From 435959ce6fd6588f7f7ecd5c2bf48773ae79aa96 Mon Sep 17 00:00:00 2001 From: kilianar Date: Wed, 29 Jun 2022 00:27:22 +0200 Subject: [PATCH 01/18] jpegoptim: 1.4.6 -> 1.4.7 Release 1.4.7 was so far only published on GitHub and not on the authors website. Therefore we switch to fetchFromGitHub for obtaining the source. The license changed from gpl2+ to gpl3+ with commit https://github.com/tjko/jpegoptim/commit/2c0f5f2c2cc3d061249bd6d3aff1c210133cdf69 --- pkgs/applications/graphics/jpegoptim/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/graphics/jpegoptim/default.nix b/pkgs/applications/graphics/jpegoptim/default.nix index 6095d81c528d..95ea902b5e69 100644 --- a/pkgs/applications/graphics/jpegoptim/default.nix +++ b/pkgs/applications/graphics/jpegoptim/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchurl, libjpeg }: +{ lib, stdenv, fetchFromGitHub, libjpeg }: stdenv.mkDerivation rec { - version = "1.4.6"; + version = "1.4.7"; pname = "jpegoptim"; - src = fetchurl { - url = "https://www.kokkonen.net/tjko/src/${pname}-${version}.tar.gz"; - sha256 = "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8"; + src = fetchFromGitHub { + owner = "tjko"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-qae3OEG4CC/OGkmNdHrXFUv9CkoaB1ZJnFHX3RFoxhk="; }; # There are no checks, it seems. @@ -17,7 +19,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Optimize JPEG files"; homepage = "https://www.kokkonen.net/tjko/projects.html"; - license = licenses.gpl2; + license = licenses.gpl3Plus; maintainers = [ maintainers.aristid ]; platforms = platforms.all; }; From b2224764eeaab6792054e98780cf05be6baec601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlys=20Bras=20de=20fer?= Date: Thu, 7 Jul 2022 18:42:44 +0200 Subject: [PATCH 02/18] nixos-generate-config: substitute nix-instantiate --- nixos/modules/installer/tools/nixos-generate-config.pl | 2 +- nixos/modules/installer/tools/tools.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 0e6320e4695c..212b2b3cd23a 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -85,7 +85,7 @@ sub debug { # nixpkgs.system -my ($status, @systemLines) = runCommand("nix-instantiate --impure --eval --expr builtins.currentSystem"); +my ($status, @systemLines) = runCommand("@nixInstantiate@ --impure --eval --expr builtins.currentSystem"); if ($status != 0 || join("", @systemLines) =~ /error/) { die "Failed to retrieve current system type from nix.\n"; } diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index 04be272742ce..8719a509d64c 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -34,6 +34,7 @@ let name = "nixos-generate-config"; src = ./nixos-generate-config.pl; perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl"; + nixInstantiate = "${pkgs.nix}/bin/nix-instantiate"; detectvirt = "${config.systemd.package}/bin/systemd-detect-virt"; btrfs = "${pkgs.btrfs-progs}/bin/btrfs"; inherit (config.system.nixos-generate-config) configuration desktopConfiguration; From 512d30b8a07d335203df533912b2b12629c6f50e Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Wed, 1 Dec 2021 00:38:59 -0500 Subject: [PATCH 03/18] python3Packages.debugpy: remove unnecessary arch specifiers --- pkgs/development/python-modules/debugpy/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index 04b78d6c8023..eab76e90c29d 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -59,12 +59,12 @@ buildPythonPackage rec { cd src/debugpy/_vendored/pydevd/pydevd_attach_to_process rm *.so *.dylib *.dll *.exe *.pdb ${stdenv.cc}/bin/c++ linux_and_mac/attach.cpp -Ilinux_and_mac -fPIC -nostartfiles ${{ - "x86_64-linux" = "-shared -m64 -o attach_linux_amd64.so"; - "i686-linux" = "-shared -m32 -o attach_linux_x86.so"; + "x86_64-linux" = "-shared -o attach_linux_amd64.so"; + "i686-linux" = "-shared -o attach_linux_x86.so"; "aarch64-linux" = "-shared -o attach_linux_arm64.so"; - "x86_64-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -arch x86_64 -o attach_x86_64.dylib"; - "i686-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -arch i386 -o attach_x86.dylib"; - "aarch64-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -arch arm64 -o attach_arm64.dylib"; + "x86_64-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -o attach_x86_64.dylib"; + "i686-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -o attach_x86.dylib"; + "aarch64-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -o attach_arm64.dylib"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")} )''; From e637c304e6936ca6f9f8ed4d0ef73e46ab3e7eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 22 Jun 2022 20:05:02 +0200 Subject: [PATCH 04/18] mediawiki: 1.37.2 -> 1.38.1, adopt --- pkgs/servers/web-apps/mediawiki/default.nix | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/servers/web-apps/mediawiki/default.nix b/pkgs/servers/web-apps/mediawiki/default.nix index 2339c170f166..b34e246fbe20 100644 --- a/pkgs/servers/web-apps/mediawiki/default.nix +++ b/pkgs/servers/web-apps/mediawiki/default.nix @@ -2,24 +2,24 @@ stdenv.mkDerivation rec { pname = "mediawiki"; - version = "1.37.2"; + version = "1.38.1"; - src = with lib; fetchurl { - url = "https://releases.wikimedia.org/mediawiki/${versions.majorMinor version}/${pname}-${version}.tar.gz"; - sha256 = "sha256-WD8HS8r87BfaUBQqVvW7/eXDNml31h2RLX5W/Mo72hs="; + src = fetchurl { + url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz"; + sha256 = "sha256-EXNlUloN7xsgnKUIV9ZXNrYlRbh3p1NIpXqF0SZDezE="; }; - prePatch = '' + postPatch = '' sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php ''; - phpConfig = writeText "LocalSettings.php" '' - - ''; - - installPhase = '' + installPhase = let + phpConfig = writeText "LocalSettings.php" '' + + ''; + in '' runHook preInstall mkdir -p $out/share/mediawiki @@ -34,6 +34,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; homepage = "https://www.mediawiki.org/"; platforms = platforms.all; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ ] ++ teams.c3d2.members; }; } From 8d750db596eb3e9601ac5734febe2b7d19300c3a Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Wed, 1 Dec 2021 01:19:12 -0500 Subject: [PATCH 05/18] =?UTF-8?q?python3Packages.debugpy:=201.6.0=20?= =?UTF-8?q?=E2=86=92=201.6.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../python-modules/debugpy/default.nix | 31 ++++++++--------- .../debugpy/fix-test-pythonpath.patch | 4 +-- .../python-modules/debugpy/hardcode-gdb.patch | 2 +- .../debugpy/hardcode-version.patch | 34 +++++++++---------- 4 files changed, 34 insertions(+), 37 deletions(-) diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index eab76e90c29d..4b752ba3c4f6 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -1,8 +1,10 @@ { lib , stdenv , buildPythonPackage +, pythonOlder , fetchFromGitHub , substituteAll +, fetchpatch , gdb , django , flask @@ -12,20 +14,20 @@ , pytest-xdist , pytestCheckHook , requests -, isPy3k -, pythonAtLeast }: buildPythonPackage rec { pname = "debugpy"; - version = "1.6.0"; + version = "1.6.2"; format = "setuptools"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "Microsoft"; repo = pname; rev = "v${version}"; - sha256 = "sha256-WfZz2SimOTpG8CWNUic8NSp4Qd2JTXk+7JSUEPhuQ6Q="; + sha256 = "sha256-jcokiAZ2WwyIvsXNIUzvMIrRttR76RwDSE7gk0xHExc="; }; patches = [ @@ -50,6 +52,13 @@ buildPythonPackage rec { # To avoid this issue, debugpy should be installed using python.withPackages: # python.withPackages (ps: with ps; [ debugpy ]) ./fix-test-pythonpath.patch + + # Fix compiling attach library from source + # https://github.com/microsoft/debugpy/pull/978 + (fetchpatch { + url = "https://github.com/microsoft/debugpy/commit/08b3b13cba9035f4ab3308153aef26e3cc9275f9.patch"; + sha256 = "sha256-8E+Y40mYQou9T1ozWslEK2XNQtuy5+MBvPvDLt4eQak="; + }) ]; # Remove pre-compiled "attach" libraries and recompile for host platform @@ -68,8 +77,6 @@ buildPythonPackage rec { }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")} )''; - doCheck = isPy3k; - checkInputs = [ django flask @@ -86,16 +93,8 @@ buildPythonPackage rec { "--timeout=0" ]; - disabledTests = lib.optionals (pythonAtLeast "3.10") [ - "test_flask_breakpoint_multiproc" - "test_subprocess[program-launch-None]" - "test_systemexit[0-zero-uncaught-raised-launch(integratedTerminal)-module]" - "test_systemexit[0-zero-uncaught--attach_pid-program]" - "test_success_exitcodes[-break_on_system_exit_zero-0-attach_listen(cli)-module]" - "test_success_exitcodes[--0-attach_connect(api)-program]" - "test_run[code-attach_connect(api)]" - "test_subprocess[program-launch-None]" - ]; + # Fixes hanging tests on Darwin + __darwinAllowLocalNetworking = true; pythonImportsCheck = [ "debugpy" diff --git a/pkgs/development/python-modules/debugpy/fix-test-pythonpath.patch b/pkgs/development/python-modules/debugpy/fix-test-pythonpath.patch index 537531cd9747..0f51106988d9 100644 --- a/pkgs/development/python-modules/debugpy/fix-test-pythonpath.patch +++ b/pkgs/development/python-modules/debugpy/fix-test-pythonpath.patch @@ -1,8 +1,8 @@ diff --git a/tests/debug/session.py b/tests/debug/session.py -index 101492fc..4ee7cfbe 100644 +index af242877..30b21a1e 100644 --- a/tests/debug/session.py +++ b/tests/debug/session.py -@@ -630,6 +630,7 @@ class Session(object): +@@ -622,6 +622,7 @@ class Session(object): if "PYTHONPATH" in self.config.env: # If specified, launcher will use it in lieu of PYTHONPATH it inherited # from the adapter when spawning debuggee, so we need to adjust again. diff --git a/pkgs/development/python-modules/debugpy/hardcode-gdb.patch b/pkgs/development/python-modules/debugpy/hardcode-gdb.patch index 09851260233f..ad40a504c9dc 100644 --- a/pkgs/development/python-modules/debugpy/hardcode-gdb.patch +++ b/pkgs/development/python-modules/debugpy/hardcode-gdb.patch @@ -1,5 +1,5 @@ diff --git a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py -index 3c0e1b94..e995a20f 100644 +index 462feae9..eb2aa945 100644 --- a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py +++ b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py @@ -399,7 +399,7 @@ def run_python_code_linux(pid, python_code, connect_debugger_tracing=False, show diff --git a/pkgs/development/python-modules/debugpy/hardcode-version.patch b/pkgs/development/python-modules/debugpy/hardcode-version.patch index 7d3fd5abfc2d..440513e26c1c 100644 --- a/pkgs/development/python-modules/debugpy/hardcode-version.patch +++ b/pkgs/development/python-modules/debugpy/hardcode-version.patch @@ -1,5 +1,5 @@ diff --git a/setup.py b/setup.py -index e7487100..10d36520 100644 +index 5fc40070..775a08ec 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,6 @@ import sys @@ -26,24 +26,22 @@ index e7487100..10d36520 100644 description="An implementation of the Debug Adapter Protocol for Python", # noqa long_description=long_description, long_description_content_type="text/markdown", -diff --git a/src/debugpy/__init__.py b/src/debugpy/__init__.py -index baa5a7c5..53553272 100644 ---- a/src/debugpy/__init__.py -+++ b/src/debugpy/__init__.py -@@ -27,7 +27,6 @@ __all__ = [ - import codecs - import os +diff --git a/src/debugpy/public_api.py b/src/debugpy/public_api.py +index 3c800898..27743245 100644 +--- a/src/debugpy/public_api.py ++++ b/src/debugpy/public_api.py +@@ -7,8 +7,6 @@ from __future__ import annotations + import functools + import typing -from debugpy import _version - from debugpy.common import compat +- + + # Expose debugpy.server API from subpackage, but do not actually import it unless + # and until a member is invoked - we don't want the server package loaded in the +@@ -182,4 +180,4 @@ def trace_this_thread(__should_trace: bool): + """ -@@ -204,7 +203,7 @@ def trace_this_thread(should_trace): - return api.trace_this_thread(should_trace) - - --__version__ = _version.get_versions()["version"] -+__version__ = "@version@" - - # Force absolute path on Python 2. - __file__ = os.path.abspath(__file__) +-__version__: str = _version.get_versions()["version"] ++__version__: str = "@version@" From 575da89648efd9de9fde5ad02f8a545c223d7e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 17 Jul 2022 20:32:29 +0200 Subject: [PATCH 06/18] corefonts: rename fonts to standard names --- pkgs/data/fonts/corefonts/default.nix | 72 ++++++++++++++++++--------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/pkgs/data/fonts/corefonts/default.nix b/pkgs/data/fonts/corefonts/default.nix index 4b4772699cd1..db6ac715829f 100644 --- a/pkgs/data/fonts/corefonts/default.nix +++ b/pkgs/data/fonts/corefonts/default.nix @@ -1,29 +1,26 @@ { lib, stdenv, fetchurl, cabextract }: let - fonts = [ - {name = "andale"; sha256 = "0w7927hlwayqf3vvanf8f3qp2g1i404jzqvhp1z3mp0sjm1gw905";} - {name = "arial"; sha256 = "1xkqyivbyb3z9dcalzidf8m4npzfpls2g0kldyn8g73f2i6plac5";} - {name = "arialb"; sha256 = "1a60zqrg63kjnykh5hz7dbpzvx7lyivn3vbrp7jyv9d1nvzz09d4";} - {name = "comic"; sha256 = "0ki0rljjc1pxkbsxg515fwx15yc95bdyaksa3pjd89nyxzzg6vcw";} - {name = "courie"; sha256 = "111k3waxki9yyxpjwl2qrdkswvsd2dmvhbjmmrwyipam2s31sldv";} - {name = "georgi"; sha256 = "0083jcpd837j2c06kp1q8glfjn9k7z6vg3wi137savk0lv6psb1c";} - {name = "impact"; sha256 = "1yyc5z7zmm3s418hmrkmc8znc55afsrz5dgxblpn9n81fhxyyqb0";} - {name = "times"; sha256 = "1aq7z3l46vwgqljvq9zfgkii6aivy00z1529qbjkspggqrg5jmnv";} - {name = "trebuc"; sha256 = "1jfsgz80pvyqvpfpaiz5pd8zwlcn67rg2jgynjwf22sip2dhssas";} - {name = "webdin"; sha256 = "0nnp2znmnmx87ijq9zma0vl0hd46npx38p0cc6lgp00hpid5nnb4";} - {name = "verdan"; sha256 = "15mdbbfqbyp25a6ynik3rck3m3mg44plwrj79rwncc9nbqjn3jy1";} - {name = "wd97vwr"; sha256 = "1lmkh3zb6xv47k0z2mcwk3vk8jff9m845c9igxm14bbvs6k2c4gn";} + { name = "andale"; sha256 = "0w7927hlwayqf3vvanf8f3qp2g1i404jzqvhp1z3mp0sjm1gw905"; } + { name = "arial"; sha256 = "1xkqyivbyb3z9dcalzidf8m4npzfpls2g0kldyn8g73f2i6plac5"; } + { name = "arialb"; sha256 = "1a60zqrg63kjnykh5hz7dbpzvx7lyivn3vbrp7jyv9d1nvzz09d4"; } + { name = "comic"; sha256 = "0ki0rljjc1pxkbsxg515fwx15yc95bdyaksa3pjd89nyxzzg6vcw"; } + { name = "courie"; sha256 = "111k3waxki9yyxpjwl2qrdkswvsd2dmvhbjmmrwyipam2s31sldv"; } + { name = "georgi"; sha256 = "0083jcpd837j2c06kp1q8glfjn9k7z6vg3wi137savk0lv6psb1c"; } + { name = "impact"; sha256 = "1yyc5z7zmm3s418hmrkmc8znc55afsrz5dgxblpn9n81fhxyyqb0"; } + { name = "times"; sha256 = "1aq7z3l46vwgqljvq9zfgkii6aivy00z1529qbjkspggqrg5jmnv"; } + { name = "trebuc"; sha256 = "1jfsgz80pvyqvpfpaiz5pd8zwlcn67rg2jgynjwf22sip2dhssas"; } + { name = "webdin"; sha256 = "0nnp2znmnmx87ijq9zma0vl0hd46npx38p0cc6lgp00hpid5nnb4"; } + { name = "verdan"; sha256 = "15mdbbfqbyp25a6ynik3rck3m3mg44plwrj79rwncc9nbqjn3jy1"; } + { name = "wd97vwr"; sha256 = "1lmkh3zb6xv47k0z2mcwk3vk8jff9m845c9igxm14bbvs6k2c4gn"; } ]; eula = fetchurl { url = "http://corefonts.sourceforge.net/eula.htm"; sha256 = "1aqbcnl032g2hd7iy56cs022g47scb0jxxp3mm206x1yqc90vs1c"; }; - in - stdenv.mkDerivation { pname = "corefonts"; version = "1"; @@ -33,22 +30,53 @@ stdenv.mkDerivation { inherit sha256; }) fonts; - nativeBuildInputs = [cabextract]; + nativeBuildInputs = [ cabextract ]; buildCommand = '' for i in $exes; do - cabextract --lowercase $i + cabextract --lowercase $i done - cabextract --lowercase viewer1.cab + # rename to more standard names + mv andalemo.ttf Andale_Mono.ttf + mv ariblk.ttf Arial_Black.ttf + mv arial.ttf Arial.ttf + mv arialbd.ttf Arial_Bold.ttf + mv arialbi.ttf Arial_Bold_Italic.ttf + mv ariali.ttf Arial_Italic.ttf + mv comic.ttf Comic_Sans_MS.ttf + mv comicbd.ttf Comic_Sans_MS_Bold.ttf + mv cour.ttf Courier_New.ttf + mv courbd.ttf Courier_New_Bold.ttf + mv couri.ttf Courier_New_Italic.ttf + mv courbi.ttf Courier_New_Bold_Italic.ttf + mv georgia.ttf Georgia.ttf + mv georgiab.ttf Georgia_Bold.ttf + mv georgiai.ttf Georgia_Italic.ttf + mv georgiaz.ttf Georgia_Bold_Italic.ttf + mv impact.ttf Impact.ttf + mv tahoma.ttf Tahoma.ttf + mv times.ttf Times_New_Roman.ttf + mv timesbd.ttf Times_New_Roman_Bold.ttf + mv timesbi.ttf Times_New_Roman_Bold_Italic.ttf + mv timesi.ttf Times_New_Roman_Italic.ttf + mv trebuc.ttf Trebuchet_MS.ttf + mv trebucbd.ttf Trebuchet_MS_Bold.ttf + mv trebucit.ttf Trebuchet_MS_Italic.ttf + mv trebucbi.ttf Trebuchet_MS_Italic.ttf + mv verdana.ttf Verdana.ttf + mv verdanab.ttf Verdana_Bold.ttf + mv verdanai.ttf Verdana_Italic.ttf + mv verdanaz.ttf Verdana_Bold_Italic.ttf + mv webdings.ttf Webdings.ttf + install -m444 -Dt $out/share/fonts/truetype *.ttf # Also put the EULA there to be on the safe side. cp ${eula} $out/share/fonts/truetype/eula.html - # Set up no-op font configs to override any aliases set up by - # other packages. + # Set up no-op font configs to override any aliases set up by other packages. mkdir -p $out/etc/fonts/conf.d for name in Andale-Mono Arial-Black Arial Comic-Sans-MS \ Courier-New Georgia Impact Times-New-Roman \ @@ -58,10 +86,6 @@ stdenv.mkDerivation { done ''; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "089d2m9bvaacj36qdq77pcazji0sbbr796shic3k52cpxkjnzbwh"; - meta = with lib; { homepage = "http://corefonts.sourceforge.net/"; description = "Microsoft's TrueType core fonts for the Web"; From 0a71372a900a2d028f279fa27c18afdd7c8273c5 Mon Sep 17 00:00:00 2001 From: Marco Rebhan Date: Sun, 26 Jun 2022 12:56:54 +0200 Subject: [PATCH 07/18] nixos-rebuild: Don't create out-link in PWD with test/dry-activate --- pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 95004f447941..b85f002e7b8f 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -254,7 +254,7 @@ nixBuild() { nixFlakeBuild() { logVerbose "Building in flake mode." - if [[ -z "$buildHost" && -z "$targetHost" && "$action" != switch && "$action" != boot ]] + if [[ -z "$buildHost" && -z "$targetHost" && "$action" != switch && "$action" != boot && "$action" != test && "$action" != dry-activate ]] then runCmd nix "${flakeFlags[@]}" build "$@" readlink -f ./result From 4a13ac89587c2ec8c313538689264d1fa05267e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 18 Jul 2022 16:29:41 +0200 Subject: [PATCH 08/18] hub: 2.14.2 -> unstable-2022-04-04 Fetching https://github.com/github/hub/commit/5d42499f1da717ff39b7b1d4139f06f3a77a0612 didn't turn out to be that easy because the vendor/ directory was removed in the meantime and we would need to create a custom patch. Since the last release is over 2 years ago I opted into bumping it to the latest version in master instead. --- .../git-and-tools/hub/default.nix | 64 ++++++++++++------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/hub/default.nix b/pkgs/applications/version-management/git-and-tools/hub/default.nix index 9d63642dcb33..cb75ec826464 100644 --- a/pkgs/applications/version-management/git-and-tools/hub/default.nix +++ b/pkgs/applications/version-management/git-and-tools/hub/default.nix @@ -1,47 +1,65 @@ -{ lib, buildGoPackage, fetchFromGitHub, git, groff, installShellFiles, unixtools, nixosTests }: +{ lib +, buildGoModule +, fetchpatch +, fetchFromGitHub +, git +, groff +, installShellFiles +, makeWrapper +, unixtools +, nixosTests +}: -buildGoPackage rec { +buildGoModule rec { pname = "hub"; - version = "2.14.2"; - - goPackagePath = "github.com/github/hub"; - - # Only needed to build the man-pages - excludedPackages = [ "github.com/github/hub/md2roff-bin" ]; + version = "unstable-2022-04-04"; src = fetchFromGitHub { owner = "github"; repo = pname; - rev = "v${version}"; - sha256 = "1qjab3dpia1jdlszz3xxix76lqrm4zbmqzd9ymld7h06awzsg2vh"; + rev = "363513a0f822a8bde5b620e5de183702280d4ace"; + sha256 = "sha256-jipZHmGtPTsztTeVZofaMReU4AEU9k6mdw9YC4KKB1Q="; }; - nativeBuildInputs = [ groff installShellFiles unixtools.col ]; - postPatch = '' - patchShebangs . - substituteInPlace git/git.go --replace "cmd.New(\"git\")" "cmd.New(\"${git}/bin/git\")" - substituteInPlace commands/args.go --replace "Executable: \"git\"" "Executable: \"${git}/bin/git\"" + patchShebangs script/ ''; + vendorSha256 = "sha256-wQH8V9jRgh45JGs4IfYS1GtmCIYdo93JG1UjJ0BGxXk="; + + # Only needed to build the man-pages + excludedPackages = [ "github.com/github/hub/md2roff-bin" ]; + + nativeBuildInputs = [ + groff + installShellFiles + makeWrapper + unixtools.col + ]; + postInstall = '' - cd go/src/${goPackagePath} - installShellCompletion --zsh --name _hub etc/hub.zsh_completion - installShellCompletion --bash --name hub etc/hub.bash_completion.sh - installShellCompletion --fish --name hub.fish etc/hub.fish_completion + installShellCompletion --cmd hub \ + --bash etc/hub.bash_completion.sh \ + --fish etc/hub.fish_completion \ + --zsh etc/hub.zsh_completion - LC_ALL=C.UTF8 \ - make man-pages + LC_ALL=C.UTF8 make man-pages installManPage share/man/man[1-9]/*.[1-9] + + wrapProgram $out/bin/hub \ + --suffix PATH : ${lib.makeBinPath [ git ]} ''; + checkInputs = [ + git + ]; + passthru.tests = { inherit (nixosTests) hub; }; meta = with lib; { description = "Command-line wrapper for git that makes you better at GitHub"; - license = licenses.mit; homepage = "https://hub.github.com/"; + license = licenses.mit; maintainers = with maintainers; [ globin ]; - platforms = with platforms; unix; }; } From 55ce7255bcdec7fbbce26271fe9e6484cec012bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 19 Jul 2022 15:19:30 +0200 Subject: [PATCH 09/18] Revert "dive: fix build" This reverts commit cdd324d59bb0c5d9cff235b1baa9b7c5e20b7fb8. --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7babea48246b..117009cfb241 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15735,9 +15735,7 @@ with pkgs; binutils = binutils; }; - dive = callPackage ../development/tools/dive { - buildGoModule = buildGo117Module; - }; + dive = callPackage ../development/tools/dive { }; doclifter = callPackage ../development/tools/misc/doclifter { }; From 9b79ff3a1034f87c27ed7b616127e60aa1595340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 19 Jul 2022 15:21:56 +0200 Subject: [PATCH 10/18] Revert "noti: fix build" This reverts commit 538d28ff3321c706969b9c430ef03bfbf038260d. --- pkgs/top-level/all-packages.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 117009cfb241..0ec31ac22b93 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4246,7 +4246,6 @@ with pkgs; noti = callPackage ../tools/misc/noti { inherit (darwin.apple_sdk.frameworks) Cocoa; - buildGoPackage = buildGo117Package; }; notify = callPackage ../tools/misc/notify { }; From 1131c38b3b9bb49c0ad8ffed7c83708544852ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 19 Jul 2022 15:41:26 +0200 Subject: [PATCH 11/18] dive: fix build on aarch64-darwin --- pkgs/development/tools/dive/default.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/dive/default.nix b/pkgs/development/tools/dive/default.nix index d6217671b0c1..0d19a1071dcf 100644 --- a/pkgs/development/tools/dive/default.nix +++ b/pkgs/development/tools/dive/default.nix @@ -1,4 +1,13 @@ -{ lib, stdenv, buildGoModule, fetchFromGitHub, pkg-config, btrfs-progs, gpgme, lvm2 }: +{ lib +, stdenv +, buildGoModule +, fetchFromGitHub +, fetchpatch +, pkg-config +, btrfs-progs +, gpgme +, lvm2 +}: buildGoModule rec { pname = "dive"; @@ -11,7 +20,14 @@ buildGoModule rec { sha256 = "sha256-1pmw8pUlek5FlI1oAuvLSqDow7hw5rw86DRDZ7pFAmA="; }; - vendorSha256 = "sha256-0gJ3dAPoilh3IWkuesy8geNsuI1T0DN64XvInc9LvlM="; + patches = [ + (fetchpatch { + url = "https://github.com/wagoodman/dive/commit/fe9411c414418d839a8638bb9a12ccfc892b5845.patch"; + sha256 = "sha256-c0TcUQ87CeOiXHoTQ3z/04i72aDr403DL7fIbXTJ9cY="; + }) + ]; + + vendorSha256 = "sha256-YPkEei7d7mXP+5FhooNoMDARQLosH2fdSaLXGZ5C27o="; nativeBuildInputs = [ pkg-config ]; From df5c71b008ca914712c1f9c73f51f722f1ca12c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 19 Jul 2022 17:55:06 +0200 Subject: [PATCH 12/18] noti: bump golang.org/x/sys --- pkgs/tools/misc/noti/default.nix | 34 ++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/misc/noti/default.nix b/pkgs/tools/misc/noti/default.nix index c964a8872f83..ac3ff7a59b70 100644 --- a/pkgs/tools/misc/noti/default.nix +++ b/pkgs/tools/misc/noti/default.nix @@ -1,7 +1,13 @@ -{ stdenv, lib, buildGoPackage, fetchFromGitHub -, Cocoa ? null }: +{ stdenv +, lib +, buildGoModule +, fetchFromGitHub +, fetchurl +, Cocoa +, installShellFiles +}: -buildGoPackage rec { +buildGoModule rec { pname = "noti"; version = "3.5.0"; @@ -12,17 +18,29 @@ buildGoPackage rec { sha256 = "12r9wawwl6x0rfv1kahwkamfa0pjq24z60az9pn9nsi2z1rrlwkd"; }; + patches = [ + # update golang.org/x/sys to fix building on aarch64-darwin + # using fetchurl because fetchpatch breaks the patch + (fetchurl { + url = "https://github.com/variadico/noti/commit/a90bccfdb2e6a0adc2e92f9a4e7be64133832ba9.patch"; + sha256 = "sha256-vSAwuAR9absMSFqGOlzmRZoOGC/jpkmh8CMCVjeleUo="; + }) + ]; + + vendorSha256 = null; + + nativeBuildInputs = [ installShellFiles ]; + buildInputs = lib.optional stdenv.isDarwin Cocoa; - goPackagePath = "github.com/variadico/noti"; - ldflags = [ - "-X ${goPackagePath}/internal/command.Version=${version}" + "-s" + "-w" + "-X github.com/variadico/noti/internal/command.Version=${version}" ]; postInstall = '' - install -Dm444 -t $out/share/man/man1 $src/docs/man/*.1 - install -Dm444 -t $out/share/man/man5 $src/docs/man/*.5 + installManPage docs/man/* ''; meta = with lib; { From 44d5286b0d1b86fabfdb239d8917aaf2952af375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 21 Jul 2022 23:47:22 +0200 Subject: [PATCH 13/18] intel-gmmlib: 22.1.5 -> 22.1.7 --- pkgs/development/libraries/intel-gmmlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/intel-gmmlib/default.nix b/pkgs/development/libraries/intel-gmmlib/default.nix index c16d3afded2d..d3b2cf3992c5 100644 --- a/pkgs/development/libraries/intel-gmmlib/default.nix +++ b/pkgs/development/libraries/intel-gmmlib/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "intel-gmmlib"; - version = "22.1.5"; + version = "22.1.7"; src = fetchFromGitHub { owner = "intel"; repo = "gmmlib"; rev = "intel-gmmlib-${version}"; - sha256 = "sha256-A7XZXkYBsFa8NMQA7EBnvEReSTorAGgoow08bMZ+WkQ="; + sha256 = "sha256-HRN4SSjP8h8nnCisysDM9V17012ECLz2GgdUok1AV24="; }; nativeBuildInputs = [ cmake ]; From 93132dc09c36aefb3d2f883901493103e5af985f Mon Sep 17 00:00:00 2001 From: Netali Date: Fri, 22 Jul 2022 04:17:14 +0200 Subject: [PATCH 14/18] nixos/pam: refactor pam_mount unmounting fix --- nixos/modules/security/pam.nix | 1 - nixos/modules/system/boot/systemd/user.nix | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index ce18af9fbc95..a80312367d85 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -611,7 +611,6 @@ let session optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so '' + optionalString cfg.pamMount '' - session [success=1 default=ignore] ${pkgs.pam}/lib/security/pam_succeed_if.so service = systemd-user quiet session optional ${pkgs.pam_mount}/lib/security/pam_mount.so disable_interactive '' + optionalString use_ldap '' diff --git a/nixos/modules/system/boot/systemd/user.nix b/nixos/modules/system/boot/systemd/user.nix index 0b1e6277c2f5..edfff5abaa9e 100644 --- a/nixos/modules/system/boot/systemd/user.nix +++ b/nixos/modules/system/boot/systemd/user.nix @@ -145,6 +145,10 @@ in { { # Ensure that pam_systemd gets included. This is special-cased # in systemd to provide XDG_RUNTIME_DIR. startSession = true; + # Disable pam_mount in systemd-user to prevent it from being called + # multiple times during login, because it will prevent pam_mount from + # unmounting the previously mounted volumes. + pamMount = false; }; # Some overrides to upstream units. From 37580d6187057ee9a8fbce185f4b6e6e708a2316 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 22 Jul 2022 04:20:00 +0000 Subject: [PATCH 15/18] nodejs-16_x: 16.15.0 -> 16.16.0 https://github.com/nodejs/node/releases/tag/v16.15.1 https://github.com/nodejs/node/releases/tag/v16.16.0 --- pkgs/development/web/nodejs/v16.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/web/nodejs/v16.nix b/pkgs/development/web/nodejs/v16.nix index 2f044b44f213..89b6c3e43631 100644 --- a/pkgs/development/web/nodejs/v16.nix +++ b/pkgs/development/web/nodejs/v16.nix @@ -1,4 +1,4 @@ -{ callPackage, openssl, python3, enableNpm ? true }: +{ callPackage, openssl, python3, fetchpatch, enableNpm ? true }: let buildNodejs = callPackage ./nodejs.nix { @@ -8,9 +8,17 @@ let in buildNodejs { inherit enableNpm; - version = "16.15.0"; # Do not upgrade until #176127 is solved - sha256 = "sha256-oPgS78Q/eDIeygiVeWCkj15r+XAE1QWMjdOwPGRupPc="; + version = "16.16.0"; + sha256 = "sha256-FFFR7/Oyql6+czhACcUicag3QK5oepPJjGKM19UnNus="; patches = [ ./disable-darwin-v8-system-instrumentation.patch + # Fix npm silently fail without a HOME directory https://github.com/npm/cli/issues/4996 + (fetchpatch { + url = "https://github.com/npm/cli/commit/9905d0e24c162c3f6cc006fa86b4c9d0205a4c6f.patch"; + sha256 = "sha256-RlabXWtjzTZ5OgrGf4pFkolonvTDIPlzPY1QcYDd28E="; + includes = [ "deps/npm/lib/npm.js" "deps/npm/lib/utils/log-file.js" ]; + stripLen = 1; + extraPrefix = "deps/npm/"; + }) ]; } From 3705020d970627dbb3fc312cf834e2277973bfd6 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Mon, 18 Jul 2022 03:57:37 -0700 Subject: [PATCH 16/18] mangohud: Build mangoapp and mangohudctl for gamescope integration --- pkgs/tools/graphics/mangohud/default.nix | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pkgs/tools/graphics/mangohud/default.nix b/pkgs/tools/graphics/mangohud/default.nix index cdbe39ee38cf..e62cfa6b8a80 100644 --- a/pkgs/tools/graphics/mangohud/default.nix +++ b/pkgs/tools/graphics/mangohud/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , fetchurl , substituteAll , coreutils @@ -27,7 +28,12 @@ , libXNVCtrl , wayland , spdlog +, glew +, glfw +, nlohmann_json +, xorg , addOpenGLRunpath +, gamescopeSupport ? true # build mangoapp and mangohudctl }: let @@ -86,6 +92,12 @@ in stdenv.mkDerivation rec { libdbus = dbus.lib; inherit hwdata libX11; }) + + (fetchpatch { + name = "allow-system-nlohmann-json.patch"; + url = "https://github.com/flightlessmango/MangoHud/commit/e1ffa0f85820abea44639438fca2152290c87ee8.patch"; + sha256 = "sha256-CaJb0RpXmNGCBidMXM39VJVLIXb6NbN5HXWkH/5Sfvo="; + }) ] ++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux") [ # Support 32bit OpenGL applications by appending the mangohud32 # lib path to LD_LIBRARY_PATH. @@ -105,6 +117,10 @@ in stdenv.mkDerivation rec { "-Dvulkan_datadir=${vulkan-headers}/share" "-Dwith_wayland=enabled" "-Duse_system_spdlog=enabled" + ] ++ lib.optionals gamescopeSupport [ + "-Dmangoapp_layer=true" + "-Dmangoapp=true" + "-Dmangohudctl=true" ]; nativeBuildInputs = [ @@ -125,6 +141,12 @@ in stdenv.mkDerivation rec { libXNVCtrl wayland spdlog + ] ++ lib.optionals gamescopeSupport [ + glew + glfw + nlohmann_json + vulkan-headers + xorg.libXrandr ]; # Support 32bit Vulkan applications by linking in 32bit Vulkan layer @@ -140,6 +162,12 @@ in stdenv.mkDerivation rec { wrapProgram "$out/bin/mangohud" \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ addOpenGLRunpath.driverLink ]} \ --prefix XDG_DATA_DIRS : "$out/share" + '' + lib.optionalString (gamescopeSupport) '' + if [[ -e "$out/bin/mangoapp" ]]; then + wrapProgram "$out/bin/mangoapp" \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ addOpenGLRunpath.driverLink ]} \ + --prefix XDG_DATA_DIRS : "$out/share" + fi ''; meta = with lib; { From d0617a58e226a267eebeef431b8f3eb45c04f949 Mon Sep 17 00:00:00 2001 From: Ilan Joselevich <56614642+Kranzes@users.noreply.github.com> Date: Fri, 22 Jul 2022 00:32:09 -0700 Subject: [PATCH 17/18] services/web-apps/lemmy.nix: Remove space that causes a type error --- nixos/modules/services/web-apps/lemmy.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/lemmy.nix b/nixos/modules/services/web-apps/lemmy.nix index 7cd2357c4556..15e616c5d5ec 100644 --- a/nixos/modules/services/web-apps/lemmy.nix +++ b/nixos/modules/services/web-apps/lemmy.nix @@ -164,7 +164,7 @@ in wantedBy = [ "multi-user.target" ]; - after = [ "pict-rs.service " ] ++ lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ]; + after = [ "pict-rs.service" ] ++ lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ]; requires = lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ]; From 42c017bcbf2ee499e0173755a7c59fcaab6a1c55 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Fri, 22 Jul 2022 12:23:56 +0200 Subject: [PATCH 18/18] sta: unstable-2020-05-10 -> unstable-2021-11-30 --- pkgs/tools/misc/sta/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/sta/default.nix b/pkgs/tools/misc/sta/default.nix index 6056fcfa49c3..696b79447a75 100644 --- a/pkgs/tools/misc/sta/default.nix +++ b/pkgs/tools/misc/sta/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation { pname = "sta"; - version = "unstable-2020-05-10"; + version = "unstable-2021-11-30"; src = fetchFromGitHub { owner = "simonccarter"; repo = "sta"; - rev = "566e3a77b103aa27a5f77ada8e068edf700f26ef"; - sha256 = "1v20di90ckl405rj5pn6lxlpxh2m2b3y9h2snjvk0k9sihk7w7d5"; + rev = "94559e3dfa97d415e3f37b1180b57c17c7222b4f"; + sha256 = "sha256-AiygCfBze7J1Emy6mc27Dim34eLR7VId9wodUZapIL4="; }; nativeBuildInputs = [ autoreconfHook ];