summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortilpner2020-05-17 20:44:28 +0200
committertilpner2020-05-18 12:59:18 +0200
commit63e23c676fb86f33e70d7362bf625b534ce65346 (patch)
treec7bcd2dc66ca3bd9b6b696ffb5a40977a4fb105f
parent3b623a74bfb3f1e04f8cbc77dceccb545b7d955f (diff)
downloadnoscript-master.tar.gz
noscript-master.tar.xz
noscript-master.zip
Build with NixHEADmaster
-rw-r--r--default.nix38
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
+ '';
+}