shell.nix
This commit is contained in:
parent
4076802e8f
commit
a78c2c7a1c
2 changed files with 14 additions and 8 deletions
9
gpm.hs
9
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
|
||||
|
|
13
shell.nix
Normal file
13
shell.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
let
|
||||
rev = "16d475334409f7fa632929b2838421b4ffe34927";
|
||||
_nixpkgs = import <nixpkgs> { };
|
||||
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 ];
|
||||
}
|
Loading…
Reference in a new issue