From a78c2c7a1cf8c75a83f0ec03d155b1beefff2edb Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Wed, 29 Aug 2018 23:15:58 +0200 Subject: [PATCH] shell.nix --- gpm.hs | 9 +-------- shell.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 shell.nix diff --git a/gpm.hs b/gpm.hs index 63775e3..6a50136 100644 --- a/gpm.hs +++ b/gpm.hs @@ -4,7 +4,7 @@ #! nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/16d475334409f7fa632929b2838421b4ffe34927.tar.gz" {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} -import Protolude hiding (stdout) +import Protolude hiding (stdout,(%)) import Turtle main :: IO () @@ -23,13 +23,6 @@ mkNewEmptyBranch br = do echo "cleanup the branch" debug "git rm --cached -r ." -mkNewEmptyBranch :: Text -> IO () -mkNewEmptyBranch br = do - echo "create a new branch "<> br <> " (be sure the branch " <> br <> " doesn't already exists)" - debug $ "git checkout --orphan " <> br - echo "cleanup the branch" - debug "git rm --cached -r ." - debug :: Text -> IO () debug cmd = do putText cmd diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..dbd4d4a --- /dev/null +++ b/shell.nix @@ -0,0 +1,13 @@ +let + rev = "16d475334409f7fa632929b2838421b4ffe34927"; + _nixpkgs = import { }; + pkgs = import ( fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz" ) { }; + ghc = pkgs.haskellPackages; + ghcPackages = ghc.ghcWithPackages (ps: [ ps.protolude ps.turtle ]); +in with pkgs; + +stdenv.mkDerivation { + name = "gpm"; + buildInputs = [ ghcPackages ]; + buildDepends = [ libiconv ]; +} \ No newline at end of file