summaryrefslogtreecommitdiff
path: root/pack
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-03-23 23:58:26 -0700
committerBen Sima <ben@bsima.me>2019-03-23 23:58:26 -0700
commitf50cecf2cb77cc073cb86a6016468a09d1c49fb0 (patch)
tree1ca9eda0a93a2e04e2dc44df8fc5113375a72c3d /pack
parent5d4e34f146a358041099299d2f86a546eed25dea (diff)
Add semi-working bs
Diffstat (limited to 'pack')
-rw-r--r--pack/bs.nix37
-rw-r--r--pack/default.nix1
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; };
}