anchor.diff:  
   let
   
  -common = { pname, version, sha1 }: stdenv.mkDerivation rec {
  +common = { pname, version, sha256 }: stdenv.mkDerivation rec {
     name = "${pname}-${version}";
   
     src = fetchurl {
       url =
         let ext = if lib.versionAtLeast version "41.0" then "xz" else "bz2";
         in "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${version}/source/firefox-${version}.source.tar.${ext}";
  -    inherit sha1;
  +    inherit sha256;
     };
   
     buildInputs =
  
positive.code:     ''
        mkdir ../objdir
        cd ../objdir
        configureScript=../mozilla-*/configure
      '';
  
    preInstall =
  
negative.code: 
    firefox = common {
      pname = "firefox";
      version = "42.0";
      sha256 = "1bm37p1ydxvnflh7kb52g6wfblxqc0kbgjn09sv7g0i9k5k38jlr";
    };
  
    firefox-esr = common {
      pname = "firefox-esr";
      version = "38.4.0esr";
      sha256 = "1izj0zi4dhp3957ya1nlh0mp6gyb7gvmwnlfv6q1cc3bw5y1z2h2";
    };
  
  }
  