1
0
mirror of https://github.com/bennofs/nix-script synced 2025-01-09 20:34:20 +01:00
nix-script/default.nix

21 lines
749 B
Nix
Raw Permalink Normal View History

2014-08-31 16:59:47 +02:00
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
name = "nix-script";
src = ./nix-script.hs;
2014-08-31 16:59:47 +02:00
phases = [ "buildPhase" "installPhase" "fixupPhase" ];
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 = {
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;
};
}