summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/firefoxPlugins/noscript.nix
blob: 67a00a1b261abfd0ca6c274d8f872e7ebe670819 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ fetchgit, stdenv, bash, zip }:

stdenv.mkDerivation rec {
  name = "noscript";
  id = "{73a6fe31-595d-460b-a920-fcc0f8843232}";

  src = fetchgit {
    url = "https://github.com/avian2/noscript";
    rev = "c900a079793868bb080ab1e23522d29dc121b4c6";
    sha256 = "1y06gh5a622yrsx0h7v92qnvdi97i54ln09zc1lvk8x430z5bdly";
  };

  buildInputs = [ zip ];

  patchPhase = ''
    substituteInPlace "version.sh" \
    --replace "/bin/bash" "${bash}/bin/bash"
  '';

  buildPhase = ''
    ./makexpi.sh
  '';

  installPhase = ''
    mkdir -p $out/
    cp *.xpi $out/${id}.xpi
  '';
}