diff options
-rw-r--r-- | default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..840513b --- /dev/null +++ b/default.nix @@ -0,0 +1,38 @@ +with import <nixpkgs> {}; + +stdenv.mkDerivation { + name = "noscript.xpi"; + + src = ./.; + + nativeBuildInputs = [ + bash + (perl.withPackages (p: with p; [ + LWP RegexpCommon RegexpAssemble + ListMoreUtils + ])) + which + git + nodePackages.web-ext + + # pretend we have curl, but rely on vendored PSL instead + (writeShellScriptBin "curl" "") + ]; + + patchPhase = '' + chmod +x build.sh TLD/generate.sh TLD/generate.pl html5_events/html5_events.pl + patchShebangs . + ''; + + buildPhase = '' + export HOME=$PWD + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + + ./build.sh + ''; + + installPhase = '' + cp xpi/*.xpi $out + ''; +} |