haccfiles/websites/muc.hacc.earth/default.nix
stuebinm 12e4cba3e6 websites: better watch scripts
nix run .#\"<domain>\" will now actually listen for changes in the
source repository, and not first copy the entire thing into the nix
store.
2024-01-12 00:41:15 +01:00

21 lines
374 B
Nix

{ stdenvNoCC, sfz, writeScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "muc.hacc.earth-static";
src = ./.;
phases = [ "buildPhase" ];
buildPhase = ''
cd $src
mkdir -p $out
cp -r * $out
rm $out/default.nix
'';
watch = writeScriptBin "watch" ''
cd $(git rev-parse --show-toplevel)/websites/muc.hacc.earth
${sfz}/bin/sfz "$@"
'';
}