anchor.diff:    setOutputFlags = false; # Configure script only understands --includedir
   
     buildInputs = [ readline icu zlib nspr ];
  -  nativeBuildInputs = [ autoconf213 pkgconfig perl which python2 zip ];
  +  nativeBuildInputs = [ autoconf213 pkgconfig perl which buildPackages.python2 zip ];
   
     # Apparently this package fails to build correctly with modern compilers, which at least
     # on ARMv6 causes polkit testsuite to break with an assertion failure in spidermonkey.
  
positive.code:     })
    ];
  
    preConfigure = ''
      export CXXFLAGS="-fpermissive"
      export LIBXUL_DIST=$out
      export PYTHON="${python2.interpreter}"
      configureFlagsArray+=("--includedir=$dev/include")
  
      cd js/src
  
negative.code:   '';
  
    configureFlags = [
      "--with-nspr-prefix=${nspr}"
      "--with-system-zlib"
      "--with-system-icu"
      "--with-intl-api"
      "--enable-readline"
      "--enable-shared-js"
    ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-jemalloc";
  
    makeFlags = [
      "HOST_CC=${buildPackages.stdenv.cc}/bin/cc"
    ];
  
    depsBuildBuild = [ buildPackages.stdenv.cc ];
  
    enableParallelBuilding = true;
  
  