From beff245878325f7013320dfc11b5a2af27523880 Mon Sep 17 00:00:00 2001 From: seb314 Date: Tue, 6 Feb 2024 20:36:20 +0100 Subject: [PATCH 01/54] python3Packages.piep: enable for python3 This re-enables the piep package for python3, as piep v0.10.0 (the current version) works fine with python3. The `disabled = isPy3k` line had been added for an earlier version of piep. Here, I chose not to remove the `disabled = ...` line, but to change to condition to `!isPy3k`, because https://github.com/timbertson/piep/commit/a5594a4e6a163d1ac3f7f95e1146bf4d8372344d and https://github.com/timbertson/piep/blob/9c032f593bbcb977b3b6048081bfa482dfe9a148/piep/main.py#L1 seem to indicate that piep no longer works with python2. --- pkgs/development/python-modules/piep/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/piep/default.nix b/pkgs/development/python-modules/piep/default.nix index 0825380a925b..ec3a9f5ec53c 100644 --- a/pkgs/development/python-modules/piep/default.nix +++ b/pkgs/development/python-modules/piep/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { version = "0.10.0"; format = "setuptools"; pname = "piep"; - disabled = isPy3k; + disabled = !isPy3k; src = fetchPypi { inherit pname version; From 9f9aa31d99628c877a25cd69b34d3dc4c27e227a Mon Sep 17 00:00:00 2001 From: Anders Rytter Hansen Date: Fri, 22 Mar 2024 17:14:02 +0100 Subject: [PATCH 02/54] gitnuro 1.1.1 -> 1.3.1 --- pkgs/applications/version-management/gitnuro/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/gitnuro/default.nix b/pkgs/applications/version-management/gitnuro/default.nix index e577cbaa6f61..664baff44766 100644 --- a/pkgs/applications/version-management/gitnuro/default.nix +++ b/pkgs/applications/version-management/gitnuro/default.nix @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { pname = "gitnuro"; - version = "1.1.1"; + version = "1.3.1"; src = fetchurl { - url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-${version}.jar"; - hash = "sha256-ugZBk/aQ2pjL9xY66g20MorAQ02GHIdJTv8ejadaBgY="; + url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-x86_64-${version}.jar"; + hash = "sha256-7yne9dD/7VT+H4tIBJvpOf8ksECCpoNAa8TSmFmjYMw="; }; icon = fetchurl { From d2ca701f821885478cea9795d5ed06e7ec320e57 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 27 Apr 2024 11:51:59 +0100 Subject: [PATCH 03/54] psitransfer: 2.1.2 -> 2.2.0 --- pkgs/servers/psitransfer/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/psitransfer/default.nix b/pkgs/servers/psitransfer/default.nix index e39ae107217e..621ad70184a6 100644 --- a/pkgs/servers/psitransfer/default.nix +++ b/pkgs/servers/psitransfer/default.nix @@ -1,22 +1,24 @@ { lib , buildNpmPackage , fetchFromGitHub +, pkg-config +, vips }: let pname = "psitransfer"; - version = "2.1.2"; + version = "2.2.0"; src = fetchFromGitHub { owner = "psi-4ward"; repo = "psitransfer"; rev = "v${version}"; - hash = "sha256-dBAieXIwCEstR9m+6+2/OLPKo2qHynZ1t372Il0mkXk="; + hash = "sha256-5o4QliAXgSZekIy0CNWfEuOxNl0uetL8C8RKUJ8HsNA="; }; app = buildNpmPackage { pname = "${pname}-app"; inherit version src; - npmDepsHash = "sha256-iCd+I/aTMwQqAMRHan3T191XNz4S3Cy6CDxSLIYY7IA="; + npmDepsHash = "sha256-q7E+osWIf6VZ3JvxCXoZYeF28aMgmKP6EzQkksUUjeY="; postPatch = '' # https://github.com/psi-4ward/psitransfer/pull/284 @@ -31,7 +33,12 @@ let in buildNpmPackage { inherit pname version src; - npmDepsHash = "sha256-H22T5IU8bjbsWhwhchDqppvYfcatbXSWqp6gdoek1Z8="; + npmDepsHash = "sha256-EW/Fej58LE/nbJomPtWvEjDveAUdo0jIWwC+ziN0gy0="; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ + vips # for 'sharp' dependency + ]; postPatch = '' rm -r public/app From c727fff763507d49f7a9a7412fd6d311eb1145fb Mon Sep 17 00:00:00 2001 From: Casey Link Date: Thu, 2 May 2024 09:06:52 +0200 Subject: [PATCH 04/54] roon-server: 2.0-1392 -> 2.0-1407 release notes: https://community.roonlabs.com/t/arc-connectivity-improvements-roon-build-1407-arc-266/272146 --- pkgs/servers/roon-server/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/roon-server/default.nix b/pkgs/servers/roon-server/default.nix index bbcd4e9165ae..14fb54f52c8c 100644 --- a/pkgs/servers/roon-server/default.nix +++ b/pkgs/servers/roon-server/default.nix @@ -15,7 +15,7 @@ , stdenv }: let - version = "2.0-1392"; + version = "2.0-1407"; urlVersion = builtins.replaceStrings [ "." "-" ] [ "00" "0" ] version; in stdenv.mkDerivation { @@ -24,7 +24,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://download.roonlabs.com/updates/production/RoonServer_linuxx64_${urlVersion}.tar.bz2"; - hash = "sha256-S6p2xlWa1Xgp+umRx1KCs4g1u7JZTByNBNUSJBQweUs="; + hash = "sha256-PW28Rw0prHS/q879GYVKaiXe0i2w6BVwgcTWOUhAhOk="; }; dontConfigure = true; From 8814c364a386d7ff271b6a6058301bc89d49d199 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Fri, 5 Apr 2024 14:34:12 +0200 Subject: [PATCH 05/54] nixos/top-level: Rename `system.forbiddenDependenciesRegex` to `system.forbiddenDependenciesRegexes` and turn it in to a list. The current setting of system.forbiddenDependenciesRegex is a string, meaning only one such regex as any additional setting would result in conflicts. As maintainers have already started using this setting eg. in profiles, it would be good if this setting would accept a list of regex to allow the end user to make use of it in addition to package maintainers. --- .../manual/release-notes/rl-2405.section.md | 2 ++ nixos/modules/profiles/perlless.nix | 2 +- nixos/modules/system/activation/test.nix | 4 ++-- nixos/modules/system/activation/top-level.nix | 23 +++++++++---------- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index bc814ad30505..19831c24e02e 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -276,6 +276,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m "mysecret"` becomes `services.aria2.rpcSecretFile = "/path/to/secret_file"` where the file `secret_file` contains the string `mysecret`. +- The `system.forbiddenDependenciesRegex` option has been renamed to `system.forbiddenDependenciesRegexes` and now has the type of `listOf string` instead of `string` to accept multiple regexes. + - `openssh`, `openssh_hpn` and `openssh_gssapi` are now compiled without support for the DSA signature algorithm as it is being deprecated upstream. Users still relying on DSA keys should consider upgrading to another signature algorithm. However, for the time being it is possible to restore DSA key support using `override` to set `dsaKeysSupport = true`. diff --git a/nixos/modules/profiles/perlless.nix b/nixos/modules/profiles/perlless.nix index 90abd14f077e..010e4f8f2a28 100644 --- a/nixos/modules/profiles/perlless.nix +++ b/nixos/modules/profiles/perlless.nix @@ -26,6 +26,6 @@ # Check that the system does not contain a Nix store path that contains the # string "perl". - system.forbiddenDependenciesRegex = "perl"; + system.forbiddenDependenciesRegexes = ["perl"]; } diff --git a/nixos/modules/system/activation/test.nix b/nixos/modules/system/activation/test.nix index 8cf000451c6e..fd251d528957 100644 --- a/nixos/modules/system/activation/test.nix +++ b/nixos/modules/system/activation/test.nix @@ -5,7 +5,7 @@ }: let node-forbiddenDependencies-fail = nixos ({ ... }: { - system.forbiddenDependenciesRegex = "-dev$"; + system.forbiddenDependenciesRegexes = ["-dev$"]; environment.etc."dev-dependency" = { text = "${expect.dev}"; }; @@ -14,7 +14,7 @@ let boot.loader.grub.enable = false; }); node-forbiddenDependencies-succeed = nixos ({ ... }: { - system.forbiddenDependenciesRegex = "-dev$"; + system.forbiddenDependenciesRegexes = ["-dev$"]; system.extraDependencies = [ expect.dev ]; documentation.enable = false; fileSystems."/".device = "ignore-root-device"; diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 4cf3012646fa..ed0ece19f2fa 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -86,6 +86,7 @@ in ../build.nix (mkRemovedOptionModule [ "nesting" "clone" ] "Use `specialisation.«name» = { inheritParentConfig = true; configuration = { ... }; }` instead.") (mkRemovedOptionModule [ "nesting" "children" ] "Use `specialisation.«name».configuration = { ... }` instead.") + (mkRenamedOptionModule [ "system" "forbiddenDependenciesRegex" ] [ "system" "forbiddenDependenciesRegexes" ]) ]; options = { @@ -160,12 +161,12 @@ in ''; }; - system.forbiddenDependenciesRegex = mkOption { - default = ""; - example = "-dev$"; - type = types.str; + system.forbiddenDependenciesRegexes = mkOption { + default = []; + example = ["-dev$"]; + type = types.listOf types.str; description = '' - A POSIX Extended Regular Expression that matches store paths that + POSIX Extended Regular Expressions that match store paths that should not appear in the system closure, with the exception of {option}`system.extraDependencies`, which is not checked. ''; }; @@ -289,15 +290,14 @@ in "$out/configuration.nix" '' + optionalString - (config.system.forbiddenDependenciesRegex != "") - '' - if [[ $forbiddenDependenciesRegex != "" && -n $closureInfo ]]; then - if forbiddenPaths="$(grep -E -- "$forbiddenDependenciesRegex" $closureInfo/store-paths)"; then + (config.system.forbiddenDependenciesRegexes != []) (lib.concatStringsSep "\n" (map (regex: '' + if [[ ${regex} != "" && -n $closureInfo ]]; then + if forbiddenPaths="$(grep -E -- "${regex}" $closureInfo/store-paths)"; then echo -e "System closure $out contains the following disallowed paths:\n$forbiddenPaths" exit 1 fi fi - ''; + '') config.system.forbiddenDependenciesRegexes)); system.systemBuilderArgs = { @@ -319,8 +319,7 @@ in # option, as opposed to `system.extraDependencies`. passedChecks = concatStringsSep " " config.system.checks; } - // lib.optionalAttrs (config.system.forbiddenDependenciesRegex != "") { - inherit (config.system) forbiddenDependenciesRegex; + // lib.optionalAttrs (config.system.forbiddenDependenciesRegexes != []) { closureInfo = pkgs.closureInfo { rootPaths = [ # override to avoid infinite recursion (and to allow using extraDependencies to add forbidden dependencies) (config.system.build.toplevel.overrideAttrs (_: { extraDependencies = []; closureInfo = null; })) From 8eafd7bf31643a65e7f375f9618382c06ecfcd32 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 5 May 2024 14:43:46 -0300 Subject: [PATCH 06/54] openturns: migrate to by-name --- .../default.nix => by-name/op/openturns/package.nix} | 5 ++++- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) rename pkgs/{development/libraries/openturns/default.nix => by-name/op/openturns/package.nix} (96%) diff --git a/pkgs/development/libraries/openturns/default.nix b/pkgs/by-name/op/openturns/package.nix similarity index 96% rename from pkgs/development/libraries/openturns/default.nix rename to pkgs/by-name/op/openturns/package.nix index a2fa42caea60..97d72b1ed45b 100644 --- a/pkgs/development/libraries/openturns/default.nix +++ b/pkgs/by-name/op/openturns/package.nix @@ -17,13 +17,16 @@ , primesieve , pagmo2 , ipopt -, Accelerate +, darwin # tests take an hour to build on a 48-core machine , runTests ? false , enablePython ? false , python3Packages }: +let + inherit (darwin.apple_sdk.frameworks) Accelerate; +in stdenv.mkDerivation rec { pname = "openturns"; version = "1.22"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5d5b5cc233ed..01746d522a58 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23828,10 +23828,6 @@ with pkgs; opensupaplex = callPackage ../games/opensupaplex { }; - openturns = callPackage ../development/libraries/openturns { - inherit (darwin.apple_sdk.frameworks) Accelerate; - }; - open-wbo = callPackage ../applications/science/logic/open-wbo { }; openwsman = callPackage ../development/libraries/openwsman { }; From 19e0ed8128a41a29249a8a92a215a6367cd00949 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 5 May 2024 15:05:18 -0300 Subject: [PATCH 07/54] openturns: pick `lib` output from primesieve --- pkgs/by-name/op/openturns/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/op/openturns/package.nix b/pkgs/by-name/op/openturns/package.nix index 97d72b1ed45b..2d03312479f7 100644 --- a/pkgs/by-name/op/openturns/package.nix +++ b/pkgs/by-name/op/openturns/package.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { ceres-solver dlib hdf5 - primesieve + (lib.getLib primesieve) pagmo2 ipopt ] ++ lib.optionals enablePython [ From 659b429eedda55f7ca8d0953b3d9e4366ccb8456 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 5 May 2024 15:16:49 -0300 Subject: [PATCH 08/54] openturns: refactor - finalAttrs - strictDeps - no nested with --- pkgs/by-name/op/openturns/package.nix | 126 ++++++++++++++------------ 1 file changed, 70 insertions(+), 56 deletions(-) diff --git a/pkgs/by-name/op/openturns/package.nix b/pkgs/by-name/op/openturns/package.nix index 2d03312479f7..152714133fa7 100644 --- a/pkgs/by-name/op/openturns/package.nix +++ b/pkgs/by-name/op/openturns/package.nix @@ -1,85 +1,99 @@ -{ lib -, stdenv -, fetchFromGitHub -, fetchpatch -, cmake -, swig -, boost -, spectra -, libxml2 -, tbb -, hmat-oss -, nlopt -, cminpack -, ceres-solver -, dlib -, hdf5 -, primesieve -, pagmo2 -, ipopt -, darwin -# tests take an hour to build on a 48-core machine -, runTests ? false -, enablePython ? false -, python3Packages +{ + lib, + boost, + ceres-solver, + cmake, + cminpack, + darwin, + dlib, + fetchFromGitHub, + fetchpatch, + hdf5, + hmat-oss, + ipopt, + libxml2, + nlopt, + pagmo2, + primesieve, + python3Packages, + spectra, + stdenv, + swig, + tbb, + # Boolean flags + runTests ? false, # tests take an hour to build on a 48-core machine + enablePython ? false, }: let inherit (darwin.apple_sdk.frameworks) Accelerate; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "openturns"; version = "1.22"; src = fetchFromGitHub { owner = "openturns"; repo = "openturns"; - rev = "v${version}"; - sha256 = "sha256-ku3/mPoa1YJVJB99R/kWlOubIO+OZAiKfPqS/DrtJQk="; + rev = "v${finalAttrs.version}"; + hash = "sha256-ku3/mPoa1YJVJB99R/kWlOubIO+OZAiKfPqS/DrtJQk="; }; - nativeBuildInputs = [ cmake ] ++ lib.optional enablePython python3Packages.sphinx; + nativeBuildInputs = [ + cmake + ] + ++ lib.optionals enablePython [ python3Packages.sphinx ]; + buildInputs = [ - swig + (lib.getLib primesieve) boost - spectra - libxml2 - tbb - hmat-oss - nlopt - cminpack ceres-solver + cminpack dlib hdf5 - (lib.getLib primesieve) - pagmo2 + hmat-oss ipopt - ] ++ lib.optionals enablePython [ - python3Packages.python + libxml2 + nlopt + pagmo2 + spectra + swig + tbb + ] + ++ lib.optionals enablePython [ + python3Packages.dill python3Packages.matplotlib python3Packages.psutil - python3Packages.dill - ] ++ lib.optional stdenv.isDarwin Accelerate; + python3Packages.python + ] + ++ lib.optionals stdenv.isDarwin [ + Accelerate + ]; cmakeFlags = [ - "-DOPENTURNS_SYSCONFIG_PATH=$out/etc" - "-DCMAKE_UNITY_BUILD=ON" - "-DCMAKE_UNITY_BUILD_BATCH_SIZE=32" - "-DSWIG_COMPILE_FLAGS='-O1'" - "-DUSE_SPHINX=${if enablePython then "ON" else "OFF"}" - "-DBUILD_PYTHON=${if enablePython then "ON" else "OFF"}" + (lib.cmakeBool "BUILD_PYTHON" enablePython) + (lib.cmakeBool "CMAKE_UNITY_BUILD" true) + (lib.cmakeBool "USE_SPHINX" enablePython) + (lib.cmakeFeature "CMAKE_UNITY_BUILD_BATCH_SIZE" "32") + (lib.cmakeFeature "SWIG_COMPILE_FLAGS" "-O1") + (lib.cmakeOptionType "PATH" "OPENTURNS_SYSCONFIG_PATH" "$out/etc") ]; + checkTarget = lib.concatStringsSep " " [ + "tests" + "check" + ]; + + strictDeps = true; + doCheck = runTests; - checkTarget = "tests check"; - - meta = with lib; { - description = "Multivariate probabilistic modeling and uncertainty treatment library"; - license = with licenses; [ lgpl3 gpl3 ]; + meta = { homepage = "https://openturns.github.io/www/"; - changelog = "https://github.com/openturns/openturns/raw/v${version}/ChangeLog"; - maintainers = with maintainers; [ gdinh ]; - platforms = platforms.unix; + description = "Multivariate probabilistic modeling and uncertainty treatment library"; + changelog = "https://github.com/openturns/openturns/raw/v${finalAttrs.version}/ChangeLog"; + license = with lib.licenses; [ lgpl3Plus gpl3Plus ]; + maintainers = with lib.maintainers; [ gdinh ]; + platforms = lib.platforms.unix; }; -} +}) From 8b7a1252d2115f672be75fa79da535f5f7febb3c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 5 May 2024 23:14:19 +0000 Subject: [PATCH 09/54] python311Packages.meraki: 1.45.0 -> 1.46.0 --- pkgs/development/python-modules/meraki/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/meraki/default.nix b/pkgs/development/python-modules/meraki/default.nix index f0d0e4087e36..1e1d3c3f67d6 100644 --- a/pkgs/development/python-modules/meraki/default.nix +++ b/pkgs/development/python-modules/meraki/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "meraki"; - version = "1.45.0"; + version = "1.46.0"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-PBeeohKNzAMlEdAjzB8fsVPc+ml+mcaWHoVWPeP93Bo="; + hash = "sha256-f3K+59+9NO33GO1SBZhKfqHPO9p5kivDeLNd780cZu8="; }; propagatedBuildInputs = [ From 92163354aa39805eaf22f6d640aea35d9574d4ff Mon Sep 17 00:00:00 2001 From: Bu Kun <65808665+pokon548@users.noreply.github.com> Date: Mon, 6 May 2024 08:15:15 +0800 Subject: [PATCH 10/54] flowtime: 6.1 -> 6.5 --- .../flowtime/default.nix => by-name/fl/flowtime/package.nix} | 4 ++-- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) rename pkgs/{applications/misc/flowtime/default.nix => by-name/fl/flowtime/package.nix} (92%) diff --git a/pkgs/applications/misc/flowtime/default.nix b/pkgs/by-name/fl/flowtime/package.nix similarity index 92% rename from pkgs/applications/misc/flowtime/default.nix rename to pkgs/by-name/fl/flowtime/package.nix index 06962d75452b..d372d1d45379 100644 --- a/pkgs/applications/misc/flowtime/default.nix +++ b/pkgs/by-name/fl/flowtime/package.nix @@ -17,13 +17,13 @@ stdenv.mkDerivation rec { pname = "flowtime"; - version = "6.1"; + version = "6.5"; src = fetchFromGitHub { owner = "Diego-Ivan"; repo = "Flowtime"; rev = "v${version}"; - hash = "sha256-wTqHTkt1O3Da2fzxf6DiQjrqOt65ZEhLOkGK5C6HzIk="; + hash = "sha256-J0Pscv0ZOpA/LV2mPTLOmDPQpfZhizTghatGnrJHToE="; }; nativeBuildInputs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1e09e4f57092..729b22de98bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30700,8 +30700,6 @@ with pkgs; expenses = callPackage ../applications/misc/expenses { }; - flowtime = callPackage ../applications/misc/flowtime { }; - furnace = callPackage ../applications/audio/furnace { inherit (darwin.apple_sdk.frameworks) Cocoa; }; From 7b6b627a6653c5917c74406896575f0a7c138a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Mon, 6 May 2024 03:18:29 +0200 Subject: [PATCH 11/54] nixos/caddy: Comment why ExecStart is reset --- nixos/modules/services/web-servers/caddy/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/web-servers/caddy/default.nix b/nixos/modules/services/web-servers/caddy/default.nix index 08ce50bff62c..7faf0e895a43 100644 --- a/nixos/modules/services/web-servers/caddy/default.nix +++ b/nixos/modules/services/web-servers/caddy/default.nix @@ -360,6 +360,7 @@ in serviceConfig = let runOptions = ''--config ${configPath} ${optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"}''; in { + # Override the `ExecStart` line from upstream's systemd unit file by our own: # https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= # If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect. ExecStart = [ "" ''${cfg.package}/bin/caddy run ${runOptions} ${optionalString cfg.resume "--resume"}'' ]; From a0bbb7891ede5ea27f97c354d57f528970895974 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 6 May 2024 05:02:45 +0000 Subject: [PATCH 12/54] home-manager: 0-unstable-2024-04-29 -> 0-unstable-2024-05-05 --- pkgs/by-name/ho/home-manager/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ho/home-manager/package.nix b/pkgs/by-name/ho/home-manager/package.nix index eab2ca256876..ea2057a39831 100644 --- a/pkgs/by-name/ho/home-manager/package.nix +++ b/pkgs/by-name/ho/home-manager/package.nix @@ -16,14 +16,14 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "home-manager"; - version = "0-unstable-2024-04-29"; + version = "0-unstable-2024-05-05"; src = fetchFromGitHub { name = "home-manager-source"; owner = "nix-community"; repo = "home-manager"; - rev = "9fe79591c1005ce6f93084ae7f7dab0a2891440d"; - hash = "sha256-OzD1P0o46uD3Ix4ZI/g9z3YAeg+4g+W3qctB6bNOReo="; + rev = "3dfe05aa9b5646995ace887931fa60269a039777"; + hash = "sha256-QXpLmgmisNK2Zgpnu9DiO9ScrKJuJ4zmiMTNpObVIuk="; }; nativeBuildInputs = [ From aa21f5b9a3fb2beb181bf0cdf5bb06bca4daabb6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 10:13:22 +0200 Subject: [PATCH 13/54] python312Packages.publicsuffixlist: 0.10.0.20240502 -> 0.10.0.20240506 --- pkgs/development/python-modules/publicsuffixlist/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/publicsuffixlist/default.nix b/pkgs/development/python-modules/publicsuffixlist/default.nix index c7793a14a896..4fcf9436e071 100644 --- a/pkgs/development/python-modules/publicsuffixlist/default.nix +++ b/pkgs/development/python-modules/publicsuffixlist/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "publicsuffixlist"; - version = "0.10.0.20240502"; + version = "0.10.0.20240506"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Hy0DmawyjUXn35tTV39Mpp+Xe16hDTbkyQoBdKS/d0o="; + hash = "sha256-gg1UcELZ8+gQg4VcBsagHhtUc9i6/d03q9oanyDT6K8="; }; build-system = [ setuptools ]; From aef8750ef1a305b4f20fd63e9c1baab9943eae2b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 10:15:08 +0200 Subject: [PATCH 14/54] python312Packages.rns: 0.7.3 -> 0.7.4 Diff: https://github.com/markqvist/Reticulum/compare/refs/tags/0.7.3...0.7.4 Changelog: https://github.com/markqvist/Reticulum/releases/tag/0.7.4 --- pkgs/development/python-modules/rns/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rns/default.nix b/pkgs/development/python-modules/rns/default.nix index 0df16e875cf1..4a9562bbd14c 100644 --- a/pkgs/development/python-modules/rns/default.nix +++ b/pkgs/development/python-modules/rns/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "rns"; - version = "0.7.3"; + version = "0.7.4"; pyproject = true; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "markqvist"; repo = "Reticulum"; rev = "refs/tags/${version}"; - hash = "sha256-QcYjqqeXBKx+Ef00Bw1OJMWDMdQgp/fqh3r5yhsa0Kg="; + hash = "sha256-M6iI554lv6PF5sIdOoaMIlQHP5YU8WM8YxfHMWhLSdE="; }; nativeBuildInputs = [ From e55e1a4d469d5be3737bf4024313484644a3abc8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 10:15:59 +0200 Subject: [PATCH 15/54] python312Packages.rns: refactor --- pkgs/development/python-modules/rns/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rns/default.nix b/pkgs/development/python-modules/rns/default.nix index 4a9562bbd14c..294e70f48b29 100644 --- a/pkgs/development/python-modules/rns/default.nix +++ b/pkgs/development/python-modules/rns/default.nix @@ -22,11 +22,11 @@ buildPythonPackage rec { hash = "sha256-M6iI554lv6PF5sIdOoaMIlQHP5YU8WM8YxfHMWhLSdE="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ cryptography netifaces pyserial From d2a6274b847f9fb0469c7f39f38289d8eb4c63ea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 10:16:17 +0200 Subject: [PATCH 16/54] python312Packages.rns: format with nixfmt --- .../python-modules/rns/default.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/rns/default.nix b/pkgs/development/python-modules/rns/default.nix index 294e70f48b29..6c3c582b2b0e 100644 --- a/pkgs/development/python-modules/rns/default.nix +++ b/pkgs/development/python-modules/rns/default.nix @@ -1,11 +1,12 @@ -{ lib -, buildPythonPackage -, cryptography -, fetchFromGitHub -, netifaces -, pyserial -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + cryptography, + fetchFromGitHub, + netifaces, + pyserial, + pythonOlder, + setuptools, }: buildPythonPackage rec { @@ -22,9 +23,7 @@ buildPythonPackage rec { hash = "sha256-M6iI554lv6PF5sIdOoaMIlQHP5YU8WM8YxfHMWhLSdE="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; dependencies = [ cryptography @@ -35,9 +34,7 @@ buildPythonPackage rec { # Module has no tests doCheck = false; - pythonImportsCheck = [ - "RNS" - ]; + pythonImportsCheck = [ "RNS" ]; meta = with lib; { description = "Cryptography-based networking stack for wide-area networks"; From 552ebcf2ea6a6ae34f783d2e070e418a4c9c4f6c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 13:11:19 +0200 Subject: [PATCH 17/54] python312Packages.cyclonedx-python-lib: 6.4.4 -> 7.3.2 Diff: https://github.com/CycloneDX/cyclonedx-python-lib/compare/refs/tags/v6.4.4...v7.3.2 Changelog: https://github.com/CycloneDX/cyclonedx-python-lib/releases/tag/v7.3.2 --- .../python-modules/cyclonedx-python-lib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix index 10cd64f83e62..b6f1f8fbe892 100644 --- a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix +++ b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "cyclonedx-python-lib"; - version = "6.4.4"; + version = "7.3.2"; pyproject = true; disabled = pythonOlder "3.9"; @@ -32,7 +32,7 @@ buildPythonPackage rec { owner = "CycloneDX"; repo = "cyclonedx-python-lib"; rev = "refs/tags/v${version}"; - hash = "sha256-PNacp16WZHNblFyA117hSL87IKGMrW0OYNXCSoBoO8Q="; + hash = "sha256-z+QBjMT0L7dqCJvbwok9TWQajIPzmAq3XPLWFxmhPsk="; }; nativeBuildInputs = [ From e18c33a8e6eeb2654607471ed30ed76cdad92731 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 13:45:02 +0200 Subject: [PATCH 18/54] checkov: relax cyclonedx-python-lib --- pkgs/development/tools/analysis/checkov/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index bb9506dee19a..4ce6bfe860ea 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -23,6 +23,7 @@ python3.pkgs.buildPythonApplication rec { "bc-python-hcl2" "boto3" "botocore" + "cyclonedx-python-lib" "dpath" "igraph" "license-expression" From 51da4621cd15c85958fa62e54e3baa7193ba6d75 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 13:47:40 +0200 Subject: [PATCH 19/54] python312Packages.cyclonedx-python-lib: refactor --- .../python-modules/cyclonedx-python-lib/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix index b6f1f8fbe892..89cd5f6f1046 100644 --- a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix +++ b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix @@ -35,12 +35,15 @@ buildPythonPackage rec { hash = "sha256-z+QBjMT0L7dqCJvbwok9TWQajIPzmAq3XPLWFxmhPsk="; }; - nativeBuildInputs = [ + build-system = [ poetry-core + ]; + + nativeBuildInputs = [ pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ importlib-metadata license-expression packageurl-python From a96f5b3439f1234340a2ab4845267a522bbabb97 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 13:48:02 +0200 Subject: [PATCH 20/54] python312Packages.cyclonedx-python-lib: format with nixfmt --- .../cyclonedx-python-lib/default.nix | 63 ++++++++----------- 1 file changed, 27 insertions(+), 36 deletions(-) diff --git a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix index 89cd5f6f1046..a065168d53c8 100644 --- a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix +++ b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix @@ -1,24 +1,25 @@ -{ lib -, buildPythonPackage -, ddt -, fetchFromGitHub -, importlib-metadata -, jsonschema -, license-expression -, lxml -, packageurl-python -, py-serializable -, pythonRelaxDepsHook -, poetry-core -, pytestCheckHook -, pythonOlder -, requirements-parser -, sortedcontainers -, setuptools -, toml -, types-setuptools -, types-toml -, xmldiff +{ + lib, + buildPythonPackage, + ddt, + fetchFromGitHub, + importlib-metadata, + jsonschema, + license-expression, + lxml, + packageurl-python, + py-serializable, + pythonRelaxDepsHook, + poetry-core, + pytestCheckHook, + pythonOlder, + requirements-parser, + sortedcontainers, + setuptools, + toml, + types-setuptools, + types-toml, + xmldiff, }: buildPythonPackage rec { @@ -35,13 +36,9 @@ buildPythonPackage rec { hash = "sha256-z+QBjMT0L7dqCJvbwok9TWQajIPzmAq3XPLWFxmhPsk="; }; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; dependencies = [ importlib-metadata @@ -64,21 +61,15 @@ buildPythonPackage rec { xmldiff ]; - pythonImportsCheck = [ - "cyclonedx" - ]; + pythonImportsCheck = [ "cyclonedx" ]; - pythonRelaxDeps = [ - "py-serializable" - ]; + pythonRelaxDeps = [ "py-serializable" ]; preCheck = '' export PYTHONPATH=tests''${PYTHONPATH+:$PYTHONPATH} ''; - pytestFlagsArray = [ - "tests/" - ]; + pytestFlagsArray = [ "tests/" ]; disabledTests = [ # These tests require network access From a57df05e6e23f186fea2f8cc3521e5cd8132b5d5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 6 May 2024 12:53:30 +0000 Subject: [PATCH 21/54] sbt: 1.9.9 -> 1.10.0 --- pkgs/development/tools/build-managers/sbt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix index 580cf127b3c6..3596f94b61de 100644 --- a/pkgs/development/tools/build-managers/sbt/default.nix +++ b/pkgs/development/tools/build-managers/sbt/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "sbt"; - version = "1.9.9"; + version = "1.10.0"; src = fetchurl { url = "https://github.com/sbt/sbt/releases/download/v${finalAttrs.version}/sbt-${finalAttrs.version}.tgz"; - hash = "sha256-xXyuYMISLKG7p3GE37TQ0l/GwYgFOUqzarYgiwwPJi8="; + hash = "sha256-FUt95sGSB8c9CjBPkByMS26tmpw6mamKnXKsGUGdJkA="; }; postPatch = '' From 5e97d1fcf03ee216610f58a37737b28d6ee734bd Mon Sep 17 00:00:00 2001 From: Anders Rytter Hansen Date: Mon, 6 May 2024 16:13:05 +0200 Subject: [PATCH 22/54] gitnuro: Update meta.platforms The specified jar file is only for x86-64, hence specifying that under meta.platforms. --- pkgs/applications/version-management/gitnuro/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/version-management/gitnuro/default.nix b/pkgs/applications/version-management/gitnuro/default.nix index 664baff44766..d59287db4bb9 100644 --- a/pkgs/applications/version-management/gitnuro/default.nix +++ b/pkgs/applications/version-management/gitnuro/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { description = "A FOSS Git multiplatform client based on Compose and JGit"; homepage = "https://gitnuro.com/"; license = licenses.gpl3Plus; - platforms = platforms.unix; + platforms = [ "x86_64-linux" ]; maintainers = with maintainers; [ zendo ]; mainProgram = "gitnuro"; }; From 56590dd7b38778f7c4c5506c99dafc4228c4c812 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 6 May 2024 10:58:23 -0400 Subject: [PATCH 23/54] netbsd: Remove unneded let-bind --- pkgs/os-specific/bsd/netbsd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index fd5e24aa7102..a770c96001a7 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -9,7 +9,7 @@ makeScopeWithSplicing' { f = (self: lib.packagesFromDirectoryRecursive { callPackage = self.callPackage; directory = ./pkgs; - } // (let inherit (self) mkDerivation; in { + } // { fetchNetBSD = path: version: sha256: fetchcvs { cvsRoot = ":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot"; @@ -133,5 +133,5 @@ makeScopeWithSplicing' { inherit (self) mknod; }; - })); + }); } From 3fe3b055adfc020e6a923c466b6bcd978a13069a Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 6 May 2024 10:41:14 -0400 Subject: [PATCH 24/54] bsd treewide: Run RFC formatter --- .../bsd/freebsd/evdev-proto/default.nix | 11 +- pkgs/os-specific/bsd/freebsd/lib/default.nix | 18 +- pkgs/os-specific/bsd/freebsd/package-set.nix | 45 +-- .../bsd/freebsd/pkgs/boot-install.nix | 9 +- .../bsd/freebsd/pkgs/compat/package.nix | 185 ++++++------ pkgs/os-specific/bsd/freebsd/pkgs/config.nix | 36 ++- pkgs/os-specific/bsd/freebsd/pkgs/csu.nix | 24 +- .../bsd/freebsd/pkgs/ctfconvert.nix | 32 ++- .../freebsd/pkgs/freebsdSetupHook/package.nix | 4 +- pkgs/os-specific/bsd/freebsd/pkgs/gencat.nix | 4 +- .../bsd/freebsd/pkgs/include/package.nix | 37 ++- pkgs/os-specific/bsd/freebsd/pkgs/install.nix | 58 ++-- .../bsd/freebsd/pkgs/libc/package.nix | 35 ++- .../os-specific/bsd/freebsd/pkgs/libdwarf.nix | 30 +- pkgs/os-specific/bsd/freebsd/pkgs/libelf.nix | 23 +- .../bsd/freebsd/pkgs/libnetbsd/package.nix | 29 +- pkgs/os-specific/bsd/freebsd/pkgs/libsbuf.nix | 4 +- pkgs/os-specific/bsd/freebsd/pkgs/libutil.nix | 8 +- pkgs/os-specific/bsd/freebsd/pkgs/lorder.nix | 16 +- pkgs/os-specific/bsd/freebsd/pkgs/make.nix | 27 +- .../bsd/freebsd/pkgs/makeMinimal.nix | 17 +- .../bsd/freebsd/pkgs/mkDerivation.nix | 151 +++++----- pkgs/os-specific/bsd/freebsd/pkgs/mknod.nix | 4 +- .../bsd/freebsd/pkgs/rpcgen/package.nix | 7 +- pkgs/os-specific/bsd/freebsd/pkgs/stat.nix | 19 +- .../os-specific/bsd/freebsd/pkgs/statHook.nix | 16 +- .../bsd/freebsd/pkgs/sys/package.nix | 125 ++++---- pkgs/os-specific/bsd/freebsd/pkgs/tsort.nix | 21 +- pkgs/os-specific/bsd/netbsd/default.nix | 272 +++++++++++------- .../bsd/netbsd/pkgs/compat/package.nix | 172 ++++++----- pkgs/os-specific/bsd/netbsd/pkgs/config.nix | 27 +- pkgs/os-specific/bsd/netbsd/pkgs/csu.nix | 49 +++- .../bsd/netbsd/pkgs/fts/package.nix | 19 +- pkgs/os-specific/bsd/netbsd/pkgs/headers.nix | 8 +- .../bsd/netbsd/pkgs/i18n_module.nix | 6 +- pkgs/os-specific/bsd/netbsd/pkgs/include.nix | 32 ++- .../bsd/netbsd/pkgs/install/package.nix | 81 +++--- .../os-specific/bsd/netbsd/pkgs/ld_elf_so.nix | 16 +- pkgs/os-specific/bsd/netbsd/pkgs/libc.nix | 59 ++-- .../os-specific/bsd/netbsd/pkgs/libcurses.nix | 24 +- pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix | 52 ++-- pkgs/os-specific/bsd/netbsd/pkgs/libm.nix | 6 +- pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix | 6 +- .../bsd/netbsd/pkgs/libpthread/base.nix | 1 - .../bsd/netbsd/pkgs/libpthread/headers.nix | 17 +- .../bsd/netbsd/pkgs/libpthread/package.nix | 39 ++- .../os-specific/bsd/netbsd/pkgs/libresolv.nix | 6 +- .../os-specific/bsd/netbsd/pkgs/librpcsvc.nix | 28 +- pkgs/os-specific/bsd/netbsd/pkgs/librt.nix | 7 +- .../bsd/netbsd/pkgs/libterminfo.nix | 33 ++- pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix | 39 ++- pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix | 21 +- pkgs/os-specific/bsd/netbsd/pkgs/make.nix | 97 ++++--- .../bsd/netbsd/pkgs/makeMinimal.nix | 15 +- .../bsd/netbsd/pkgs/mkDerivation.nix | 173 ++++++----- pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix | 1 - .../netbsd/pkgs/netbsdSetupHook/package.nix | 4 +- .../os-specific/bsd/netbsd/pkgs/stat/hook.nix | 17 +- .../bsd/netbsd/pkgs/stat/package.nix | 21 +- pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix | 55 ++-- .../bsd/netbsd/pkgs/sys/headers.nix | 50 +++- .../bsd/netbsd/pkgs/sys/package.nix | 50 +++- pkgs/os-specific/bsd/netbsd/pkgs/tic.nix | 31 +- pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix | 21 +- pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix | 7 +- 65 files changed, 1623 insertions(+), 934 deletions(-) diff --git a/pkgs/os-specific/bsd/freebsd/evdev-proto/default.nix b/pkgs/os-specific/bsd/freebsd/evdev-proto/default.nix index d62c01f5eb88..6696d12912e6 100644 --- a/pkgs/os-specific/bsd/freebsd/evdev-proto/default.nix +++ b/pkgs/os-specific/bsd/freebsd/evdev-proto/default.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, linuxHeaders, freebsd, runCommandCC, buildPackages }: +{ + lib, + stdenv, + linuxHeaders, + freebsd, + runCommandCC, + buildPackages, +}: stdenv.mkDerivation { pname = "evdev-proto"; @@ -28,7 +35,7 @@ stdenv.mkDerivation { TOUCH = "touch"; XARGS = "xargs"; - ABI_FILE = runCommandCC "abifile" {} "$CC -shared -o $out"; + ABI_FILE = runCommandCC "abifile" { } "$CC -shared -o $out"; CLEAN_FETCH_ENV = true; INSTALL_AS_USER = true; NO_CHECKSUM = true; diff --git a/pkgs/os-specific/bsd/freebsd/lib/default.nix b/pkgs/os-specific/bsd/freebsd/lib/default.nix index 30fea7e17dce..26119a8ba196 100644 --- a/pkgs/os-specific/bsd/freebsd/lib/default.nix +++ b/pkgs/os-specific/bsd/freebsd/lib/default.nix @@ -3,14 +3,16 @@ { inherit version; - mkBsdArch = stdenv': { - x86_64 = "amd64"; - aarch64 = "arm64"; - i486 = "i386"; - i586 = "i386"; - i686 = "i386"; - }.${stdenv'.hostPlatform.parsed.cpu.name} - or stdenv'.hostPlatform.parsed.cpu.name; + mkBsdArch = + stdenv': + { + x86_64 = "amd64"; + aarch64 = "arm64"; + i486 = "i386"; + i586 = "i386"; + i686 = "i386"; + } + .${stdenv'.hostPlatform.parsed.cpu.name} or stdenv'.hostPlatform.parsed.cpu.name; install-wrapper = builtins.readFile ./install-wrapper.sh; } diff --git a/pkgs/os-specific/bsd/freebsd/package-set.nix b/pkgs/os-specific/bsd/freebsd/package-set.nix index 609b3f45b51e..000377c6af91 100644 --- a/pkgs/os-specific/bsd/freebsd/package-set.nix +++ b/pkgs/os-specific/bsd/freebsd/package-set.nix @@ -1,6 +1,12 @@ -{ stdenv, lib, stdenvNoCC -, fetchzip -, sourceData, versionData, buildFreebsd, patchesRoot +{ + stdenv, + lib, + stdenvNoCC, + fetchzip, + sourceData, + versionData, + buildFreebsd, + patchesRoot, }: self: @@ -8,7 +14,8 @@ self: lib.packagesFromDirectoryRecursive { callPackage = self.callPackage; directory = ./pkgs; -} // { +} +// { inherit sourceData patchesRoot versionData; # Keep the crawled portion of Nixpkgs finite. @@ -21,11 +28,15 @@ lib.packagesFromDirectoryRecursive { compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isFreeBSD) self.compat; freebsd-lib = import ./lib { - version = lib.concatStringsSep "." (map toString (lib.filter (x: x != null) [ - self.versionData.major - self.versionData.minor - self.versionData.patch or null - ])); + version = lib.concatStringsSep "." ( + map toString ( + lib.filter (x: x != null) [ + self.versionData.major + self.versionData.minor + self.versionData.patch or null + ] + ) + ); }; # The manual callPackages below should in principle be unnecessary, but are @@ -51,21 +62,21 @@ lib.packagesFromDirectoryRecursive { }; libc = self.callPackage ./pkgs/libc/package.nix { - inherit (buildFreebsd) makeMinimal install gencat rpcgen; + inherit (buildFreebsd) + makeMinimal + install + gencat + rpcgen + ; inherit (self) csu include; }; - libnetbsd = self.callPackage ./pkgs/libnetbsd/package.nix { - inherit (buildFreebsd) makeMinimal; - }; + libnetbsd = self.callPackage ./pkgs/libnetbsd/package.nix { inherit (buildFreebsd) makeMinimal; }; mkDerivation = self.callPackage ./pkgs/mkDerivation.nix { inherit stdenv; inherit (buildFreebsd) makeMinimal install tsort; }; - makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { - inherit (self) make; - }; - + makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { inherit (self) make; }; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/boot-install.nix b/pkgs/os-specific/bsd/freebsd/pkgs/boot-install.nix index 71ecef1bcae4..966489d9aef3 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/boot-install.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/boot-install.nix @@ -1,7 +1,10 @@ { buildPackages, freebsd-lib }: # Wrap NetBSD's install -buildPackages.writeShellScriptBin "boot-install" (freebsd-lib.install-wrapper + '' +buildPackages.writeShellScriptBin "boot-install" ( + freebsd-lib.install-wrapper + + '' - ${buildPackages.netbsd.install}/bin/xinstall "''${args[@]}" -'') + ${buildPackages.netbsd.install}/bin/xinstall "''${args[@]}" + '' +) diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix index d31e3b05427b..be3a7a910474 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix @@ -1,9 +1,16 @@ -{ lib, stdenv, mkDerivation, patchesRoot -, bsdSetupHook, freebsdSetupHook -, makeMinimal, boot-install -, which -, freebsd-lib -, expat, zlib, +{ + lib, + stdenv, + mkDerivation, + patchesRoot, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + boot-install, + which, + freebsd-lib, + expat, + zlib, }: let @@ -13,90 +20,95 @@ in mkDerivation rec { pname = "compat"; path = "tools/build"; - extraPaths = [ - "lib/libc/db" - "lib/libc/stdlib" # getopt - "lib/libc/gen" # getcap - "lib/libc/locale" # rpmatch - ] ++ lib.optionals stdenv.hostPlatform.isLinux [ - "lib/libc/string" # strlcpy - "lib/libutil" - ] ++ [ - "contrib/libc-pwcache" - "contrib/libc-vis" - "sys/libkern" - "sys/kern/subr_capability.c" + extraPaths = + [ + "lib/libc/db" + "lib/libc/stdlib" # getopt + "lib/libc/gen" # getcap + "lib/libc/locale" # rpmatch + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + "lib/libc/string" # strlcpy + "lib/libutil" + ] + ++ [ + "contrib/libc-pwcache" + "contrib/libc-vis" + "sys/libkern" + "sys/kern/subr_capability.c" - # Take only individual headers, or else we will clobber native libc, etc. + # Take only individual headers, or else we will clobber native libc, etc. - "sys/rpc/types.h" + "sys/rpc/types.h" - # Listed in Makekfile as INC - "include/mpool.h" - "include/ndbm.h" - "include/err.h" - "include/stringlist.h" - "include/a.out.h" - "include/nlist.h" - "include/db.h" - "include/getopt.h" - "include/nl_types.h" - "include/elf.h" - "sys/sys/ctf.h" + # Listed in Makekfile as INC + "include/mpool.h" + "include/ndbm.h" + "include/err.h" + "include/stringlist.h" + "include/a.out.h" + "include/nlist.h" + "include/db.h" + "include/getopt.h" + "include/nl_types.h" + "include/elf.h" + "sys/sys/ctf.h" - # Listed in Makekfile as SYSINC + # Listed in Makekfile as SYSINC - "sys/sys/capsicum.h" - "sys/sys/caprights.h" - "sys/sys/imgact_aout.h" - "sys/sys/nlist_aout.h" - "sys/sys/nv.h" - "sys/sys/dnv.h" - "sys/sys/cnv.h" + "sys/sys/capsicum.h" + "sys/sys/caprights.h" + "sys/sys/imgact_aout.h" + "sys/sys/nlist_aout.h" + "sys/sys/nv.h" + "sys/sys/dnv.h" + "sys/sys/cnv.h" - "sys/sys/elf32.h" - "sys/sys/elf64.h" - "sys/sys/elf_common.h" - "sys/sys/elf_generic.h" - "sys/${mkBsdArch stdenv}/include" - ] ++ lib.optionals stdenv.hostPlatform.isx86 [ - "sys/x86/include" - ] ++ [ + "sys/sys/elf32.h" + "sys/sys/elf64.h" + "sys/sys/elf_common.h" + "sys/sys/elf_generic.h" + "sys/${mkBsdArch stdenv}/include" + ] + ++ lib.optionals stdenv.hostPlatform.isx86 [ "sys/x86/include" ] + ++ [ - "sys/sys/queue.h" - "sys/sys/md5.h" - "sys/sys/sbuf.h" - "sys/sys/tree.h" - "sys/sys/font.h" - "sys/sys/consio.h" - "sys/sys/fnv_hash.h" + "sys/sys/queue.h" + "sys/sys/md5.h" + "sys/sys/sbuf.h" + "sys/sys/tree.h" + "sys/sys/font.h" + "sys/sys/consio.h" + "sys/sys/fnv_hash.h" - "sys/crypto/chacha20/_chacha.h" - "sys/crypto/chacha20/chacha.h" - # included too, despite ".c" - "sys/crypto/chacha20/chacha.c" + "sys/crypto/chacha20/_chacha.h" + "sys/crypto/chacha20/chacha.h" + # included too, despite ".c" + "sys/crypto/chacha20/chacha.c" - "sys/fs" - "sys/ufs" - "sys/sys/disk" + "sys/fs" + "sys/ufs" + "sys/sys/disk" - "lib/libcapsicum" - "lib/libcasper" - ]; + "lib/libcapsicum" + "lib/libcasper" + ]; patches = [ /${patchesRoot}/compat-install-dirs.patch /${patchesRoot}/compat-fix-typedefs-locations.patch ]; - preBuild = '' - NIX_CFLAGS_COMPILE+=' -I../../include -I../../sys' + preBuild = + '' + NIX_CFLAGS_COMPILE+=' -I../../include -I../../sys' - cp ../../sys/${mkBsdArch stdenv}/include/elf.h ../../sys/sys - cp ../../sys/${mkBsdArch stdenv}/include/elf.h ../../sys/sys/${mkBsdArch stdenv} - '' + lib.optionalString stdenv.hostPlatform.isx86 '' - cp ../../sys/x86/include/elf.h ../../sys/x86 - ''; + cp ../../sys/${mkBsdArch stdenv}/include/elf.h ../../sys/sys + cp ../../sys/${mkBsdArch stdenv}/include/elf.h ../../sys/sys/${mkBsdArch stdenv} + '' + + lib.optionalString stdenv.hostPlatform.isx86 '' + cp ../../sys/x86/include/elf.h ../../sys/x86 + ''; setupHooks = [ ../../../../../build-support/setup-hooks/role.bash @@ -109,13 +121,17 @@ mkDerivation rec { ''; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook + bsdSetupHook + freebsdSetupHook makeMinimal boot-install which ]; - buildInputs = [ expat zlib ]; + buildInputs = [ + expat + zlib + ]; makeFlags = [ "STRIP=-s" # flag to install, not command @@ -124,12 +140,15 @@ mkDerivation rec { "INSTALL=boot-install" ]; - preIncludes = '' - mkdir -p $out/{0,1}-include - cp --no-preserve=mode -r cross-build/include/common/* $out/0-include - '' + lib.optionalString stdenv.hostPlatform.isLinux '' - cp --no-preserve=mode -r cross-build/include/linux/* $out/1-include - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - cp --no-preserve=mode -r cross-build/include/darwin/* $out/1-include - ''; + preIncludes = + '' + mkdir -p $out/{0,1}-include + cp --no-preserve=mode -r cross-build/include/common/* $out/0-include + '' + + lib.optionalString stdenv.hostPlatform.isLinux '' + cp --no-preserve=mode -r cross-build/include/linux/* $out/1-include + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + cp --no-preserve=mode -r cross-build/include/darwin/* $out/1-include + ''; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/config.nix b/pkgs/os-specific/bsd/freebsd/pkgs/config.nix index 641cfc46b4e9..f7ba273ed558 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/config.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/config.nix @@ -1,17 +1,35 @@ -{ mkDerivation -, bsdSetupHook, freebsdSetupHook -, makeMinimal, install, mandoc, groff -, flex, byacc, file2c -, compatIfNeeded, libnv, libsbuf +{ + mkDerivation, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + flex, + byacc, + file2c, + compatIfNeeded, + libnv, + libsbuf, }: mkDerivation { path = "usr.sbin/config"; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal install mandoc groff + bsdSetupHook + freebsdSetupHook + makeMinimal + install + mandoc + groff - flex byacc file2c + flex + byacc + file2c + ]; + buildInputs = compatIfNeeded ++ [ + libnv + libsbuf ]; - buildInputs = compatIfNeeded ++ [ libnv libsbuf ]; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/csu.nix b/pkgs/os-specific/bsd/freebsd/pkgs/csu.nix index 0b17cb1c8481..fd62338d7f9f 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/csu.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/csu.nix @@ -1,9 +1,14 @@ -{ lib, mkDerivation -, bsdSetupHook, freebsdSetupHook -, makeMinimal -, install -, flex, byacc, gencat -, include +{ + lib, + mkDerivation, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + flex, + byacc, + gencat, + include, }: mkDerivation { @@ -13,11 +18,14 @@ mkDerivation { "lib/libc/include/libc_private.h" ]; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook + bsdSetupHook + freebsdSetupHook makeMinimal install - flex byacc gencat + flex + byacc + gencat ]; buildInputs = [ include ]; MK_TESTS = "no"; diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/ctfconvert.nix b/pkgs/os-specific/bsd/freebsd/pkgs/ctfconvert.nix index 0aebc9b3d0b9..a85836e58b8d 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/ctfconvert.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/ctfconvert.nix @@ -1,7 +1,18 @@ -{ lib, stdenv, mkDerivation -, bsdSetupHook, freebsdSetupHook -, makeMinimal, install, mandoc, groff -, compatIfNeeded, libelf, libdwarf, zlib, libspl +{ + lib, + stdenv, + mkDerivation, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + compatIfNeeded, + libelf, + libdwarf, + zlib, + libspl, }: mkDerivation { @@ -16,13 +27,20 @@ mkDerivation { OPENSOLARIS_USR_DISTDIR = "$(SRCTOP)/cddl/contrib/opensolaris"; OPENSOLARIS_SYS_DISTDIR = "$(SRCTOP)/sys/cddl/contrib/opensolaris"; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal install mandoc groff + bsdSetupHook + freebsdSetupHook + makeMinimal + install + mandoc + groff # flex byacc file2c ]; buildInputs = compatIfNeeded ++ [ - libelf libdwarf zlib libspl + libelf + libdwarf + zlib + libspl ]; meta.license = lib.licenses.cddl; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/freebsdSetupHook/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/freebsdSetupHook/package.nix index 430c4c5c43ac..ef4a14ccf4aa 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/freebsdSetupHook/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/freebsdSetupHook/package.nix @@ -1,5 +1,3 @@ { makeSetupHook }: -makeSetupHook { - name = "freebsd-setup-hook"; -} ./setup-hook.sh +makeSetupHook { name = "freebsd-setup-hook"; } ./setup-hook.sh diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/gencat.nix b/pkgs/os-specific/bsd/freebsd/pkgs/gencat.nix index e9ae9f27cc05..ea701b6404ec 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/gencat.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/gencat.nix @@ -1,5 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "usr.bin/gencat"; -} +mkDerivation { path = "usr.bin/gencat"; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix index 5c6f3ac4a16b..fd17dcbb99e0 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix @@ -1,9 +1,16 @@ -{ lib, mkDerivation, patchesRoot -, buildPackages -, bsdSetupHook, freebsdSetupHook -, makeMinimal -, install -, mandoc, groff, rsync /*, nbperf*/, rpcgen +{ + lib, + mkDerivation, + patchesRoot, + buildPackages, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + rsync, # , nbperf + rpcgen, }: mkDerivation { @@ -15,19 +22,21 @@ mkDerivation { "sys" ]; - nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook + nativeBuildInputs = [ + bsdSetupHook + freebsdSetupHook makeMinimal install - mandoc groff rsync /*nbperf*/ rpcgen + mandoc + groff + rsync # nbperf + rpcgen # HACK use NetBSD's for now buildPackages.netbsd.mtree ]; - patches = [ - /${patchesRoot}/no-perms-BSD.include.dist.patch - ]; + patches = [ /${patchesRoot}/no-perms-BSD.include.dist.patch ]; # The makefiles define INCSDIR per subdirectory, so we have to set # something else on the command line so those definitions aren't @@ -39,9 +48,7 @@ mkDerivation { {} \; ''; - makeFlags = [ - "RPCGEN_CPP=${buildPackages.stdenv.cc.cc}/bin/cpp" - ]; + makeFlags = [ "RPCGEN_CPP=${buildPackages.stdenv.cc.cc}/bin/cpp" ]; # multiple header dirs, see above postConfigure = '' diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/install.nix b/pkgs/os-specific/bsd/freebsd/pkgs/install.nix index 3db6cd3633d4..0f70087618df 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/install.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/install.nix @@ -1,31 +1,49 @@ -{ lib, stdenv, mkDerivation, writeShellScript -, freebsd-lib -, mtree -, bsdSetupHook, freebsdSetupHook -, makeMinimal, mandoc, groff -, boot-install, install -, compatIfNeeded, libmd, libnetbsd +{ + lib, + stdenv, + mkDerivation, + writeShellScript, + freebsd-lib, + mtree, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + mandoc, + groff, + boot-install, + install, + compatIfNeeded, + libmd, + libnetbsd, }: # HACK: to ensure parent directories exist. This emulates GNU # install’s -D option. No alternative seems to exist in BSD install. let - binstall = writeShellScript "binstall" (freebsd-lib.install-wrapper + '' + binstall = writeShellScript "binstall" ( + freebsd-lib.install-wrapper + + '' - @out@/bin/xinstall "''${args[@]}" - ''); -in mkDerivation { + @out@/bin/xinstall "''${args[@]}" + '' + ); +in +mkDerivation { path = "usr.bin/xinstall"; extraPaths = [ mtree.path ]; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal mandoc groff - (if stdenv.hostPlatform == stdenv.buildPlatform - then boot-install - else install) + bsdSetupHook + freebsdSetupHook + makeMinimal + mandoc + groff + (if stdenv.hostPlatform == stdenv.buildPlatform then boot-install else install) ]; skipIncludesPhase = true; - buildInputs = compatIfNeeded ++ [ libmd libnetbsd ]; + buildInputs = compatIfNeeded ++ [ + libmd + libnetbsd + ]; makeFlags = [ "STRIP=-s" # flag to install, not command "MK_WERROR=no" @@ -37,5 +55,9 @@ in mkDerivation { mv $out/bin/install $out/bin/xinstall ln -s ./binstall $out/bin/install ''; - outputs = [ "out" "man" "test" ]; + outputs = [ + "out" + "man" + "test" + ]; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix index 935b48cca5e7..6cf2216ba05f 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix @@ -1,12 +1,20 @@ -{ lib, stdenv, mkDerivation -, patchesRoot +{ + lib, + stdenv, + mkDerivation, + patchesRoot, -, bsdSetupHook, freebsdSetupHook -, makeMinimal -, install -, flex, byacc, gencat, rpcgen + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + flex, + byacc, + gencat, + rpcgen, -, csu, include + csu, + include, }: mkDerivation rec { @@ -63,13 +71,20 @@ mkDerivation rec { ''; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook + bsdSetupHook + freebsdSetupHook makeMinimal install - flex byacc gencat rpcgen + flex + byacc + gencat + rpcgen + ]; + buildInputs = [ + include + csu ]; - buildInputs = [ include csu ]; env.NIX_CFLAGS_COMPILE = "-B${csu}/lib"; # Suppress lld >= 16 undefined version errors diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libdwarf.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libdwarf.nix index 9fc8fc5f9a62..84115b626a7a 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libdwarf.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libdwarf.nix @@ -1,8 +1,16 @@ -{ lib, stdenv, mkDerivation -, bsdSetupHook, freebsdSetupHook -, makeMinimal, install, mandoc, groff -, m4 -, compatIfNeeded, libelf +{ + lib, + stdenv, + mkDerivation, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + m4, + compatIfNeeded, + libelf, }: mkDerivation { @@ -15,13 +23,15 @@ mkDerivation { "sys/sys/elf_common.h" ]; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal install mandoc groff + bsdSetupHook + freebsdSetupHook + makeMinimal + install + mandoc + groff m4 ]; - buildInputs = compatIfNeeded ++ [ - libelf - ]; + buildInputs = compatIfNeeded ++ [ libelf ]; MK_TESTS = "no"; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libelf.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libelf.nix index a44ce1685e57..881cbfcd811c 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libelf.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libelf.nix @@ -1,7 +1,14 @@ -{ lib, stdenv, mkDerivation -, bsdSetupHook, freebsdSetupHook -, makeMinimal, install, mandoc, groff -, m4 +{ + lib, + stdenv, + mkDerivation, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + m4, }: mkDerivation { @@ -15,8 +22,12 @@ mkDerivation { ]; BOOTSTRAPPING = !stdenv.isFreeBSD; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal install mandoc groff + bsdSetupHook + freebsdSetupHook + makeMinimal + install + mandoc + groff m4 ]; diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix index 0deea8b2fb7b..80ea685a3162 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix @@ -1,18 +1,27 @@ -{ lib, stdenv -, mkDerivation, patchesRoot -, bsdSetupHook, freebsdSetupHook, makeMinimal, mandoc, groff -, boot-install, install -, compatIfNeeded +{ + lib, + stdenv, + mkDerivation, + patchesRoot, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + mandoc, + groff, + boot-install, + install, + compatIfNeeded, }: mkDerivation { path = "lib/libnetbsd"; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal mandoc groff - (if stdenv.hostPlatform == stdenv.buildPlatform - then boot-install - else install) + bsdSetupHook + freebsdSetupHook + makeMinimal + mandoc + groff + (if stdenv.hostPlatform == stdenv.buildPlatform then boot-install else install) ]; patches = lib.optionals (!stdenv.hostPlatform.isFreeBSD) [ /${patchesRoot}/libnetbsd-do-install.patch diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libsbuf.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libsbuf.nix index 719474dbb11a..242492a3f2f2 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libsbuf.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libsbuf.nix @@ -2,8 +2,6 @@ mkDerivation { path = "lib/libsbuf"; - extraPaths = [ - "sys/kern" - ]; + extraPaths = [ "sys/kern" ]; MK_TESTS = "no"; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libutil.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libutil.nix index c420d0daf852..683396d140c2 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libutil.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libutil.nix @@ -1,7 +1,11 @@ -{ mkDerivation, lib, stdenv }: +{ + mkDerivation, + lib, + stdenv, +}: mkDerivation { path = "lib/libutil"; - extraPaths = ["lib/libc/gen"]; + extraPaths = [ "lib/libc/gen" ]; clangFixup = true; MK_TESTS = "no"; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/lorder.nix b/pkgs/os-specific/bsd/freebsd/pkgs/lorder.nix index d1fd86ab5e46..abbe2079855e 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/lorder.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/lorder.nix @@ -1,5 +1,7 @@ -{ mkDerivation -, bsdSetupHook, freebsdSetupHook +{ + mkDerivation, + bsdSetupHook, + freebsdSetupHook, }: mkDerivation rec { @@ -13,8 +15,12 @@ mkDerivation rec { mv "lorder.1" "$man/share/man" ''; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook + bsdSetupHook + freebsdSetupHook + ]; + buildInputs = [ ]; + outputs = [ + "out" + "man" ]; - buildInputs = []; - outputs = [ "out" "man" ]; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/make.nix b/pkgs/os-specific/bsd/freebsd/pkgs/make.nix index fa1722cfec22..ecf231c30414 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/make.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/make.nix @@ -1,20 +1,25 @@ -{ lib, mkDerivation, stdenv }: +{ + lib, + mkDerivation, + stdenv, +}: mkDerivation { path = "contrib/bmake"; version = "9.2"; - postPatch = '' - # make needs this to pick up our sys make files - export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" + postPatch = + '' + # make needs this to pick up our sys make files + export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" - '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \ - --replace '-Wl,--fatal-warnings' "" \ - --replace '-Wl,--warn-shared-textrel' "" - ''; + '' + + lib.optionalString stdenv.isDarwin '' + substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \ + --replace '-Wl,--fatal-warnings' "" \ + --replace '-Wl,--warn-shared-textrel' "" + ''; postInstall = '' make -C $BSDSRCDIR/share/mk FILESDIR=$out/share/mk install ''; - extraPaths = [ "share/mk" ] - ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "tools/build/mk"; + extraPaths = [ "share/mk" ] ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "tools/build/mk"; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/makeMinimal.nix b/pkgs/os-specific/bsd/freebsd/pkgs/makeMinimal.nix index e6a8e38a4ace..c510a4da4b82 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/makeMinimal.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/makeMinimal.nix @@ -1,19 +1,24 @@ -{ lib, stdenv, mkDerivation -, make -, bsdSetupHook, freebsdSetupHook +{ + lib, + stdenv, + mkDerivation, + make, + bsdSetupHook, + freebsdSetupHook, }: mkDerivation rec { inherit (make) path; - buildInputs = []; + buildInputs = [ ]; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook + bsdSetupHook + freebsdSetupHook ]; skipIncludesPhase = true; - makeFlags = []; + makeFlags = [ ]; postPatch = '' patchShebangs configure diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix b/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix index 79428626b8ec..b5c962064fad 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix @@ -1,78 +1,99 @@ -{ lib, stdenv, stdenvNoCC -, compatIfNeeded -, runCommand, rsync -, freebsd-lib -, source -, bsdSetupHook, freebsdSetupHook -, makeMinimal -, install, tsort, lorder, mandoc, groff +{ + lib, + stdenv, + stdenvNoCC, + compatIfNeeded, + runCommand, + rsync, + freebsd-lib, + source, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + mandoc, + groff, }: -lib.makeOverridable (attrs: let - stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv; -in stdenv'.mkDerivation (rec { - pname = "${attrs.pname or (baseNameOf attrs.path)}-freebsd"; - inherit (freebsd-lib) version; - src = runCommand "${pname}-filtered-src" { - nativeBuildInputs = [ rsync ]; - } '' - for p in ${lib.concatStringsSep " " ([ attrs.path ] ++ attrs.extraPaths or [])}; do - set -x - path="$out/$p" - mkdir -p "$(dirname "$path")" - src_path="${source}/$p" - if [[ -d "$src_path" ]]; then src_path+=/; fi - rsync --chmod="+w" -r "$src_path" "$path" - set +x - done - ''; +lib.makeOverridable ( + attrs: + let + stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv; + in + stdenv'.mkDerivation ( + rec { + pname = "${attrs.pname or (baseNameOf attrs.path)}-freebsd"; + inherit (freebsd-lib) version; + src = runCommand "${pname}-filtered-src" { nativeBuildInputs = [ rsync ]; } '' + for p in ${lib.concatStringsSep " " ([ attrs.path ] ++ attrs.extraPaths or [ ])}; do + set -x + path="$out/$p" + mkdir -p "$(dirname "$path")" + src_path="${source}/$p" + if [[ -d "$src_path" ]]; then src_path+=/; fi + rsync --chmod="+w" -r "$src_path" "$path" + set +x + done + ''; - extraPaths = [ ]; + extraPaths = [ ]; - nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal - install tsort lorder mandoc groff #statHook - ]; - buildInputs = compatIfNeeded; + nativeBuildInputs = [ + bsdSetupHook + freebsdSetupHook + makeMinimal + install + tsort + lorder + mandoc + groff # statHook + ]; + buildInputs = compatIfNeeded; - HOST_SH = stdenv'.shell; + HOST_SH = stdenv'.shell; - # Since STRIP below is the flag - STRIPBIN = "${stdenv.cc.bintools.targetPrefix}strip"; + # Since STRIP below is the flag + STRIPBIN = "${stdenv.cc.bintools.targetPrefix}strip"; - makeFlags = [ - "STRIP=-s" # flag to install, not command - ] ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "MK_WERROR=no"; + makeFlags = [ + "STRIP=-s" # flag to install, not command + ] ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "MK_WERROR=no"; - # amd64 not x86_64 for this on unlike NetBSD - MACHINE_ARCH = freebsd-lib.mkBsdArch stdenv'; + # amd64 not x86_64 for this on unlike NetBSD + MACHINE_ARCH = freebsd-lib.mkBsdArch stdenv'; - MACHINE = freebsd-lib.mkBsdArch stdenv'; + MACHINE = freebsd-lib.mkBsdArch stdenv'; - MACHINE_CPUARCH = MACHINE_ARCH; + MACHINE_CPUARCH = MACHINE_ARCH; - COMPONENT_PATH = attrs.path or null; + COMPONENT_PATH = attrs.path or null; - strictDeps = true; + strictDeps = true; - meta = with lib; { - maintainers = with maintainers; [ ericson2314 ]; - platforms = platforms.unix; - license = licenses.bsd2; - }; -} // lib.optionalAttrs stdenv'.hasCC { - # TODO should CC wrapper set this? - CPP = "${stdenv'.cc.targetPrefix}cpp"; -} // lib.optionalAttrs stdenv'.isDarwin { - MKRELRO = "no"; -} // lib.optionalAttrs (stdenv'.cc.isClang or false) { - HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc); -} // lib.optionalAttrs (stdenv'.cc.isGNU or false) { - HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc); -} // lib.optionalAttrs (stdenv'.isx86_32) { - USE_SSP = "no"; -} // lib.optionalAttrs (attrs.headersOnly or false) { - installPhase = "includesPhase"; - dontBuild = true; -} // attrs)) + meta = with lib; { + maintainers = with maintainers; [ ericson2314 ]; + platforms = platforms.unix; + license = licenses.bsd2; + }; + } + // lib.optionalAttrs stdenv'.hasCC { + # TODO should CC wrapper set this? + CPP = "${stdenv'.cc.targetPrefix}cpp"; + } + // lib.optionalAttrs stdenv'.isDarwin { MKRELRO = "no"; } + // lib.optionalAttrs (stdenv'.cc.isClang or false) { + HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc); + } + // lib.optionalAttrs (stdenv'.cc.isGNU or false) { + HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc); + } + // lib.optionalAttrs (stdenv'.isx86_32) { USE_SSP = "no"; } + // lib.optionalAttrs (attrs.headersOnly or false) { + installPhase = "includesPhase"; + dontBuild = true; + } + // attrs + ) +) diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/mknod.nix b/pkgs/os-specific/bsd/freebsd/pkgs/mknod.nix index 56dff7d606bd..bf7d8b7db689 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/mknod.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/mknod.nix @@ -1,5 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "sbin/mknod"; -} +mkDerivation { path = "sbin/mknod"; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix index c2e64cb36601..409064f2b65d 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix @@ -1,4 +1,9 @@ -{ lib, mkDerivation, stdenv, patchesRoot }: +{ + lib, + mkDerivation, + stdenv, + patchesRoot, +}: mkDerivation rec { path = "usr.bin/rpcgen"; diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/stat.nix b/pkgs/os-specific/bsd/freebsd/pkgs/stat.nix index c730f00869f8..a801ab895441 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/stat.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/stat.nix @@ -1,13 +1,22 @@ -{ mkDerivation -, bsdSetupHook, freebsdSetupHook -, makeMinimal, install, mandoc, groff +{ + mkDerivation, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + mandoc, + groff, }: # Don't add this to nativeBuildInputs directly. Use statHook instead. mkDerivation { path = "usr.bin/stat"; nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal install mandoc groff + bsdSetupHook + freebsdSetupHook + makeMinimal + install + mandoc + groff ]; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/statHook.nix b/pkgs/os-specific/bsd/freebsd/pkgs/statHook.nix index 07129938b095..4609c004e6f5 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/statHook.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/statHook.nix @@ -1,12 +1,16 @@ -{ makeSetupHook, writeText, stat }: +{ + makeSetupHook, + writeText, + stat, +}: # stat isn't in POSIX, and NetBSD stat supports a completely # different range of flags than GNU stat, so including it in PATH # breaks stdenv. Work around that with a hook that will point # NetBSD's build system and NetBSD stat without including it in # PATH. -makeSetupHook { - name = "netbsd-stat-hook"; -} (writeText "netbsd-stat-hook-impl" '' - makeFlagsArray+=(TOOL_STAT=${stat}/bin/stat) -'') +makeSetupHook { name = "netbsd-stat-hook"; } ( + writeText "netbsd-stat-hook-impl" '' + makeFlagsArray+=(TOOL_STAT=${stat}/bin/stat) + '' +) diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix index ab0edbabceab..50fff7738919 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix @@ -1,67 +1,92 @@ -{ stdenv, mkDerivation, freebsd-lib, patchesRoot -, buildPackages -, bsdSetupHook, freebsdSetupHook -, makeMinimal, install, mandoc, groff -, config, rpcgen, file2c, gawk, uudecode, xargs-j #, ctfconvert +{ + stdenv, + mkDerivation, + freebsd-lib, + patchesRoot, + buildPackages, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + config, + rpcgen, + file2c, + gawk, + uudecode, + xargs-j, # , ctfconvert }: -mkDerivation (let - cfg = "MINIMAL"; -in rec { - path = "sys"; +mkDerivation ( + let + cfg = "MINIMAL"; + in + rec { + path = "sys"; - nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal install mandoc groff + nativeBuildInputs = [ + bsdSetupHook + freebsdSetupHook + makeMinimal + install + mandoc + groff - config rpcgen file2c gawk uudecode xargs-j - #ctfconvert - ]; + config + rpcgen + file2c + gawk + uudecode + xargs-j + #ctfconvert + ]; - patches = [ - /${patchesRoot}/sys-gnu-date.patch - /${patchesRoot}/sys-no-explicit-intrinsics-dep.patch - ]; + patches = [ + /${patchesRoot}/sys-gnu-date.patch + /${patchesRoot}/sys-no-explicit-intrinsics-dep.patch + ]; - # --dynamic-linker /red/herring is used when building the kernel. - NIX_ENFORCE_PURITY = 0; + # --dynamic-linker /red/herring is used when building the kernel. + NIX_ENFORCE_PURITY = 0; - AWK = "${buildPackages.gawk}/bin/awk"; + AWK = "${buildPackages.gawk}/bin/awk"; - CWARNEXTRA = "-Wno-error=shift-negative-value -Wno-address-of-packed-member"; + CWARNEXTRA = "-Wno-error=shift-negative-value -Wno-address-of-packed-member"; - MK_CTF = "no"; + MK_CTF = "no"; - KODIR = "${builtins.placeholder "out"}/kernel"; - KMODDIR = "${builtins.placeholder "out"}/kernel"; - DTBDIR = "${builtins.placeholder"out"}/dbt"; + KODIR = "${builtins.placeholder "out"}/kernel"; + KMODDIR = "${builtins.placeholder "out"}/kernel"; + DTBDIR = "${builtins.placeholder "out"}/dbt"; - KERN_DEBUGDIR = "${builtins.placeholder "out"}/debug"; - KERN_DEBUGDIR_KODIR = "${KERN_DEBUGDIR}/kernel"; - KERN_DEBUGDIR_KMODDIR = "${KERN_DEBUGDIR}/kernel"; + KERN_DEBUGDIR = "${builtins.placeholder "out"}/debug"; + KERN_DEBUGDIR_KODIR = "${KERN_DEBUGDIR}/kernel"; + KERN_DEBUGDIR_KMODDIR = "${KERN_DEBUGDIR}/kernel"; - skipIncludesPhase = true; + skipIncludesPhase = true; - configurePhase = '' - runHook preConfigure + configurePhase = '' + runHook preConfigure - for f in conf/kmod.mk contrib/dev/acpica/acpica_prep.sh; do - substituteInPlace "$f" --replace 'xargs -J' 'xargs-j ' - done + for f in conf/kmod.mk contrib/dev/acpica/acpica_prep.sh; do + substituteInPlace "$f" --replace 'xargs -J' 'xargs-j ' + done - for f in conf/*.mk; do - substituteInPlace "$f" --replace 'KERN_DEBUGDIR}''${' 'KERN_DEBUGDIR_' - done + for f in conf/*.mk; do + substituteInPlace "$f" --replace 'KERN_DEBUGDIR}''${' 'KERN_DEBUGDIR_' + done - cd ${freebsd-lib.mkBsdArch stdenv}/conf - sed -i ${cfg} \ - -e 's/WITH_CTF=1/WITH_CTF=0/' \ - -e '/KDTRACE/d' - config ${cfg} + cd ${freebsd-lib.mkBsdArch stdenv}/conf + sed -i ${cfg} \ + -e 's/WITH_CTF=1/WITH_CTF=0/' \ + -e '/KDTRACE/d' + config ${cfg} - runHook postConfigure - ''; - preBuild = '' - cd ../compile/${cfg} - ''; -}) + runHook postConfigure + ''; + preBuild = '' + cd ../compile/${cfg} + ''; + } +) diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/tsort.nix b/pkgs/os-specific/bsd/freebsd/pkgs/tsort.nix index cdc1b27ce8fe..ab0101789f49 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/tsort.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/tsort.nix @@ -1,12 +1,21 @@ -{ mkDerivation -, bsdSetupHook, freebsdSetupHook -, makeMinimal, install, mandoc, groff +{ + mkDerivation, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + mandoc, + groff, }: mkDerivation { path = "usr.bin/tsort"; - nativeBuildInputs = [ - bsdSetupHook freebsdSetupHook - makeMinimal install mandoc groff + nativeBuildInputs = [ + bsdSetupHook + freebsdSetupHook + makeMinimal + install + mandoc + groff ]; } diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index a770c96001a7..e0d03108960c 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -1,137 +1,187 @@ -{ stdenv, lib, stdenvNoCC -, makeScopeWithSplicing', generateSplicesForMkScope -, buildPackages -, fetchcvs +{ + stdenv, + lib, + stdenvNoCC, + makeScopeWithSplicing', + generateSplicesForMkScope, + buildPackages, + fetchcvs, }: makeScopeWithSplicing' { otherSplices = generateSplicesForMkScope "netbsd"; - f = (self: lib.packagesFromDirectoryRecursive { - callPackage = self.callPackage; - directory = ./pkgs; - } // { + f = ( + self: + lib.packagesFromDirectoryRecursive { + callPackage = self.callPackage; + directory = ./pkgs; + } + // { - fetchNetBSD = path: version: sha256: fetchcvs { - cvsRoot = ":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot"; - module = "src/${path}"; - inherit sha256; - tag = "netbsd-${lib.replaceStrings ["."] ["-"] version}-RELEASE"; - }; + fetchNetBSD = + path: version: sha256: + fetchcvs { + cvsRoot = ":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot"; + module = "src/${path}"; + inherit sha256; + tag = "netbsd-${lib.replaceStrings [ "." ] [ "-" ] version}-RELEASE"; + }; - defaultMakeFlags = [ - "MKSOFTFLOAT=${if stdenv.hostPlatform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft" - then "yes" - else "no"}" - ]; + defaultMakeFlags = [ + "MKSOFTFLOAT=${ + if stdenv.hostPlatform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft" then + "yes" + else + "no" + }" + ]; - compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isNetBSD) self.compat; + compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isNetBSD) self.compat; - # The manual callPackages below should in principle be unnecessary because - # they're just selecting arguments that would be selected anyway. However, - # if we don't perform these manual calls, we get infinite recursion issues - # because of the splices. + # The manual callPackages below should in principle be unnecessary because + # they're just selecting arguments that would be selected anyway. However, + # if we don't perform these manual calls, we get infinite recursion issues + # because of the splices. - mkDerivation = self.callPackage ./pkgs/mkDerivation.nix { - inherit stdenv stdenvNoCC; - inherit (buildPackages.netbsd) netbsdSetupHook makeMinimal install tsort lorder; - inherit (buildPackages) mandoc; - inherit (buildPackages.buildPackages) rsync; + mkDerivation = self.callPackage ./pkgs/mkDerivation.nix { + inherit stdenv stdenvNoCC; + inherit (buildPackages.netbsd) + netbsdSetupHook + makeMinimal + install + tsort + lorder + ; + inherit (buildPackages) mandoc; + inherit (buildPackages.buildPackages) rsync; + }; - }; + makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { inherit (self) make; }; - makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { - inherit (self) make; - }; + compat = self.callPackage ./pkgs/compat/package.nix { + inherit (buildPackages) coreutils; + inherit (buildPackages.darwin) cctools-port; + inherit (buildPackages.buildPackages) rsync; + inherit (buildPackages.netbsd) makeMinimal; + inherit (self) + install + include + libc + libutil + ; + }; - compat = self.callPackage ./pkgs/compat/package.nix { - inherit (buildPackages) coreutils; - inherit (buildPackages.darwin) cctools-port; - inherit (buildPackages.buildPackages) rsync; - inherit (buildPackages.netbsd) makeMinimal; - inherit (self) install include libc libutil; - }; + install = self.callPackage ./pkgs/install/package.nix { + inherit (self) + fts + mtree + make + compatIfNeeded + ; + inherit (buildPackages.buildPackages) rsync; + inherit (buildPackages.netbsd) makeMinimal; + }; - install = self.callPackage ./pkgs/install/package.nix { - inherit (self) fts mtree make compatIfNeeded; - inherit (buildPackages.buildPackages) rsync; - inherit (buildPackages.netbsd) makeMinimal; - }; + # See note in pkgs/stat/package.nix + stat = self.callPackage ./pkgs/stat/package.nix { + inherit (buildPackages.netbsd) makeMinimal install; + inherit (buildPackages.buildPackages) rsync; + }; - # See note in pkgs/stat/package.nix - stat = self.callPackage ./pkgs/stat/package.nix { - inherit (buildPackages.netbsd) makeMinimal install; - inherit (buildPackages.buildPackages) rsync; - }; + # See note in pkgs/stat/hook.nix + statHook = self.callPackage ./pkgs/stat/hook.nix { inherit (self) stat; }; - # See note in pkgs/stat/hook.nix - statHook = self.callPackage ./pkgs/stat/hook.nix { - inherit (self) stat; - }; + tsort = self.callPackage ./pkgs/tsort.nix { + inherit (buildPackages.netbsd) makeMinimal install; + inherit (buildPackages.buildPackages) rsync; + }; - tsort = self.callPackage ./pkgs/tsort.nix { - inherit (buildPackages.netbsd) makeMinimal install; - inherit (buildPackages.buildPackages) rsync; - }; + lorder = self.callPackage ./pkgs/lorder.nix { + inherit (buildPackages.netbsd) makeMinimal install; + inherit (buildPackages.buildPackages) rsync; + }; - lorder = self.callPackage ./pkgs/lorder.nix { - inherit (buildPackages.netbsd) makeMinimal install; - inherit (buildPackages.buildPackages) rsync; - }; + config = self.callPackage ./pkgs/config.nix { + inherit (buildPackages.netbsd) makeMinimal install; + inherit (buildPackages.buildPackages) rsync; + inherit (self) cksum; + }; - config = self.callPackage ./pkgs/config.nix { - inherit (buildPackages.netbsd) makeMinimal install; - inherit (buildPackages.buildPackages) rsync; - inherit (self) cksum; - }; + include = self.callPackage ./pkgs/include.nix { + inherit (buildPackages.netbsd) + makeMinimal + install + nbperf + rpcgen + ; + inherit (buildPackages) stdenv; + inherit (buildPackages.buildPackages) rsync; + }; - include = self.callPackage ./pkgs/include.nix { - inherit (buildPackages.netbsd) - makeMinimal install nbperf rpcgen; - inherit (buildPackages) stdenv; - inherit (buildPackages.buildPackages) rsync; - }; + sys-headers = self.callPackage ./pkgs/sys/headers.nix { + inherit (buildPackages.netbsd) + makeMinimal + install + tsort + lorder + statHook + uudecode + config + genassym + ; + inherit (buildPackages.buildPackages) rsync; + }; - sys-headers = self.callPackage ./pkgs/sys/headers.nix { - inherit (buildPackages.netbsd) - makeMinimal install tsort lorder statHook uudecode config genassym; - inherit (buildPackages.buildPackages) rsync; - }; + libutil = self.callPackage ./pkgs/libutil.nix { inherit (self) libc sys; }; - libutil = self.callPackage ./pkgs/libutil.nix { - inherit (self) libc sys; - }; + libpthread-headers = self.callPackage ./pkgs/libpthread/headers.nix { }; - libpthread-headers = self.callPackage ./pkgs/libpthread/headers.nix { }; + csu = self.callPackage ./pkgs/csu.nix { + inherit (self) headers sys ld_elf_so; + inherit (buildPackages.netbsd) + netbsdSetupHook + makeMinimal + install + genassym + gencat + lorder + tsort + statHook + ; + inherit (buildPackages.buildPackages) rsync; + }; - csu = self.callPackage ./pkgs/csu.nix { - inherit (self) headers sys ld_elf_so; - inherit (buildPackages.netbsd) - netbsdSetupHook - makeMinimal - install - genassym gencat lorder tsort statHook; - inherit (buildPackages.buildPackages) rsync; - }; + _mainLibcExtraPaths = with self; [ + common + i18n_module.src + sys.src + ld_elf_so.src + libpthread.src + libm.src + libresolv.src + librpcsvc.src + libutil.src + librt.src + libcrypt.src + ]; - _mainLibcExtraPaths = with self; [ - common i18n_module.src sys.src - ld_elf_so.src libpthread.src libm.src libresolv.src - librpcsvc.src libutil.src librt.src libcrypt.src - ]; + libc = self.callPackage ./pkgs/libc.nix { + inherit (self) headers csu librt; + inherit (buildPackages.netbsd) + netbsdSetupHook + makeMinimal + install + genassym + gencat + lorder + tsort + statHook + rpcgen + ; + inherit (buildPackages.buildPackages) rsync; + }; - libc = self.callPackage ./pkgs/libc.nix { - inherit (self) headers csu librt; - inherit (buildPackages.netbsd) - netbsdSetupHook - makeMinimal - install - genassym gencat lorder tsort statHook rpcgen; - inherit (buildPackages.buildPackages) rsync; - }; - - mtree = self.callPackage ./pkgs/mtree.nix { - inherit (self) mknod; - }; - - }); + mtree = self.callPackage ./pkgs/mtree.nix { inherit (self) mknod; }; + } + ); } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix index a1336ad52f6d..4c149e95c1ae 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix @@ -1,21 +1,29 @@ -{ lib, mkDerivation, stdenv -, zlib -, defaultMakeFlags -, coreutils -, cctools-port -, include, libc, libutil -, install -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, rsync -, fetchNetBSD -, _mainLibcExtraPaths +{ + lib, + mkDerivation, + stdenv, + zlib, + defaultMakeFlags, + coreutils, + cctools-port, + include, + libc, + libutil, + install, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + rsync, + fetchNetBSD, + _mainLibcExtraPaths, }: -mkDerivation (let +mkDerivation ( + let version = "9.2"; commonDeps = [ zlib ]; - in { + in + { path = "tools/compat"; sha256 = "1vsxg7136nlhc72vpa664vs22874xh7ila95nkmsd8crn3z3cyn0"; inherit version; @@ -29,19 +37,23 @@ mkDerivation (let make include/.stamp configure nbtool_config.h.in defs.mk.in ''; - configurePlatforms = [ "build" "host" ]; - configureFlags = [ - "--cache-file=config.cache" - ] ++ lib.optionals stdenv.hostPlatform.isMusl [ - # We include this header in our musl package only for legacy - # compatibility, and compat works fine without it (and having it - # know about sys/cdefs.h breaks packages like glib when built - # statically). - "ac_cv_header_sys_cdefs_h=no" + configurePlatforms = [ + "build" + "host" ]; + configureFlags = + [ "--cache-file=config.cache" ] + ++ lib.optionals stdenv.hostPlatform.isMusl [ + # We include this header in our musl package only for legacy + # compatibility, and compat works fine without it (and having it + # know about sys/cdefs.h breaks packages like glib when built + # statically). + "ac_cv_header_sys_cdefs_h=no" + ]; nativeBuildInputs = commonDeps ++ [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal rsync ]; @@ -50,22 +62,27 @@ mkDerivation (let # temporarily use gnuinstall for bootstrapping # bsdinstall will be built later - makeFlags = defaultMakeFlags ++ [ - "INSTALL=${coreutils}/bin/install" - "DATADIR=$(out)/share" - # Can't sort object files yet - "LORDER=echo" - "TSORT=cat" - # Can't process man pages yet - "MKSHARE=no" - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # GNU objcopy produces broken .a libs which won't link into dependers. - # Makefiles only invoke `$OBJCOPY -x/-X`, so cctools strip works here. - "OBJCOPY=${cctools-port}/bin/strip" - ]; + makeFlags = + defaultMakeFlags + ++ [ + "INSTALL=${coreutils}/bin/install" + "DATADIR=$(out)/share" + # Can't sort object files yet + "LORDER=echo" + "TSORT=cat" + # Can't process man pages yet + "MKSHARE=no" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # GNU objcopy produces broken .a libs which won't link into dependers. + # Makefiles only invoke `$OBJCOPY -x/-X`, so cctools strip works here. + "OBJCOPY=${cctools-port}/bin/strip" + ]; RENAME = "-D"; - passthru.tests = { netbsd-install = install; }; + passthru.tests = { + netbsd-install = install; + }; patches = [ ./compat-cxx-safe-header.patch @@ -79,42 +96,51 @@ mkDerivation (let makeFlagsArray+=('INSTALL_SYMLINK=''${INSTALL} ''${SYMLINK} ''${RENAME}') ''; - postInstall = '' - # why aren't these installed by netbsd? - install -D compat_defs.h $out/include/compat_defs.h - install -D $BSDSRCDIR/include/cdbw.h $out/include/cdbw.h - install -D $BSDSRCDIR/sys/sys/cdbr.h $out/include/cdbr.h - install -D $BSDSRCDIR/sys/sys/featuretest.h \ - $out/include/sys/featuretest.h - install -D $BSDSRCDIR/sys/sys/md5.h $out/include/md5.h - install -D $BSDSRCDIR/sys/sys/rmd160.h $out/include/rmd160.h - install -D $BSDSRCDIR/sys/sys/sha1.h $out/include/sha1.h - install -D $BSDSRCDIR/sys/sys/sha2.h $out/include/sha2.h - install -D $BSDSRCDIR/sys/sys/queue.h $out/include/sys/queue.h - install -D $BSDSRCDIR/include/vis.h $out/include/vis.h - install -D $BSDSRCDIR/include/db.h $out/include/db.h - install -D $BSDSRCDIR/include/netconfig.h $out/include/netconfig.h - install -D $BSDSRCDIR/include/utmpx.h $out/include/utmpx.h - install -D $BSDSRCDIR/include/tzfile.h $out/include/tzfile.h - install -D $BSDSRCDIR/sys/sys/tree.h $out/include/sys/tree.h - install -D $BSDSRCDIR/include/nl_types.h $out/include/nl_types.h - install -D $BSDSRCDIR/include/stringlist.h $out/include/stringlist.h + postInstall = + '' + # why aren't these installed by netbsd? + install -D compat_defs.h $out/include/compat_defs.h + install -D $BSDSRCDIR/include/cdbw.h $out/include/cdbw.h + install -D $BSDSRCDIR/sys/sys/cdbr.h $out/include/cdbr.h + install -D $BSDSRCDIR/sys/sys/featuretest.h \ + $out/include/sys/featuretest.h + install -D $BSDSRCDIR/sys/sys/md5.h $out/include/md5.h + install -D $BSDSRCDIR/sys/sys/rmd160.h $out/include/rmd160.h + install -D $BSDSRCDIR/sys/sys/sha1.h $out/include/sha1.h + install -D $BSDSRCDIR/sys/sys/sha2.h $out/include/sha2.h + install -D $BSDSRCDIR/sys/sys/queue.h $out/include/sys/queue.h + install -D $BSDSRCDIR/include/vis.h $out/include/vis.h + install -D $BSDSRCDIR/include/db.h $out/include/db.h + install -D $BSDSRCDIR/include/netconfig.h $out/include/netconfig.h + install -D $BSDSRCDIR/include/utmpx.h $out/include/utmpx.h + install -D $BSDSRCDIR/include/tzfile.h $out/include/tzfile.h + install -D $BSDSRCDIR/sys/sys/tree.h $out/include/sys/tree.h + install -D $BSDSRCDIR/include/nl_types.h $out/include/nl_types.h + install -D $BSDSRCDIR/include/stringlist.h $out/include/stringlist.h - # Collapse includes slightly to fix dangling reference - install -D $BSDSRCDIR/common/include/rpc/types.h $out/include/rpc/types.h - sed -i '1s;^;#include "nbtool_config.h"\n;' $out/include/rpc/types.h - '' + lib.optionalString stdenv.isDarwin '' - mkdir -p $out/include/ssp - touch $out/include/ssp/ssp.h - '' + '' - mkdir -p $out/lib/pkgconfig - substitute ${./libbsd-overlay.pc} $out/lib/pkgconfig/libbsd-overlay.pc \ - --subst-var-by out $out \ - --subst-var-by version ${version} - ''; - extraPaths = [ include.src libc.src libutil.src + # Collapse includes slightly to fix dangling reference + install -D $BSDSRCDIR/common/include/rpc/types.h $out/include/rpc/types.h + sed -i '1s;^;#include "nbtool_config.h"\n;' $out/include/rpc/types.h + '' + + lib.optionalString stdenv.isDarwin '' + mkdir -p $out/include/ssp + touch $out/include/ssp/ssp.h + '' + + '' + mkdir -p $out/lib/pkgconfig + substitute ${./libbsd-overlay.pc} $out/lib/pkgconfig/libbsd-overlay.pc \ + --subst-var-by out $out \ + --subst-var-by version ${version} + ''; + extraPaths = [ + include.src + libc.src + libutil.src (fetchNetBSD "external/bsd/flex" "9.2" "0h98jpfj7vx5zh7vd7bk6b1hmzgkcb757a8j6d9zgygxxv13v43m") (fetchNetBSD "sys/sys" "9.2" "0zawhw51klaigqqwkx0lzrx3mim2jywrc24cm7c66qsf1im9awgd") - (fetchNetBSD "common/include/rpc/types.h" "9.2" "0n2df12mlc3cbc48jxq35yzl1y7ghgpykvy7jnfh898rdhac7m9a") + (fetchNetBSD "common/include/rpc/types.h" "9.2" + "0n2df12mlc3cbc48jxq35yzl1y7ghgpykvy7jnfh898rdhac7m9a" + ) ] ++ libutil.extraPaths ++ _mainLibcExtraPaths; - }) + } +) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/config.nix b/pkgs/os-specific/bsd/netbsd/pkgs/config.nix index 277d70129e6f..c423f3ca8676 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/config.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/config.nix @@ -1,8 +1,15 @@ -{ mkDerivation -, bsdSetupHook, netbsdSetupHook -, makeMinimal, install, mandoc, byacc, flex, rsync -, compatIfNeeded -, cksum +{ + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + mandoc, + byacc, + flex, + rsync, + compatIfNeeded, + cksum, }: mkDerivation { path = "usr.bin/config"; @@ -10,8 +17,14 @@ mkDerivation { sha256 = "1yz3n4hncdkk6kp595fh2q5lg150vpqg8iw2dccydkyw4y3hgsjj"; env.NIX_CFLAGS_COMPILE = toString [ "-DMAKE_BOOTSTRAP" ]; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook - makeMinimal install mandoc byacc flex rsync + bsdSetupHook + netbsdSetupHook + makeMinimal + install + mandoc + byacc + flex + rsync ]; buildInputs = compatIfNeeded; extraPaths = [ cksum.src ]; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/csu.nix b/pkgs/os-specific/bsd/netbsd/pkgs/csu.nix index 2d13ced6d5ed..66443331490f 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/csu.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/csu.nix @@ -1,11 +1,23 @@ -{ lib, mkDerivation -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, mandoc, groff, flex -, byacc, genassym, gencat, lorder, tsort, statHook, rsync -, headers -, sys -, ld_elf_so +{ + lib, + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + flex, + byacc, + genassym, + gencat, + lorder, + tsort, + statHook, + rsync, + headers, + sys, + ld_elf_so, }: mkDerivation { @@ -14,11 +26,24 @@ mkDerivation { sha256 = "0al5jfazvhlzn9hvmnrbchx4d0gm282hq5gp4xs2zmj9ycmf6d03"; meta.platforms = lib.platforms.netbsd; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - install mandoc groff flex - byacc genassym gencat lorder tsort statHook rsync + install + mandoc + groff + flex + byacc + genassym + gencat + lorder + tsort + statHook + rsync ]; buildInputs = [ headers ]; - extraPaths = [ sys.src ld_elf_so.src ]; + extraPaths = [ + sys.src + ld_elf_so.src + ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/fts/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/fts/package.nix index 0393d36357f6..7c64658bf2e5 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/fts/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/fts/package.nix @@ -1,7 +1,10 @@ -{ mkDerivation -, bsdSetupHook, netbsdSetupHook, rsync -, compatIfNeeded -, fetchNetBSD +{ + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + rsync, + compatIfNeeded, + fetchNetBSD, }: mkDerivation { @@ -10,12 +13,16 @@ mkDerivation { sha256 = "01d4fpxvz1pgzfk5xznz5dcm0x0gdzwcsfm1h3d0xc9kc6hj2q77"; version = "9.2"; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook rsync + bsdSetupHook + netbsdSetupHook + rsync ]; propagatedBuildInputs = compatIfNeeded; extraPaths = [ (fetchNetBSD "lib/libc/gen/fts.c" "9.2" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7") - (fetchNetBSD "lib/libc/include/namespace.h" "9.2" "0kksr3pdwdc1cplqf5z12ih4cml6l11lqrz91f7hjjm64y7785kc") + (fetchNetBSD "lib/libc/include/namespace.h" "9.2" + "0kksr3pdwdc1cplqf5z12ih4cml6l11lqrz91f7hjjm64y7785kc" + ) (fetchNetBSD "lib/libc/gen/fts.3" "9.2" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1") ]; skipIncludesPhase = true; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/headers.nix b/pkgs/os-specific/bsd/netbsd/pkgs/headers.nix index 646e5675130b..40615b2722d5 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/headers.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/headers.nix @@ -1,4 +1,10 @@ -{ lib, symlinkJoin, include, sys-headers, libpthread-headers }: +{ + lib, + symlinkJoin, + include, + sys-headers, + libpthread-headers, +}: symlinkJoin { name = "netbsd-headers-9.2"; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/i18n_module.nix b/pkgs/os-specific/bsd/netbsd/pkgs/i18n_module.nix index 60b091ef0b71..c76ada865775 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/i18n_module.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/i18n_module.nix @@ -1,4 +1,8 @@ -{ lib, mkDerivation, libc }: +{ + lib, + mkDerivation, + libc, +}: mkDerivation { path = "lib/i18n_module"; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/include.nix b/pkgs/os-specific/bsd/netbsd/pkgs/include.nix index 1ecdec90ae09..ec316a63174f 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/include.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/include.nix @@ -1,10 +1,18 @@ -{ lib, mkDerivation -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, mandoc, groff, rsync, nbperf, rpcgen -, common -, defaultMakeFlags -, stdenv +{ + lib, + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + rsync, + nbperf, + rpcgen, + common, + defaultMakeFlags, + stdenv, }: mkDerivation { @@ -12,9 +20,15 @@ mkDerivation { version = "9.2"; sha256 = "0nxnmj4c8s3hb9n3fpcmd0zl3l1nmhivqgi9a35sis943qvpgl9h"; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - install mandoc groff rsync nbperf rpcgen + install + mandoc + groff + rsync + nbperf + rpcgen ]; # The makefiles define INCSDIR per subdirectory, so we have to set diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix index 991517ac2d48..69b0c073259e 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix @@ -1,10 +1,16 @@ -{ mkDerivation -, writeShellScript -, mtree, make -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, mandoc, groff, rsync -, compatIfNeeded, fts +{ + mkDerivation, + writeShellScript, + mtree, + make, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + mandoc, + groff, + rsync, + compatIfNeeded, + fts, }: @@ -18,32 +24,39 @@ let @out@/bin/xinstall "$@" ''; in - mkDerivation { - path = "usr.bin/xinstall"; - version = "9.2"; - sha256 = "1f6pbz3qv1qcrchdxif8p5lbmnwl8b9nq615hsd3cyl4avd5bfqj"; - extraPaths = [ mtree.src make.src ]; - nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook - makeMinimal - mandoc groff rsync - ]; - skipIncludesPhase = true; - buildInputs = compatIfNeeded - # fts header is needed. glibc already has this header, but musl doesn't, - # so make sure pkgsMusl.netbsd.install still builds in case you want to - # remove it! - ++ [ fts ]; - installPhase = '' - runHook preInstall +mkDerivation { + path = "usr.bin/xinstall"; + version = "9.2"; + sha256 = "1f6pbz3qv1qcrchdxif8p5lbmnwl8b9nq615hsd3cyl4avd5bfqj"; + extraPaths = [ + mtree.src + make.src + ]; + nativeBuildInputs = [ + bsdSetupHook + netbsdSetupHook + makeMinimal + mandoc + groff + rsync + ]; + skipIncludesPhase = true; + buildInputs = + compatIfNeeded + # fts header is needed. glibc already has this header, but musl doesn't, + # so make sure pkgsMusl.netbsd.install still builds in case you want to + # remove it! + ++ [ fts ]; + installPhase = '' + runHook preInstall - install -D install.1 $out/share/man/man1/install.1 - install -D xinstall $out/bin/xinstall - install -D -m 0550 ${binstall} $out/bin/binstall - substituteInPlace $out/bin/binstall --subst-var out - ln -s $out/bin/binstall $out/bin/install + install -D install.1 $out/share/man/man1/install.1 + install -D xinstall $out/bin/xinstall + install -D -m 0550 ${binstall} $out/bin/binstall + substituteInPlace $out/bin/binstall --subst-var out + ln -s $out/bin/binstall $out/bin/install - runHook postInstall - ''; - setupHook = ./install-setup-hook.sh; - } + runHook postInstall + ''; + setupHook = ./install-setup-hook.sh; +} diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/ld_elf_so.nix b/pkgs/os-specific/bsd/netbsd/pkgs/ld_elf_so.nix index 1496ad6a0e88..a350e81d3206 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/ld_elf_so.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/ld_elf_so.nix @@ -1,11 +1,12 @@ -{ lib -, mkDerivation -, libc -, defaultMakeFlags +{ + lib, + mkDerivation, + libc, + defaultMakeFlags, }: mkDerivation { - path = "libexec/ld.elf_so"; + path = "libexec/ld.elf_so"; version = "9.2"; sha256 = "0ia9mqzdljly0vqfwflm5mzz55k7qsr4rw2bzhivky6k30vgirqa"; meta.platforms = lib.platforms.netbsd; @@ -13,6 +14,9 @@ mkDerivation { # Hack to prevent a symlink being installed here for compatibility. SHLINKINSTALLDIR = "/usr/libexec"; USE_FORT = "yes"; - makeFlags = defaultMakeFlags ++ [ "BINDIR=$(out)/libexec" "CLIBOBJ=${libc}/lib" ]; + makeFlags = defaultMakeFlags ++ [ + "BINDIR=$(out)/libexec" + "CLIBOBJ=${libc}/lib" + ]; extraPaths = [ libc.src ] ++ libc.extraPaths; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libc.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libc.nix index ebc01a11668a..d755e4b6870a 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libc.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libc.nix @@ -1,14 +1,27 @@ -{ lib -, mkDerivation -, defaultMakeFlags -, _mainLibcExtraPaths -, fetchNetBSD -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, mandoc, groff, flex -, byacc, genassym, gencat, lorder, tsort, statHook, rsync, rpcgen -, csu, headers -, librt +{ + lib, + mkDerivation, + defaultMakeFlags, + _mainLibcExtraPaths, + fetchNetBSD, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + flex, + byacc, + genassym, + gencat, + lorder, + tsort, + statHook, + rsync, + rpcgen, + csu, + headers, + librt, }: mkDerivation { @@ -21,18 +34,32 @@ mkDerivation { (fetchNetBSD "external/bsd/jemalloc" "9.2" "0cq704swa0h2yxv4gc79z2lwxibk9k7pxh3q5qfs7axx3jx3n8kb") ]; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - install mandoc groff flex - byacc genassym gencat lorder tsort statHook rsync rpcgen + install + mandoc + groff + flex + byacc + genassym + gencat + lorder + tsort + statHook + rsync + rpcgen + ]; + buildInputs = [ + headers + csu ]; - buildInputs = [ headers csu ]; env.NIX_CFLAGS_COMPILE = "-B${csu}/lib -fcommon"; meta.platforms = lib.platforms.netbsd; SHLIBINSTALLDIR = "$(out)/lib"; MKPICINSTALL = "yes"; NLSDIR = "$(out)/share/nls"; - makeFlags = defaultMakeFlags ++ [ "FILESDIR=$(out)/var/db"]; + makeFlags = defaultMakeFlags ++ [ "FILESDIR=$(out)/var/db" ]; postInstall = '' pushd ${headers} find . -type d -exec mkdir -p $out/\{} \; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix index 2409879640a9..5072821db911 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix @@ -1,7 +1,10 @@ -{ lib, mkDerivation, stdenv -, libterminfo -, compatIfNeeded -, defaultMakeFlags +{ + lib, + mkDerivation, + stdenv, + libterminfo, + compatIfNeeded, + defaultMakeFlags, }: mkDerivation { @@ -9,11 +12,14 @@ mkDerivation { version = "9.2"; sha256 = "0pd0dggl3w4bv5i5h0s1wrc8hr66n4hkv3zlklarwfdhc692fqal"; buildInputs = [ libterminfo ]; - env.NIX_CFLAGS_COMPILE = toString ([ - "-D__scanflike(a,b)=" - "-D__va_list=va_list" - "-D__warn_references(a,b)=" - ] ++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)="); + env.NIX_CFLAGS_COMPILE = toString ( + [ + "-D__scanflike(a,b)=" + "-D__va_list=va_list" + "-D__warn_references(a,b)=" + ] + ++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)=" + ); propagatedBuildInputs = compatIfNeeded; MKDOC = "no"; # missing vfontedpr makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ]; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix index eb734f34c3d4..ee1e7bf79f96 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix @@ -1,26 +1,32 @@ -{ lib, mkDerivation -, libterminfo, libcurses -, compatIfNeeded -, defaultMakeFlags +{ + lib, + mkDerivation, + libterminfo, + libcurses, + compatIfNeeded, + defaultMakeFlags, }: mkDerivation { - path = "lib/libedit"; - version = "9.2"; - sha256 = "1wqhngraxwqk4jgrf5f18jy195yrp7c06n1gf31pbplq79mg1bcj"; - buildInputs = [ libterminfo libcurses ]; - propagatedBuildInputs = compatIfNeeded; - SHLIBINSTALLDIR = "$(out)/lib"; - makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ]; - postPatch = '' - sed -i '1i #undef bool_t' $COMPONENT_PATH/el.h - substituteInPlace $COMPONENT_PATH/config.h \ - --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" "" - substituteInPlace $COMPONENT_PATH/readline/Makefile --replace /usr/include "$out/include" - ''; - env.NIX_CFLAGS_COMPILE = toString [ - "-D__noinline=" - "-D__scanflike(a,b)=" - "-D__va_list=va_list" - ]; - } + path = "lib/libedit"; + version = "9.2"; + sha256 = "1wqhngraxwqk4jgrf5f18jy195yrp7c06n1gf31pbplq79mg1bcj"; + buildInputs = [ + libterminfo + libcurses + ]; + propagatedBuildInputs = compatIfNeeded; + SHLIBINSTALLDIR = "$(out)/lib"; + makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ]; + postPatch = '' + sed -i '1i #undef bool_t' $COMPONENT_PATH/el.h + substituteInPlace $COMPONENT_PATH/config.h \ + --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" "" + substituteInPlace $COMPONENT_PATH/readline/Makefile --replace /usr/include "$out/include" + ''; + env.NIX_CFLAGS_COMPILE = toString [ + "-D__noinline=" + "-D__scanflike(a,b)=" + "-D__va_list=va_list" + ]; +} diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libm.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libm.nix index 86990088adf2..f36e97f8e6ae 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libm.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libm.nix @@ -1,4 +1,8 @@ -{ lib, mkDerivation, sys }: +{ + lib, + mkDerivation, + sys, +}: mkDerivation { path = "lib/libm"; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix index 21ca0f62fd4e..b0be4a2da723 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix @@ -1,4 +1,8 @@ -{ lib, mkDerivation, sys }: +{ + lib, + mkDerivation, + sys, +}: mkDerivation { pname = "libpci"; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix index 485a12837bcb..d8ea7c553eba 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix @@ -3,4 +3,3 @@ version = "9.2"; sha256 = "0mlmc31k509dwfmx5s2x010wxjc44mr6y0cbmk30cfipqh8c962h"; } - diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix index 3896562501fc..c3cc899017ee 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix @@ -1,9 +1,12 @@ { lib, mkDerivation }: -mkDerivation (import ./base.nix // { - pname = "libpthread-headers"; - installPhase = "includesPhase"; - dontBuild = true; - noCC = true; - meta.platforms = lib.platforms.netbsd; -}) +mkDerivation ( + import ./base.nix + // { + pname = "libpthread-headers"; + installPhase = "includesPhase"; + dontBuild = true; + noCC = true; + meta.platforms = lib.platforms.netbsd; + } +) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix index c2a0d407718e..88d392e20b4a 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix @@ -1,15 +1,28 @@ -{ lib, mkDerivation -, headers -, common, libc, librt, sys +{ + lib, + mkDerivation, + headers, + common, + libc, + librt, + sys, }: -mkDerivation (import ./base.nix // { - pname = "libpthread"; - installPhase = null; - noCC = false; - dontBuild = false; - buildInputs = [ headers ]; - SHLIBINSTALLDIR = "$(out)/lib"; - extraPaths = [ common libc.src librt.src sys.src ]; - meta.platforms = lib.platforms.netbsd; -}) +mkDerivation ( + import ./base.nix + // { + pname = "libpthread"; + installPhase = null; + noCC = false; + dontBuild = false; + buildInputs = [ headers ]; + SHLIBINSTALLDIR = "$(out)/lib"; + extraPaths = [ + common + libc.src + librt.src + sys.src + ]; + meta.platforms = lib.platforms.netbsd; + } +) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libresolv.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libresolv.nix index 2427592e4aa9..24bc4f2f9e00 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libresolv.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libresolv.nix @@ -1,4 +1,8 @@ -{ lib, mkDerivation, libc }: +{ + lib, + mkDerivation, + libc, +}: mkDerivation { path = "lib/libresolv"; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/librpcsvc.nix b/pkgs/os-specific/bsd/netbsd/pkgs/librpcsvc.nix index 87524339e268..8d757a8a8430 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/librpcsvc.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/librpcsvc.nix @@ -1,9 +1,15 @@ -{ lib -, mkDerivation -, defaultMakeFlags -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, tsort, lorder, rpcgen, statHook +{ + lib, + mkDerivation, + defaultMakeFlags, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + rpcgen, + statHook, }: mkDerivation { @@ -13,9 +19,13 @@ mkDerivation { makeFlags = defaultMakeFlags ++ [ "INCSDIR=$(out)/include/rpcsvc" ]; meta.platforms = lib.platforms.netbsd; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - install tsort lorder rpcgen statHook + install + tsort + lorder + rpcgen + statHook ]; } - diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/librt.nix b/pkgs/os-specific/bsd/netbsd/pkgs/librt.nix index 2ffe0787004a..fa0229953b66 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/librt.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/librt.nix @@ -1,4 +1,9 @@ -{ lib, mkDerivation, libc, headers }: +{ + lib, + mkDerivation, + libc, + headers, +}: mkDerivation { path = "lib/librt"; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libterminfo.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libterminfo.nix index b9268cc7ba33..6ac573d865b1 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libterminfo.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libterminfo.nix @@ -1,8 +1,18 @@ -{ mkDerivation -, bsdSetupHook, netbsdSetupHook -, makeMinimal, install, tsort, lorder, mandoc, statHook, nbperf, tic, rsync -, compatIfNeeded -, fetchNetBSD +{ + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + mandoc, + statHook, + nbperf, + tic, + rsync, + compatIfNeeded, + fetchNetBSD, }: mkDerivation { @@ -10,8 +20,17 @@ mkDerivation { version = "9.2"; sha256 = "0pq05k3dj0dfsczv07frnnji92mazmy2qqngqbx2zgqc1x251414"; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook - makeMinimal install tsort lorder mandoc statHook nbperf tic rsync + bsdSetupHook + netbsdSetupHook + makeMinimal + install + tsort + lorder + mandoc + statHook + nbperf + tic + rsync ]; buildInputs = compatIfNeeded; SHLIBINSTALLDIR = "$(out)/lib"; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix index 4aaf8f0e7ab6..fdc57df9c231 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix @@ -1,20 +1,41 @@ -{ mkDerivation -, common, libc, sys -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, byacc, install, tsort, lorder, mandoc, statHook, rsync -, headers +{ + mkDerivation, + common, + libc, + sys, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + byacc, + install, + tsort, + lorder, + mandoc, + statHook, + rsync, + headers, }: mkDerivation { path = "lib/libutil"; version = "9.2"; sha256 = "02gm5a5zhh8qp5r5q5r7x8x6x50ir1i0ncgsnfwh1vnrz6mxbq7z"; - extraPaths = [ common libc.src sys.src ]; + extraPaths = [ + common + libc.src + sys.src + ]; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - byacc install tsort lorder mandoc statHook rsync + byacc + install + tsort + lorder + mandoc + statHook + rsync ]; buildInputs = [ headers ]; SHLIBINSTALLDIR = "$(out)/lib"; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix b/pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix index d3109601382a..0b99a794b07a 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix @@ -1,7 +1,12 @@ -{ mkDerivation -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, mandoc, groff, rsync +{ + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + rsync, }: mkDerivation { @@ -9,8 +14,12 @@ mkDerivation { version = "9.2"; sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2"; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - install mandoc groff rsync + install + mandoc + groff + rsync ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/make.nix b/pkgs/os-specific/bsd/netbsd/pkgs/make.nix index dcd80ef00467..381e30916407 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/make.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/make.nix @@ -1,56 +1,63 @@ -{ lib, mkDerivation, fetchNetBSD, stdenv }: +{ + lib, + mkDerivation, + fetchNetBSD, + stdenv, +}: mkDerivation { path = "usr.bin/make"; sha256 = "0vi73yicbmbp522qzqvd979cx6zm5jakhy77xh73c1kygf8klccs"; version = "9.2"; - postPatch = '' - substituteInPlace $BSDSRCDIR/share/mk/bsd.doc.mk \ - --replace '-o ''${DOCOWN}' "" \ - --replace '-g ''${DOCGRP}' "" - for mk in $BSDSRCDIR/share/mk/bsd.inc.mk $BSDSRCDIR/share/mk/bsd.kinc.mk; do - substituteInPlace $mk \ - --replace '-o ''${BINOWN}' "" \ - --replace '-g ''${BINGRP}' "" - done - substituteInPlace $BSDSRCDIR/share/mk/bsd.kmodule.mk \ - --replace '-o ''${KMODULEOWN}' "" \ - --replace '-g ''${KMODULEGRP}' "" - substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \ - --replace '-o ''${LIBOWN}' "" \ - --replace '-g ''${LIBGRP}' "" \ - --replace '-o ''${DEBUGOWN}' "" \ - --replace '-g ''${DEBUGGRP}' "" - substituteInPlace $BSDSRCDIR/share/mk/bsd.lua.mk \ - --replace '-o ''${LIBOWN}' "" \ - --replace '-g ''${LIBGRP}' "" - substituteInPlace $BSDSRCDIR/share/mk/bsd.man.mk \ - --replace '-o ''${MANOWN}' "" \ - --replace '-g ''${MANGRP}' "" - substituteInPlace $BSDSRCDIR/share/mk/bsd.nls.mk \ - --replace '-o ''${NLSOWN}' "" \ - --replace '-g ''${NLSGRP}' "" - substituteInPlace $BSDSRCDIR/share/mk/bsd.prog.mk \ - --replace '-o ''${BINOWN}' "" \ - --replace '-g ''${BINGRP}' "" \ - --replace '-o ''${RUMPBINOWN}' "" \ - --replace '-g ''${RUMPBINGRP}' "" \ - --replace '-o ''${DEBUGOWN}' "" \ - --replace '-g ''${DEBUGGRP}' "" + postPatch = + '' + substituteInPlace $BSDSRCDIR/share/mk/bsd.doc.mk \ + --replace '-o ''${DOCOWN}' "" \ + --replace '-g ''${DOCGRP}' "" + for mk in $BSDSRCDIR/share/mk/bsd.inc.mk $BSDSRCDIR/share/mk/bsd.kinc.mk; do + substituteInPlace $mk \ + --replace '-o ''${BINOWN}' "" \ + --replace '-g ''${BINGRP}' "" + done + substituteInPlace $BSDSRCDIR/share/mk/bsd.kmodule.mk \ + --replace '-o ''${KMODULEOWN}' "" \ + --replace '-g ''${KMODULEGRP}' "" + substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \ + --replace '-o ''${LIBOWN}' "" \ + --replace '-g ''${LIBGRP}' "" \ + --replace '-o ''${DEBUGOWN}' "" \ + --replace '-g ''${DEBUGGRP}' "" + substituteInPlace $BSDSRCDIR/share/mk/bsd.lua.mk \ + --replace '-o ''${LIBOWN}' "" \ + --replace '-g ''${LIBGRP}' "" + substituteInPlace $BSDSRCDIR/share/mk/bsd.man.mk \ + --replace '-o ''${MANOWN}' "" \ + --replace '-g ''${MANGRP}' "" + substituteInPlace $BSDSRCDIR/share/mk/bsd.nls.mk \ + --replace '-o ''${NLSOWN}' "" \ + --replace '-g ''${NLSGRP}' "" + substituteInPlace $BSDSRCDIR/share/mk/bsd.prog.mk \ + --replace '-o ''${BINOWN}' "" \ + --replace '-g ''${BINGRP}' "" \ + --replace '-o ''${RUMPBINOWN}' "" \ + --replace '-g ''${RUMPBINGRP}' "" \ + --replace '-o ''${DEBUGOWN}' "" \ + --replace '-g ''${DEBUGGRP}' "" - # make needs this to pick up our sys make files - export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" + # make needs this to pick up our sys make files + export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" - substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \ - --replace '_INSTRANLIB=''${empty(PRESERVE):?-a "''${RANLIB} -t":}' '_INSTRANLIB=' - substituteInPlace $BSDSRCDIR/share/mk/bsd.kinc.mk \ - --replace /bin/rm rm - '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \ - --replace '-Wl,--fatal-warnings' "" \ - --replace '-Wl,--warn-shared-textrel' "" - ''; + substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \ + --replace '_INSTRANLIB=''${empty(PRESERVE):?-a "''${RANLIB} -t":}' '_INSTRANLIB=' + substituteInPlace $BSDSRCDIR/share/mk/bsd.kinc.mk \ + --replace /bin/rm rm + '' + + lib.optionalString stdenv.isDarwin '' + substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \ + --replace '-Wl,--fatal-warnings' "" \ + --replace '-Wl,--warn-shared-textrel' "" + ''; postInstall = '' make -C $BSDSRCDIR/share/mk FILESDIR=$out/share/mk install ''; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix b/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix index 18655b3bf863..585c72bd1798 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix @@ -1,6 +1,9 @@ -{ mkDerivation -, bsdSetupHook, netbsdSetupHook, rsync -, make +{ + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + rsync, + make, }: mkDerivation { @@ -8,9 +11,11 @@ mkDerivation { sha256 = "0fh0nrnk18m613m5blrliq2aydciv51qhc0ihsj4k63incwbk90n"; version = "9.2"; - buildInputs = []; + buildInputs = [ ]; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook rsync + bsdSetupHook + netbsdSetupHook + rsync ]; skipIncludesPhase = true; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix b/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix index 82e8889f6cf4..849d2b1da3fb 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix @@ -1,82 +1,113 @@ -{ lib -, stdenvNoCC, stdenv -, fetchNetBSD -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, tsort, lorder -, mandoc, groff, statHook, rsync -, compatIfNeeded -, defaultMakeFlags +{ + lib, + stdenvNoCC, + stdenv, + fetchNetBSD, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + mandoc, + groff, + statHook, + rsync, + compatIfNeeded, + defaultMakeFlags, }: -lib.makeOverridable (attrs: let - stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv; -in stdenv'.mkDerivation ({ - pname = "${attrs.pname or (baseNameOf attrs.path)}-netbsd"; - inherit (attrs) version; - src = fetchNetBSD attrs.path attrs.version attrs.sha256; +lib.makeOverridable ( + attrs: + let + stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv; + in + stdenv'.mkDerivation ( + { + pname = "${attrs.pname or (baseNameOf attrs.path)}-netbsd"; + inherit (attrs) version; + src = fetchNetBSD attrs.path attrs.version attrs.sha256; - extraPaths = [ ]; + extraPaths = [ ]; - nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook - makeMinimal - install tsort lorder mandoc groff statHook rsync - ]; - buildInputs = compatIfNeeded; + nativeBuildInputs = [ + bsdSetupHook + netbsdSetupHook + makeMinimal + install + tsort + lorder + mandoc + groff + statHook + rsync + ]; + buildInputs = compatIfNeeded; - HOST_SH = stdenv'.shell; + HOST_SH = stdenv'.shell; - MACHINE_ARCH = { - i486 = "i386"; - i586 = "i386"; - i686 = "i386"; - }.${stdenv'.hostPlatform.parsed.cpu.name} - or stdenv'.hostPlatform.parsed.cpu.name; + MACHINE_ARCH = + { + i486 = "i386"; + i586 = "i386"; + i686 = "i386"; + } + .${stdenv'.hostPlatform.parsed.cpu.name} or stdenv'.hostPlatform.parsed.cpu.name; - MACHINE = { - x86_64 = "amd64"; - aarch64 = "evbarm64"; - i486 = "i386"; - i586 = "i386"; - i686 = "i386"; - }.${stdenv'.hostPlatform.parsed.cpu.name} - or stdenv'.hostPlatform.parsed.cpu.name; + MACHINE = + { + x86_64 = "amd64"; + aarch64 = "evbarm64"; + i486 = "i386"; + i586 = "i386"; + i686 = "i386"; + } + .${stdenv'.hostPlatform.parsed.cpu.name} or stdenv'.hostPlatform.parsed.cpu.name; - COMPONENT_PATH = attrs.path; + COMPONENT_PATH = attrs.path; - makeFlags = defaultMakeFlags; + makeFlags = defaultMakeFlags; - strictDeps = true; + strictDeps = true; - meta = with lib; { - maintainers = with maintainers; [ matthewbauer qyliss ]; - platforms = platforms.unix; - license = licenses.bsd2; - }; - -} // lib.optionalAttrs stdenv'.hasCC { - # TODO should CC wrapper set this? - CPP = "${stdenv'.cc.targetPrefix}cpp"; -} // lib.optionalAttrs stdenv'.isDarwin { - MKRELRO = "no"; -} // lib.optionalAttrs (stdenv'.cc.isClang or false) { - HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc); -} // lib.optionalAttrs (stdenv'.cc.isGNU or false) { - HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc); -} // lib.optionalAttrs (stdenv'.isx86_32) { - USE_SSP = "no"; -} // lib.optionalAttrs (attrs.headersOnly or false) { - installPhase = "includesPhase"; - dontBuild = true; -} // attrs // { - # Files that use NetBSD-specific macros need to have nbtool_config.h - # included ahead of them on non-NetBSD platforms. - postPatch = lib.optionalString (!stdenv'.hostPlatform.isNetBSD) '' - set +e - grep -Zlr "^__RCSID - ^__BEGIN_DECLS" $COMPONENT_PATH | xargs -0r grep -FLZ nbtool_config.h | - xargs -0tr sed -i '0,/^#/s//#include \n\0/' - set -e - '' + attrs.postPatch or ""; -})) + meta = with lib; { + maintainers = with maintainers; [ + matthewbauer + qyliss + ]; + platforms = platforms.unix; + license = licenses.bsd2; + }; + } + // lib.optionalAttrs stdenv'.hasCC { + # TODO should CC wrapper set this? + CPP = "${stdenv'.cc.targetPrefix}cpp"; + } + // lib.optionalAttrs stdenv'.isDarwin { MKRELRO = "no"; } + // lib.optionalAttrs (stdenv'.cc.isClang or false) { + HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc); + } + // lib.optionalAttrs (stdenv'.cc.isGNU or false) { + HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc); + } + // lib.optionalAttrs (stdenv'.isx86_32) { USE_SSP = "no"; } + // lib.optionalAttrs (attrs.headersOnly or false) { + installPhase = "includesPhase"; + dontBuild = true; + } + // attrs + // { + # Files that use NetBSD-specific macros need to have nbtool_config.h + # included ahead of them on non-NetBSD platforms. + postPatch = + lib.optionalString (!stdenv'.hostPlatform.isNetBSD) '' + set +e + grep -Zlr "^__RCSID + ^__BEGIN_DECLS" $COMPONENT_PATH | xargs -0r grep -FLZ nbtool_config.h | + xargs -0tr sed -i '0,/^#/s//#include \n\0/' + set -e + '' + + attrs.postPatch or ""; + } + ) +) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix b/pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix index 02ce7cf6ce5e..a23c5dddfc9f 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix @@ -5,4 +5,3 @@ mkDerivation { version = "9.2"; sha256 = "1nxc302vgmjhm3yqdivqyfzslrg0vjpbss44s74rcryrl19mma9r"; } - diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/netbsdSetupHook/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/netbsdSetupHook/package.nix index e80571f2bf9a..31368523ee6f 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/netbsdSetupHook/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/netbsdSetupHook/package.nix @@ -1,5 +1,3 @@ { makeSetupHook }: -makeSetupHook { - name = "netbsd-setup-hook"; - } ./setup-hook.sh +makeSetupHook { name = "netbsd-setup-hook"; } ./setup-hook.sh diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/stat/hook.nix b/pkgs/os-specific/bsd/netbsd/pkgs/stat/hook.nix index 78186f55cd45..e38c53a3aac5 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/stat/hook.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/stat/hook.nix @@ -1,4 +1,8 @@ -{ makeSetupHook, writeText, stat }: +{ + makeSetupHook, + writeText, + stat, +}: # stat isn't in POSIX, and NetBSD stat supports a completely # different range of flags than GNU stat, so including it in PATH @@ -6,9 +10,8 @@ # NetBSD's build system and NetBSD stat without including it in # PATH. -makeSetupHook { - name = "netbsd-stat-hook"; -} (writeText "netbsd-stat-hook-impl" '' - makeFlagsArray+=(TOOL_STAT=${stat}/bin/stat) -'') - +makeSetupHook { name = "netbsd-stat-hook"; } ( + writeText "netbsd-stat-hook-impl" '' + makeFlagsArray+=(TOOL_STAT=${stat}/bin/stat) + '' +) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/stat/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/stat/package.nix index fa4d5cb3e21f..397b1f5303c1 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/stat/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/stat/package.nix @@ -1,7 +1,12 @@ -{ mkDerivation -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, mandoc, groff, rsync +{ + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + rsync, }: # Don't add this to nativeBuildInputs directly. @@ -12,8 +17,12 @@ mkDerivation { version = "9.2"; sha256 = "18nqwlndfc34qbbgqx5nffil37jfq9aw663ippasfxd2hlyc106x"; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - install mandoc groff rsync + install + mandoc + groff + rsync ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix b/pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix index ba458ef5c712..4c140fa3bdef 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix @@ -1,9 +1,20 @@ -{ lib, mkDerivation -, include -, bsdSetupHook, netbsdSetupHook -, makeMinimal, install, tsort, lorder, statHook, rsync, uudecode, config, genassym -, defaultMakeFlags -, common +{ + lib, + mkDerivation, + include, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + statHook, + rsync, + uudecode, + config, + genassym, + defaultMakeFlags, + common, }: { path = "sys"; @@ -29,23 +40,34 @@ '' substituteInPlace sys/arch/i386/stand/efiboot/Makefile.efiboot \ --replace "-nocombreloc" "-z nocombreloc" - '' + - # multiple header dirs, see above - include.postPatch; + '' + + + # multiple header dirs, see above + include.postPatch; CONFIG = "GENERIC"; propagatedBuildInputs = [ include ]; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook - makeMinimal install tsort lorder statHook rsync uudecode config genassym + bsdSetupHook + netbsdSetupHook + makeMinimal + install + tsort + lorder + statHook + rsync + uudecode + config + genassym ]; - postConfigure = '' - pushd arch/$MACHINE/conf - config $CONFIG - popd - '' + postConfigure = + '' + pushd arch/$MACHINE/conf + config $CONFIG + popd + '' # multiple header dirs, see above + include.postConfigure; @@ -68,5 +90,4 @@ meta.platforms = lib.platforms.netbsd; extraPaths = [ common ]; - } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/sys/headers.nix b/pkgs/os-specific/bsd/netbsd/pkgs/sys/headers.nix index a3f20d772a3e..2df35efc199a 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/sys/headers.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/sys/headers.nix @@ -1,21 +1,49 @@ -{ lib, mkDerivation -, include -, bsdSetupHook, netbsdSetupHook -, makeMinimal, install, tsort, lorder, statHook, rsync, uudecode, config, genassym -, defaultMakeFlags -, common +{ + lib, + mkDerivation, + include, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + statHook, + rsync, + uudecode, + config, + genassym, + defaultMakeFlags, + common, }: let base = import ./base.nix { inherit - lib mkDerivation include bsdSetupHook netbsdSetupHook makeMinimal install - tsort lorder statHook rsync uudecode config genassym defaultMakeFlags - common; + lib + mkDerivation + include + bsdSetupHook + netbsdSetupHook + makeMinimal + install + tsort + lorder + statHook + rsync + uudecode + config + genassym + defaultMakeFlags + common + ; }; in - mkDerivation (base // { +mkDerivation ( + base + // { pname = "sys-headers"; installPhase = "includesPhase"; dontBuild = true; noCC = true; - }) + } +) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/sys/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/sys/package.nix index 87031a50346e..c8e6edab5f48 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/sys/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/sys/package.nix @@ -1,21 +1,49 @@ -{ lib, mkDerivation -, include -, bsdSetupHook, netbsdSetupHook -, makeMinimal, install, tsort, lorder, statHook, rsync, uudecode, config, genassym -, defaultMakeFlags -, common +{ + lib, + mkDerivation, + include, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + statHook, + rsync, + uudecode, + config, + genassym, + defaultMakeFlags, + common, }: let base = import ./base.nix { inherit - lib mkDerivation include bsdSetupHook netbsdSetupHook makeMinimal install - tsort lorder statHook rsync uudecode config genassym defaultMakeFlags - common; + lib + mkDerivation + include + bsdSetupHook + netbsdSetupHook + makeMinimal + install + tsort + lorder + statHook + rsync + uudecode + config + genassym + defaultMakeFlags + common + ; }; in - mkDerivation (base // { +mkDerivation ( + base + // { pname = "sys"; installPhase = null; noCC = false; dontBuild = false; - }) + } +) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/tic.nix b/pkgs/os-specific/bsd/netbsd/pkgs/tic.nix index 2a7e3644b6be..e0900652108f 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/tic.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/tic.nix @@ -1,11 +1,17 @@ -{ mkDerivation -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, mandoc, groff, nbperf, rsync -, compatIfNeeded -, defaultMakeFlags -, libterminfo -, fetchNetBSD +{ + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + nbperf, + rsync, + compatIfNeeded, + defaultMakeFlags, + libterminfo, + fetchNetBSD, }: mkDerivation { @@ -15,9 +21,14 @@ mkDerivation { HOSTPROG = "tic"; buildInputs = compatIfNeeded; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - install mandoc groff nbperf rsync + install + mandoc + groff + nbperf + rsync ]; makeFlags = defaultMakeFlags ++ [ "TOOLDIR=$(out)" ]; extraPaths = [ diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix b/pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix index 334eccc64c55..9200bc57a73e 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix @@ -1,7 +1,12 @@ -{ mkDerivation -, bsdSetupHook, netbsdSetupHook -, makeMinimal -, install, mandoc, groff, rsync +{ + mkDerivation, + bsdSetupHook, + netbsdSetupHook, + makeMinimal, + install, + mandoc, + groff, + rsync, }: mkDerivation { @@ -9,8 +14,12 @@ mkDerivation { version = "9.2"; sha256 = "1dqvf9gin29nnq3c4byxc7lfd062pg7m84843zdy6n0z63hnnwiq"; nativeBuildInputs = [ - bsdSetupHook netbsdSetupHook + bsdSetupHook + netbsdSetupHook makeMinimal - install mandoc groff rsync + install + mandoc + groff + rsync ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix b/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix index dac9674f9d6f..7592db3eaf18 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix @@ -1,4 +1,8 @@ -{ lib, mkDerivation, stdenv }: +{ + lib, + mkDerivation, + stdenv, +}: mkDerivation { path = "usr.bin/uudecode"; @@ -7,4 +11,3 @@ mkDerivation { env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNO_BASE64"; NIX_LDFLAGS = lib.optional stdenv.isDarwin "-lresolv"; } - From 49bf0587cca566876431f5f44fa87955247aa3d3 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 6 May 2024 10:43:04 -0400 Subject: [PATCH 25/54] git-blame-ignore-revs: Add BSD reformatting --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 432191b92de4..c6e1c1da6942 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -108,3 +108,6 @@ fb0e5be84331188a69b3edd31679ca6576edb75a # postgresql: move packages.nix to ext/default.nix 719034f6f6749d624faa28dff259309fc0e3e730 + +# pkgs/os-specific/bsd: Reformat with nixfmt-rfc-style 2024-03-01 +3fe3b055adfc020e6a923c466b6bcd978a13069a From 7c87bee77b8ab8a22dafa973e7be3b6329a97e9e Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Mon, 6 May 2024 14:05:17 -0400 Subject: [PATCH 26/54] nixos/oauth2-proxy: fix missing `lib.` --- nixos/modules/services/security/oauth2-proxy.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/security/oauth2-proxy.nix b/nixos/modules/services/security/oauth2-proxy.nix index 075e64b743b1..78a772845a35 100644 --- a/nixos/modules/services/security/oauth2-proxy.nix +++ b/nixos/modules/services/security/oauth2-proxy.nix @@ -17,7 +17,7 @@ let inherit (cfg.github) org team; }; }; - google = cfg: { google = with cfg.google; optionalAttrs (groups != []) { + google = cfg: { google = with cfg.google; lib.optionalAttrs (groups != []) { admin-email = adminEmail; service-account = serviceAccountJSON; group = groups; From 00a248e2ab129061c62732bbfb5c106c2fdcd2de Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 7 May 2024 04:15:39 +1000 Subject: [PATCH 27/54] melonDS: 0.9.5-unstable-2024-04-18 -> 0.9.5-unstable-2024-05-05 (#309445) --- pkgs/by-name/me/melonDS/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/me/melonDS/package.nix b/pkgs/by-name/me/melonDS/package.nix index 334b5909496c..eb6a7d2c3b98 100644 --- a/pkgs/by-name/me/melonDS/package.nix +++ b/pkgs/by-name/me/melonDS/package.nix @@ -23,13 +23,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "melonDS"; - version = "0.9.5-unstable-2024-04-18"; + version = "0.9.5-unstable-2024-05-05"; src = fetchFromGitHub { owner = "melonDS-emu"; repo = "melonDS"; - rev = "ba8d547dfa81539f4e8474152d92e866ad89241b"; - hash = "sha256-va4KegM2z0GSA43goUynRPNPvQnrV2b8oNOfLKPE+Zc="; + rev = "10798c3464ca0e199087960fda918ed99acc2e21"; + hash = "sha256-5GbJKhICrbVfnfZt6Ni4uNbodH3rJY5lKoQRgiPXWCg="; }; nativeBuildInputs = [ From 40e304c8b0ff217cc2547df2b931b5a98046d2c6 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 2 May 2024 22:52:13 +0200 Subject: [PATCH 28/54] kdbplus: remove has not been updated in years --- pkgs/applications/misc/kdbplus/default.nix | 76 ---------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 3 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 pkgs/applications/misc/kdbplus/default.nix diff --git a/pkgs/applications/misc/kdbplus/default.nix b/pkgs/applications/misc/kdbplus/default.nix deleted file mode 100644 index 05d1c98e56ac..000000000000 --- a/pkgs/applications/misc/kdbplus/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ lib, stdenv, requireFile, unzip, rlwrap, bash, zlib }: - -assert (stdenv.hostPlatform.system == "i686-linux"); - -let - libPath = lib.makeLibraryPath - [ stdenv.cc.libc stdenv.cc.cc zlib ]; -in -stdenv.mkDerivation rec { - pname = "kdbplus"; - version = "3.6"; - - src = requireFile rec { - message = '' - Nix can't download kdb+ for you automatically. Go to - http://kx.com and download the free, 32-bit version for - Linux. Then run "nix-prefetch-url file://\$PWD/${name}" in - the directory where you saved it. Note you need version ${version}. - ''; - name = "linuxx86.zip"; - sha256 = "0w6znd9warcqx28vf648n0vgmxyyy9kvsfpsfw37d1kp5finap4p"; - }; - - dontStrip = true; - nativeBuildInputs = [ unzip ]; - - phases = "unpackPhase installPhase"; - unpackPhase = "mkdir ${pname}-${version} && cd ${pname}-${version} && unzip -qq ${src}"; - installPhase = '' - mkdir -p $out/bin $out/libexec - - patchelf \ - --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${libPath} \ - ./q/l32/q - mv ./q/l32/q $out/libexec/q - - # Shell script wrappers to make things more convenient... - - cat > $out/bin/q-install <<- EOF - #!${bash}/bin/bash - if [ -f \$HOME/q/q.k ]; then - echo "kdb has already been unpacked in \$HOME. Skipping..." - exit 0 - fi - echo -n "Unzipping ${src} into \$HOME... " - cd \$HOME && ${unzip}/bin/unzip -qq ${src} - echo "Done" - EOF - - cat > $out/bin/q <<- EOF - #!${bash}/bin/bash - if [ ! -f \$HOME/q/q.k ]; then - echo "ERROR: You need to unzip the Q sources into \$HOME before running q." - echo - echo "Try:" - echo " cd \$HOME && unzip ${src}" - echo "(or run q-install)" - exit 1 - fi - - exec ${rlwrap}/bin/rlwrap $out/libexec/q \$@ - EOF - - chmod +x $out/bin/q $out/bin/q-install - ''; - - meta = { - description = "Analytics and time-series database"; - homepage = "http://www.kx.com/"; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - license = lib.licenses.unfree; - platforms = [ "i686-linux" ]; - maintainers = [ lib.maintainers.thoughtpolice ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 539f3e4c554d..fbf1a40bdcd1 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -586,6 +586,7 @@ mapAliases ({ kube3d = k3d; # Added 2022-0705 kafkacat = kcat; # Added 2021-10-07 kak-lsp = kakoune-lsp; # Added 2024-04-01 + kdbplus = throw "'kdbplus' has been removed from nixpkgs"; # Added 2024-05-06 kdeconnect = plasma5Packages.kdeconnect-kde; # Added 2020-10-28 keepassx = throw "KeePassX is no longer actively developed. Please consider KeePassXC as a maintained alternative."; # Added 2023-02-17 keepassx2 = throw "KeePassX is no longer actively developed. Please consider KeePassXC as a maintained alternative."; # Added 2023-02-17 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 628cbadf9136..c626dececd01 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9590,8 +9590,6 @@ with pkgs; kdoctor = callPackage ../development/tools/kdoctor { }; - kdbplus = pkgsi686Linux.callPackage ../applications/misc/kdbplus { }; - kdigger = callPackage ../tools/security/kdigger { }; kdiskmark = libsForQt5.callPackage ../tools/filesystems/kdiskmark { }; From 0150af1a6cc4c46827186a0bbbd3fdf1ad47437d Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Wed, 24 Apr 2024 12:04:55 +0200 Subject: [PATCH 29/54] flashprog: 1.0.1 -> 1.1 Signed-off-by: Felix Singer --- pkgs/by-name/fl/flashprog/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/fl/flashprog/package.nix b/pkgs/by-name/fl/flashprog/package.nix index 509c0fb5504a..fe04a6586cd8 100644 --- a/pkgs/by-name/fl/flashprog/package.nix +++ b/pkgs/by-name/fl/flashprog/package.nix @@ -12,14 +12,14 @@ , withGpio ? stdenv.isLinux }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "flashprog"; - version = "1.0.1"; + version = "1.1"; src = fetchgit { url = "https://review.sourcearcade.org/flashprog"; - rev = "2ca11f9a4101ea230081d448ab2b570425b7f0bd"; - hash = "sha256-pm9g9iOJAKnzzY9couzt8RmqZFbIpKcO++zsUJ9o49U="; + rev = "v${finalAttrs.version}"; + hash = "sha256-CLwaGxVOo8FJaWfvrJ2hAm7XonP5nHT6YTsaw7scKCM="; }; nativeBuildInputs = [ @@ -60,4 +60,4 @@ stdenv.mkDerivation { platforms = platforms.all; mainProgram = "flashprog"; }; -} +}) From d85d3af4f9295cc258744dd14c79b2552035deea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 20:45:25 +0200 Subject: [PATCH 30/54] python312Packages.bitbox02: 6.2.0 -> 6.3.0 Changelog: https://github.com/digitalbitbox/bitbox02-firmware/blob/py-bitbox02-6.3.0/CHANGELOG.md --- .../python-modules/bitbox02/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/bitbox02/default.nix b/pkgs/development/python-modules/bitbox02/default.nix index 7d6f89175608..02656be6319b 100644 --- a/pkgs/development/python-modules/bitbox02/default.nix +++ b/pkgs/development/python-modules/bitbox02/default.nix @@ -1,28 +1,33 @@ { lib -, buildPythonPackage -, pythonOlder -, fetchPypi , base58 +, buildPythonPackage , ecdsa +, fetchPypi , hidapi , noiseprotocol , protobuf +, pythonOlder , semver +, setuptools , typing-extensions }: buildPythonPackage rec { pname = "bitbox02"; - version = "6.2.0"; - format = "setuptools"; + version = "6.3.0"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-zt4G45nJjtU2/tbYpCEgjaoA+Xtpe9g2OpQaxfMzCb8="; + hash = "sha256-0D+yIovlYw8dfDUeW+vcualbvmLs+IySkTpmHwk2meM="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ base58 ecdsa From 81565e13d365c16327694f297f589b5b92c5cdb1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 20:49:10 +0200 Subject: [PATCH 31/54] python312Packages.bitbox02: refactor --- pkgs/development/python-modules/bitbox02/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bitbox02/default.nix b/pkgs/development/python-modules/bitbox02/default.nix index 02656be6319b..83953afdf14d 100644 --- a/pkgs/development/python-modules/bitbox02/default.nix +++ b/pkgs/development/python-modules/bitbox02/default.nix @@ -24,11 +24,11 @@ buildPythonPackage rec { hash = "sha256-0D+yIovlYw8dfDUeW+vcualbvmLs+IySkTpmHwk2meM="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ base58 ecdsa hidapi From a18682e994f7ca29c10fe48444de8e2fcc5d2936 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 20:49:27 +0200 Subject: [PATCH 32/54] python312Packages.bitbox02: foramt with nixfmt --- .../python-modules/bitbox02/default.nix | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/bitbox02/default.nix b/pkgs/development/python-modules/bitbox02/default.nix index 83953afdf14d..0217979d31da 100644 --- a/pkgs/development/python-modules/bitbox02/default.nix +++ b/pkgs/development/python-modules/bitbox02/default.nix @@ -1,15 +1,16 @@ -{ lib -, base58 -, buildPythonPackage -, ecdsa -, fetchPypi -, hidapi -, noiseprotocol -, protobuf -, pythonOlder -, semver -, setuptools -, typing-extensions +{ + lib, + base58, + buildPythonPackage, + ecdsa, + fetchPypi, + hidapi, + noiseprotocol, + protobuf, + pythonOlder, + semver, + setuptools, + typing-extensions, }: buildPythonPackage rec { @@ -24,9 +25,7 @@ buildPythonPackage rec { hash = "sha256-0D+yIovlYw8dfDUeW+vcualbvmLs+IySkTpmHwk2meM="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; dependencies = [ base58 @@ -41,9 +40,7 @@ buildPythonPackage rec { # does not contain tests doCheck = false; - pythonImportsCheck = [ - "bitbox02" - ]; + pythonImportsCheck = [ "bitbox02" ]; meta = with lib; { description = "Firmware code of the BitBox02 hardware wallet"; From d51697124627278b1b4d1bc27abbbbd2d5733482 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 6 May 2024 15:04:27 -0400 Subject: [PATCH 33/54] workflows: Add `pkgs/os-specific/bsd` to formatter whitelist --- .github/workflows/check-nix-format.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-nix-format.yml b/.github/workflows/check-nix-format.yml index 7bbe36373c68..eca090186062 100644 --- a/.github/workflows/check-nix-format.yml +++ b/.github/workflows/check-nix-format.yml @@ -32,6 +32,7 @@ jobs: # Each environment variable beginning with NIX_FMT_PATHS_ is a list of # paths to check with nixfmt. env: + NIX_FMT_PATHS_BSD: pkgs/os-specific/bsd NIX_FMT_PATHS_MPVSCRIPTS: pkgs/applications/video/mpv/scripts # Format paths related to the Nixpkgs CUDA ecosystem. NIX_FMT_PATHS_CUDA: | From c9335c6596a3d8426e40957171c1a96ed218a68c Mon Sep 17 00:00:00 2001 From: John Lago <750845+Lagoja@users.noreply.github.com> Date: Mon, 6 May 2024 12:05:19 -0700 Subject: [PATCH 34/54] dumb-init: fix missing platforms (#308923) * Add darwin support * remove trailing comma * Update pkgs/applications/virtualization/dumb-init/default.nix Co-authored-by: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> --------- Co-authored-by: Sandro Co-authored-by: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> --- pkgs/applications/virtualization/dumb-init/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/dumb-init/default.nix b/pkgs/applications/virtualization/dumb-init/default.nix index 5907aacc99d4..28054be349e1 100644 --- a/pkgs/applications/virtualization/dumb-init/default.nix +++ b/pkgs/applications/virtualization/dumb-init/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/Yelp/dumb-init"; license = licenses.mit; maintainers = [ ]; - platforms = platforms.linux; + platforms = platforms.unix; mainProgram = "dumb-init"; }; } From 14d21edba6efa39613b959360abe5c0d7aa0fd91 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 21:18:59 +0200 Subject: [PATCH 35/54] python312Packages.validator-collection: disable failing tests --- .../python-modules/validator-collection/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/validator-collection/default.nix b/pkgs/development/python-modules/validator-collection/default.nix index 8625956d7754..60cc3c9c6f5e 100644 --- a/pkgs/development/python-modules/validator-collection/default.nix +++ b/pkgs/development/python-modules/validator-collection/default.nix @@ -135,6 +135,14 @@ buildPythonPackage rec { pythonImportsCheck = [ "validator_collection" ]; + disabledTests = [ + # Issues with fake filesystem /var/data + "test_writeable" + "test_executable" + "test_readable" + "test_is_readable" + ]; + meta = with lib; { description = "Python library of 60+ commonly-used validator functions"; homepage = "https://github.com/insightindustry/validator-collection/"; From a1511991954d084e35c20c750fb8b4caefbd9517 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 6 May 2024 19:19:53 +0000 Subject: [PATCH 36/54] clojure: 1.11.3.1456 -> 1.11.3.1463 --- pkgs/development/interpreters/clojure/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/clojure/default.nix b/pkgs/development/interpreters/clojure/default.nix index b440e56812ad..8fd965874fae 100644 --- a/pkgs/development/interpreters/clojure/default.nix +++ b/pkgs/development/interpreters/clojure/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation (finalAttrs: { pname = "clojure"; - version = "1.11.3.1456"; + version = "1.11.3.1463"; src = fetchurl { # https://github.com/clojure/brew-install/releases url = "https://github.com/clojure/brew-install/releases/download/${finalAttrs.version}/clojure-tools-${finalAttrs.version}.tar.gz"; - hash = "sha256-ymOkUUDSj5KzFMBY1D7gErjPAK5E/QjFDGcwDo5fzW0="; + hash = "sha256-26QZ3j54XztpW2WJ1xg0Gc+OwrsvmfK4iv0GsLV8FIc="; }; nativeBuildInputs = [ From 545b050c0e489b036e521445c0485632d2ef2395 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 21:24:38 +0200 Subject: [PATCH 37/54] python312Packages.holidays: 0.47 -> 0.48 Diff: https://github.com/vacanza/python-holidays/compare/refs/tags/v0.47...v0.48 Changelog: https://github.com/vacanza/python-holidays/releases/tag/v0.48 --- pkgs/development/python-modules/holidays/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/holidays/default.nix b/pkgs/development/python-modules/holidays/default.nix index 82dc5a9882cf..79e5fc8d523a 100644 --- a/pkgs/development/python-modules/holidays/default.nix +++ b/pkgs/development/python-modules/holidays/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "holidays"; - version = "0.47"; + version = "0.48"; pyproject = true; disabled = pythonOlder "3.8"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "vacanza"; repo = "python-holidays"; rev = "refs/tags/v${version}"; - hash = "sha256-A4viSzUia4QBdD0svkqYtsCq/la7Nrf2xu/fVDZHb00="; + hash = "sha256-PKa4knEUkULeGbwjEViF2J3QyUOOvKHYxy0ChmRQf6A="; }; build-system = [ From 4f3bbb2c2d2a3822a23cf7824522f2ed51de3b98 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 6 May 2024 21:47:30 +0200 Subject: [PATCH 38/54] python312Packages.airthings-ble: 0.8.0 -> 0.9.0 https://github.com/vincegio/airthings-ble/releases/tag/0.9.0 --- pkgs/development/python-modules/airthings-ble/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/airthings-ble/default.nix b/pkgs/development/python-modules/airthings-ble/default.nix index 9fc7d0e68049..9e84b10802f9 100644 --- a/pkgs/development/python-modules/airthings-ble/default.nix +++ b/pkgs/development/python-modules/airthings-ble/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "airthings-ble"; - version = "0.8.0"; + version = "0.9.0"; pyproject = true; disabled = pythonOlder "3.9"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "vincegio"; repo = "airthings-ble"; rev = "refs/tags/${version}"; - hash = "sha256-BgjfvKrVpw/cP93JCloZKq+PIyS/w7/v6+obfgDT64A="; + hash = "sha256-920Vgk8kY5NsjYrOGYoRtcdHl4KKO7ytieH8cJ0S3RE="; }; postPatch = '' @@ -45,7 +45,7 @@ buildPythonPackage rec { meta = with lib; { description = "Library for Airthings BLE devices"; homepage = "https://github.com/vincegio/airthings-ble"; - changelog = "https://github.com/vincegio/airthings-ble/releases/tag/v${version}"; + changelog = "https://github.com/vincegio/airthings-ble/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; From bf2ccd8a063e29121df37b88ed64b9775368df13 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 6 May 2024 21:48:31 +0200 Subject: [PATCH 39/54] python312Packages.bluetooth-adapters: 0.19.1 -> 0.19.2 https://github.com/bluetooth-devices/bluetooth-adapters/blob/v0.19.2/CHANGELOG.md --- .../development/python-modules/bluetooth-adapters/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bluetooth-adapters/default.nix b/pkgs/development/python-modules/bluetooth-adapters/default.nix index b9ca27e563ed..c41d87173529 100644 --- a/pkgs/development/python-modules/bluetooth-adapters/default.nix +++ b/pkgs/development/python-modules/bluetooth-adapters/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "bluetooth-adapters"; - version = "0.19.1"; + version = "0.19.2"; pyproject = true; disabled = pythonOlder "3.9"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = "bluetooth-adapters"; rev = "refs/tags/v${version}"; - hash = "sha256-r+Ll9ODFal+I2MwrwHakPFWD3GiE/n0f/dYs69jmmpU="; + hash = "sha256-hPs6YnmndJ2Z5RotcIRIYWPdvMyX56ul84l1Cs8kqH0="; }; postPatch = '' From d1977bab90af748fe3e97c00f976b9bf5903e616 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 6 May 2024 21:49:49 +0200 Subject: [PATCH 40/54] home-assistant: 2024.5.1 -> 2024.5.2 https://github.com/home-assistant/core/releases/tag/2024.5.2 --- pkgs/servers/home-assistant/component-packages.nix | 2 +- pkgs/servers/home-assistant/default.nix | 6 +++--- pkgs/servers/home-assistant/frontend.nix | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index ef9b4762dd14..6e48b7665ad8 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2,7 +2,7 @@ # Do not edit! { - version = "2024.5.1"; + version = "2024.5.2"; components = { "3_day_blinds" = ps: with ps; [ ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index c7097843a6cf..eab18d3b2dcd 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -476,7 +476,7 @@ let extraBuildInputs = extraPackages python.pkgs; # Don't forget to run update-component-packages.py after updating - hassVersion = "2024.5.1"; + hassVersion = "2024.5.2"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -494,13 +494,13 @@ in python.pkgs.buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = "refs/tags/${version}"; - hash = "sha256-/JuKN0V2wMZW56l2nt4T3cpDnQiHeC27+QVBi3j3aDI="; + hash = "sha256-OdtkkZ8Yl6H2dUBILrT/02ML3MnptdBydVzKhxoKjAY="; }; # Secondary source is pypi sdist for translations sdist = fetchPypi { inherit pname version; - hash = "sha256-3Tqs+69e1ESOcEMCx3LTt1c04pG5pK/RGX30x8WRegQ="; + hash = "sha256-5ASuTREkAUCS94Ur5yNHU8ISrASGl90scyYWBHiKlKI="; }; build-system = with python.pkgs; [ diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix index c6e3c210e41d..4724eb834d84 100644 --- a/pkgs/servers/home-assistant/frontend.nix +++ b/pkgs/servers/home-assistant/frontend.nix @@ -4,7 +4,7 @@ buildPythonPackage rec { # the frontend version corresponding to a specific home-assistant version can be found here # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json pname = "home-assistant-frontend"; - version = "20240501.0"; + version = "20240501.1"; format = "wheel"; src = fetchPypi { @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "home_assistant_frontend"; dist = "py3"; python = "py3"; - hash = "sha256-W3EiDkm/Se63/Ph4HUSRj2pY+y/pyCqecs4azYcxsaw="; + hash = "sha256-d/mlZfMri0E4lgMrIt3cRqpF3F12Xr7YuHqTogFON9E="; }; # there is nothing to strip in this package From 118c083dfc76444f8f28b2f1e332dd11148e0b2e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 May 2024 22:00:00 +0200 Subject: [PATCH 41/54] python312Packages.boto3-stubs: 1.34.98 -> 1.34.99 --- pkgs/development/python-modules/boto3-stubs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/boto3-stubs/default.nix b/pkgs/development/python-modules/boto3-stubs/default.nix index e0810d717f4f..ee720cbb1c22 100644 --- a/pkgs/development/python-modules/boto3-stubs/default.nix +++ b/pkgs/development/python-modules/boto3-stubs/default.nix @@ -366,7 +366,7 @@ buildPythonPackage rec { pname = "boto3-stubs"; - version = "1.34.98"; + version = "1.34.99"; pyproject = true; disabled = pythonOlder "3.7"; @@ -374,7 +374,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "boto3_stubs"; inherit version; - hash = "sha256-LhkC5wBmIBa3M5wOwCqCqL+hJ3Dc2Ga1WoWY+A7nNUs="; + hash = "sha256-uOVKyGfZ9gzsIhqLtsmyljzj4pcTTxgdQp003UDWGWk="; }; build-system = [ setuptools ]; From efd232d7b6a17bc0f200c06a3a8451428e105fa2 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 6 May 2024 23:06:44 +0200 Subject: [PATCH 42/54] python312Packages.django_5: 5.0.4 -> 5.0.5 https://docs.djangoproject.com/en/5.0/releases/5.0.5/ --- pkgs/development/python-modules/django/5.nix | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/django/5.nix b/pkgs/development/python-modules/django/5.nix index fc4ba20245fc..637bbb652869 100644 --- a/pkgs/development/python-modules/django/5.nix +++ b/pkgs/development/python-modules/django/5.nix @@ -1,7 +1,7 @@ { lib , stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , fetchpatch2 , pythonAtLeast , pythonOlder @@ -44,15 +44,16 @@ buildPythonPackage rec { pname = "django"; - version = "5.0.4"; + version = "5.0.5"; pyproject = true; disabled = pythonOlder "3.10"; - src = fetchPypi { - pname = "Django"; - inherit version; - hash = "sha256-S9AajIMLt3qKOw59iyW4h+U2rReoG6Lc5UdhNcczEr0="; + src = fetchFromGitHub { + owner = "django"; + repo = "django"; + rev = "refs/tags/${version}"; + hash = "sha256-0/AbPmTl38E9BpHVKs0r79fISjEa1d4XO/se1pA7zxg="; }; patches = [ @@ -65,13 +66,6 @@ buildPythonPackage rec { # disable test that excpects timezone issues ./django_5_disable_failing_tests.patch - (fetchpatch2 { - # https://github.com/django/django/pull/17979 - name = "django-mime-utf8-surrogates.patch"; - url = "https://github.com/django/django/commit/b231bcd19e57267ce1fc21d42d46f0b65fdcfcf8.patch"; - hash = "sha256-HhmRwi24VkoPoh+NygAThCoMywoMwrLijU4ZsDfVU34="; - }) - ] ++ lib.optionals withGdal [ (substituteAll { src = ./django_5_set_geos_gdal_lib.patch; From e72e5acac8a851e0a73f5ce31e7bb483543af079 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:52:12 +0100 Subject: [PATCH 43/54] cegui: unstable-2023-03-18 -> 0-unstable-2023-03-18 Not really correct, but the updater can't see the correct upstream tags on the used branch. --- pkgs/development/libraries/cegui/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/cegui/default.nix b/pkgs/development/libraries/cegui/default.nix index 1e884b3d8a81..0a1fd07e2508 100644 --- a/pkgs/development/libraries/cegui/default.nix +++ b/pkgs/development/libraries/cegui/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, writeShellScript , cmake , ogre , freetype @@ -13,7 +14,7 @@ stdenv.mkDerivation { pname = "cegui"; - version = "unstable-2023-03-18"; + version = "0-unstable-2023-03-18"; src = fetchFromGitHub { owner = "paroj"; @@ -47,6 +48,12 @@ stdenv.mkDerivation { passthru.updateScript = unstableGitUpdater { branch = "v0"; + # The above branch is separate from the branch with the latest tags, so the updater doesn't pick them up + # This is what would be used to handle upstream's format, if it was able to see the tags + # tagConverter = writeShellScript "cegui-tag-converter.sh" '' + # sed -e 's/^v//g' -e 's/-/./g' + # ''; + hardcodeZeroVersion = true; }; meta = with lib; { From 53ff5df1b9ea27c9d778f8e3856be6fad217572e Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:53:13 +0100 Subject: [PATCH 44/54] crossguid: unstable-2019-05-29 -> 0.2.2-unstable-2019-05-29 --- pkgs/development/libraries/crossguid/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/crossguid/default.nix b/pkgs/development/libraries/crossguid/default.nix index e8d85ec23dd5..2b98aca1d66d 100644 --- a/pkgs/development/libraries/crossguid/default.nix +++ b/pkgs/development/libraries/crossguid/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "crossguid"; - version = "unstable-2019-05-29"; + version = "0.2.2-unstable-2019-05-29"; src = fetchFromGitHub { owner = "graeme-hill"; @@ -24,7 +24,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = lib.optional stdenv.isLinux libuuid; - passthru.updateScript = unstableGitUpdater { }; + passthru.updateScript = unstableGitUpdater { + tagPrefix = "v"; + }; meta = with lib; { description = "Lightweight cross platform C++ GUID/UUID library"; From 935882c621d7a4a0b695defe489e31da5f25b82e Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:53:36 +0100 Subject: [PATCH 45/54] gl3w: unstable-2023-10-10 -> 0-unstable-2023-10-10 --- pkgs/development/libraries/gl3w/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gl3w/default.nix b/pkgs/development/libraries/gl3w/default.nix index fdfb203ba12b..c0934e7d18f9 100644 --- a/pkgs/development/libraries/gl3w/default.nix +++ b/pkgs/development/libraries/gl3w/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "gl3w"; - version = "unstable-2023-10-10"; + version = "0-unstable-2023-10-10"; src = fetchFromGitHub { owner = "skaslev"; From e85faede0a211303100d7d35f113b6a38b9fc088 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:54:08 +0100 Subject: [PATCH 46/54] gtk-frdp: unstable-2024-03-01 -> 3.37.1-unstable-2024-03-01 --- pkgs/development/libraries/gtk-frdp/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gtk-frdp/default.nix b/pkgs/development/libraries/gtk-frdp/default.nix index 3819c2043a1d..b3edf0ba4853 100644 --- a/pkgs/development/libraries/gtk-frdp/default.nix +++ b/pkgs/development/libraries/gtk-frdp/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { pname = "gtk-frdp"; - version = "unstable-2024-03-01"; + version = "3.37.1-unstable-2024-03-01"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; @@ -41,7 +41,9 @@ stdenv.mkDerivation rec { ]; passthru = { - updateScript = unstableGitUpdater { }; + updateScript = unstableGitUpdater { + tagPrefix = "v"; + }; }; env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ From 0c67a69f7a06a9fb91e9d6c8e2bcadb3f9c59655 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:54:31 +0100 Subject: [PATCH 47/54] hax11: unstable-2023-09-25 -> 0-unstable-2023-09-25 --- pkgs/development/libraries/hax11/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/hax11/default.nix b/pkgs/development/libraries/hax11/default.nix index 42851f0cf300..fba0a560e993 100644 --- a/pkgs/development/libraries/hax11/default.nix +++ b/pkgs/development/libraries/hax11/default.nix @@ -9,7 +9,7 @@ multiStdenv.mkDerivation (finalAttrs: { pname = "hax11"; - version = "unstable-2023-09-25"; + version = "0-unstable-2023-09-25"; src = fetchFromGitHub { owner = "CyberShadow"; From 72aa0eeac48addaa566daed47fc160ca7a8ad58c Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:55:58 +0100 Subject: [PATCH 48/54] libsegfault: unstable-2022-11-13 -> 0-unstable-2022-11-13 --- pkgs/development/libraries/libsegfault/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libsegfault/default.nix b/pkgs/development/libraries/libsegfault/default.nix index 721570f330b3..58896c3e2bc2 100644 --- a/pkgs/development/libraries/libsegfault/default.nix +++ b/pkgs/development/libraries/libsegfault/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "libsegfault"; - version = "unstable-2022-11-13"; + version = "0-unstable-2022-11-13"; src = fetchFromGitHub { owner = "jonathanpoelen"; From bfb6ea04cfd87d33afd0c1b4ca41d5120f0592a3 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:56:38 +0100 Subject: [PATCH 49/54] libvgm: unstable-2024-04-24 -> 0-unstable-2024-04-24 --- pkgs/development/libraries/libvgm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libvgm/default.nix b/pkgs/development/libraries/libvgm/default.nix index 0f45c39e0aeb..0b07548d073a 100644 --- a/pkgs/development/libraries/libvgm/default.nix +++ b/pkgs/development/libraries/libvgm/default.nix @@ -42,7 +42,7 @@ let in stdenv.mkDerivation { pname = "libvgm"; - version = "unstable-2024-04-24"; + version = "0-unstable-2024-04-24"; src = fetchFromGitHub { owner = "ValleyBell"; From 97d0c1d1587860115a831dbce63c27a63e5e7911 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:57:21 +0100 Subject: [PATCH 50/54] libz: unstable-2018-03-31 -> 1.2.8.2015.12.26-unstable-2018-03-31 --- pkgs/development/libraries/libz/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libz/default.nix b/pkgs/development/libraries/libz/default.nix index 6b3e1dacdc00..b9ee7f96b421 100644 --- a/pkgs/development/libraries/libz/default.nix +++ b/pkgs/development/libraries/libz/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "libz"; - version = "unstable-2018-03-31"; + version = "1.2.8.2015.12.26-unstable-2018-03-31"; src = fetchFromGitLab { owner = "sortix"; @@ -18,7 +18,9 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" "dev" ]; outputDoc = "dev"; # single tiny man3 page - passthru.updateScript = unstableGitUpdater { }; + passthru.updateScript = unstableGitUpdater { + tagPrefix = "libz-"; + }; meta = { homepage = "https://sortix.org/libz/"; From eb394b2974d6435ca13353b6457c42ae7af9f6a7 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:57:43 +0100 Subject: [PATCH 51/54] minilibx: unstable-2021-10-30 -> 0-unstable-2021-10-30 --- pkgs/development/libraries/minilibx/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/minilibx/default.nix b/pkgs/development/libraries/minilibx/default.nix index 0551993e438a..41a422e3a2a2 100644 --- a/pkgs/development/libraries/minilibx/default.nix +++ b/pkgs/development/libraries/minilibx/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { pname = "minilibx"; - version = "unstable-2021-10-30"; + version = "0-unstable-2021-10-30"; src = fetchFromGitHub { owner = "42Paris"; From 046edaea92757ec5b846b3a5022038b96e983c48 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:55:41 +0100 Subject: [PATCH 52/54] libcxxrt: unstable-2024-04-15 -> 4.0.10-unstable-2024-04-15 --- pkgs/development/libraries/libcxxrt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libcxxrt/default.nix b/pkgs/development/libraries/libcxxrt/default.nix index cd9e7778a80b..6cdcbe63f78c 100644 --- a/pkgs/development/libraries/libcxxrt/default.nix +++ b/pkgs/development/libraries/libcxxrt/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation { pname = "libcxxrt"; - version = "unstable-2024-04-15"; + version = "4.0.10-unstable-2024-04-15"; src = fetchFromGitHub { owner = "libcxxrt"; From 52a5da6a01b33a13ff7d1d28f42deaa8bb610216 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 7 Feb 2024 17:58:03 +0100 Subject: [PATCH 53/54] rapidcheck: unstable-2023-12-14 -> 0-unstable-2023-12-14 --- pkgs/development/libraries/rapidcheck/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/rapidcheck/default.nix b/pkgs/development/libraries/rapidcheck/default.nix index 68f2e5e096a8..880f1706b299 100644 --- a/pkgs/development/libraries/rapidcheck/default.nix +++ b/pkgs/development/libraries/rapidcheck/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rapidcheck"; - version = "unstable-2023-12-14"; + version = "0-unstable-2023-12-14"; src = fetchFromGitHub { owner = "emil-e"; From 9d7a729277d7a71f584d37181df0236ece2522ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Mon, 6 May 2024 03:18:51 +0200 Subject: [PATCH 54/54] treewide: ReadWriteDirectories -> ReadWritePaths. These were renamed in systemd v231: https://github.com/systemd/systemd/commit/2a624c36e646e9ef8d204a506b12e7dbd380e111 --- nixos/modules/services/misc/zoneminder.nix | 2 +- nixos/modules/services/security/step-ca.nix | 2 +- nixos/modules/services/web-servers/caddy/default.nix | 2 +- nixos/modules/services/web-servers/traefik.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/misc/zoneminder.nix b/nixos/modules/services/misc/zoneminder.nix index 84c3a6710c0d..d09cd87febff 100644 --- a/nixos/modules/services/misc/zoneminder.nix +++ b/nixos/modules/services/misc/zoneminder.nix @@ -350,7 +350,7 @@ in { RestartSec = "10s"; CacheDirectory = dirs cacheDirs; RuntimeDirectory = dirName; - ReadWriteDirectories = lib.mkIf useCustomDir [ cfg.storageDir ]; + ReadWritePaths = lib.mkIf useCustomDir [ cfg.storageDir ]; StateDirectory = dirs (lib.optionals (!useCustomDir) libDirs); LogsDirectory = dirName; PrivateTmp = true; diff --git a/nixos/modules/services/security/step-ca.nix b/nixos/modules/services/security/step-ca.nix index c708cb2b8910..e9195fbd5160 100644 --- a/nixos/modules/services/security/step-ca.nix +++ b/nixos/modules/services/security/step-ca.nix @@ -107,7 +107,7 @@ in UMask = "0077"; Environment = "HOME=%S/step-ca"; WorkingDirectory = ""; # override upstream - ReadWriteDirectories = ""; # override upstream + ReadWritePaths = ""; # override upstream # LocalCredential handles file permission problems arising from the use of DynamicUser. LoadCredential = "intermediate_password:${cfg.intermediatePasswordFile}"; diff --git a/nixos/modules/services/web-servers/caddy/default.nix b/nixos/modules/services/web-servers/caddy/default.nix index 7faf0e895a43..1cd1448c7d56 100644 --- a/nixos/modules/services/web-servers/caddy/default.nix +++ b/nixos/modules/services/web-servers/caddy/default.nix @@ -368,7 +368,7 @@ in ExecReload = [ "" ''${cfg.package}/bin/caddy reload ${runOptions} --force'' ]; User = cfg.user; Group = cfg.group; - ReadWriteDirectories = cfg.dataDir; + ReadWritePaths = [ cfg.dataDir ]; StateDirectory = mkIf (cfg.dataDir == "/var/lib/caddy") [ "caddy" ]; LogsDirectory = mkIf (cfg.logDir == "/var/log/caddy") [ "caddy" ]; Restart = "on-failure"; diff --git a/nixos/modules/services/web-servers/traefik.nix b/nixos/modules/services/web-servers/traefik.nix index 9c53455bcf3d..1a65ce21112e 100644 --- a/nixos/modules/services/web-servers/traefik.nix +++ b/nixos/modules/services/web-servers/traefik.nix @@ -170,7 +170,7 @@ in { PrivateDevices = true; ProtectHome = true; ProtectSystem = "full"; - ReadWriteDirectories = cfg.dataDir; + ReadWritePaths = [ cfg.dataDir ]; RuntimeDirectory = "traefik"; }; };