summaryrefslogtreecommitdiff
path: root/fixed.nix
blob: 35c2ba9e00f2f904b2b7ac78376563fa91d2e521 (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
30
{ nixpkgs ? import <nixpkgs> {} }:
with nixpkgs;

stdenv.mkDerivation {
  name = "walint-fixed";

  buildInputs = [ ghc stack zlib zlib.dev git openssl cacert ];

  src = ./.;

  buildPhase = ''
    cp -r $src .
    mkdir /tmp/stack-home
    HOME=/tmp/stack-home stack build --no-nix --system-ghc
  '';

  installPhase = ''
    HOME=/tmp/stack-home stack install --local-bin-path $out --no-nix --system-ghc
    mkdir -p $out/share/walint
    cp -r static $out/share/walint
    cp config.json $out/share/walint
    cp config.toml $out/share/walint
  '';

  outputHashAlgo = "sha256";
  outputHashMode = "recursive";
  # replace this with the correct SHA256
  outputHash = "sha256-Qd7MDGslrS6zs6WWI9sjzDous0nUbrjdK2fF747KLq8=";
  dontShrink = true;
}