blob: 7ea92c29f5c1597afbce119f69186512c263d5a7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
{ pkgs, ... }:
pkgs.stdenv.mkDerivation {
name = "learn-piano-chords";
src = ./.;
buildInputs = with pkgs; [
elmPackages.elm
nodejs
];
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "0diya7q8ird56jsbf2p49fyvldsay6m9z251zr2rq1i4qs7idy0j";
phases = [ "unpackPhase" "buildPhase" ];
buildPhase = ''
export NIX_REDIRECTS=/etc/protocols=${pkgs.iana-etc}/etc/protocols
export LD_PRELOAD=${pkgs.libredirect}/lib/libredirect.so
export SYSTEM_CERTIFICATE_PATH=${pkgs.cacert}/etc/ssl/certs
mkdir -p $out
cp index.html $out
elm make src/Main.elm --optimize --output=$out/elm.js
npx tailwindcss build index.css -o $out/output.css
'';
}
|