From 78f915a0025a594b334bccd3a56023d5c6f8310c Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Thu, 14 May 2020 22:08:26 -0400 Subject: [PATCH 01/27] nixos/kernel.nix: ensure same kernel is used Originally, changes to the kernel don't propagate to the other derivation within the same package set. This commit allows for the changes in the kernel to be propagated. A distinct example is setting `boot.kernel.randstructSeed` to a non-zero length string which would result in building 2 kernels, one with the correct seed and the other with the zero length seed. Then, when using an out-of-tree kernel driver, it would be built with the zero length seed which differs from the non-zero length seed used to boot, contradicting the purpose of the `boot.kernel.randstructSeed`. --- nixos/modules/system/boot/kernel.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index ed7226331d70..9287852bacfd 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -37,12 +37,10 @@ in boot.kernelPackages = mkOption { default = pkgs.linuxPackages; type = types.unspecified // { merge = mergeEqualOption; }; - apply = kernelPackages: kernelPackages.extend (self: super: { - kernel = super.kernel.override { - inherit randstructSeed; - kernelPatches = super.kernel.kernelPatches ++ kernelPatches; - features = lib.recursiveUpdate super.kernel.features features; - }; + apply = kernelPackages: pkgs.linuxPackagesFor (kernelPackages.kernel.override { + inherit randstructSeed; + kernelPatches = kernelPackages.kernel.kernelPatches ++ kernelPatches; + features = lib.recursiveUpdate kernelPackages.kernel.features features; }); # We don't want to evaluate all of linuxPackages for the manual # - some of it might not even evaluate correctly. From 771199faf3c6eb59cecab1e843cc2550c99158d1 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sat, 26 Sep 2020 11:28:54 -0400 Subject: [PATCH 02/27] nixos/clight: fix config file generation --- nixos/modules/services/x11/clight.nix | 30 +++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/x11/clight.nix b/nixos/modules/services/x11/clight.nix index 4daf6d8d9db7..873f425fb8be 100644 --- a/nixos/modules/services/x11/clight.nix +++ b/nixos/modules/services/x11/clight.nix @@ -11,14 +11,21 @@ let else if isBool v then boolToString v else if isString v then ''"${escape [''"''] v}"'' else if isList v then "[ " + concatMapStringsSep ", " toConf v + " ]" + else if isAttrs v then "\n{\n" + convertAttrs v + "\n}" else abort "clight.toConf: unexpected type (v = ${v})"; - clightConf = pkgs.writeText "clight.conf" - (concatStringsSep "\n" (mapAttrsToList - (name: value: "${toString name} = ${toConf value};") - (filterAttrs - (_: value: value != null) - cfg.settings))); + getSep = v: + if isAttrs v then ":" + else "="; + + convertAttrs = attrs: concatStringsSep "\n" (mapAttrsToList + (name: value: "${toString name} ${getSep value} ${toConf value};") + attrs); + + clightConf = pkgs.writeText "clight.conf" (convertAttrs + (filterAttrs + (_: value: value != null) + cfg.settings)); in { options.services.clight = { enable = mkOption { @@ -49,9 +56,10 @@ in { }; settings = let - validConfigTypes = with types; either int (either str (either bool float)); + validConfigTypes = with types; oneOf [ int str bool float ]; + collectionTypes = with types; oneOf [ validConfigTypes (listOf validConfigTypes) ]; in mkOption { - type = with types; attrsOf (nullOr (either validConfigTypes (listOf validConfigTypes))); + type = with types; attrsOf (nullOr (either collectionTypes (attrsOf collectionTypes))); default = {}; example = { captures = 20; gamma_long_transition = true; ac_capture_timeouts = [ 120 300 60 ]; }; description = '' @@ -69,10 +77,10 @@ in { services.upower.enable = true; services.clight.settings = { - gamma_temp = with cfg.temperature; mkDefault [ day night ]; + gamma.temp = with cfg.temperature; mkDefault [ day night ]; } // (optionalAttrs (config.location.provider == "manual") { - latitude = mkDefault config.location.latitude; - longitude = mkDefault config.location.longitude; + daytime.latitude = mkDefault config.location.latitude; + daytime.longitude = mkDefault config.location.longitude; }); services.geoclue2.appConfig.clightc = { From 450cb04f16cc2214c2a298fe26bb4c306cf84fb3 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 3 Nov 2018 19:50:12 +0100 Subject: [PATCH 03/27] nixos: hardware.nvidia.package option for selecting nvidia package Make it possible to select a derivation to use. This also moves some logic that belongs to the derivation back into it. --- nixos/modules/hardware/video/nvidia.nix | 51 ++++++++----------- pkgs/os-specific/linux/nvidia-x11/default.nix | 16 ++++-- pkgs/os-specific/linux/nvidia-x11/generic.nix | 4 ++ 3 files changed, 36 insertions(+), 35 deletions(-) diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index d1cf7d05c1b8..f3a617379aba 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -5,36 +5,17 @@ with lib; let - - drivers = config.services.xserver.videoDrivers; - - # FIXME: should introduce an option like - # ‘hardware.video.nvidia.package’ for overriding the default NVIDIA - # driver. - nvidiaForKernel = kernelPackages: - if elem "nvidia" drivers then - kernelPackages.nvidia_x11 - else if elem "nvidiaBeta" drivers then - kernelPackages.nvidia_x11_beta - else if elem "nvidiaVulkanBeta" drivers then - kernelPackages.nvidia_x11_vulkan_beta - else if elem "nvidiaLegacy304" drivers then - kernelPackages.nvidia_x11_legacy304 - else if elem "nvidiaLegacy340" drivers then - kernelPackages.nvidia_x11_legacy340 - else if elem "nvidiaLegacy390" drivers then - kernelPackages.nvidia_x11_legacy390 - else null; - - nvidia_x11 = nvidiaForKernel config.boot.kernelPackages; - nvidia_libs32 = - if versionOlder nvidia_x11.version "391" then - ((nvidiaForKernel pkgs.pkgsi686Linux.linuxPackages).override { libsOnly = true; kernel = null; }).out - else - (nvidiaForKernel config.boot.kernelPackages).lib32; + nvidia_x11 = let + drivers = config.services.xserver.videoDrivers; + isDeprecated = str: (hasPrefix "nvidia" str) && (str != "nvidia"); + hasDeprecated = drivers: any isDeprecated drivers; + in if (hasDeprecated drivers) then + throw '' + Selecting an nvidia driver has been modified for NixOS 19.03. The version is now set using `hardware.nvidia.package`. + '' + else if (elem "nvidia" drivers) then cfg.package else null; enabled = nvidia_x11 != null; - cfg = config.hardware.nvidia; pCfg = cfg.prime; @@ -151,6 +132,16 @@ in GPUs stay awake even during headless mode. ''; }; + + hardware.nvidia.package = lib.mkOption { + type = lib.types.package; + default = config.boot.kernelPackages.nvidiaPackages.stable; + defaultText = "config.boot.kernelPackages.nvidiaPackages.stable"; + description = '' + The NVIDIA X11 derivation to use. + ''; + example = "config.boot.kernelPackages.nvidiaPackages.legacy340"; + }; }; config = mkIf enabled { @@ -230,9 +221,9 @@ in }; hardware.opengl.package = mkIf (!offloadCfg.enable) nvidia_x11.out; - hardware.opengl.package32 = mkIf (!offloadCfg.enable) nvidia_libs32; + hardware.opengl.package32 = mkIf (!offloadCfg.enable) nvidia_x11.lib32; hardware.opengl.extraPackages = optional offloadCfg.enable nvidia_x11.out; - hardware.opengl.extraPackages32 = optional offloadCfg.enable nvidia_libs32; + hardware.opengl.extraPackages32 = optional offloadCfg.enable nvidia_x11.lib32; environment.systemPackages = [ nvidia_x11.bin nvidia_x11.settings ] ++ optionals nvidiaPersistencedEnabled [ nvidia_x11.persistenced ]; diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 4b0c060f9ce4..dd491f884f66 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -1,11 +1,17 @@ -{ lib, callPackage, fetchpatch, fetchurl, stdenv }: +{ lib, callPackage, fetchpatch, fetchurl, stdenv, pkgsi686Linux }: let - -generic = args: -if ((!lib.versionOlder args.version "391") + generic = args: let + imported = import ./generic.nix args; + in if ((!lib.versionOlder args.version "391") && stdenv.hostPlatform.system != "x86_64-linux") then null - else callPackage (import ./generic.nix args) { }; + else callPackage imported { + lib32 = (pkgsi686Linux.callPackage imported { + libsOnly = true; + kernel = null; + }).out; + }; + kernel = callPackage # a hacky way of extracting parameters from callPackage ({ kernel, libsOnly ? false }: if libsOnly then { } else kernel) { }; diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix index 1587ad06bc30..8d102e501afd 100644 --- a/pkgs/os-specific/linux/nvidia-x11/generic.nix +++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix @@ -25,6 +25,8 @@ , # don't include the bundled 32-bit libraries on 64-bit platforms, # even if it’s in downloaded binary disable32Bit ? false + # 32 bit libs only version of this package +, lib32 ? null }: with stdenv.lib; @@ -93,6 +95,8 @@ let }; persistenced = mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256; inherit persistencedVersion settingsVersion; + } // optionalAttrs (!i686bundled) { + inherit lib32; }; meta = with lib; { From 81228c93e797b960462d67ca3758a3d4775d058e Mon Sep 17 00:00:00 2001 From: edef Date: Tue, 26 Jan 2021 19:41:02 +0000 Subject: [PATCH 04/27] perlPackages.MathPlanePath: 127 -> 129 This fixes the build failure introduced by c5b0de9c6ba, which indirectly broke slic3r. --- pkgs/top-level/perl-packages.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 1d1557c6f074..515069b03c04 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -12341,10 +12341,10 @@ let MathPlanePath = buildPerlPackage { pname = "Math-PlanePath"; - version = "127"; + version = "129"; src = fetchurl { - url = "mirror://cpan/authors/id/K/KR/KRYDE/Math-PlanePath-127.tar.gz"; - sha256 = "1dzywpydigwyr38vz9f4yn7xkkk21vi6lyzjlyqv8iny0y0c7w20"; + url = "mirror://cpan/authors/id/K/KR/KRYDE/Math-PlanePath-129.tar.gz"; + sha256 = "0zirgq9n422wc1j95pijkr88wwmzhll5nxh3sb2vcxsh9l75v8cd"; }; propagatedBuildInputs = [ MathLibm constant-defer ]; buildInputs = [ DataFloat MathBigIntLite NumberFraction ]; From 08ce0156e4775da2b530914a16022c1ac9d3047c Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sat, 30 Jan 2021 17:19:29 +0700 Subject: [PATCH 05/27] pleroma-otp: stdenv.lib -> lib --- pkgs/servers/pleroma-otp/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/pleroma-otp/default.nix b/pkgs/servers/pleroma-otp/default.nix index e66ae693a0e8..4905acd07577 100644 --- a/pkgs/servers/pleroma-otp/default.nix +++ b/pkgs/servers/pleroma-otp/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , autoPatchelfHook , fetchurl , file @@ -60,11 +61,11 @@ stdenv.mkDerivation { pleroma = nixosTests.pleroma; }; - meta = { + meta = with lib; { description = "ActivityPub microblogging server"; homepage = https://git.pleroma.social/pleroma/pleroma; - license = stdenv.lib.licenses.agpl3; - maintainers = with stdenv.lib.maintainers; [ ninjatrappeur ]; + license = licenses.agpl3; + maintainers = with maintainers; [ ninjatrappeur ]; platforms = [ "x86_64-linux" "aarch64-linux" ]; }; } From 7ff2c85a8ee2e5122c9b0c51946d9470a527223e Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sat, 30 Jan 2021 17:19:44 +0700 Subject: [PATCH 06/27] cargo-valgrind: stdenv.lib -> lib --- pkgs/development/tools/rust/cargo-valgrind/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-valgrind/default.nix b/pkgs/development/tools/rust/cargo-valgrind/default.nix index 138fc060568f..50cffe74848e 100644 --- a/pkgs/development/tools/rust/cargo-valgrind/default.nix +++ b/pkgs/development/tools/rust/cargo-valgrind/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , rustPlatform , fetchFromGitHub , nix-update-script @@ -30,10 +31,10 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ makeWrapper ]; postInstall = '' - wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${stdenv.lib.makeBinPath [ valgrind ]} + wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${lib.makeBinPath [ valgrind ]} ''; - meta = with stdenv.lib; { + meta = with lib; { description = ''Cargo subcommand "valgrind": runs valgrind and collects its output in a helpful manner''; homepage = "https://github.com/jfrimmel/cargo-valgrind"; license = with licenses; [ asl20 /* or */ mit ]; From 9071feb01d79d4e9a42a485f72bc5cb325baf8dc Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sat, 30 Jan 2021 17:19:55 +0700 Subject: [PATCH 07/27] hspell: stdenv.lib -> lib --- pkgs/development/libraries/hspell/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/hspell/default.nix b/pkgs/development/libraries/hspell/default.nix index 67e593d27f4f..2a65afad809a 100644 --- a/pkgs/development/libraries/hspell/default.nix +++ b/pkgs/development/libraries/hspell/default.nix @@ -16,15 +16,15 @@ stdenv.mkDerivation rec { }; patchPhase = "patchShebangs ."; - preBuild = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' make CC=${buildPackages.stdenv.cc}/bin/cc find_sizes mv find_sizes find_sizes_build make clean substituteInPlace Makefile --replace "./find_sizes" "./find_sizes_build" - substituteInPlace Makefile --replace "ar cr" "${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr" - substituteInPlace Makefile --replace "ranlib" "${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" - substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" + substituteInPlace Makefile --replace "ar cr" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr" + substituteInPlace Makefile --replace "ranlib" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" + substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" ''; nativeBuildInputs = [ perl zlib ]; # buildInputs = [ zlib ]; From ff2006837ce229461bd7d18c58d94a3310866d91 Mon Sep 17 00:00:00 2001 From: Greizgh Date: Sat, 30 Jan 2021 11:33:15 +0100 Subject: [PATCH 08/27] tt-rss: 2019-01-29 -> 2021-01-29 --- pkgs/servers/tt-rss/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/tt-rss/default.nix b/pkgs/servers/tt-rss/default.nix index 95b895b281bb..e91fed5ee160 100644 --- a/pkgs/servers/tt-rss/default.nix +++ b/pkgs/servers/tt-rss/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "tt-rss"; - version = "2019-01-29"; - rev = "c7c9c5fb0ab6b3d4ea3078865670d6c1dfe2ecac"; + version = "2021-01-29"; + rev = "6d8f2221b82b6a31becbeed8baf5e05ad9e053fe"; src = fetchurl { - url = "https://git.tt-rss.org/git/tt-rss/archive/${rev}.tar.gz"; - sha256 = "0k184zqrfscv17gnl106q4yzhqmxb0g1dn1wkdkrclc3qcrviyp6"; + url = "https://git.tt-rss.org/fox/tt-rss/archive/${rev}.tar.gz"; + sha256 = "124c62hck631xlq5aa1miz9rbg711ygk7z1yx92m5dfcy630l7x5"; }; installPhase = '' From 32e8cec5d9be7963c3cc23541c2679a4a5989348 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sat, 30 Jan 2021 17:23:49 +0700 Subject: [PATCH 09/27] stdenv: warn about use of inherited lib --- pkgs/stdenv/generic/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index c7c3bb9f3f3f..125eff9aec57 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -152,9 +152,12 @@ let inherit lib config stdenv; }) mkDerivation; - # For convenience, bring in the library functions in lib/ so - # packages don't have to do that themselves. - inherit lib; + # Slated for deprecation in 21.11 + lib = builtins.trace ( "Warning: `stdenv.lib` is deprecated " + + "and will be removed in the next release. " + + "Please use `pkgs.lib` instead. " + + "For more information see https://github.com/NixOS/nixpkgs/issues/108938") + lib; inherit fetchurlBoot; From 54be5b6963e5bbf49c83c8212deb5a4bd9adf053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 30 Jan 2021 12:46:24 +0100 Subject: [PATCH 10/27] mbedtls: 2.16.3 -> 2.16.9 --- pkgs/development/libraries/mbedtls/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/mbedtls/default.nix b/pkgs/development/libraries/mbedtls/default.nix index e3e0d2ecd78d..38a9b78b6d10 100644 --- a/pkgs/development/libraries/mbedtls/default.nix +++ b/pkgs/development/libraries/mbedtls/default.nix @@ -11,14 +11,13 @@ stdenv.mkDerivation rec { pname = "mbedtls"; - name = "mbedtls-${version}"; - version = "2.16.3"; # nixpkgs-update: no auto update + version = "2.16.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "ARMmbed"; repo = "mbedtls"; rev = "${pname}-${version}"; - sha256 = "1mzh92yyz93099a1gb2wvwc76jv12d1k1wg9k3dimbgczxgrkirc"; + sha256 = "0mz7n373b8d287crwi6kq2hb8ryyi228j38h25744lqai23qj5cf"; }; nativeBuildInputs = [ cmake ninja perl python ]; From 113bc6492db8155241fb099712b0560483a30e6d Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Sat, 30 Jan 2021 14:15:56 +0100 Subject: [PATCH 11/27] gradle: 6.7 -> 6.8.1 --- .../tools/build-managers/gradle/default.nix | 10 +++++----- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix index 638be6b02d83..d314064904d1 100644 --- a/pkgs/development/tools/build-managers/gradle/default.nix +++ b/pkgs/development/tools/build-managers/gradle/default.nix @@ -51,15 +51,15 @@ rec { }; }; - gradle_latest = gradle_6_7; + gradle_latest = gradle_6_8; - gradle_6_7 = gradleGen rec { - name = "gradle-6.7"; - nativeVersion = "0.22-milestone-8"; + gradle_6_8 = gradleGen rec { + name = "gradle-6.8.1"; + nativeVersion = "0.22-milestone-9"; src = fetchurl { url = "https://services.gradle.org/distributions/${name}-bin.zip"; - sha256 = "1i6zm55wzy13wvvmf3804b0rs47yrqqablf4gpf374ls05cpgmca"; + sha256 = "1zfn7400k39qbiidd5zxay6v5f5xz8x4g7rrf04p71bkmws1lngx"; }; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f7c74d2f01ca..a6a8a7663dd3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12203,7 +12203,7 @@ in gradle_4_10 = res.gradleGen.gradle_4_10; gradle_4 = gradle_4_10; gradle_5 = res.gradleGen.gradle_5_6; - gradle_6 = res.gradleGen.gradle_6_7; + gradle_6 = res.gradleGen.gradle_6_8; gperf = callPackage ../development/tools/misc/gperf { }; # 3.1 changed some parameters from int to size_t, leading to mismatches. From 0fa48587917c6ed7be02aba4d76ca126c69407a9 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sat, 30 Jan 2021 20:26:37 +0700 Subject: [PATCH 12/27] release-notes/rl-2103: mention deprecation of stdenv.lib --- nixos/doc/manual/release-notes/rl-2103.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml index 24a0281310c6..235b9ba1ed90 100644 --- a/nixos/doc/manual/release-notes/rl-2103.xml +++ b/nixos/doc/manual/release-notes/rl-2103.xml @@ -477,6 +477,14 @@ self: super: Other Notable Changes + + + stdenv.lib has been deprecated and will break + eval in 21.11. Please use pkgs.lib instead. + See #108938 + for details. + + The Mailman NixOS module (services.mailman) has a new From 54bf37a9576f6e510b2403eec926a2948799e96b Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Sat, 30 Jan 2021 14:36:38 +0100 Subject: [PATCH 13/27] mindustry: Use Gradle 6.8 --- pkgs/games/mindustry/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/mindustry/default.nix b/pkgs/games/mindustry/default.nix index fb6b9d70a9cb..ca4dc3b9a17c 100644 --- a/pkgs/games/mindustry/default.nix +++ b/pkgs/games/mindustry/default.nix @@ -88,7 +88,7 @@ let ''; # The default one still uses jdk8 (#89731) - gradle_6 = (gradleGen.override (old: { java = jdk; })).gradle_6_7; + gradle_6 = (gradleGen.override (old: { java = jdk; })).gradle_6_8; # fake build to pre-download deps into fixed-output derivation deps = stdenv.mkDerivation { From 3802fefa621cd9ab34ed46ff76b6eadbc82837b7 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 30 Jan 2021 23:12:45 +0000 Subject: [PATCH 14/27] pythonPackages.rich: 9.1.0 -> 9.10.0 --- pkgs/development/python-modules/rich/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix index 3c0810072c00..64739b3c65c6 100644 --- a/pkgs/development/python-modules/rich/default.nix +++ b/pkgs/development/python-modules/rich/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "rich"; - version = "9.1.0"; + version = "9.10.0"; # tests not included in pypi tarball src = fetchFromGitHub { owner = "willmcgugan"; repo = pname; rev = "v${version}"; - sha256 = "18iha0fs8vm0j11k39yxj26h8qxrp27ijhx6h1yyizbygmr5b5nk"; + sha256 = "1m1rswg16r4pxv7504nk7lpyxrwf16xw4w55rs3jisryx14ccic6"; }; format = "pyproject"; From 201b24adc5ca8d8bd6c4a078ea7d78a14263b3d2 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 20 Jan 2021 20:00:28 +0100 Subject: [PATCH 15/27] git-big-picture: 1.0.0 -> 1.1.1 - Migrate from fetchFromGitHub to fetchPypi to ease SHA256 handling - Drop tests (while not included with PyPI releases) - Install a man page (as shipped by upstream) - Move buildInputs to runtime only Co-Authored-By: Silvan Mosberger --- .../git-and-tools/git-big-picture/default.nix | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix b/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix index 5f84d4235734..35aada8b870f 100644 --- a/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix @@ -1,27 +1,20 @@ -{ fetchFromGitHub, python3Packages, lib, git, graphviz }: +{ python3Packages, lib, git, graphviz }: python3Packages.buildPythonApplication rec { pname = "git-big-picture"; - version = "1.0.0"; + version = "1.1.1"; + format = "wheel"; - src = fetchFromGitHub { - owner = "git-big-picture"; - repo = pname; - rev = "v${version}"; - sha256 = "14yf71iwgk78nw8w0bpijsnnl4vg3bvxsw3vvypxmbrc1nh0bdha"; + src = python3Packages.fetchPypi { + inherit format version; + pname = "git_big_picture"; # underscores needed for working download URL + python = "py3"; # i.e. no Python 2.7 + sha256 = "a20a480057ced1585c4c38497d27a5012f12dd29697313f0bb8fa6ddbb5c17d8"; }; - buildInputs = [ git graphviz ]; - - # NOTE: Tests are disabled due to unpackaged test dependency "Scruf". - # When bumping to 1.1.0, please re-enable and use: - #checkInputs = [ cram git pytest ]; - #checkPhase = "pytest test.py"; - doCheck = false; - postFixup = '' wrapProgram $out/bin/git-big-picture \ - --prefix PATH ":" ${ lib.makeBinPath buildInputs } + --prefix PATH ":" ${ lib.makeBinPath [ git graphviz ] } ''; meta = { From c06068bc1e24733781f631135566f080752bd758 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 30 Jan 2021 23:19:51 +0000 Subject: [PATCH 16/27] osinfo-db: 20201119 -> 20201218 --- pkgs/data/misc/osinfo-db/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/misc/osinfo-db/default.nix b/pkgs/data/misc/osinfo-db/default.nix index 36fc664a83bb..70224aaa8363 100644 --- a/pkgs/data/misc/osinfo-db/default.nix +++ b/pkgs/data/misc/osinfo-db/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "osinfo-db"; - version = "20201119"; + version = "20201218"; src = fetchurl { url = "https://releases.pagure.org/libosinfo/${pname}-${version}.tar.xz"; - sha256 = "1a0c42rh3anl3wy4hpg36s8k37y8zxpi5lc67wjwnj4j6mwi7w3l"; + sha256 = "sha256-APKuXWtnpF1r/q2MXddaDeBnBigx4hwMevPwx5uNq3k="; }; nativeBuildInputs = [ osinfo-db-tools gettext libxml2 ]; From e6bfaee09fe5298788819bd2a40053d255b2cabd Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sat, 30 Jan 2021 18:20:24 -0500 Subject: [PATCH 17/27] unixODBCDrivers.msodbcsql: 17-17.5.1.1-1 -> 17.7.1.1-1 --- pkgs/development/libraries/unixODBCDrivers/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/unixODBCDrivers/default.nix b/pkgs/development/libraries/unixODBCDrivers/default.nix index edbe51998c3e..faf74bcab477 100644 --- a/pkgs/development/libraries/unixODBCDrivers/default.nix +++ b/pkgs/development/libraries/unixODBCDrivers/default.nix @@ -137,12 +137,12 @@ version = "${versionMajor}.${versionMinor}.${versionAdditional}-1"; versionMajor = "17"; - versionMinor = "5"; + versionMinor = "7"; versionAdditional = "1.1"; src = fetchurl { - url = "https://packages.microsoft.com/debian/9/prod/pool/main/m/msodbcsql17/msodbcsql${versionMajor}_${version}_amd64.deb"; - sha256 = "0ysrl01z5ca72qw8n8kwwcl432cgiyw4pibfwg5nifx0kd7i7z4z"; + url = "https://packages.microsoft.com/debian/10/prod/pool/main/m/msodbcsql17/msodbcsql${versionMajor}_${version}_amd64.deb"; + sha256 = "0vwirnp56jibm3qf0kmi4jnz1w7xfhnsfr8imr0c9hg6av4sk3a6"; }; nativeBuildInputs = [ dpkg patchelf ]; From d4276b67cd98d5fab898afbf2b1ab60848d87d84 Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Sat, 30 Jan 2021 16:37:21 -0800 Subject: [PATCH 18/27] libjpeg: update sha256 --- pkgs/development/libraries/libjpeg/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libjpeg/default.nix b/pkgs/development/libraries/libjpeg/default.nix index f462d9824a42..65482e8e9c60 100644 --- a/pkgs/development/libraries/libjpeg/default.nix +++ b/pkgs/development/libraries/libjpeg/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation { src = fetchurl { url = "http://www.ijg.org/files/jpegsrc.v9d.tar.gz"; - sha256 = "0clwys9lcqlxqgcw8s1gwfm5ix2zjlqpklmd3mbvqmj5ibj51jwr"; + sha256 = "1vkip9rz4hz8f31a2kl7wl7f772wg1z0fg1fbd1653wzwlxllhvc"; }; configureFlags = optional static "--enable-static --disable-shared"; From 999612636f93c8e6e77d37d77ddc9edef202af6e Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 31 Jan 2021 01:34:04 +0000 Subject: [PATCH 19/27] postgresql11Packages.plpgsql_check: 1.15.1 -> 1.15.2 --- pkgs/servers/sql/postgresql/ext/plpgsql_check.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix b/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix index 5ce32177d51b..d6df5e4ba0d5 100644 --- a/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix +++ b/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "plpgsql_check"; - version = "1.15.1"; + version = "1.15.2"; src = fetchFromGitHub { owner = "okbob"; repo = pname; rev = "v${version}"; - sha256 = "0rjbzcdvwx19ql0ilccr47inilf7kh5hn7aacjqs1nxk91g3x7yf"; + sha256 = "sha256-mYFItrFC0BeRwLfZA1SAV+4rvrNrx75lTWS7w2ZDHag="; }; buildInputs = [ postgresql ]; From 5a825670b36a4a825a2e103e798e39fd3fada90f Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 31 Jan 2021 01:51:09 +0000 Subject: [PATCH 20/27] python37Packages.libcloud: 3.3.0 -> 3.3.1 --- pkgs/development/python-modules/libcloud/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/libcloud/default.nix b/pkgs/development/python-modules/libcloud/default.nix index bda0553b8eee..72faf56069d6 100644 --- a/pkgs/development/python-modules/libcloud/default.nix +++ b/pkgs/development/python-modules/libcloud/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "apache-libcloud"; - version = "3.3.0"; + version = "3.3.1"; src = fetchPypi { inherit pname version; - sha256 = "2e3e4d02f9b3197f9119e737bc704fba52f34459d4bc96d8ad8f183d600747ba"; + sha256 = "d7450453eaf5904eb4fb4f74cf9f37dc83721a719bce34f5abb336b1a1ab974d"; }; checkInputs = [ mock pytest pytestrunner requests-mock ]; From c473d7f365e4914a1f8fc2f9b412899562c4f6ae Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 30 Jan 2021 20:51:10 -0500 Subject: [PATCH 21/27] python37Packages.libcloud: update meta --- pkgs/development/python-modules/libcloud/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/libcloud/default.nix b/pkgs/development/python-modules/libcloud/default.nix index 72faf56069d6..176dfd8ce954 100644 --- a/pkgs/development/python-modules/libcloud/default.nix +++ b/pkgs/development/python-modules/libcloud/default.nix @@ -30,7 +30,8 @@ buildPythonPackage rec { meta = with lib; { description = "A unified interface to many cloud providers"; - homepage = "http://incubator.apache.org/libcloud/"; + homepage = "https://libcloud.apache.org/"; + changelog = "https://github.com/apache/libcloud/blob/v${version}/CHANGES.rst"; license = licenses.asl20; }; From 463842d4473c543b0fbb06e08fe59871766a4961 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 30 Jan 2021 20:52:10 -0500 Subject: [PATCH 22/27] python37Packages.libcloud: add pythonImportsCheck --- pkgs/development/python-modules/libcloud/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/libcloud/default.nix b/pkgs/development/python-modules/libcloud/default.nix index 176dfd8ce954..0449f6099581 100644 --- a/pkgs/development/python-modules/libcloud/default.nix +++ b/pkgs/development/python-modules/libcloud/default.nix @@ -28,6 +28,8 @@ buildPythonPackage rec { # requires a certificates file doCheck = false; + pythonImportsCheck = [ "libcloud" ]; + meta = with lib; { description = "A unified interface to many cloud providers"; homepage = "https://libcloud.apache.org/"; From 38df477aa7aa48cc2b34b863ef447a66bd567447 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 31 Jan 2021 01:55:31 +0000 Subject: [PATCH 23/27] postgresql11Packages.pgrouting: 3.1.2 -> 3.1.3 --- pkgs/servers/sql/postgresql/ext/pgrouting.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pgrouting.nix b/pkgs/servers/sql/postgresql/ext/pgrouting.nix index 6604b52cfd3d..b2a0ee0f80ee 100644 --- a/pkgs/servers/sql/postgresql/ext/pgrouting.nix +++ b/pkgs/servers/sql/postgresql/ext/pgrouting.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "pgrouting"; - version = "3.1.2"; + version = "3.1.3"; nativeBuildInputs = [ cmake perl ]; buildInputs = [ postgresql boost ]; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { owner = "pgRouting"; repo = pname; rev = "v${version}"; - sha256 = "sha256-9M8Hug+znihViHC/57aPyc7Zgbeb1H8a/iVCfAG/Am8="; + sha256 = "sha256-ahDQ+nSTeIsdjID/ZwiGZCVBzOf0/oQs3SYsFYEEoxY="; }; installPhase = '' From ada45d2a9bb354998a9dfa54b453e277094a0d43 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 31 Jan 2021 01:55:32 +0000 Subject: [PATCH 24/27] postgresql11Packages.pgrouting: update license --- pkgs/servers/sql/postgresql/ext/pgrouting.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/sql/postgresql/ext/pgrouting.nix b/pkgs/servers/sql/postgresql/ext/pgrouting.nix index b2a0ee0f80ee..67e7fc5bc461 100644 --- a/pkgs/servers/sql/postgresql/ext/pgrouting.nix +++ b/pkgs/servers/sql/postgresql/ext/pgrouting.nix @@ -26,6 +26,6 @@ stdenv.mkDerivation rec { changelog = "https://github.com/pgRouting/pgrouting/releases/tag/v${version}"; maintainers = [ maintainers.steve-chavez ]; platforms = postgresql.meta.platforms; - license = licenses.gpl2; + license = licenses.gpl2Plus; }; } From 27da11972d3fd9353f81e94a6549e8a0da40f45d Mon Sep 17 00:00:00 2001 From: Elias Probst Date: Sun, 4 Oct 2020 18:47:52 +0200 Subject: [PATCH 25/27] nixos/restic: correct location of cache directory By default, restic determines the location of the cache based on the XDG base dir specification, which is `~/.cache/restic` when the environment variable `$XDG_CACHE_HOME` isn't set. As restic is executed as root by default, this resulted in the cache being written to `/root/.cache/restic`, which is not quite right for a system service and also meant, multiple backup services would use the same cache directory - potentially causing issues with locking, data corruption, etc. The goal was to ensure, restic uses the correct cache location for a system service - one cache per backup specification, using `/var/cache` as the base directory for it. systemd sets the environment variable `$CACHE_DIRECTORY` once `CacheDirectory=` is defined, but restic doesn't change its behavior based on the presence of this environment variable. Instead, the specifier [1] `%C` can be used to point restic explicitly towards the correct cache location using the `--cache-dir` argument. Furthermore, the `CacheDirectoryMode=` was set to `0700`, as the default of `0755` is far too open in this case, as the cache might contain sensitive data. [1] https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Specifiers --- nixos/doc/manual/release-notes/rl-2103.xml | 5 +++++ nixos/modules/services/backup/restic.nix | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml index 24a0281310c6..41086e2220f0 100644 --- a/nixos/doc/manual/release-notes/rl-2103.xml +++ b/nixos/doc/manual/release-notes/rl-2103.xml @@ -653,6 +653,11 @@ self: super: The platform grouping of these things never meant anything, and was just a historial/implementation artifact that was overdue removal. + + + services.restic now uses a dedicated cache directory for every backup defined in services.restic.backups. The old global cache directory, /root/.cache/restic, is now unused and can be removed to free up disk space. + + diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index d869835bf07e..573f0efa9da4 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -243,9 +243,11 @@ in restartIfChanged = false; serviceConfig = { Type = "oneshot"; - ExecStart = [ "${resticCmd} backup ${concatStringsSep " " backup.extraBackupArgs} ${backupPaths}" ] ++ pruneCmd; + ExecStart = [ "${resticCmd} backup --cache-dir=%C/restic-backups-${name} ${concatStringsSep " " backup.extraBackupArgs} ${backupPaths}" ] ++ pruneCmd; User = backup.user; RuntimeDirectory = "restic-backups-${name}"; + CacheDirectory = "restic-backups-${name}"; + CacheDirectoryMode = "0700"; } // optionalAttrs (backup.s3CredentialsFile != null) { EnvironmentFile = backup.s3CredentialsFile; }; From afb84146cfa303c5568aeb8e8bdeb148465d9cc7 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 30 Jan 2021 06:02:11 +0000 Subject: [PATCH 26/27] kdiff3: 1.8.4 -> 1.8.5 --- pkgs/tools/text/kdiff3/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/kdiff3/default.nix b/pkgs/tools/text/kdiff3/default.nix index 862faadea3f1..c230278c0a02 100644 --- a/pkgs/tools/text/kdiff3/default.nix +++ b/pkgs/tools/text/kdiff3/default.nix @@ -6,11 +6,11 @@ mkDerivation rec { pname = "kdiff3"; - version = "1.8.4"; + version = "1.8.5"; src = fetchurl { url = "https://download.kde.org/stable/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1f1vyhvc31yfxspv5lzw8qjd2w8x74s2fmij1921m307g84qxqbn"; + sha256 = "sha256-vJL30E6xI/nFbb4wR69nv3FSQPqZSHrB0czypF4IVME="; }; nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; From 227693ed69a03605d7b9d5e051f2158aaf8cbe3c Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sun, 31 Jan 2021 03:03:11 +0000 Subject: [PATCH 27/27] Update pkgs/stdenv/generic/default.nix Co-authored-by: John Ericson --- pkgs/stdenv/generic/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 125eff9aec57..52d57a6decee 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -153,11 +153,11 @@ let }) mkDerivation; # Slated for deprecation in 21.11 - lib = builtins.trace ( "Warning: `stdenv.lib` is deprecated " - + "and will be removed in the next release. " - + "Please use `pkgs.lib` instead. " - + "For more information see https://github.com/NixOS/nixpkgs/issues/108938") - lib; + lib = builtins.trace + ( "Warning: `stdenv.lib` is deprecated and will be removed in the next release." + + " Please use `pkgs.lib` instead." + + " For more information see https://github.com/NixOS/nixpkgs/issues/108938") + lib; inherit fetchurlBoot;