diff options
author | stuebinm | 2022-04-01 13:52:37 +0200 |
---|---|---|
committer | stuebinm | 2022-04-01 13:52:37 +0200 |
commit | dea6636bde162f0ce762cc3567b92a0e1255ce54 (patch) | |
tree | 3dd9ef6206bca4b3446661d9e2c7f2c3b8a08262 | |
parent | 0965e840d2e26378ef64392ed69e4c6109c31009 (diff) |
add fixed-output derivation
-rw-r--r-- | fixed.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/fixed.nix b/fixed.nix new file mode 100644 index 0000000..35c2ba9 --- /dev/null +++ b/fixed.nix @@ -0,0 +1,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; +} |