2019-02-10 22:08:58 +00:00
|
|
|
{ stdenv, haskellPackages, fetchFromGitHub }:
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "nix-script";
|
2019-02-10 22:08:58 +00:00
|
|
|
version = "2015-09-22";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bennofs";
|
|
|
|
repo = "nix-script";
|
|
|
|
rev = "83064dc557b642f6748d4f2372b2c88b2a82c4e7";
|
|
|
|
sha256 = "0iwclyd2zz8lv012yghfr4696kdnsq6xvc91wv00jpwk2c09xl7a";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
(haskellPackages.ghcWithPackages (hs: with hs; [ posix-escape ]))
|
|
|
|
];
|
|
|
|
|
|
|
|
phases = [ "buildPhase" "installPhase" "fixupPhase" ];
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ghc -O2 $src/nix-script.hs -o $out/bin/nix-script -odir . -hidir .
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
ln -s $out/bin/nix-script $out/bin/nix-scripti
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A shebang for running inside nix-shell.";
|
|
|
|
homepage = https://github.com/bennofs/nix-script;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bennofs rnhmjoj ];
|
|
|
|
platforms = haskellPackages.ghc.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|