diff options
Diffstat (limited to 'pack')
-rw-r--r-- | pack/bs.nix | 37 | ||||
-rw-r--r-- | pack/default.nix | 1 |
2 files changed, 38 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} + ''; +} diff --git a/pack/default.nix b/pack/default.nix index ee92fde..3c48884 100644 --- a/pack/default.nix +++ b/pack/default.nix @@ -4,4 +4,5 @@ { fathom = import ./fathom.nix { inherit nixpkgs; }; ibb = import ./ibb.nix { inherit nixpkgs; }; + bs = import ./bs.nix { inherit nixpkgs; }; } |