diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index 6e8b06f..c01f88c 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -155,6 +155,21 @@ pkgs: oldpkgs: { mv "$textPath" $out ''; + writeHaskell = name: extra-deps: text: + pkgs.stdenv.mkDerivation { + inherit name; + src = pkgs.writeHaskellPackage name { + executables.${name} = { + inherit extra-deps; + text = text; + }; + }; + phases = [ "buildPhase" ]; + buildPhase = '' + ln -fns $src/bin/${name} $out + ''; + }; + writeHaskellPackage = k: let |