anchor.diff:          python27
           python27Packages.lxml
           rsync
  +        unzip
           zip
         ];
   
  -      buildCommand = ''
  +      unpackPhase = ''
           cp -dR --no-preserve=mode "$src" src
           cd src
  -
  -        sed -i makexpi.sh -e '104d' # cp -a translations/* fails because the dir is empty ...
  +      '';
  +
  +      # Beware: the build expects translations/ to be non-empty (which it
  +      # will be with submodules initialized).
  +      buildPhase = ''
           $shell ./makexpi.sh ${version} --no-recurse
  -        install -m 444 -Dt $out pkg"/"*.xpi
  +      '';
  +
  +      installPhase = ''
  +        mkdir $out
  +        unzip -d "$out/$extid" "pkg/https-everywhere-$version-eff.xpi"
         '';
   
         meta = {
  
positive.code:     EOF
  
      # Preload extensions
      install -m 444 -D \
        ${firefoxExtensions.tor-launcher}/tor-launcher-*.xpi \
        browser/extensions/tor-launcher@torproject.org.xpi
      install -m 444 -D \
        ${firefoxExtensions.torbutton}/torbutton-*.xpi \
        browser/extensions/torbutton@torproject.org.xpi
      install -m 444 -D \
        ${firefoxExtensions.https-everywhere}/https-everywhere-*-eff.xpi \
        browser/extensions/https-everywhere-eff@eff.org.xpi
      install -m 444 -D \
        ${firefoxExtensions.noscript} \
        browser/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi
  
      # Copy bundle data
      cat \
  
negative.code:       };
      };
  
      noscript = stdenv.mkDerivation rec {
        name = "noscript-${version}";
        version = "5.0.10";
  
        extid = "{73a6fe31-595d-460b-a920-fcc0f8843232}";
  
        src = fetchurl {
          url = "https://secure.informaction.com/download/releases/noscript-${version}.xpi";
          sha256 = "18k5karbaj5mhd9cyjbqgik6044bw88rjalkh6anjanxbn503j6g";
        };
  
        nativeBuildInputs = [ unzip ];
  
        unpackPhase = ":";
  
        installPhase = ''
          mkdir $out
          unzip -d "$out/$extid" "$src"
        '';
      };
  
      torbutton = stdenv.mkDerivation rec {
        name = "torbutton-${version}";
        version = "1.9.8.1";
  
        extid = "torbutton@torproject.org";
  
        src = fetchgit {
          url = "https://git.torproject.org/torbutton.git";
  