anchor.diff:      mkdir -p $out/lib $installedTests/libexec/installed-tests/gjs
       ln -s $PWD/libgjs.so.0 $out/lib/libgjs.so.0
       ln -s $PWD/installed-tests/js/libgimarshallingtests.so $installedTests/libexec/installed-tests/gjs/libgimarshallingtests.so
  +    ln -s $PWD/installed-tests/js/libgjstesttools/libgjstesttools.so $installedTests/libexec/installed-tests/gjs/libgjstesttools.so
       ln -s $PWD/installed-tests/js/libregress.so $installedTests/libexec/installed-tests/gjs/libregress.so
       ln -s $PWD/installed-tests/js/libwarnlib.so $installedTests/libexec/installed-tests/gjs/libwarnlib.so
     '';
  
positive.code:   ];
  in stdenv.mkDerivation rec {
    pname = "gjs";
    version = "1.68.0";
  
    src = fetchurl {
      url = "mirror://gnome/sources/gjs/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
      sha256 = "1vqsmzy2wmyhmq37y2c6jl0wq4xnicf0z7k6jaxn3aw11sh783ph";
    };
  
    patches = [
      # Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3961.
      (fetchpatch {
        url = "https://gitlab.gnome.org/GNOME/gjs/-/commit/58337929c338e7b5c0a35196d783d3b2be542900.patch";
        sha256 = "QgmU+d838fU5LiS4lhTF+179U1lY1L5tJbYtX/oc68k=";
      })
  
      # Hard-code various paths
      ./fix-paths.patch
  
      # Allow installing installed tests to a separate output.
      ./installed-tests-path.patch
    ];
  
    outputs = [ "out" "dev" "installedTests" ];
  
    nativeBuildInputs = [
      meson
  
negative.code: { fetchurl
  , lib
  , stdenv
  , meson
  , ninja
  , pkg-config
  