From 63e23c676fb86f33e70d7362bf625b534ce65346 Mon Sep 17 00:00:00 2001 From: tilpner Date: Sun, 17 May 2020 20:44:28 +0200 Subject: Build with Nix --- default.nix | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 default.nix 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 {}; + +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 + ''; +} -- cgit v1.2.3