2014-08-31 16:59:47 +02:00
|
|
|
{ pkgs ? import <nixpkgs> {} }:
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
2014-08-31 18:04:27 +02:00
|
|
|
name = "nix-script";
|
|
|
|
src = ./nix-script.hs;
|
2014-08-31 16:59:47 +02:00
|
|
|
phases = [ "buildPhase" "installPhase" "fixupPhase" ];
|
2014-08-31 18:04:27 +02:00
|
|
|
buildPhase = ''mkdir -p $out/bin; ghc -O2 $src -o $out/bin/nix-script -odir $TMP'';
|
2019-09-19 17:32:40 +02:00
|
|
|
installPhase = ''
|
|
|
|
ln -s $out/bin/nix-script $out/bin/nix-scripti
|
|
|
|
ln -s $out/bin/nix-script $out/bin/nix-scripts
|
|
|
|
'';
|
2015-09-11 06:19:17 +02:00
|
|
|
buildInputs = [ (pkgs.haskellPackages.ghcWithPackages (hs: with hs; [posix-escape])) ];
|
2014-08-31 16:59:47 +02:00
|
|
|
meta = {
|
2014-08-31 18:04:27 +02:00
|
|
|
homepage = https://github.com/bennofs/nix-script;
|
2014-08-31 16:59:47 +02:00
|
|
|
description = "A shebang for running inside nix-shell.";
|
|
|
|
license = pkgs.lib.licenses.bsd3;
|
|
|
|
maintainers = [ pkgs.lib.maintainers.bennofs ];
|
|
|
|
platforms = pkgs.haskellPackages.ghc.meta.platforms;
|
|
|
|
};
|
2014-08-31 18:04:27 +02:00
|
|
|
}
|