diff options
Diffstat (limited to 'pack/bs.nix')
-rw-r--r-- | pack/bs.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pack/bs.nix b/pack/bs.nix new file mode 100644 index 0000000..3d6b7ee --- /dev/null +++ b/pack/bs.nix @@ -0,0 +1,37 @@ +{ nixpkgs }: +with nixpkgs; +let + ghc = pkgs.haskell.packages.ghc844.ghcWithPackages (hp: with hp; [ + containers + directory + haskeline + HTTP + mtl + optparse-applicative + parsec + protolude + text + transformers + wl-pprint-text + ]); + entrypoint = "Bs"; +in +stdenv.mkDerivation rec { + name = "bs"; + version = "0"; + src = ../.; + nativeBuildInputs = [ + ghc + ]; + strictDeps = true; + buildPhase = '' + ${ghc}/bin/ghc \ + -iapex -ilore \ + -main-is ${entrypoint} --make apex/${entrypoint}.hs \ + -o bild/${name} + ''; + installPhase = '' + mkdir -p $out/bin + cp bild/${name} $out/bin/${name} + ''; +} |