summaryrefslogtreecommitdiff
path: root/pack/ibb.nix
blob: 4224974dfd18e920afc344f4d220921259dca14a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ nixpkgs }:
with nixpkgs;
let
  ghc = pkgs.haskell.packages.ghc844.ghcWithPackages (hp: with hp; [
    blaze-html
    blaze-markup
    bytestring
    random
    scotty
    shakespeare
    text
  ]);
in
stdenv.mkDerivation rec {
  name = "ibb";
  version = "0";
  src = ../.;
  nativeBuildInputs = [
    ghc
  ];
  strictDeps = true;
  buildPhase = ''
    ${ghc}/bin/ghc -iapex -ilore -main-is Ibb --make apex/Ibb.hs -o bild/${name}
  '';
  installPhase = ''
    mkdir -p $out/bin
    cp bild/${name} $out/bin/${name}
  '';
}