1
0
mirror of https://github.com/bennofs/nix-script synced 2025-01-10 04:44:21 +01:00
nix-script/default.nix

17 lines
655 B
Nix
Raw Normal View History

2014-08-31 16:59:47 +02:00
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
name = "nix-bang";
src = ./nix-bang.hs;
phases = [ "buildPhase" "installPhase" "fixupPhase" ];
buildPhase = ''mkdir $out; ghc -O2 $src -o $out/nix-bang -odir $TMP'';
installPhase = ''ln -s $out/nix-bang $out/nix-bangi'';
buildInputs = [ (pkgs.haskellPackages.ghcWithPackages (hs: with hs; [lens text])) ];
meta = {
homepage = https://github.com/bennofs/nix-bang;
description = "A shebang for running inside nix-shell.";
license = pkgs.lib.licenses.bsd3;
maintainers = [ pkgs.lib.maintainers.bennofs ];
platforms = pkgs.haskellPackages.ghc.meta.platforms;
};
}