From f3d86dbf9efc06cc327d7e88d3e57ae6bc841f04 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 16 Jan 2022 02:16:02 +0000 Subject: [PATCH] 3p/nixpkgs: clean up patches --- .../nixpkgs/patches/patch-cherrypy.patch | 11 -- third_party/nixpkgs/patches/pr153718.patch | 37 ----- third_party/nixpkgs/patches/pr153998.patch | 47 ------ third_party/nixpkgs/patches/pr154021.patch | 154 ------------------ third_party/nixpkgs/patches/series | 4 - 5 files changed, 253 deletions(-) delete mode 100644 third_party/nixpkgs/patches/patch-cherrypy.patch delete mode 100644 third_party/nixpkgs/patches/pr153718.patch delete mode 100644 third_party/nixpkgs/patches/pr153998.patch delete mode 100644 third_party/nixpkgs/patches/pr154021.patch diff --git a/third_party/nixpkgs/patches/patch-cherrypy.patch b/third_party/nixpkgs/patches/patch-cherrypy.patch deleted file mode 100644 index 03d26f1417..0000000000 --- a/third_party/nixpkgs/patches/patch-cherrypy.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/pkgs/development/python-modules/cherrypy/default.nix b/pkgs/development/python-modules/cherrypy/default.nix ---- a/pkgs/development/python-modules/cherrypy/default.nix -+++ b/pkgs/development/python-modules/cherrypy/default.nix -@@ -38,6 +38,7 @@ buildPythonPackage rec { - checkPhase = '' - substituteInPlace pytest.ini --replace "--doctest-modules" "" - pytest \ -+ -W ignore \ - -k 'not KeyboardInterrupt and not daemonize and not Autoreload' \ - --deselect=cherrypy/test/test_static.py::StaticTest::test_null_bytes \ - --deselect=cherrypy/test/test_tools.py::ToolTests::testCombinedTools \ diff --git a/third_party/nixpkgs/patches/pr153718.patch b/third_party/nixpkgs/patches/pr153718.patch deleted file mode 100644 index 905016c95c..0000000000 --- a/third_party/nixpkgs/patches/pr153718.patch +++ /dev/null @@ -1,37 +0,0 @@ -From a8ef60565ac9dc3fe2c68dc6a7fb29765e8bc2cf Mon Sep 17 00:00:00 2001 -From: pacien -Date: Thu, 6 Jan 2022 22:16:22 +0100 -Subject: [PATCH] mercurial: add CA cert to test env for libgit - -This seems to be required for the tests to pass on Hydra. - -Otherwise, the test suit fails with errors like: - -``` -feature pygit2 failed: OpenSSL error: failed to load certificates: -error:00000000:lib(0):func(0):reason(0) -``` ---- - pkgs/applications/version-management/mercurial/default.nix | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix -index a85844fff2163..c3c04da3a69a6 100644 ---- a/pkgs/applications/version-management/mercurial/default.nix -+++ b/pkgs/applications/version-management/mercurial/default.nix -@@ -11,6 +11,7 @@ - , which - , sqlite - , git -+, cacert - , gnupg - }: - -@@ -70,6 +71,7 @@ let - git - gnupg - ]; -+ SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; # needed for git - checkPhase = '' - cat << EOF > tests/blacklists/nix - # tests enforcing "/usr/bin/env" shebangs, which are patched for nix diff --git a/third_party/nixpkgs/patches/pr153998.patch b/third_party/nixpkgs/patches/pr153998.patch deleted file mode 100644 index a7c7dfd621..0000000000 --- a/third_party/nixpkgs/patches/pr153998.patch +++ /dev/null @@ -1,47 +0,0 @@ -From a7f3bd4bf7ad413bb4fcfe9fdb1866cc9e1fb704 Mon Sep 17 00:00:00 2001 -From: pacien -Date: Fri, 7 Jan 2022 16:42:56 +0100 -Subject: [PATCH 1/2] mercurial: add pacien as maintainer - ---- - pkgs/applications/version-management/mercurial/default.nix | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix -index c3c04da3a69a6..b59bf1ff17e19 100644 ---- a/pkgs/applications/version-management/mercurial/default.nix -+++ b/pkgs/applications/version-management/mercurial/default.nix -@@ -118,7 +118,7 @@ let - homepage = "https://www.mercurial-scm.org"; - downloadPage = "https://www.mercurial-scm.org/release/"; - license = licenses.gpl2Plus; -- maintainers = with maintainers; [ eelco lukegb ]; -+ maintainers = with maintainers; [ eelco lukegb pacien ]; - updateWalker = true; - platforms = platforms.unix; - }; - -From 416883461db4d3b8d451155dd6b6886da876f16e Mon Sep 17 00:00:00 2001 -From: pacien -Date: Sat, 8 Jan 2022 13:48:04 +0100 -Subject: [PATCH 2/2] mercurialFull: skip an unstable experimental test - ---- - pkgs/applications/version-management/mercurial/default.nix | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix -index b59bf1ff17e19..cc00f68461be9 100644 ---- a/pkgs/applications/version-management/mercurial/default.nix -+++ b/pkgs/applications/version-management/mercurial/default.nix -@@ -77,6 +77,10 @@ let - # tests enforcing "/usr/bin/env" shebangs, which are patched for nix - test-run-tests.t - test-check-shbang.t -+ -+ # unstable experimental/unsupported features -+ # https://bz.mercurial-scm.org/show_bug.cgi?id=6633#c1 -+ test-git-interop.t - EOF - - # extended timeout necessary for tests to pass on the busy CI workers diff --git a/third_party/nixpkgs/patches/pr154021.patch b/third_party/nixpkgs/patches/pr154021.patch deleted file mode 100644 index fbba63a763..0000000000 --- a/third_party/nixpkgs/patches/pr154021.patch +++ /dev/null @@ -1,154 +0,0 @@ -From d69abfe510c77fa4cd01346e155c8a6e0e6de920 Mon Sep 17 00:00:00 2001 -From: Luke Granger-Brown -Date: Sat, 8 Jan 2022 15:59:29 +0000 -Subject: [PATCH] mercurial: move tests to passthru.tests - -They're very expensive to run, especially if you don't have that many -cores, and can sometimes be a bit flaky (it looks like their CI doesn't -run things under the same constraints as we tend to). - -Move them to a separate derivation, and make them test the actual -installed output rather than the local copy. ---- - .../version-management/mercurial/default.nix | 100 ++++++++++++------ - 1 file changed, 65 insertions(+), 35 deletions(-) - -diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix -index cc00f68461be9..85993487fb37e 100644 ---- a/pkgs/applications/version-management/mercurial/default.nix -+++ b/pkgs/applications/version-management/mercurial/default.nix -@@ -7,6 +7,7 @@ - , highlightSupport ? fullBuild - , ApplicationServices - # test dependencies -+, runCommand - , unzip - , which - , sqlite -@@ -39,15 +40,6 @@ let - } else null; - cargoRoot = if rustSupport then "rust" else null; - -- postPatch = '' -- patchShebangs . -- -- for f in **/*.{py,c,t}; do -- # not only used in shebangs -- substituteAllInPlace "$f" '/bin/sh' '${stdenv.shell}' -- done -- ''; -- - propagatedBuildInputs = lib.optional re2Support fb-re2 - ++ lib.optional gitSupport pygit2 - ++ lib.optional highlightSupport pygments; -@@ -63,31 +55,6 @@ let - makeFlags = [ "PREFIX=$(out)" ] - ++ lib.optional rustSupport "PURE=--rust"; - -- doCheck = stdenv.isLinux; # tests seem unstable on Darwin -- checkInputs = [ -- unzip -- which -- sqlite -- git -- gnupg -- ]; -- SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; # needed for git -- checkPhase = '' -- cat << EOF > tests/blacklists/nix -- # tests enforcing "/usr/bin/env" shebangs, which are patched for nix -- test-run-tests.t -- test-check-shbang.t -- -- # unstable experimental/unsupported features -- # https://bz.mercurial-scm.org/show_bug.cgi?id=6633#c1 -- test-git-interop.t -- EOF -- -- # extended timeout necessary for tests to pass on the busy CI workers -- export HGTESTFLAGS="--blacklist blacklists/nix --timeout 600" -- make check -- ''; -- - postInstall = (lib.optionalString guiSupport '' - mkdir -p $out/etc/mercurial - cp contrib/hgk $out/bin -@@ -115,7 +82,9 @@ let - --zsh contrib/zsh_completion - ''; - -- passthru.tests = {}; -+ passthru.tests = { -+ mercurial-tests = makeTests { flags = "--with-hg=$MERCURIAL_BASE/bin/hg"; }; -+ }; - - meta = with lib; { - description = "A fast, lightweight SCM system for very large distributed projects"; -@@ -127,6 +96,67 @@ let - platforms = platforms.unix; - }; - }; -+ -+ makeTests = { mercurial ? self, nameSuffix ? "", flags ? "" }: runCommand "${mercurial.pname}${nameSuffix}-tests" { -+ inherit (mercurial) src; -+ -+ SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; # needed for git -+ MERCURIAL_BASE = mercurial; -+ nativeBuildInputs = [ -+ python -+ unzip -+ which -+ sqlite -+ git -+ gnupg -+ ]; -+ -+ postPatch = '' -+ patchShebangs . -+ -+ for f in **/*.{py,c,t}; do -+ # not only used in shebangs -+ substituteAllInPlace "$f" '/bin/sh' '${stdenv.shell}' -+ done -+ -+ for f in **/*.t; do -+ substituteInPlace 2>/dev/null "$f" \ -+ --replace '*/hg:' '*/*hg*:' \${/* paths emitted by our wrapped hg look like ..hg-wrapped-wrapped */""} -+ --replace '"$PYTHON" "$BINDIR"/hg' '"$BINDIR"/hg' ${/* 'hg' is a wrapper; don't run using python directly */""} -+ done -+ ''; -+ -+ # This runs Mercurial _a lot_ of times. -+ requiredSystemFeatures = [ "big-parallel" ]; -+ -+ # Don't run tests if not-Linux or if cross-compiling. -+ meta.broken = !stdenv.hostPlatform.isLinux || stdenv.buildPlatform != stdenv.hostPlatform; -+ } '' -+ addToSearchPathWithCustomDelimiter : PYTHONPATH "${mercurial}/${python.sitePackages}" -+ -+ unpackPhase -+ cd "$sourceRoot" -+ patchPhase -+ -+ cat << EOF > tests/blacklists/nix -+ # tests enforcing "/usr/bin/env" shebangs, which are patched for nix -+ test-run-tests.t -+ test-check-shbang.t -+ -+ # unstable experimental/unsupported features -+ # https://bz.mercurial-scm.org/show_bug.cgi?id=6633#c1 -+ test-git-interop.t -+ -+ # doesn't like the extra setlocale warnings emitted by our bash wrappers -+ test-locale.t -+ EOF -+ -+ export HGTEST_REAL_HG="${mercurial}/bin/hg" -+ # extended timeout necessary for tests to pass on the busy CI workers -+ export HGTESTFLAGS="--blacklist blacklists/nix --timeout 1800 -j$NIX_BUILD_CORES ${flags}" -+ make check -+ touch $out -+ ''; - in - self.overridePythonAttrs (origAttrs: { - passthru = origAttrs.passthru // rec { diff --git a/third_party/nixpkgs/patches/series b/third_party/nixpkgs/patches/series index 466a94cf9f..f2cc68009d 100644 --- a/third_party/nixpkgs/patches/series +++ b/third_party/nixpkgs/patches/series @@ -1,7 +1,3 @@ -patch-cherrypy.patch pomerium-fix.patch pomerium-fix2.patch -pr153718.patch -pr153998.patch -pr154021.patch nvidia-sideband-socket.patch