From 4e08f168930fe3f5e186c6118e1ce3ce1928ea1f Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Sun, 26 Nov 2023 00:43:55 +0100 Subject: [PATCH 01/71] nixos/networkd: fix manpage for `WireGuardPeer` config Signed-off-by: Christoph Heiss --- nixos/modules/system/boot/networkd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 33261021480f..3e10770812db 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -1612,7 +1612,7 @@ let description = lib.mdDoc '' Each attribute in this set specifies an option in the `[WireGuardPeer]` section of the unit. See - {manpage}`systemd.network(5)` for details. + {manpage}`systemd.netdev(5)` for details. ''; }; }; From 02dd7c7bb36cfd930eaf7124e560013074ccf01e Mon Sep 17 00:00:00 2001 From: Reinis Muiznieks Date: Thu, 16 Nov 2023 17:52:51 +0200 Subject: [PATCH 02/71] prefetch-npm-deps: add support for npm alias schema in version spec --- .../node/fetch-npm-deps/src/main.rs | 4 +- .../node/fetch-npm-deps/src/parse/lock.rs | 77 ++++++++++++++----- 2 files changed, 61 insertions(+), 20 deletions(-) diff --git a/pkgs/build-support/node/fetch-npm-deps/src/main.rs b/pkgs/build-support/node/fetch-npm-deps/src/main.rs index 9d86bd8091a7..c3d817ebe8c9 100644 --- a/pkgs/build-support/node/fetch-npm-deps/src/main.rs +++ b/pkgs/build-support/node/fetch-npm-deps/src/main.rs @@ -241,7 +241,9 @@ fn main() -> anyhow::Result<()> { packages.into_par_iter().try_for_each(|package| { eprintln!("{}", package.name); - let tarball = package.tarball()?; + let tarball = package + .tarball() + .map_err(|e| anyhow!("couldn't fetch {} at {}: {e:?}", package.name, package.url))?; let integrity = package.integrity().map(ToString::to_string); cache diff --git a/pkgs/build-support/node/fetch-npm-deps/src/parse/lock.rs b/pkgs/build-support/node/fetch-npm-deps/src/parse/lock.rs index f50a31651d0e..77839e67aaec 100644 --- a/pkgs/build-support/node/fetch-npm-deps/src/parse/lock.rs +++ b/pkgs/build-support/node/fetch-npm-deps/src/parse/lock.rs @@ -216,29 +216,35 @@ fn to_new_packages( } if let UrlOrString::Url(v) = &package.version { - for (scheme, host) in [ - ("github", "github.com"), - ("bitbucket", "bitbucket.org"), - ("gitlab", "gitlab.com"), - ] { - if v.scheme() == scheme { - package.version = { - let mut new_url = initial_url.clone(); + if v.scheme() == "npm" { + if let Some(UrlOrString::Url(ref url)) = &package.resolved { + package.version = UrlOrString::Url(url.clone()); + } + } else { + for (scheme, host) in [ + ("github", "github.com"), + ("bitbucket", "bitbucket.org"), + ("gitlab", "gitlab.com"), + ] { + if v.scheme() == scheme { + package.version = { + let mut new_url = initial_url.clone(); - new_url.set_host(Some(host))?; + new_url.set_host(Some(host))?; - if v.path().ends_with(".git") { - new_url.set_path(v.path()); - } else { - new_url.set_path(&format!("{}.git", v.path())); - } + if v.path().ends_with(".git") { + new_url.set_path(v.path()); + } else { + new_url.set_path(&format!("{}.git", v.path())); + } - new_url.set_fragment(v.fragment()); + new_url.set_fragment(v.fragment()); - UrlOrString::Url(new_url) - }; + UrlOrString::Url(new_url) + }; - break; + break; + } } } } @@ -268,7 +274,8 @@ fn get_initial_url() -> anyhow::Result { #[cfg(test)] mod tests { use super::{ - get_initial_url, to_new_packages, Hash, HashCollection, OldPackage, Package, UrlOrString, + get_initial_url, packages, to_new_packages, Hash, HashCollection, OldPackage, Package, + UrlOrString, }; use std::{ cmp::Ordering, @@ -330,4 +337,36 @@ mod tests { Some(Hash(String::from("sha512-foo"))) ); } + + #[test] + fn parse_lockfile_correctly() { + let packages = packages( + r#"{ + "name": "node-ddr", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + } + } + }"#).unwrap(); + + assert_eq!(packages.len(), 1); + assert_eq!( + packages[0].resolved, + Some(UrlOrString::Url( + Url::parse("https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz") + .unwrap() + )) + ); + } } From d1e8cfa97782a508550aed1a4c5d116547d91708 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 1 Dec 2023 10:34:14 +0000 Subject: [PATCH 03/71] ofono: 2.1 -> 2.2 --- pkgs/tools/networking/ofono/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/ofono/default.nix b/pkgs/tools/networking/ofono/default.nix index 4872900b0fb7..b52912d5e9a0 100644 --- a/pkgs/tools/networking/ofono/default.nix +++ b/pkgs/tools/networking/ofono/default.nix @@ -12,14 +12,14 @@ stdenv.mkDerivation rec { pname = "ofono"; - version = "2.1"; + version = "2.2"; outputs = [ "out" "dev" ]; src = fetchgit { url = "https://git.kernel.org/pub/scm/network/ofono/ofono.git"; rev = version; - sha256 = "sha256-GxQfh/ps5oM9G6B1EVgnjo8LqHD1hMqdnju1PCQq3kA="; + sha256 = "sha256-mnh0qzmgPDfimN/M33HntYj90Xcgc/uF8tKbzeQV1Yg="; }; patches = [ From 09002e9d23eaa33f7cbcd2107e1a9a334154ef3e Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Sun, 22 Jan 2023 13:27:02 -0500 Subject: [PATCH 04/71] nixos/ups: various fixes & clean up - Ensure NUT_STATEPATH exists (fixes service startup) - Use mode option to enable services (fixes #113735) - Remove extraneous slash in paths (fixes confusing logs) - Support reload for upsmon and upsd - Remove ExecStart wrapper scripts --- nixos/modules/services/monitoring/ups.nix | 56 ++++++++++++----------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix index efef2d777acd..4777da327b85 100644 --- a/nixos/modules/services/monitoring/ups.nix +++ b/nixos/modules/services/monitoring/ups.nix @@ -6,9 +6,7 @@ with lib; let cfg = config.power.ups; -in -let upsOptions = {name, config, ...}: { options = { @@ -103,19 +101,14 @@ in # powerManagement.powerDownCommands power.ups = { - enable = mkOption { - default = false; - type = with types; bool; - description = lib.mdDoc '' - Enables support for Power Devices, such as Uninterruptible Power - Supplies, Power Distribution Units and Solar Controllers. - ''; - }; + enable = mkEnableOption (lib.mdDoc '' + Enables support for Power Devices, such as Uninterruptible Power + Supplies, Power Distribution Units and Solar Controllers. + ''); - # This option is not used yet. mode = mkOption { default = "standalone"; - type = types.str; + type = types.enum [ "none" "standalone" "netserver" "netclient" ]; description = lib.mdDoc '' The MODE determines which part of the NUT is to be started, and which configuration files must be modified. @@ -180,38 +173,48 @@ in environment.systemPackages = [ pkgs.nut ]; systemd.services.upsmon = { + enable = mkDefault (elem cfg.mode [ "standalone" "netserver" "netclient" ]); description = "Uninterruptible Power Supplies (Monitor)"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - serviceConfig.Type = "forking"; - script = "${pkgs.nut}/sbin/upsmon"; - environment.NUT_CONFPATH = "/etc/nut/"; - environment.NUT_STATEPATH = "/var/lib/nut/"; + serviceConfig = { + Type = "forking"; + ExecStart = "${pkgs.nut}/sbin/upsmon"; + ExecReload = "${pkgs.nut}/sbin/upsmon -c reload"; + }; + environment.NUT_CONFPATH = "/etc/nut"; + environment.NUT_STATEPATH = "/var/lib/nut"; }; systemd.services.upsd = { + enable = mkDefault (elem cfg.mode [ "standalone" "netserver" ]); description = "Uninterruptible Power Supplies (Daemon)"; after = [ "network.target" "upsmon.service" ]; wantedBy = [ "multi-user.target" ]; serviceConfig.Type = "forking"; - # TODO: replace 'root' by another username. - script = "${pkgs.nut}/sbin/upsd -u root"; - environment.NUT_CONFPATH = "/etc/nut/"; - environment.NUT_STATEPATH = "/var/lib/nut/"; + serviceConfig = { + Type = "forking"; + # TODO: replace 'root' by another username. + ExecStart = "${pkgs.nut}/sbin/upsd -u root"; + ExecReload = "${pkgs.nut}/sbin/upsd -c reload"; + }; + environment.NUT_CONFPATH = "/etc/nut"; + environment.NUT_STATEPATH = "/var/lib/nut"; }; systemd.services.upsdrv = { + enable = mkDefault (elem cfg.mode [ "standalone" "netserver" ]); description = "Uninterruptible Power Supplies (Register all UPS)"; after = [ "upsd.service" ]; wantedBy = [ "multi-user.target" ]; - # TODO: replace 'root' by another username. - script = "${pkgs.nut}/bin/upsdrvctl -u root start"; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; + # TODO: replace 'root' by another username. + ExecStart = "${pkgs.nut}/bin/upsdrvctl -u root start"; }; - environment.NUT_CONFPATH = "/etc/nut/"; - environment.NUT_STATEPATH = "/var/lib/nut/"; + environment.NUT_CONFPATH = "/etc/nut"; + environment.NUT_STATEPATH = "/var/lib/nut"; }; environment.etc = { @@ -223,9 +226,7 @@ in '' maxstartdelay = ${toString cfg.maxStartDelay} - ${flip concatStringsSep (forEach (attrValues cfg.ups) (ups: ups.summary)) " - - "} + ${concatStringsSep "\n\n" (forEach (attrValues cfg.ups) (ups: ups.summary))} ''; "nut/upssched.conf".source = cfg.schedulerRules; # These file are containing private information and thus should not @@ -241,6 +242,7 @@ in systemd.tmpfiles.rules = [ "d /var/state/ups -" + "d /var/lib/nut 700" ]; From c1793ff6236474b9e534c0dbd9805a5037871b3a Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Sat, 21 Jan 2023 22:07:54 -0500 Subject: [PATCH 05/71] nixos/ups: add {users,upsmon,upsd} config options --- .../manual/release-notes/rl-2405.section.md | 2 + nixos/modules/services/monitoring/ups.nix | 371 +++++++++++++++++- 2 files changed, 360 insertions(+), 13 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index a1bdb4321d9a..43235f29a1cb 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -24,6 +24,8 @@ In addition to numerous new and upgraded packages, this release has the followin +- The `power.ups` module now generates `upsd.conf`, `upsd.users` and `upsmon.conf` automatically from a set of new configuration options. This breaks compatibility with existing `power.ups` setups where these files were created manually. Back up these files before upgrading NixOS. + - `mkosi` was updated to v19. Parts of the user interface have changed. Consult the [release notes](https://github.com/systemd/mkosi/releases/tag/v19) for a list of changes. diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix index 4777da327b85..c9dda8a8c093 100644 --- a/nixos/modules/services/monitoring/ups.nix +++ b/nixos/modules/services/monitoring/ups.nix @@ -6,6 +6,82 @@ with lib; let cfg = config.power.ups; + defaultPort = 3493; + + nutFormat = { + + type = with lib.types; let + + singleAtom = nullOr (oneOf [ + bool + int + float + str + ]) // { + description = "atom (null, bool, int, float or string)"; + }; + + in attrsOf (oneOf [ + singleAtom + (listOf (nonEmptyListOf singleAtom)) + ]); + + generate = name: value: + let + normalizedValue = + lib.mapAttrs (key: val: + if lib.isList val + then forEach val (elem: if lib.isList elem then elem else [elem]) + else + if val == null + then [] + else [[val]] + ) value; + + mkValueString = concatMapStringsSep " " (v: + let str = generators.mkValueStringDefault {} v; + in + # Quote the value if it has spaces and isn't already quoted. + if (hasInfix " " str) && !(hasPrefix "\"" str && hasSuffix "\"" str) + then "\"${str}\"" + else str + ); + + in pkgs.writeText name (lib.generators.toKeyValue { + mkKeyValue = generators.mkKeyValueDefault { inherit mkValueString; } " "; + listsAsDuplicateKeys = true; + } normalizedValue); + + }; + + installSecrets = source: target: secrets: + pkgs.writeShellScript "installSecrets.sh" '' + install -m0600 -D ${source} "${target}" + ${concatLines (forEach secrets (name: '' + ${pkgs.replace-secret}/bin/replace-secret \ + '@${name}@' \ + "$CREDENTIALS_DIRECTORY/${name}" \ + "${target}" + ''))} + chmod u-w "${target}" + ''; + + upsmonConf = nutFormat.generate "upsmon.conf" cfg.upsmon.settings; + + upsdUsers = pkgs.writeText "upsd.users" (let + # This looks like INI, but it's not quite because the + # 'upsmon' option lacks a '='. See: man upsd.users + userConfig = name: user: concatStringsSep "\n " (concatLists [ + [ + "[${name}]" + "password = \"@upsdusers_password_${name}@\"" + ] + (optional (user.upsmon != null) "upsmon ${user.upsmon}") + (forEach user.actions (action: "actions = ${action}")) + (forEach user.instcmds (instcmd: "instcmds = ${instcmd}")) + ]); + in concatStringsSep "\n\n" (mapAttrsToList userConfig cfg.users)); + upsOptions = {name, config, ...}: { @@ -93,6 +169,213 @@ let }; }; + listenOptions = { + options = { + address = mkOption { + type = types.str; + description = lib.mdDoc '' + Address of the interface for `upsd` to listen on. + See `man upsd.conf` for details. + ''; + }; + + port = mkOption { + type = types.port; + default = defaultPort; + description = lib.mdDoc '' + TCP port for `upsd` to listen on. + See `man upsd.conf` for details. + ''; + }; + }; + }; + + upsdOptions = { + options = { + enable = mkOption { + type = types.bool; + defaultText = literalMD "`true` if `mode` is one of `standalone`, `netserver`"; + description = mdDoc "Whether to enable `upsd`."; + }; + + listen = mkOption { + type = with types; listOf (submodule listenOptions); + default = []; + example = [ + { + address = "192.168.50.1"; + } + { + address = "::1"; + port = 5923; + } + ]; + description = lib.mdDoc '' + Address of the interface for `upsd` to listen on. + See `man upsd` for details`. + ''; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = lib.mdDoc '' + Additional lines to add to `upsd.conf`. + ''; + }; + }; + + config = { + enable = mkDefault (elem cfg.mode [ "standalone" "netserver" ]); + }; + }; + + + monitorOptions = { name, config, ... }: { + options = { + system = mkOption { + type = types.str; + default = name; + description = lib.mdDoc '' + Identifier of the UPS to monitor, in this form: `[@[:]]` + See `upsmon.conf` for details. + ''; + }; + + powerValue = mkOption { + type = types.int; + default = 1; + description = lib.mdDoc '' + Number of power supplies that the UPS feeds on this system. + See `upsmon.conf` for details. + ''; + }; + + user = mkOption { + type = types.str; + description = lib.mdDoc '' + Username from `upsd.users` for accessing this UPS. + See `upsmon.conf` for details. + ''; + }; + + passwordFile = mkOption { + type = types.str; + defaultText = literalMD "power.ups.users.\${user}.passwordFile"; + description = lib.mdDoc '' + The full path to a file containing the password from + `upsd.users` for accessing this UPS. The password file + is read on service start. + See `upsmon.conf` for details. + ''; + }; + + type = mkOption { + type = types.str; + default = "master"; + description = lib.mdDoc '' + The relationship with `upsd`. + See `upsmon.conf` for details. + ''; + }; + }; + + config = { + passwordFile = mkDefault cfg.users.${config.user}.passwordFile; + }; + }; + + upsmonOptions = { + options = { + enable = mkOption { + type = types.bool; + defaultText = literalMD "`true` if `mode` is one of `standalone`, `netserver`, `netclient`"; + description = mdDoc "Whether to enable `upsmon`."; + }; + + monitor = mkOption { + type = with types; attrsOf (submodule monitorOptions); + default = {}; + description = lib.mdDoc '' + Set of UPS to monitor. See `man upsmon.conf` for details. + ''; + }; + + settings = mkOption { + type = nutFormat.type; + default = {}; + defaultText = literalMD '' + { + MINSUPPLIES = 1; + RUN_AS_USER = "root"; + NOTIFYCMD = "''${pkgs.nut}/bin/upssched"; + SHUTDOWNCMD = "''${pkgs.systemd}/bin/shutdown now"; + } + ''; + description = mdDoc "Additional settings to add to `upsmon.conf`."; + example = literalMD '' + { + MINSUPPLIES = 2; + NOTIFYFLAG = [ + [ "ONLINE" "SYSLOG+EXEC" ] + [ "ONBATT" "SYSLOG+EXEC" ] + ]; + } + ''; + }; + }; + + config = { + enable = mkDefault (elem cfg.mode [ "standalone" "netserver" "netclient" ]); + settings = { + RUN_AS_USER = "root"; # TODO: replace 'root' by another username. + MINSUPPLIES = mkDefault 1; + NOTIFYCMD = mkDefault "${pkgs.nut}/bin/upssched"; + SHUTDOWNCMD = mkDefault "${pkgs.systemd}/bin/shutdown now"; + MONITOR = flip mapAttrsToList cfg.upsmon.monitor (name: monitor: with monitor; [ system powerValue user "\"@upsmon_password_${name}@\"" type ]); + }; + }; + }; + + userOptions = { + options = { + passwordFile = mkOption { + type = types.str; + description = lib.mdDoc '' + The full path to a file that contains the user's (clear text) + password. The password file is read on service start. + ''; + }; + + actions = mkOption { + type = with types; listOf str; + default = []; + description = lib.mdDoc '' + Allow the user to do certain things with upsd. + See `man upsd.users` for details. + ''; + }; + + instcmds = mkOption { + type = with types; listOf str; + default = []; + description = lib.mdDoc '' + Let the user initiate specific instant commands. Use "ALL" to grant all commands automatically. For the full list of what your UPS supports, use "upscmd -l". + See `man upsd.users` for details. + ''; + }; + + upsmon = mkOption { + type = with types; nullOr str; + default = null; + description = lib.mdDoc '' + Add the necessary actions for a upsmon process to work. + See `man upsd.users` for details. + ''; + }; + }; + }; + in @@ -141,6 +424,13 @@ in ''; }; + openFirewall = mkOption { + type = types.bool; + default = false; + description = lib.mdDoc '' + Open ports in the firewall for `upsd`. + ''; + }; maxStartDelay = mkOption { default = 45; @@ -154,6 +444,22 @@ in ''; }; + upsmon = mkOption { + default = {}; + description = lib.mdDoc '' + Options for the `upsmon.conf` configuration file. + ''; + type = types.submodule upsmonOptions; + }; + + upsd = mkOption { + default = {}; + description = lib.mdDoc '' + Options for the `upsd.conf` configuration file. + ''; + type = types.submodule upsdOptions; + }; + ups = mkOption { default = {}; # see nut/etc/ups.conf.sample @@ -165,45 +471,84 @@ in type = with types; attrsOf (submodule upsOptions); }; + users = mkOption { + default = {}; + description = lib.mdDoc '' + Users that can access upsd. See `man upsd.users`. + ''; + type = with types; attrsOf (submodule userOptions); + }; + }; }; config = mkIf cfg.enable { + assertions = [ + (let + totalPowerValue = foldl' add 0 (map (monitor: monitor.powerValue) (attrValues cfg.upsmon.monitor)); + minSupplies = cfg.upsmon.settings.MINSUPPLIES; + in mkIf cfg.upsmon.enable { + assertion = totalPowerValue >= minSupplies; + message = '' + `power.ups.upsmon`: Total configured power value (${toString totalPowerValue}) must be at least MINSUPPLIES (${toString minSupplies}). + ''; + }) + ]; + environment.systemPackages = [ pkgs.nut ]; - systemd.services.upsmon = { - enable = mkDefault (elem cfg.mode [ "standalone" "netserver" "netclient" ]); + networking.firewall = mkIf cfg.openFirewall { + allowedTCPPorts = + if cfg.upsd.listen == [] + then [ defaultPort ] + else unique (forEach cfg.upsd.listen (listen: listen.port)); + }; + + systemd.services.upsmon = let + secrets = mapAttrsToList (name: monitor: "upsmon_password_${name}") cfg.upsmon.monitor; + createUpsmonConf = installSecrets upsmonConf "/run/nut/upsmon.conf" secrets; + in { + enable = cfg.upsmon.enable; description = "Uninterruptible Power Supplies (Monitor)"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { Type = "forking"; + ExecStartPre = "${createUpsmonConf}"; ExecStart = "${pkgs.nut}/sbin/upsmon"; ExecReload = "${pkgs.nut}/sbin/upsmon -c reload"; + LoadCredential = mapAttrsToList (name: monitor: "upsmon_password_${name}:${monitor.passwordFile}") cfg.upsmon.monitor; }; environment.NUT_CONFPATH = "/etc/nut"; environment.NUT_STATEPATH = "/var/lib/nut"; }; - systemd.services.upsd = { - enable = mkDefault (elem cfg.mode [ "standalone" "netserver" ]); + systemd.services.upsd = let + secrets = mapAttrsToList (name: user: "upsdusers_password_${name}") cfg.users; + createUpsdUsers = installSecrets upsdUsers "/run/nut/upsd.users" secrets; + in { + enable = cfg.upsd.enable; description = "Uninterruptible Power Supplies (Daemon)"; after = [ "network.target" "upsmon.service" ]; wantedBy = [ "multi-user.target" ]; - serviceConfig.Type = "forking"; serviceConfig = { Type = "forking"; + ExecStartPre = "${createUpsdUsers}"; # TODO: replace 'root' by another username. ExecStart = "${pkgs.nut}/sbin/upsd -u root"; ExecReload = "${pkgs.nut}/sbin/upsd -c reload"; + LoadCredential = mapAttrsToList (name: user: "upsdusers_password_${name}:${user.passwordFile}") cfg.users; }; environment.NUT_CONFPATH = "/etc/nut"; environment.NUT_STATEPATH = "/var/lib/nut"; + restartTriggers = [ + config.environment.etc."nut/upsd.conf".source + ]; }; systemd.services.upsdrv = { - enable = mkDefault (elem cfg.mode [ "standalone" "netserver" ]); + enable = cfg.upsd.enable; description = "Uninterruptible Power Supplies (Register all UPS)"; after = [ "upsd.service" ]; wantedBy = [ "multi-user.target" ]; @@ -228,14 +573,14 @@ in ${concatStringsSep "\n\n" (forEach (attrValues cfg.ups) (ups: ups.summary))} ''; + "nut/upsd.conf".source = pkgs.writeText "upsd.conf" + '' + ${concatStringsSep "\n" (forEach cfg.upsd.listen (listen: "LISTEN ${listen.address} ${toString listen.port}"))} + ${cfg.upsd.extraConfig} + ''; "nut/upssched.conf".source = cfg.schedulerRules; - # These file are containing private information and thus should not - # be stored inside the Nix store. - /* - "nut/upsd.conf".source = ""; - "nut/upsd.users".source = ""; - "nut/upsmon.conf".source = ""; - */ + "nut/upsd.users".source = "/run/nut/upsd.users"; + "nut/upsmon.conf".source = "/run/nut/upsmon.conf"; }; power.ups.schedulerRules = mkDefault "${pkgs.nut}/etc/upssched.conf.sample"; From 46190c26586ddfcc05a2ed64d9426fced68bb7b2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 3 Dec 2023 11:12:57 +0000 Subject: [PATCH 06/71] scaleway-cli: 2.24.0 -> 2.25.0 --- pkgs/tools/admin/scaleway-cli/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/admin/scaleway-cli/default.nix b/pkgs/tools/admin/scaleway-cli/default.nix index 38fd3fc1e12f..b27c95793ca2 100644 --- a/pkgs/tools/admin/scaleway-cli/default.nix +++ b/pkgs/tools/admin/scaleway-cli/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "scaleway-cli"; - version = "2.24.0"; + version = "2.25.0"; src = fetchFromGitHub { owner = "scaleway"; repo = "scaleway-cli"; rev = "v${version}"; - sha256 = "sha256-Q65X2lsR5jyWXxxmkvUA0yG4miD+KUSBGRFXvH4KBGY="; + sha256 = "sha256-wx/247ZNbdNdRiGLTfCig1JAjmXZX0aCHbOgelzMcyw="; }; - vendorHash = "sha256-mZ2XFZS5tqtRUhdo6AOCY4xSaYgxUEy1OFbyzsbCEnU="; + vendorHash = "sha256-FftJsXM9sexRqBKrIeTdWh5Z0eYIK3acDNtptqqILD8="; ldflags = [ "-w" From ec44c740ca262a3055a0c076d59db96f9a227e8c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 3 Dec 2023 22:31:52 +0000 Subject: [PATCH 07/71] python310Packages.labgrid: 23.0.3 -> 23.0.4 --- pkgs/development/python-modules/labgrid/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/labgrid/default.nix b/pkgs/development/python-modules/labgrid/default.nix index aa4b10d49d5f..4a66ff5a364a 100644 --- a/pkgs/development/python-modules/labgrid/default.nix +++ b/pkgs/development/python-modules/labgrid/default.nix @@ -25,13 +25,13 @@ buildPythonPackage rec { pname = "labgrid"; - version = "23.0.3"; + version = "23.0.4"; src = fetchFromGitHub { owner = "labgrid-project"; repo = "labgrid"; rev = "refs/tags/v${version}"; - sha256 = "sha256-yhlBqqCLOt6liw4iv8itG6E4QfIa7cW76QJqefUM5dw="; + sha256 = "sha256-EEPQSIHKAmLPudv7LLm9ol3Kukgz8edYKfDi+wvERpk="; }; nativeBuildInputs = [ From a8f317f6dccbc6c21719510fdebf0f3638626217 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Mon, 4 Dec 2023 13:10:02 +0100 Subject: [PATCH 08/71] fwupd: 1.9.9 -> 1.9.10 https://github.com/fwupd/fwupd/releases/tag/1.9.10 --- pkgs/os-specific/linux/firmware/fwupd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index c77c01df8508..e96902a13029 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -122,7 +122,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "fwupd"; - version = "1.9.9"; + version = "1.9.10"; # libfwupd goes to lib # daemon, plug-ins and libfwupdplugin go to out @@ -133,7 +133,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "fwupd"; repo = "fwupd"; rev = finalAttrs.version; - hash = "sha256-UUrG3CMCAC5hyy2U5I4zqvJoSP/+zuiq1P+2Pdb3QD0="; + hash = "sha256-qB7SGkjPahZmLax8HrSdLvORAXTBcuN5NohT0KUjCnM="; }; patches = [ From 53c3732fa4cc7f48ccc5b69a45eb7a37d629572a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 4 Dec 2023 12:42:18 +0000 Subject: [PATCH 09/71] python310Packages.opencensus-ext-azure: 1.1.11 -> 1.1.12 --- .../python-modules/opencensus-ext-azure/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/opencensus-ext-azure/default.nix b/pkgs/development/python-modules/opencensus-ext-azure/default.nix index 7250a0841f24..534213c2dbc3 100644 --- a/pkgs/development/python-modules/opencensus-ext-azure/default.nix +++ b/pkgs/development/python-modules/opencensus-ext-azure/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "opencensus-ext-azure"; - version = "1.1.11"; + version = "1.1.12"; format = "setuptools"; disabled = pythonOlder "3.4"; src = fetchPypi { inherit pname version; - hash = "sha256-IdTU0FGdSCOdBBQskLalH17MBDaE64DPoKcBqiM0YHM="; + hash = "sha256-hrseR84dIKytlq08Efjvsvp6tensSJbzBj2F+JlJBGI="; }; propagatedBuildInputs = [ From 85aa2d80defe7c7d7fec62a59aab158937fd4e2f Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Mon, 4 Dec 2023 10:20:19 -0500 Subject: [PATCH 10/71] vault-bin: fix license as 1.15 and later is unfree bsl11 --- pkgs/tools/security/vault/vault-bin.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/security/vault/vault-bin.nix b/pkgs/tools/security/vault/vault-bin.nix index ca392d68a96d..dbb33e610efc 100644 --- a/pkgs/tools/security/vault/vault-bin.nix +++ b/pkgs/tools/security/vault/vault-bin.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { description = "A tool for managing secrets, this binary includes the UI"; homepage = "https://www.vaultproject.io"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - license = licenses.mpl20; + license = licenses.bsl11; maintainers = with maintainers; teams.serokell.members ++ [ offline psyanticy Chili-Man techknowlogick mkaito ]; mainProgram = "vault"; platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ]; From a267c5b907e75fb81302dbda1ee8d38d050f150a Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Mon, 4 Dec 2023 10:22:39 -0500 Subject: [PATCH 11/71] vault-bin: 1.15.2 -> 1.15.3 --- pkgs/tools/security/vault/vault-bin.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/security/vault/vault-bin.nix b/pkgs/tools/security/vault/vault-bin.nix index dbb33e610efc..e7516cc83d0d 100644 --- a/pkgs/tools/security/vault/vault-bin.nix +++ b/pkgs/tools/security/vault/vault-bin.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "vault-bin"; - version = "1.15.2"; + version = "1.15.3"; src = let @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { aarch64-darwin = "darwin_arm64"; }; sha256 = selectSystem { - x86_64-linux = "sha256-aawDrQu8wEZqJ/uyCJjtWcgy8Ut34B5P+odqddE5P3M="; - aarch64-linux = "sha256-thLVw//yIgPCAV9CdrRlINLg+cO5aB279I2aboZMF6w="; - i686-linux = "sha256-bUhtnQB5YZdDuB4uondln0D3itoTr+1FaqjgTiT76WA="; - x86_64-darwin = "sha256-+wZrWwbpibtCla1ydhDnLJsHrVymLzEXVE1KftZ+pOs="; - aarch64-darwin = "sha256-2FGiCzIAEyXTqRaKEDZK5d/PWl4EmvJl9NieiOdgOeY="; + x86_64-linux = "sha256-rRXpRxuslOvvNgK6W0BG/LWs2sAGGCuSxcbVbsmrtN0="; + aarch64-linux = "sha256-vD/S+aZGa+JFRBV9WML9WbhrFpB8FynM62ZJ0zkWtDU="; + i686-linux = "sha256-Y9KpL0kZxlgfkBSyXJVSND2hSJ1y+FuXKPK0/P2YX2w="; + x86_64-darwin = "sha256-i85GQSJK7dPoLP7XBrz7CiISCG8KbGylL++ecy/CXRY="; + aarch64-darwin = "sha256-eZAuUNbigJ/kye8p3yu+Qf+p47IkxKJntR2sGFpM+j8="; }; in fetchzip { From 5bda2ec626a4107f8adc3a7e58c16c0594c40d2c Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Fri, 24 Nov 2023 13:47:03 +0000 Subject: [PATCH 12/71] cudaPackagesGoogle: init, a package-set for jax and tf --- pkgs/development/python-modules/jaxlib/bin.nix | 8 ++++---- .../python-modules/jaxlib/default.nix | 4 ++-- .../python-modules/tensorflow/bin.nix | 6 +++--- .../python-modules/tensorflow/default.nix | 16 ++++++++-------- pkgs/top-level/all-packages.nix | 4 ++++ pkgs/top-level/python-packages.nix | 1 - 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/jaxlib/bin.nix b/pkgs/development/python-modules/jaxlib/bin.nix index d80cbc2a6018..e35b4759bd64 100644 --- a/pkgs/development/python-modules/jaxlib/bin.nix +++ b/pkgs/development/python-modules/jaxlib/bin.nix @@ -29,11 +29,11 @@ , stdenv # Options: , cudaSupport ? config.cudaSupport -, cudaPackages ? {} +, cudaPackagesGoogle }: let - inherit (cudaPackages) cudatoolkit cudnn; + inherit (cudaPackagesGoogle) cudatoolkit cudnn; version = "0.4.20"; @@ -210,8 +210,8 @@ buildPythonPackage { maintainers = with maintainers; [ samuela ]; platforms = [ "aarch64-darwin" "x86_64-linux" "x86_64-darwin" ]; broken = - !(cudaSupport -> (cudaPackages ? cudatoolkit) && lib.versionAtLeast cudatoolkit.version "11.1") - || !(cudaSupport -> (cudaPackages ? cudnn) && lib.versionAtLeast cudnn.version "8.2") + !(cudaSupport -> (cudaPackagesGoogle ? cudatoolkit) && lib.versionAtLeast cudatoolkit.version "11.1") + || !(cudaSupport -> (cudaPackagesGoogle ? cudnn) && lib.versionAtLeast cudnn.version "8.2") || !(cudaSupport -> stdenv.isLinux); }; } diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index c70ab0ac2b32..a04d6973ca4b 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -44,14 +44,14 @@ , config # CUDA flags: , cudaSupport ? config.cudaSupport -, cudaPackages ? {} +, cudaPackagesGoogle # MKL: , mklSupport ? true }: let - inherit (cudaPackages) backendStdenv cudatoolkit cudaFlags cudnn nccl; + inherit (cudaPackagesGoogle) backendStdenv cudatoolkit cudaFlags cudnn nccl; pname = "jaxlib"; version = "0.4.20"; diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index fa70e4cc4a30..104002361926 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -22,7 +22,7 @@ , tensorboard , config , cudaSupport ? config.cudaSupport -, cudaPackages ? {} +, cudaPackagesGoogle , zlib , python , keras-applications @@ -43,7 +43,7 @@ assert ! (stdenv.isDarwin && cudaSupport); let packages = import ./binary-hashes.nix; - inherit (cudaPackages) cudatoolkit cudnn; + inherit (cudaPackagesGoogle) cudatoolkit cudnn; in buildPythonPackage { pname = "tensorflow" + lib.optionalString cudaSupport "-gpu"; inherit (packages) version; @@ -200,7 +200,7 @@ in buildPythonPackage { ]; passthru = { - inherit cudaPackages; + cudaPackages = cudaPackagesGoogle; }; meta = with lib; { diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index c8e292e31674..be8b26f3d0e9 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -19,8 +19,8 @@ # https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0 , config , cudaSupport ? config.cudaSupport -, cudaPackages ? { } -, cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities +, cudaPackagesGoogle +, cudaCapabilities ? cudaPackagesGoogle.cudaFlags.cudaCapabilities , mklSupport ? false, mkl , tensorboardSupport ? true # XLA without CUDA is broken @@ -50,15 +50,15 @@ let # __ZN4llvm11SmallPtrSetIPKNS_10AllocaInstELj8EED1Ev in any of the # translation units, so the build fails at link time stdenv = - if cudaSupport then cudaPackages.backendStdenv + if cudaSupport then cudaPackagesGoogle.backendStdenv else if originalStdenv.isDarwin then llvmPackages_11.stdenv else originalStdenv; - inherit (cudaPackages) cudatoolkit nccl; + inherit (cudaPackagesGoogle) cudatoolkit nccl; # use compatible cuDNN (https://www.tensorflow.org/install/source#gpu) # cudaPackages.cudnn led to this: # https://github.com/tensorflow/tensorflow/issues/60398 cudnnAttribute = "cudnn_8_6"; - cudnn = cudaPackages.${cudnnAttribute}; + cudnn = cudaPackagesGoogle.${cudnnAttribute}; gentoo-patches = fetchzip { url = "https://dev.gentoo.org/~perfinion/patches/tensorflow-patches-2.12.0.tar.bz2"; hash = "sha256-SCRX/5/zML7LmKEPJkcM5Tebez9vv/gmE4xhT/jyqWs="; @@ -486,8 +486,8 @@ let broken = stdenv.isDarwin || !(xlaSupport -> cudaSupport) - || !(cudaSupport -> builtins.hasAttr cudnnAttribute cudaPackages) - || !(cudaSupport -> cudaPackages ? cudatoolkit); + || !(cudaSupport -> builtins.hasAttr cudnnAttribute cudaPackagesGoogle) + || !(cudaSupport -> cudaPackagesGoogle ? cudatoolkit); } // lib.optionalAttrs stdenv.isDarwin { timeout = 86400; # 24 hours maxSilent = 14400; # 4h, double the default of 7200s @@ -590,7 +590,7 @@ in buildPythonPackage { # Regression test for #77626 removed because not more `tensorflow.contrib`. passthru = { - inherit cudaPackages; + cudaPackages = cudaPackagesGoogle; deps = bazel-build.deps; libtensorflow = bazel-build.out; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e32f668e0d65..e7ee7c01292b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7318,6 +7318,10 @@ with pkgs; cudaPackages_12_2 = callPackage ./cuda-packages.nix { cudaVersion = "12.2"; }; cudaPackages_12 = cudaPackages_12_0; + # Use the older cudaPackages for tensorflow and jax, as determined by cudnn + # compatibility: https://www.tensorflow.org/install/source#gpu + cudaPackagesGoogle = cudaPackages_11; + # TODO: try upgrading once there is a cuDNN release supporting CUDA 12. No # such cuDNN release as of 2023-01-10. cudaPackages = recurseIntoAttrs cudaPackages_11; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ebf97327f53f..d2abc3c70698 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13924,7 +13924,6 @@ self: super: with self; { callPackage ../development/python-modules/tensorflow { inherit (pkgs.darwin) cctools; inherit (pkgs.config) cudaSupport; - inherit (self.tensorflow-bin) cudaPackages; inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security; flatbuffers-core = pkgs.flatbuffers; flatbuffers-python = self.flatbuffers; From 3ee37e4356ef08d0a4b872e76031983288e40a80 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Fri, 24 Nov 2023 22:46:28 +0000 Subject: [PATCH 13/71] tensorrt: dont break eval for unrelated packages --- .../science/math/tensorrt/extension.nix | 28 +++++++++++++++---- .../science/math/tensorrt/generic.nix | 15 ++++++---- pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/science/math/tensorrt/extension.nix b/pkgs/development/libraries/science/math/tensorrt/extension.nix index b4018c6cc284..ffd9b672684c 100644 --- a/pkgs/development/libraries/science/math/tensorrt/extension.nix +++ b/pkgs/development/libraries/science/math/tensorrt/extension.nix @@ -17,16 +17,32 @@ final: prev: let isSupported = fileData: elem cudaVersion fileData.supportedCudaVersions; # Return the first file that is supported. In practice there should only ever be one anyway. supportedFile = files: findFirst isSupported null files; - # Supported versions with versions as keys and file as value - supportedVersions = filterAttrs (version: file: file !=null ) (mapAttrs (version: files: supportedFile files) tensorRTVersions); + # Compute versioned attribute name to be used in this package set computeName = version: "tensorrt_${toUnderscore version}"; + + # Supported versions with versions as keys and file as value + supportedVersions = lib.recursiveUpdate + { + tensorrt = { + enable = false; + fileVersionCuda = null; + fileVersionCudnn = null; + fullVersion = "0.0.0"; + sha256 = null; + tarball = null; + supportedCudaVersions = [ ]; + }; + } + (mapAttrs' (version: attrs: nameValuePair (computeName version) attrs) + (filterAttrs (version: file: file != null) (mapAttrs (version: files: supportedFile files) tensorRTVersions))); + # Add all supported builds as attributes - allBuilds = mapAttrs' (version: file: nameValuePair (computeName version) (buildTensorRTPackage (removeAttrs file ["fileVersionCuda"]))) supportedVersions; + allBuilds = mapAttrs (name: file: buildTensorRTPackage (removeAttrs file ["fileVersionCuda"])) supportedVersions; + # Set the default attributes, e.g. tensorrt = tensorrt_8_4; - defaultBuild = { "tensorrt" = if allBuilds ? ${computeName tensorRTDefaultVersion} - then allBuilds.${computeName tensorRTDefaultVersion} - else throw "tensorrt-${tensorRTDefaultVersion} does not support your cuda version ${cudaVersion}"; }; + defaultName = computeName tensorRTDefaultVersion; + defaultBuild = lib.optionalAttrs (allBuilds ? ${defaultName}) { tensorrt = allBuilds.${computeName tensorRTDefaultVersion}; }; in { inherit buildTensorRTPackage; } // allBuilds // defaultBuild; diff --git a/pkgs/development/libraries/science/math/tensorrt/generic.nix b/pkgs/development/libraries/science/math/tensorrt/generic.nix index 165c6f356da8..2bcdd8e588cf 100644 --- a/pkgs/development/libraries/science/math/tensorrt/generic.nix +++ b/pkgs/development/libraries/science/math/tensorrt/generic.nix @@ -8,20 +8,22 @@ , cudnn }: -{ fullVersion +{ enable ? true +, fullVersion , fileVersionCudnn ? null , tarball , sha256 , supportedCudaVersions ? [ ] }: -assert fileVersionCudnn == null || lib.assertMsg (lib.strings.versionAtLeast cudnn.version fileVersionCudnn) +assert !enable || fileVersionCudnn == null || lib.assertMsg (lib.strings.versionAtLeast cudnn.version fileVersionCudnn) "This version of TensorRT requires at least cuDNN ${fileVersionCudnn} (current version is ${cudnn.version})"; backendStdenv.mkDerivation rec { pname = "cudatoolkit-${cudatoolkit.majorVersion}-tensorrt"; version = fullVersion; - src = requireFile rec { + src = if !enable then null else + requireFile rec { name = tarball; inherit sha256; message = '' @@ -38,13 +40,13 @@ backendStdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ + nativeBuildInputs = lib.optionals enable [ autoPatchelfHook autoAddOpenGLRunpathHook ]; # Used by autoPatchelfHook - buildInputs = [ + buildInputs = lib.optionals enable [ backendStdenv.cc.cc.lib # libstdc++ cudatoolkit cudnn @@ -75,6 +77,7 @@ backendStdenv.mkDerivation rec { ''; passthru.stdenv = backendStdenv; + passthru.enable = enable; meta = with lib; { # Check that the cudatoolkit version satisfies our min/max constraints (both @@ -82,7 +85,7 @@ backendStdenv.mkDerivation rec { # official version constraints (as recorded in default.nix). In some cases # you _may_ be able to smudge version constraints, just know that you're # embarking into unknown and unsupported territory when doing so. - broken = !(elem cudaVersion supportedCudaVersions); + broken = !enable || !(elem cudaVersion supportedCudaVersions); description = "TensorRT: a high-performance deep learning interface"; homepage = "https://developer.nvidia.com/tensorrt"; license = licenses.unfree; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d2abc3c70698..8eb3cfcc14e9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13956,7 +13956,7 @@ self: super: with self; { tensorly = callPackage ../development/python-modules/tensorly { }; - tensorrt = callPackage ../development/python-modules/tensorrt { }; + tensorrt = callPackage ../development/python-modules/tensorrt { cudaPackages = pkgs.cudaPackages_11; }; tensorstore = callPackage ../development/python-modules/tensorstore { }; From e5b174bedb0af5f8da2be151f241b6d0174f6bfb Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 27 Nov 2023 14:39:48 +0000 Subject: [PATCH 14/71] opensubdiv: drop the cudatoolkit.run file, and respect cudaFlags --- .../libraries/opensubdiv/default.nix | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/opensubdiv/default.nix b/pkgs/development/libraries/opensubdiv/default.nix index b0ff4b528864..b946d8ab718a 100644 --- a/pkgs/development/libraries/opensubdiv/default.nix +++ b/pkgs/development/libraries/opensubdiv/default.nix @@ -1,9 +1,7 @@ { config, lib, stdenv, fetchFromGitHub, cmake, pkg-config, xorg, libGLU , libGL, glew, ocl-icd, python3 -, cudaSupport ? config.cudaSupport, cudatoolkit - # For visibility mostly. The whole approach to cuda architectures and capabilities - # will be reworked soon. -, cudaArch ? "compute_37" +, cudaSupport ? config.cudaSupport +, cudaPackages , openclSupport ? !cudaSupport , darwin }: @@ -21,7 +19,11 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ + cmake + pkg-config + cudaPackages.cuda_nvcc + ]; buildInputs = [ libGLU libGL python3 # FIXME: these are not actually needed, but the configure script wants them. @@ -30,21 +32,31 @@ stdenv.mkDerivation rec { ] ++ lib.optional (openclSupport && !stdenv.isDarwin) ocl-icd ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [OpenCL Cocoa CoreVideo IOKit AppKit AGL ]) - ++ lib.optional cudaSupport cudatoolkit; + ++ lib.optional cudaSupport [ + cudaPackages.cuda_cudart + ]; + + # It's important to set OSD_CUDA_NVCC_FLAGS, + # because otherwise OSD might piggyback unwanted architectures: + # https://github.com/PixarAnimationStudios/OpenSubdiv/blob/7d0ab5530feef693ac0a920585b5c663b80773b3/CMakeLists.txt#L602 + preConfigure = lib.optionalString cudaSupport '' + cmakeFlagsArray+=( + -DOSD_CUDA_NVCC_FLAGS="${lib.concatStringsSep " " cudaPackages.cudaFlags.gencode}" + ) + ''; cmakeFlags = [ "-DNO_TUTORIALS=1" "-DNO_REGRESSION=1" "-DNO_EXAMPLES=1" "-DNO_METAL=1" # don’t have metal in apple sdk + (lib.cmakeBool "NO_OPENCL" (!openclSupport)) + (lib.cmakeBool "NO_CUDA" (!cudaSupport)) ] ++ lib.optionals (!stdenv.isDarwin) [ "-DGLEW_INCLUDE_DIR=${glew.dev}/include" "-DGLEW_LIBRARY=${glew.dev}/lib" ] ++ lib.optionals cudaSupport [ - "-DOSD_CUDA_NVCC_FLAGS=--gpu-architecture=${cudaArch}" - "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc" ] ++ lib.optionals (!openclSupport) [ - "-DNO_OPENCL=1" ]; preBuild = let maxBuildCores = 16; in lib.optionalString cudaSupport '' From 238138417344ba277e80ed451ce5f80f47dd86f2 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 27 Nov 2023 14:46:41 +0000 Subject: [PATCH 15/71] blender: drop cudatoolkit.runfile --- pkgs/applications/misc/blender/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 24ea7287160b..bdfd867f5567 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -52,7 +52,10 @@ stdenv.mkDerivation (finalAttrs: rec { nativeBuildInputs = [ cmake makeWrapper python310Packages.wrapPython llvmPackages.llvm.dev ] - ++ lib.optionals cudaSupport [ addOpenGLRunpath ] + ++ lib.optionals cudaSupport [ + addOpenGLRunpath + cudaPackages.cuda_nvcc + ] ++ lib.optionals waylandSupport [ pkg-config ]; buildInputs = [ boost ffmpeg gettext glew ilmbase @@ -87,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: rec { llvmPackages.openmp SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL ]) ++ lib.optional jackaudioSupport libjack2 - ++ lib.optional cudaSupport cudaPackages.cudatoolkit + ++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ] ++ lib.optional colladaSupport opencollada ++ lib.optional spaceNavSupport libspnav; pythonPath = with python310Packages; [ numpy requests zstandard ]; From 5c2a368f87f0f3b0585255aaa5a2d1547da4c29c Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 27 Nov 2023 15:19:17 +0000 Subject: [PATCH 16/71] catboost: downgrade to cudaPackages_11 because of unsupported architectures (compute_35) --- pkgs/top-level/all-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e7ee7c01292b..65bb876dd6fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20776,6 +20776,9 @@ with pkgs; # catboost requires clang 12+ for build # after bumping the default version of llvm, check for compatibility with the cuda backend and pin it. inherit (llvmPackages_12) stdenv; + + # https://github.com/catboost/catboost/issues/2540 + cudaPackages = cudaPackages_11; }; ndn-cxx = callPackage ../development/libraries/ndn-cxx { }; From 361d7da37f7bb945a026cb15dcb5ec548bf87e95 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 27 Nov 2023 15:42:46 +0000 Subject: [PATCH 17/71] ctranslate2: fix the cuda 12 build --- pkgs/development/libraries/ctranslate2/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/ctranslate2/default.nix b/pkgs/development/libraries/ctranslate2/default.nix index 58906b608231..324a11a6c7a2 100644 --- a/pkgs/development/libraries/ctranslate2/default.nix +++ b/pkgs/development/libraries/ctranslate2/default.nix @@ -57,6 +57,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals withMkl [ mkl ] ++ lib.optionals withCUDA [ + cudaPackages.cuda_cccl # required by the fp16 headers in cudart cudaPackages.cuda_cudart cudaPackages.libcublas cudaPackages.libcurand From 6c63202052bb23151ca77b613357c790c5542e42 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 27 Nov 2023 17:35:08 +0000 Subject: [PATCH 18/71] cudaPackages.cuda_nvcc: fix (getExe cuda_nvcc) --- pkgs/development/compilers/cudatoolkit/redist/overrides.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/cudatoolkit/redist/overrides.nix b/pkgs/development/compilers/cudatoolkit/redist/overrides.nix index a0ac0b0fcb1f..5cc560fa0fd2 100644 --- a/pkgs/development/compilers/cudatoolkit/redist/overrides.nix +++ b/pkgs/development/compilers/cudatoolkit/redist/overrides.nix @@ -51,7 +51,7 @@ in ] ); - cuda_nvcc = prev.cuda_nvcc.overrideAttrs (_: { + cuda_nvcc = prev.cuda_nvcc.overrideAttrs (oldAttrs: { # Required by cmake's enable_language(CUDA) to build a test program # When implementing cross-compilation support: this is # final.pkgs.targetPackages.cudaPackages.cuda_cudart @@ -82,6 +82,10 @@ in depsTargetTargetPropagated = [ final.setupCudaHook ]; + + meta = (oldAttrs.meta or { }) // { + mainProgram = "nvcc"; + }; }); cuda_nvprof = prev.cuda_nvprof.overrideAttrs (oldAttrs: { From 0dc161b2f806aa3d9dd7bee4f3dbb5289bc98eeb Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 27 Nov 2023 17:36:26 +0000 Subject: [PATCH 19/71] cudaPackages_12.cutensor: init and fix --- .../science/math/cutensor/generic.nix | 29 ++++++++++++++----- pkgs/top-level/cuda-packages.nix | 15 +++++++++- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/science/math/cutensor/generic.nix b/pkgs/development/libraries/science/math/cutensor/generic.nix index c957fcdd99d4..02fe13851620 100644 --- a/pkgs/development/libraries/science/math/cutensor/generic.nix +++ b/pkgs/development/libraries/science/math/cutensor/generic.nix @@ -1,7 +1,11 @@ { stdenv , lib , libPath +, cuda_cudart +, cudaMajorVersion +, cuda_nvcc , cudatoolkit +, libcublas , fetchurl , autoPatchelfHook , addOpenGLRunpath @@ -17,7 +21,7 @@ let in stdenv.mkDerivation { - pname = "cudatoolkit-${cudatoolkit.majorVersion}-cutensor"; + pname = "cutensor-cu${cudaMajorVersion}"; inherit version; src = fetchurl { @@ -32,20 +36,27 @@ stdenv.mkDerivation { nativeBuildInputs = [ autoPatchelfHook addOpenGLRunpath + cuda_nvcc ]; buildInputs = [ stdenv.cc.cc.lib - ]; - - propagatedBuildInputs = [ - cudatoolkit + cuda_cudart + libcublas ]; # Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found. # See the explanation in addOpenGLRunpath. installPhase = '' mkdir -p "$out" "$dev" + + if [[ ! -d "${libPath}" ]] ; then + echo "Cutensor: ${libPath} does not exist, only found:" >&2 + find "$(dirname ${libPath})"/ -maxdepth 1 >&2 + echo "This cutensor release might not support your cudatoolkit version" >&2 + exit 1 + fi + mv include "$dev" mv ${libPath} "$out/lib" @@ -58,7 +69,7 @@ stdenv.mkDerivation { ''; passthru = { - inherit cudatoolkit; + cudatoolkit = lib.warn "cutensor.passthru: cudaPackages.cudatoolkit is deprecated" cudatoolkit; majorVersion = lib.versions.major version; }; @@ -66,7 +77,11 @@ stdenv.mkDerivation { description = "cuTENSOR: A High-Performance CUDA Library For Tensor Primitives"; homepage = "https://developer.nvidia.com/cutensor"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - license = licenses.unfree; + license = licenses.unfreeRedistributable // { + shortName = "cuTENSOR EULA"; + name = "cuTENSOR SUPPLEMENT TO SOFTWARE LICENSE AGREEMENT FOR NVIDIA SOFTWARE DEVELOPMENT KITS"; + url = "https://docs.nvidia.com/cuda/cutensor/license.html"; + }; platforms = [ "x86_64-linux" ]; maintainers = with maintainers; [ obsidian-systems-maintenance ]; }; diff --git a/pkgs/top-level/cuda-packages.nix b/pkgs/top-level/cuda-packages.nix index a2f49a98ccd5..3912422785bc 100644 --- a/pkgs/top-level/cuda-packages.nix +++ b/pkgs/top-level/cuda-packages.nix @@ -24,6 +24,7 @@ let buildCuTensorPackage = final.callPackage ../development/libraries/science/math/cutensor/generic.nix; + # FIXME: Include non-x86_64 platforms cuTensorVersions = { "1.2.2.5" = { hash = "sha256-lU7iK4DWuC/U3s1Ct/rq2Gr3w4F2U7RYYgpmF05bibY="; @@ -31,12 +32,24 @@ let "1.5.0.3" = { hash = "sha256-T96+lPC6OTOkIs/z3QWg73oYVSyidN0SVkBWmT9VRx0="; }; + "2.0.0.7" = { + hash = "sha256-32M4rtGOW2rgxJUhBT0WBtKkHhh9f17M+RgK9rvE72g="; + }; }; inherit (final) cudaMajorMinorVersion cudaMajorVersion; + cudaToCutensor = { + "10" = "1.2.25"; + "11" = "1.5.0.3"; + "12" = "2.0.0.7"; + }; + + versionNewer = lib.flip lib.versionOlder; + latestVersion = (builtins.head (lib.sort versionNewer (builtins.attrNames cuTensorVersions))); + cutensor = buildCuTensorPackage rec { - version = if cudaMajorMinorVersion == "10.1" then "1.2.2.5" else "1.5.0.3"; + version = cudaToCutensor.${cudaMajorVersion} or latestVersion; inherit (cuTensorVersions.${version}) hash; # This can go into generic.nix libPath = "lib/${if cudaMajorVersion == "10" then cudaMajorMinorVersion else cudaMajorVersion}"; From ee108108fcbe21999ecc1f36ac730c15376dc824 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 27 Nov 2023 17:36:57 +0000 Subject: [PATCH 20/71] python3Packages.cupy: fix (use older cutensor) --- .../python-modules/cupy/default.nix | 46 +++++++++++++++---- pkgs/top-level/python-packages.nix | 3 +- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/cupy/default.nix b/pkgs/development/python-modules/cupy/default.nix index e5de149fca14..71defbb99b98 100644 --- a/pkgs/development/python-modules/cupy/default.nix +++ b/pkgs/development/python-modules/cupy/default.nix @@ -11,11 +11,34 @@ , cudaPackages , addOpenGLRunpath , pythonOlder +, symlinkJoin }: let - inherit (cudaPackages) cudatoolkit cudnn cutensor nccl; -in buildPythonPackage rec { + inherit (cudaPackages) cudnn cutensor nccl; + cudatoolkit-joined = symlinkJoin { + name = "cudatoolkit-joined-${cudaPackages.cudaVersion}"; + paths = with cudaPackages; [ + cuda_cccl # + cuda_cccl.dev + cuda_cudart + cuda_nvcc.dev # + cuda_nvprof + cuda_nvrtc + cuda_nvtx + cuda_profiler_api + libcublas + libcufft + libcurand + libcusolver + libcusparse + + # Missing: + # cusparselt + ]; + }; +in +buildPythonPackage rec { pname = "cupy"; version = "12.2.0"; @@ -32,27 +55,32 @@ in buildPythonPackage rec { # very short builds and a few extremely long ones, so setting both ends up # working nicely in practice. preConfigure = '' - export CUDA_PATH=${cudatoolkit} export CUPY_NUM_BUILD_JOBS="$NIX_BUILD_CORES" export CUPY_NUM_NVCC_THREADS="$NIX_BUILD_CORES" ''; nativeBuildInputs = [ + setuptools + wheel addOpenGLRunpath cython + cudaPackages.cuda_nvcc ]; - LDFLAGS = "-L${cudatoolkit}/lib/stubs"; - - propagatedBuildInputs = [ - cudatoolkit + buildInputs = [ + cudatoolkit-joined cudnn cutensor nccl + ]; + + NVCC = "${lib.getExe cudaPackages.cuda_nvcc}"; # FIXME: splicing/buildPackages + CUDA_PATH = "${cudatoolkit-joined}"; + LDFLAGS = "-L${cudaPackages.cuda_cudart}/lib/stubs"; + + propagatedBuildInputs = [ fastrlock numpy - setuptools - wheel ]; nativeCheckInputs = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8eb3cfcc14e9..1f38396d73c7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2467,7 +2467,8 @@ self: super: with self; { cufflinks = callPackage ../development/python-modules/cufflinks { }; - cupy = callPackage ../development/python-modules/cupy { }; + # cupy 12.2.0 possibly incompatible with cutensor 2.0 that comes with cudaPackages_12 + cupy = callPackage ../development/python-modules/cupy { cudaPackages = pkgs.cudaPackages_11; }; curio = callPackage ../development/python-modules/curio { }; From 58819d631edc8ffa5658ef025e1b1c04903cc43f Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 27 Nov 2023 17:50:09 +0000 Subject: [PATCH 21/71] ucx: fix the cudaPackages_12 variant; drop the cudatoolkit runfile dependency --- pkgs/development/libraries/ucx/default.nix | 32 ++++++++++++++-------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/ucx/default.nix b/pkgs/development/libraries/ucx/default.nix index 627cac56bb73..3b923d8efdd2 100644 --- a/pkgs/development/libraries/ucx/default.nix +++ b/pkgs/development/libraries/ucx/default.nix @@ -2,18 +2,12 @@ , rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config , config , enableCuda ? config.cudaSupport -, cudatoolkit +, cudaPackages , enableRocm ? config.rocmSupport , rocmPackages }: let - # Needed for configure to find all libraries - cudatoolkit' = symlinkJoin { - inherit (cudatoolkit) name meta; - paths = [ cudatoolkit cudatoolkit.lib ]; - }; - rocmList = with rocmPackages; [ rocm-core rocm-runtime rocm-device-libs clr ]; rocm = symlinkJoin { @@ -35,7 +29,15 @@ stdenv.mkDerivation rec { outputs = [ "out" "doc" "dev" ]; - nativeBuildInputs = [ autoreconfHook doxygen pkg-config ]; + nativeBuildInputs = [ + autoreconfHook + doxygen + pkg-config + ] + ++ lib.optionals enableCuda [ + cudaPackages.cuda_nvcc + cudaPackages.autoAddOpenGLRunpathHook + ]; buildInputs = [ libbfd @@ -44,8 +46,16 @@ stdenv.mkDerivation rec { perl rdma-core zlib - ] ++ lib.optional enableCuda cudatoolkit - ++ lib.optionals enableRocm rocmList; + ] ++ lib.optionals enableCuda [ + cudaPackages.cuda_cudart + cudaPackages.cuda_nvml_dev + + ] ++ lib.optionals enableRocm rocmList; + + LDFLAGS = lib.optionals enableCuda [ + # Fake libnvidia-ml.so (the real one is deployed impurely) + "-L${cudaPackages.cuda_nvml_dev}/lib/stubs" + ]; configureFlags = [ "--with-rdmacm=${lib.getDev rdma-core}" @@ -53,7 +63,7 @@ stdenv.mkDerivation rec { "--with-rc" "--with-dm" "--with-verbs=${lib.getDev rdma-core}" - ] ++ lib.optional enableCuda "--with-cuda=${cudatoolkit'}" + ] ++ lib.optionals enableCuda [ "--with-cuda=${cudaPackages.cuda_cudart}" ] ++ lib.optional enableRocm "--with-rocm=${rocm}"; postInstall = '' From 31f1b517cdea429dc7a6c212ca650ea184c75a93 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Tue, 28 Nov 2023 00:12:07 +0000 Subject: [PATCH 22/71] gromacs: drop cudatoolkit.run --- .../molecular-dynamics/gromacs/default.nix | 32 ++++++++++++++++--- pkgs/development/libraries/hwloc/default.nix | 5 +-- pkgs/top-level/all-packages.nix | 1 - 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index e669562c9cc7..1daeeb81410a 100644 --- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -1,4 +1,14 @@ -{ lib, stdenv, fetchurl, cmake, hwloc, fftw, perl, blas, lapack, mpi, cudatoolkit +{ lib +, stdenv +, fetchurl +, cmake +, hwloc +, fftw +, perl +, blas +, lapack +, mpi +, cudaPackages , plumed , singlePrec ? true , config @@ -9,6 +19,8 @@ }: let + inherit (cudaPackages.cudaFlags) cudaCapabilities dropDot; + # Select reasonable defaults for all major platforms # The possible values are defined in CMakeLists.txt: # AUTO None SSE2 SSE4.1 AVX_128_FMA AVX_256 AVX2_256 @@ -52,7 +64,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ] ++ lib.optional enablePlumed plumed - ; + ++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ]; buildInputs = [ fftw @@ -61,13 +73,17 @@ in stdenv.mkDerivation rec { blas lapack ] ++ lib.optional enableMpi mpi - ++ lib.optional enableCuda cudatoolkit - ; + ++ lib.optionals enableCuda [ + cudaPackages.cuda_cudart + cudaPackages.libcufft + cudaPackages.cuda_profiler_api + ]; propagatedBuildInputs = lib.optional enableMpi mpi; propagatedUserEnvPkgs = lib.optional enableMpi mpi; cmakeFlags = [ + (lib.cmakeBool "GMX_HWLOC" true) "-DGMX_SIMD:STRING=${SIMD cpuAcceleration}" "-DGMX_OPENMP:BOOL=TRUE" "-DBUILD_SHARED_LIBS=ON" @@ -87,7 +103,13 @@ in stdenv.mkDerivation rec { else [ "-DGMX_MPI:BOOL=FALSE" ] - ) ++ lib.optional enableCuda "-DGMX_GPU=CUDA"; + ) ++ lib.optionals enableCuda [ + "-DGMX_GPU=CUDA" + (lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities))) + + # Gromacs seems to ignore and override the normal variables, so we add this ad hoc: + (lib.cmakeFeature "GMX_CUDA_TARGET_COMPUTE" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities))) + ]; postInstall = '' moveToOutput share/cmake $dev diff --git a/pkgs/development/libraries/hwloc/default.nix b/pkgs/development/libraries/hwloc/default.nix index 67048167d6bf..626d0b7cca94 100644 --- a/pkgs/development/libraries/hwloc/default.nix +++ b/pkgs/development/libraries/hwloc/default.nix @@ -22,12 +22,13 @@ stdenv.mkDerivation rec { ]; # XXX: libX11 is not directly needed, but needed as a propagated dep of Cairo. - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config ] + ++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ]; buildInputs = [ expat ncurses ] ++ lib.optionals x11Support [ cairo libX11 ] ++ lib.optionals stdenv.isLinux [ numactl ] - ++ lib.optional enableCuda cudaPackages.cudatoolkit; + ++ lib.optionals enableCuda [ cudaPackages.cuda_cudart ]; # Since `libpci' appears in `hwloc.pc', it must be propagated. propagatedBuildInputs = lib.optional stdenv.isLinux pciutils; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 65bb876dd6fe..75e47757a8eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -39447,7 +39447,6 @@ with pkgs; singlePrec = true; enableMpi = true; enableCuda = true; - cudatoolkit = cudatoolkit_11; fftw = fftwSinglePrec; }); From 0c4b1fcfba531c8f33b416583053df2582a6843e Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Tue, 28 Nov 2023 09:46:47 +0000 Subject: [PATCH 23/71] openvino: opencvConfig.cmake attempts to find_package(CUDA) --- pkgs/development/libraries/opencv/4.x.nix | 2 ++ pkgs/development/libraries/openvino/default.nix | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 06360449c1ba..4c1b13d1309e 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -476,6 +476,8 @@ effectiveStdenv.mkDerivation { ''; passthru = { + cudaSupport = enableCuda; + tests = { inherit (gst_all_1) gst-plugins-bad; } diff --git a/pkgs/development/libraries/openvino/default.nix b/pkgs/development/libraries/openvino/default.nix index b3809f095364..5761f9e7bb64 100644 --- a/pkgs/development/libraries/openvino/default.nix +++ b/pkgs/development/libraries/openvino/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , fetchurl , substituteAll +, cudaSupport ? opencv.cudaSupport or false # build , addOpenGLRunpath @@ -21,6 +22,7 @@ , protobuf , pugixml , tbb +, cudaPackages }: let @@ -68,6 +70,8 @@ stdenv.mkDerivation rec { setuptools ])) shellcheck + ] ++ lib.optionals cudaSupport [ + cudaPackages.cuda_nvcc ]; patches = [ @@ -133,6 +137,8 @@ stdenv.mkDerivation rec { protobuf pugixml tbb + ] ++ lib.optionals cudaSupport [ + cudaPackages.cuda_cudart ]; enableParallelBuilding = true; From 9cc210a7839f4e2aeb13bcadc96981daf8bc6501 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Tue, 28 Nov 2023 10:32:22 +0000 Subject: [PATCH 24/71] nvidia-thrust: rm as deprecated The GitHub repo has been archived, the new thing is [cccl](https://github.com/nvidia/cccl) --- .../libraries/nvidia-thrust/default.nix | 102 ------------------ .../libraries/science/math/faiss/default.nix | 7 -- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 11 -- 4 files changed, 1 insertion(+), 120 deletions(-) delete mode 100644 pkgs/development/libraries/nvidia-thrust/default.nix diff --git a/pkgs/development/libraries/nvidia-thrust/default.nix b/pkgs/development/libraries/nvidia-thrust/default.nix deleted file mode 100644 index f68b57f193b7..000000000000 --- a/pkgs/development/libraries/nvidia-thrust/default.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ lib -, config -, fetchFromGitHub -, stdenv -, cmake -, pkg-config -, cudaPackages ? { } -, symlinkJoin -, tbb -, hostSystem ? "CPP" -, deviceSystem ? if config.cudaSupport then "CUDA" else "OMP" -}: - -# Policy for device_vector -assert builtins.elem deviceSystem [ - "CPP" # Serial on CPU - "OMP" # Parallel with OpenMP - "TBB" # Parallel with Intel TBB - "CUDA" # Parallel on GPU -]; - -# Policy for host_vector -# Always lives on CPU, but execution can be made parallel -assert builtins.elem hostSystem [ "CPP" "OMP" "TBB" ]; - -let - pname = "nvidia-thrust"; - version = "1.16.0"; - - inherit (cudaPackages) backendStdenv cudaFlags; - cudaCapabilities = map cudaFlags.dropDot cudaFlags.cudaCapabilities; - - tbbSupport = builtins.elem "TBB" [ deviceSystem hostSystem ]; - cudaSupport = deviceSystem == "CUDA"; - - # TODO: Would like to use this: - cudaJoined = symlinkJoin { - name = "cuda-packages-unsplit"; - paths = with cudaPackages; [ - cuda_nvcc - cuda_nvrtc # symbols: cudaLaunchDevice, &c; notice postBuild - cuda_cudart # cuda_runtime.h - libcublas - ]; - postBuild = '' - ln -s $out/lib $out/lib64 - ''; - }; -in -stdenv.mkDerivation { - inherit pname version; - - src = fetchFromGitHub { - owner = "NVIDIA"; - repo = "thrust"; - rev = version; - fetchSubmodules = true; - hash = "sha256-/EyznxWKuHuvHNjq+SQg27IaRbtkjXR2zlo2YgCWmUQ="; - }; - - # NVIDIA's "compiler hacks" seem like work-arounds for legacy toolchains and - # cause us errors such as: - # > Thrust's test harness uses CMAKE_CXX_COMPILER for the CUDA host compiler. - # > Refusing to overwrite specified CMAKE_CUDA_HOST_COMPILER - # So we un-fix cmake after them: - postPatch = '' - echo > cmake/ThrustCompilerHacks.cmake - ''; - - buildInputs = lib.optionals tbbSupport [ tbb ]; - - nativeBuildInputs = [ - cmake - pkg-config - ] ++ lib.optionals cudaSupport [ - # Goes in native build inputs because thrust looks for headers - # in a path relative to nvcc... - cudaJoined - ]; - - cmakeFlags = [ - "-DTHRUST_INCLUDE_CUB_CMAKE=${if cudaSupport then "ON" else "OFF"}" - "-DTHRUST_DEVICE_SYSTEM=${deviceSystem}" - "-DTHRUST_HOST_SYSTEM=${hostSystem}" - "-DTHRUST_AUTO_DETECT_COMPUTE_ARCHS=OFF" - "-DTHRUST_DISABLE_ARCH_BY_DEFAULT=ON" - ] ++ lib.optionals cudaFlags.enableForwardCompat [ - "-DTHRUST_ENABLE_COMPUTE_FUTURE=ON" - ] ++ map (sm: "THRUST_ENABLE_COMPUTE_${sm}") cudaCapabilities; - - passthru = { - inherit cudaSupport cudaPackages cudaJoined; - }; - - meta = with lib; { - description = "A high-level C++ parallel algorithms library that builds on top of CUDA, TBB, OpenMP, etc"; - homepage = "https://github.com/NVIDIA/thrust"; - license = licenses.asl20; - platforms = platforms.unix; - maintainers = with maintainers; [ SomeoneSerge ]; - }; -} diff --git a/pkgs/development/libraries/science/math/faiss/default.nix b/pkgs/development/libraries/science/math/faiss/default.nix index 21e6cbf858cd..25ac539e05f2 100644 --- a/pkgs/development/libraries/science/math/faiss/default.nix +++ b/pkgs/development/libraries/science/math/faiss/default.nix @@ -6,8 +6,6 @@ , cmake , cudaPackages ? { } , cudaSupport ? config.cudaSupport -, nvidia-thrust -, useThrustSourceBuild ? true , pythonSupport ? true , pythonPackages , llvmPackages @@ -27,8 +25,6 @@ , runCommand }@inputs: -assert cudaSupport -> nvidia-thrust.cudaSupport; - let pname = "faiss"; version = "1.7.4"; @@ -44,9 +40,6 @@ let cuda_cudart # cuda_runtime.h libcublas libcurand - ] ++ lib.optionals useThrustSourceBuild [ - nvidia-thrust - ] ++ lib.optionals (!useThrustSourceBuild) [ cuda_cccl ] ++ lib.optionals (cudaPackages ? cuda_profiler_api) [ cuda_profiler_api # cuda_profiler_api.h diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index e655c34c7e82..daab3488385d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -644,6 +644,7 @@ mapAliases ({ noto-fonts-cjk = noto-fonts-cjk-sans; # Added 2021-12-16 noto-fonts-emoji = noto-fonts-color-emoji; # Added 2023-09-09 noto-fonts-extra = noto-fonts; # Added 2023-04-08 + nvidia-thrust = throw "nvidia-thrust has been removed because the project was deprecated; use cudaPackages.cuda_cccl"; ### O ### diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75e47757a8eb..1e9069ef0ead 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11276,16 +11276,6 @@ with pkgs; nvfetcher = haskell.lib.compose.justStaticExecutables haskellPackages.nvfetcher; - nvidia-thrust = callPackage ../development/libraries/nvidia-thrust { }; - - nvidia-thrust-intel = callPackage ../development/libraries/nvidia-thrust { - hostSystem = "TBB"; - deviceSystem = if config.cudaSupport then "CUDA" else "TBB"; - }; - - nvidia-thrust-cuda = callPackage ../development/libraries/nvidia-thrust { - deviceSystem = "CUDA"; - }; miller = callPackage ../tools/text/miller { }; @@ -39988,7 +39978,6 @@ with pkgs; faissWithCuda = faiss.override { cudaSupport = true; - nvidia-thrust = nvidia-thrust-cuda; }; fityk = callPackage ../applications/science/misc/fityk { }; From 3e37f3c9836da7cf6dd2c3d66a442cd8c74113b3 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Sun, 3 Dec 2023 21:03:57 +0000 Subject: [PATCH 25/71] ucc: drop the cudatoolkit runfile --- pkgs/development/libraries/ucc/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/ucc/default.nix b/pkgs/development/libraries/ucc/default.nix index a92c6bea37d7..a6e7e7710a97 100644 --- a/pkgs/development/libraries/ucc/default.nix +++ b/pkgs/development/libraries/ucc/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, libtool, automake, autoconf, ucx , config , enableCuda ? config.cudaSupport -, cudatoolkit +, cudaPackages , enableAvx ? stdenv.hostPlatform.avxSupport , enableSse41 ? stdenv.hostPlatform.sse4_1Support , enableSse42 ? stdenv.hostPlatform.sse4_2Support @@ -30,19 +30,23 @@ stdenv.mkDerivation rec { done ''; + nativeBuildInputs = [ libtool automake autoconf ] + ++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ]; + buildInputs = [ ucx ] + ++ lib.optionals enableCuda [ + cudaPackages.cuda_cccl + cudaPackages.cuda_cudart + ]; + + preConfigure = '' ./autogen.sh ''; - - nativeBuildInputs = [ libtool automake autoconf ]; - buildInputs = [ ucx ] - ++ lib.optional enableCuda cudatoolkit; - configureFlags = [ ] ++ lib.optional enableSse41 "--with-sse41" ++ lib.optional enableSse42 "--with-sse42" ++ lib.optional enableAvx "--with-avx" - ++ lib.optional enableCuda "--with-cuda=${cudatoolkit}"; + ++ lib.optional enableCuda "--with-cuda=${cudaPackages.cuda_cudart}"; postInstall = '' find $out/lib/ -name "*.la" -exec rm -f \{} \; From 0f047c2372f2ebfaf67fad4aaacc131f5d879583 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Sun, 3 Dec 2023 21:04:11 +0000 Subject: [PATCH 26/71] ucc: respect cudaFlags --- pkgs/development/libraries/ucc/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/ucc/default.nix b/pkgs/development/libraries/ucc/default.nix index a6e7e7710a97..68f358b3d3de 100644 --- a/pkgs/development/libraries/ucc/default.nix +++ b/pkgs/development/libraries/ucc/default.nix @@ -41,6 +41,8 @@ stdenv.mkDerivation rec { preConfigure = '' ./autogen.sh + '' + lib.optionalString enableCuda '' + configureFlagsArray+=( "--with-nvcc-gencode=${builtins.concatStringsSep " " cudaPackages.cudaFlags.gencode}" ) ''; configureFlags = [ ] ++ lib.optional enableSse41 "--with-sse41" From 4c6d2b81cf4dd94398a6fc5b3727c685b439f4b3 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Sun, 3 Dec 2023 21:06:03 +0000 Subject: [PATCH 27/71] openmpi: drop the cudatoolkit runfile --- pkgs/development/libraries/openmpi/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index 1c4955e2c51a..a8bd8acacd59 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -3,7 +3,7 @@ , libpsm2, libfabric, pmix, ucx, ucc , config # Enable CUDA support -, cudaSupport ? config.cudaSupport, cudatoolkit +, cudaSupport ? config.cudaSupport, cudaPackages # Enable the Sun Grid Engine bindings , enableSGE ? false @@ -18,12 +18,7 @@ , fortranSupport ? true }: -let - cudatoolkit_joined = symlinkJoin { - name = "${cudatoolkit.name}-unsplit"; - paths = [ cudatoolkit.out cudatoolkit.lib ]; - }; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "openmpi"; version = "4.1.6"; @@ -47,12 +42,13 @@ in stdenv.mkDerivation rec { buildInputs = [ zlib ] ++ lib.optionals stdenv.isLinux [ libnl numactl pmix ucx ucc ] - ++ lib.optionals cudaSupport [ cudatoolkit ] + ++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ] ++ [ libevent hwloc ] ++ lib.optional (stdenv.isLinux || stdenv.isFreeBSD) rdma-core ++ lib.optionals fabricSupport [ libpsm2 libfabric ]; nativeBuildInputs = [ perl ] + ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ] ++ lib.optionals fortranSupport [ gfortran ]; configureFlags = lib.optional (!cudaSupport) "--disable-mca-dso" @@ -67,7 +63,7 @@ in stdenv.mkDerivation rec { # TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build # https://github.com/openucx/ucx # https://www.open-mpi.org/faq/?category=buildcuda - ++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ] + ++ lib.optionals cudaSupport [ "--with-cuda=${cudaPackages.cuda_cudart}" "--enable-dlopen" ] ++ lib.optionals fabricSupport [ "--with-psm2=${lib.getDev libpsm2}" "--with-libfabric=${lib.getDev libfabric}" ] ; @@ -98,7 +94,8 @@ in stdenv.mkDerivation rec { doCheck = true; passthru = { - inherit cudaSupport cudatoolkit; + inherit cudaSupport; + cudatoolkit = cudaPackages.cudatoolkit; # For backward compatibility only }; meta = with lib; { From 9d729f260d023569a20c4339776e6b442a9f588c Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 4 Dec 2023 11:54:16 +0000 Subject: [PATCH 28/71] python311Packages.torchWithCuda: drop cuda_cudart.static at runtime --- pkgs/development/python-modules/torch/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index d18dd97df5b4..b648e2d7bf36 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -337,7 +337,8 @@ in buildPythonPackage rec { buildInputs = [ blas blas.provider ] ++ lib.optionals cudaSupport (with cudaPackages; [ cuda_cccl.dev # - cuda_cudart # cuda_runtime.h and libraries + cuda_cudart.dev # cuda_runtime.h and libraries + cuda_cudart.lib cuda_cupti.dev # For kineto cuda_cupti.lib # For kineto cuda_nvcc.dev # crt/host_config.h; even though we include this in nativeBuildinputs, it's needed here too From 8f54001d9c1d413e05e168fab14518626fb7ff71 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Mon, 27 Nov 2023 02:18:48 +0100 Subject: [PATCH 29/71] gnomeExtensions.unite: 72 -> 77 This reverts commit a0f20138a4323764ead04e7ffda25dbc15dd81c6. --- .../gnome/extensions/extensionOverrides.nix | 7 --- .../gnome/extensions/manuallyPackaged.nix | 2 + .../gnome/extensions/unite/default.nix | 43 +++++++++++++++++++ 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 pkgs/desktops/gnome/extensions/unite/default.nix diff --git a/pkgs/desktops/gnome/extensions/extensionOverrides.nix b/pkgs/desktops/gnome/extensions/extensionOverrides.nix index d200a80a30fb..b3718cbd17f3 100644 --- a/pkgs/desktops/gnome/extensions/extensionOverrides.nix +++ b/pkgs/desktops/gnome/extensions/extensionOverrides.nix @@ -23,7 +23,6 @@ , vte , wrapGAppsHook , xdg-utils -, xprop }: let # Helper method to reduce redundancy @@ -137,12 +136,6 @@ super: lib.trivial.pipe super [ ]; })) - (patchExtension "unite@hardpixel.eu" (old: { - buildInputs = [ xprop ]; - - meta.maintainers = with lib.maintainers; [ rhoriguchi ]; - })) - (patchExtension "x11gestures@joseexposito.github.io" (old: { # Extension can't find Touchegg # https://github.com/NixOS/nixpkgs/issues/137621 diff --git a/pkgs/desktops/gnome/extensions/manuallyPackaged.nix b/pkgs/desktops/gnome/extensions/manuallyPackaged.nix index 6e8da3840f08..e1e40ec10593 100644 --- a/pkgs/desktops/gnome/extensions/manuallyPackaged.nix +++ b/pkgs/desktops/gnome/extensions/manuallyPackaged.nix @@ -16,6 +16,8 @@ "taskwhisperer-extension@infinicode.de" = callPackage ./taskwhisperer { }; "tilingnome@rliang.github.com" = callPackage ./tilingnome { }; "TopIcons@phocean.net" = callPackage ./topicons-plus { }; + # Can be removed when https://github.com/hardpixel/unite-shell/issues/353 resolved + "unite@hardpixel.eu" = callPackage ./unite { }; "valent@andyholmes.ca" = callPackage ./valent { }; "window-corner-preview@fabiomereu.it" = callPackage ./window-corner-preview { }; } diff --git a/pkgs/desktops/gnome/extensions/unite/default.nix b/pkgs/desktops/gnome/extensions/unite/default.nix new file mode 100644 index 000000000000..ef975ffddf45 --- /dev/null +++ b/pkgs/desktops/gnome/extensions/unite/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, gnome, fetchFromGitHub, xprop, glib }: + +stdenv.mkDerivation rec { + pname = "gnome-shell-extension-unite"; + version = "77"; + + src = fetchFromGitHub { + owner = "hardpixel"; + repo = "unite-shell"; + rev = "v${version}"; + hash = "sha256-5PClGWOxqwTVaqBySu5I+qavaV1vcKHUvoYJ3Qgcq2o="; + }; + + passthru = { + extensionUuid = "unite@hardpixel.eu"; + extensionPortalSlug = "unite"; + }; + + nativeBuildInputs = [ glib ]; + + buildInputs = [ xprop ]; + + buildPhase = '' + runHook preBuild + glib-compile-schemas --strict --targetdir="unite@hardpixel.eu/schemas/" "unite@hardpixel.eu/schemas" + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/gnome-shell/extensions + cp -r "unite@hardpixel.eu" $out/share/gnome-shell/extensions + runHook postInstall + ''; + + meta = with lib; { + description = "Unite is a GNOME Shell extension which makes a few layout tweaks to the top panel and removes window decorations to make it look like Ubuntu Unity Shell"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ rhoriguchi ]; + homepage = "https://github.com/hardpixel/unite-shell"; + broken = versionOlder gnome.gnome-shell.version "3.32"; + }; +} From 4608a2e805cb42ee26933dbdfd8a52c5bfd7c92e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Dec 2023 02:23:11 +0000 Subject: [PATCH 30/71] python310Packages.pyomo: 6.6.2 -> 6.7.0 --- pkgs/development/python-modules/pyomo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyomo/default.nix b/pkgs/development/python-modules/pyomo/default.nix index 9e0de7f3915d..a257a337ca0c 100644 --- a/pkgs/development/python-modules/pyomo/default.nix +++ b/pkgs/development/python-modules/pyomo/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "pyomo"; - version = "6.6.2"; + version = "6.7.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { repo = "pyomo"; owner = "pyomo"; rev = "refs/tags/${version}"; - hash = "sha256-hh2sfWOUp3ac75NEuTrw3YkvS7hXpzJp39v6cfrhNiQ="; + hash = "sha256-HoTtvda97ghQ0SQBZFGkDAwD2WNtZpIum2m1khivEK4="; }; propagatedBuildInputs = [ From eb7460ec8d1c2fb5ef15624da7dd9fb92c2d4370 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Dec 2023 06:20:57 +0000 Subject: [PATCH 31/71] cni-plugins: 1.3.0 -> 1.4.0 --- pkgs/applications/networking/cluster/cni/plugins.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/cni/plugins.nix b/pkgs/applications/networking/cluster/cni/plugins.nix index 8421c3157e5e..1db39c3cf007 100644 --- a/pkgs/applications/networking/cluster/cni/plugins.nix +++ b/pkgs/applications/networking/cluster/cni/plugins.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "cni-plugins"; - version = "1.3.0"; + version = "1.4.0"; src = fetchFromGitHub { owner = "containernetworking"; repo = "plugins"; rev = "v${version}"; - hash = "sha256-cbmG9wK3yd79jCiNAKcSSx0COyh6CxR1bgIiCO3i++g="; + hash = "sha256-goXpNpb5tVOHeskRLw3CivYett3RxYBREAI+S74CMFQ="; }; vendorHash = null; From c1181450243e4e06c93cc1c40917bb1edcf5ead9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Dec 2023 10:12:55 +0000 Subject: [PATCH 32/71] mediaelch: 2.10.4 -> 2.10.6 --- pkgs/applications/misc/mediaelch/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/mediaelch/default.nix b/pkgs/applications/misc/mediaelch/default.nix index 2745dca8a02c..bc85e674c575 100644 --- a/pkgs/applications/misc/mediaelch/default.nix +++ b/pkgs/applications/misc/mediaelch/default.nix @@ -24,13 +24,13 @@ let in stdenv.mkDerivation rec { pname = "mediaelch"; - version = "2.10.4"; + version = "2.10.6"; src = fetchFromGitHub { owner = "Komet"; repo = "MediaElch"; rev = "v${version}"; - hash = "sha256-gNpnmyUKDXf40+1JmJzNyEPIv/DO8b3CdJAphheEvTU="; + hash = "sha256-qc7HaCMAmALY9MoIKmaCWF0cnwBBFDAXwqiBzwzu2bU="; fetchSubmodules = true; }; From 0ae5758951f5abc97dabbd705d1b5a30049113df Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Dec 2023 12:09:14 +0000 Subject: [PATCH 33/71] stuffbin: 1.1.0 -> 1.2.0 --- pkgs/tools/filesystems/stuffbin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/stuffbin/default.nix b/pkgs/tools/filesystems/stuffbin/default.nix index 2640ba8b8519..b955aa870c0f 100644 --- a/pkgs/tools/filesystems/stuffbin/default.nix +++ b/pkgs/tools/filesystems/stuffbin/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "stuffbin"; - version = "1.1.0"; + version = "1.2.0"; vendorHash = null; @@ -10,7 +10,7 @@ buildGoModule rec { owner = "knadh"; repo = "stuffbin"; rev = "v${version}"; - sha256 = "sha256-M72xNh7bKUMLzA+M8bJB++kJ5KCrkboQm1v8BasP3Yo="; + sha256 = "sha256-roXjE0t4iwrL2y/G2oePYL2AbTwd9uzQPtgdY14WeZk="; }; ldflags = [ "-s" "-w" "-X main.version=${version}" ]; From 6277cae51b86179b6a8c6d5020f08d199ba4feba Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Dec 2023 13:08:59 +0000 Subject: [PATCH 34/71] zlog: 1.2.16 -> 1.2.17 --- pkgs/development/libraries/zlog/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/zlog/default.nix b/pkgs/development/libraries/zlog/default.nix index e67b8ee336ed..4baa18b9d46f 100644 --- a/pkgs/development/libraries/zlog/default.nix +++ b/pkgs/development/libraries/zlog/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - version = "1.2.16"; + version = "1.2.17"; pname = "zlog"; src = fetchFromGitHub { owner = "HardySimpson"; repo = pname; rev = version; - sha256 = "sha256-wpaMbFKSwTIFe3p65pMJ6Pf2qKp1uYZCyyinGU4AxrQ="; + sha256 = "sha256-ckpDMRLxObpl8N539DC5u2bPpmD7jM+KugurUfta6tg="; }; makeFlags = [ "PREFIX=${placeholder "out"}" ]; From 1db066af566a467177a4e7aba5cc112f30e21039 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Dec 2023 13:11:44 +0000 Subject: [PATCH 35/71] neil: 0.2.62 -> 0.2.63 --- pkgs/development/tools/neil/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/neil/default.nix b/pkgs/development/tools/neil/default.nix index bfa390248f32..96eb34f09170 100644 --- a/pkgs/development/tools/neil/default.nix +++ b/pkgs/development/tools/neil/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "neil"; - version = "0.2.62"; + version = "0.2.63"; src = fetchFromGitHub { owner = "babashka"; repo = "neil"; rev = "v${version}"; - sha256 = "sha256-zSZ62RMHZLuhIPdde0cfWae+uFpWVjMfHuLAJdRedJA="; + sha256 = "sha256-mcygDOx5yzOW80bv54cPOKl1t443DXFRq4Hb4KYD5e8="; }; nativeBuildInputs = [ makeWrapper ]; From e812ec2c57a4988e20a80d6b3b6d0f89510ab66d Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 5 Dec 2023 13:16:11 +0000 Subject: [PATCH 36/71] xfce.xfce4-cpugraph-plugin: 1.2.8 -> 1.2.10 https://gitlab.xfce.org/panel-plugins/xfce4-cpugraph-plugin/-/compare/xfce4-cpugraph-plugin-1.2.8...xfce4-cpugraph-plugin-1.2.10 --- .../xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix index 113d8b18f26a..f138d8418966 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix @@ -14,10 +14,10 @@ mkXfceDerivation rec { category = "panel-plugins"; pname = "xfce4-cpugraph-plugin"; - version = "1.2.8"; + version = "1.2.10"; rev-prefix = "xfce4-cpugraph-plugin-"; odd-unstable = false; - sha256 = "sha256-GNoODnw9Z9MTlvxCOTeZt61A/0AGhMwjrRGdM35XU+M="; + sha256 = "sha256-VPelWTtFHmU4ZgWLTzZKbtmQ4LOtVwJvpLG9rHtGoNs="; buildInputs = [ exo From 6b124190b1ebdbf72124a16fed0b0bd2c9dabc3d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Dec 2023 13:20:00 +0000 Subject: [PATCH 37/71] matrix-sliding-sync: 0.99.12 -> 0.99.13 --- pkgs/servers/matrix-synapse/sliding-sync/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/matrix-synapse/sliding-sync/default.nix b/pkgs/servers/matrix-synapse/sliding-sync/default.nix index aca863ed2da9..28a788c9c328 100644 --- a/pkgs/servers/matrix-synapse/sliding-sync/default.nix +++ b/pkgs/servers/matrix-synapse/sliding-sync/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "matrix-sliding-sync"; - version = "0.99.12"; + version = "0.99.13"; src = fetchFromGitHub { owner = "matrix-org"; repo = "sliding-sync"; rev = "refs/tags/v${version}"; - hash = "sha256-7M+Ti1SfurRngXg2oCdLveG6QyjM2BjKnoovJxz7ZOY="; + hash = "sha256-jrsMPFUSdtUs6qG902+oRBGUvFGmhR8/NHCUwB9oVnE="; }; - vendorHash = "sha256-li5kEF7U7KyyMLMhVBqvnLuLXI6QrJl1KeusKrQXo8w="; + vendorHash = "sha256-THjvc0TepIBFOTte7t63Dmadf3HMuZ9m0YzQMI5e5Pw="; subPackages = [ "cmd/syncv3" ]; From e6c2707ab266ca1f0c1a8125d3bcc73929dbbfb1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 10 Sep 2023 08:56:15 +0200 Subject: [PATCH 38/71] maid: init at 0.10 --- pkgs/by-name/ma/maid/Gemfile | 3 + pkgs/by-name/ma/maid/Gemfile.lock | 55 +++++++ pkgs/by-name/ma/maid/gemset.nix | 230 ++++++++++++++++++++++++++++++ pkgs/by-name/ma/maid/package.nix | 23 +++ pkgs/by-name/ma/maid/test.nix | 20 +++ 5 files changed, 331 insertions(+) create mode 100644 pkgs/by-name/ma/maid/Gemfile create mode 100644 pkgs/by-name/ma/maid/Gemfile.lock create mode 100644 pkgs/by-name/ma/maid/gemset.nix create mode 100644 pkgs/by-name/ma/maid/package.nix create mode 100644 pkgs/by-name/ma/maid/test.nix diff --git a/pkgs/by-name/ma/maid/Gemfile b/pkgs/by-name/ma/maid/Gemfile new file mode 100644 index 000000000000..9ac699f872dc --- /dev/null +++ b/pkgs/by-name/ma/maid/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'maid', '~> 0.10.0' +gem 'rake' diff --git a/pkgs/by-name/ma/maid/Gemfile.lock b/pkgs/by-name/ma/maid/Gemfile.lock new file mode 100644 index 000000000000..c78adf5ba292 --- /dev/null +++ b/pkgs/by-name/ma/maid/Gemfile.lock @@ -0,0 +1,55 @@ +GEM + remote: https://rubygems.org/ + specs: + concurrent-ruby (1.2.2) + deprecated (3.0.1) + dimensions (1.3.0) + escape (0.0.4) + et-orbi (1.2.7) + tzinfo + exifr (1.3.10) + ffi (1.15.5) + fugit (1.8.1) + et-orbi (~> 1, >= 1.2.7) + raabro (~> 1.4) + geocoder (1.8.2) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + maid (0.10.0) + deprecated (~> 3.0.0) + dimensions (>= 1.0.0, < 2.0) + escape (>= 0.0.1, < 0.1.0) + exifr (~> 1.3.10) + geocoder (~> 1.8.1) + listen (~> 3.8.0) + mime-types (~> 3.0, < 4.0) + rubyzip (~> 2.3.2) + rufus-scheduler (~> 3.8.2) + thor (~> 1.2.1) + xdg (~> 2.2.3) + mime-types (3.5.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2023.0808) + raabro (1.4.0) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rubyzip (2.3.2) + rufus-scheduler (3.8.2) + fugit (~> 1.1, >= 1.1.6) + thor (1.2.2) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + xdg (2.2.5) + +PLATFORMS + ruby + +DEPENDENCIES + maid (~> 0.10.0) + rake + +BUNDLED WITH + 2.3.26 diff --git a/pkgs/by-name/ma/maid/gemset.nix b/pkgs/by-name/ma/maid/gemset.nix new file mode 100644 index 000000000000..f82ef7bed37a --- /dev/null +++ b/pkgs/by-name/ma/maid/gemset.nix @@ -0,0 +1,230 @@ +{ + concurrent-ruby = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0krcwb6mn0iklajwngwsg850nk8k9b35dhmc2qkbdqvmifdi2y9q"; + type = "gem"; + }; + version = "1.2.2"; + }; + deprecated = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1ky20wy29jdhfy4xdw1lgxggciq4ywizmh265fyvwxbj6svw6b03"; + type = "gem"; + }; + version = "3.0.1"; + }; + dimensions = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1jlkyfqk14291wbw8ly46jvp8vrcvswlns4078y1m44bb3rgm123"; + type = "gem"; + }; + version = "1.3.0"; + }; + escape = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0sa1xkfc9jvkwyw1jbz3jhkq0ms1zrvswi6mmfiwcisg5fp497z4"; + type = "gem"; + }; + version = "0.0.4"; + }; + et-orbi = { + dependencies = ["tzinfo"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1d2z4ky2v15dpcz672i2p7lb2nc793dasq3yq3660h2az53kss9v"; + type = "gem"; + }; + version = "1.2.7"; + }; + exifr = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "08fmmswa9fwymwsa2gzlm856ak3y9kjxdzm4zdrcrfyxs2p8yqwc"; + type = "gem"; + }; + version = "1.3.10"; + }; + ffi = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1862ydmclzy1a0cjbvm8dz7847d9rch495ib0zb64y84d3xd4bkg"; + type = "gem"; + }; + version = "1.15.5"; + }; + fugit = { + dependencies = ["et-orbi" "raabro"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1cm2lrvhrpqq19hbdsxf4lq2nkb2qdldbdxh3gvi15l62dlb5zqq"; + type = "gem"; + }; + version = "1.8.1"; + }; + geocoder = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "120lqyq308q8hg8ykawd7cp3k2ck8z9g5f9ffijp8dn2k9f21fjc"; + type = "gem"; + }; + version = "1.8.2"; + }; + listen = { + dependencies = ["rb-fsevent" "rb-inotify"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "13rgkfar8pp31z1aamxf5y7cfq88wv6rxxcwy7cmm177qq508ycn"; + type = "gem"; + }; + version = "3.8.0"; + }; + maid = { + dependencies = ["deprecated" "dimensions" "escape" "exifr" "geocoder" "listen" "mime-types" "rubyzip" "rufus-scheduler" "thor" "xdg"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0v1lhwgxyli10rinw6h33ikhskx9j3b20h7plrx8c69z05sfsdd9"; + type = "gem"; + }; + version = "0.10.0"; + }; + mime-types = { + dependencies = ["mime-types-data"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0q8d881k1b3rbsfcdi3fx0b5vpdr5wcrhn88r2d9j7zjdkxp5mw5"; + type = "gem"; + }; + version = "3.5.1"; + }; + mime-types-data = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "17zdim7kzrh5j8c97vjqp4xp78wbyz7smdp4hi5iyzk0s9imdn5a"; + type = "gem"; + }; + version = "3.2023.0808"; + }; + raabro = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "10m8bln9d00dwzjil1k42i5r7l82x25ysbi45fwyv4932zsrzynl"; + type = "gem"; + }; + version = "1.4.0"; + }; + rake = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "15whn7p9nrkxangbs9hh75q585yfn66lv0v2mhj6q6dl6x8bzr2w"; + type = "gem"; + }; + version = "13.0.6"; + }; + rb-fsevent = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zmf31rnpm8553lqwibvv3kkx0v7majm1f341xbxc0bk5sbhp423"; + type = "gem"; + }; + version = "0.11.2"; + }; + rb-inotify = { + dependencies = ["ffi"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005"; + type = "gem"; + }; + version = "0.10.1"; + }; + rubyzip = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0grps9197qyxakbpw02pda59v45lfgbgiyw48i0mq9f2bn9y6mrz"; + type = "gem"; + }; + version = "2.3.2"; + }; + rufus-scheduler = { + dependencies = ["fugit"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1as4yrb8y5lq49div8p3vqgwrrhdgwnvx4m73y3712nmnlpx6cws"; + type = "gem"; + }; + version = "3.8.2"; + }; + thor = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0k7j2wn14h1pl4smibasw0bp66kg626drxb59z7rzflch99cd4rg"; + type = "gem"; + }; + version = "1.2.2"; + }; + tzinfo = { + dependencies = ["concurrent-ruby"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "16w2g84dzaf3z13gxyzlzbf748kylk5bdgg3n1ipvkvvqy685bwd"; + type = "gem"; + }; + version = "2.0.6"; + }; + xdg = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "04xr4cavnzxlk926pkji7b5yiqy4qsd3gdvv8mg6jliq6sczg9gk"; + type = "gem"; + }; + version = "2.2.5"; + }; +} diff --git a/pkgs/by-name/ma/maid/package.nix b/pkgs/by-name/ma/maid/package.nix new file mode 100644 index 000000000000..f7f237d085fd --- /dev/null +++ b/pkgs/by-name/ma/maid/package.nix @@ -0,0 +1,23 @@ +{ bundlerApp +, bundlerUpdateScript +, callPackage +, lib +}: + +bundlerApp { + pname = "maid"; + gemdir = ./.; + exes = [ "maid" ]; + + passthru.updateScript = bundlerUpdateScript "maid"; + + passthru.tests.run = callPackage ./test.nix { }; + + meta = with lib; { + description = "Rule-based file mover and cleaner in Ruby"; + homepage = "https://github.com/maid/maid"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ alanpearce ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/by-name/ma/maid/test.nix b/pkgs/by-name/ma/maid/test.nix new file mode 100644 index 000000000000..722481f2dfcb --- /dev/null +++ b/pkgs/by-name/ma/maid/test.nix @@ -0,0 +1,20 @@ +{ runCommandLocal, maid }: + +runCommandLocal "test-maid-run" { + nativeBuildInputs = [ maid ]; +} + '' + mkdir -p $out/test + export HOME=$out + cd $out + touch test/a.iso test/b.txt + cat > rules.rb < Date: Tue, 5 Dec 2023 14:44:08 +0000 Subject: [PATCH 39/71] last: 1499 -> 1518 --- pkgs/applications/science/biology/last/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/biology/last/default.nix b/pkgs/applications/science/biology/last/default.nix index 7cf1560d2492..607b1ee51cc5 100644 --- a/pkgs/applications/science/biology/last/default.nix +++ b/pkgs/applications/science/biology/last/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "last"; - version = "1499"; + version = "1518"; src = fetchFromGitLab { owner = "mcfrith"; repo = "last"; rev = "refs/tags/${version}"; - hash = "sha256-uofXtGGDloM1FxW0PYKKwfDOPlAJiapGVKwd1clFzp8="; + hash = "sha256-a6i5BfJhVHkXTLd7SVFxISEB+Kwl7BhjUUkF8ItMOak="; }; nativeBuildInputs = [ From b735b9b29fbc88910611adc005408f55288e39f0 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 5 Dec 2023 15:55:35 +0100 Subject: [PATCH 40/71] maintainers: add viperML --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c56575012f09..9e27fbc16cd3 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19228,6 +19228,12 @@ githubId = 118959; name = "VinyMeuh"; }; + viperML = { + email = "ayatsfer@gmail.com"; + github = "viperML"; + githubId = 11395853; + name = "Fernando Ayats"; + }; viraptor = { email = "nix@viraptor.info"; github = "viraptor"; From 49a1283e137964f00242bafa8f1eb414cda771cf Mon Sep 17 00:00:00 2001 From: Misaka13514 Date: Tue, 5 Dec 2023 23:11:10 +0800 Subject: [PATCH 41/71] fscan: 1.8.3 -> 1.8.3-build3 Diff: https://github.com/shadow1ng/fscan/compare/1.8.3...1.8.3-build3 Changelog: https://github.com/shadow1ng/fscan/releases/tag/1.8.3 --- pkgs/tools/security/fscan/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/fscan/default.nix b/pkgs/tools/security/fscan/default.nix index cda7fb968d3d..00ce9d8ec78e 100644 --- a/pkgs/tools/security/fscan/default.nix +++ b/pkgs/tools/security/fscan/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "fscan"; - version = "1.8.3"; + version = "1.8.3-build3"; src = fetchFromGitHub { owner = "shadow1ng"; repo = "fscan"; rev = version; - hash = "sha256-uoM/nMtgIqyzpOoSQKD5k4LXAXoA8G5N4In8tZlngqs="; + hash = "sha256-GtOCd8JaR6tx8hoB+P9QXrEnN7Wvmv7jddhc2/8hjvQ="; }; vendorHash = "sha256-hvb2IfypwYauF3ubE36u0bTU+l/FWP/CZt6dFd9zc6s="; @@ -18,7 +18,6 @@ buildGoModule rec { homepage = "https://github.com/shadow1ng/fscan"; license = licenses.mit; maintainers = with maintainers; [ Misaka13514 ]; - platforms = with platforms; unix ++ windows; mainProgram = "fscan"; }; } From 46b647b9e19ca4f00ff534c79d4dc6afc9f602b4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 5 Dec 2023 16:36:33 +0100 Subject: [PATCH 42/71] python311Packages.dvc-render: 0.6.0 -> 1.0.0 Diff: https://github.com/iterative/dvc-render/compare/refs/tags/0.6.0...1.0.0 Changelog: https://github.com/iterative/dvc-render/releases/tag/1.0.0 --- pkgs/development/python-modules/dvc-render/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dvc-render/default.nix b/pkgs/development/python-modules/dvc-render/default.nix index c0ab18a4d17c..1d7de80cf661 100644 --- a/pkgs/development/python-modules/dvc-render/default.nix +++ b/pkgs/development/python-modules/dvc-render/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "dvc-render"; - version = "0.6.0"; + version = "1.0.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "iterative"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-seL96aOJ554pD7lgzXZFDCXqY/3TAQugWMA7MtqKoAE="; + hash = "sha256-OrfepQuLBNa5m3Sy4NzFOArtFFvaNtNNVJ8DNN3yT6s="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; From 9c67d604249932ec3ae155d73863072e8ef48435 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 5 Dec 2023 16:37:32 +0100 Subject: [PATCH 43/71] python310Packages.pyomo: update disabled --- pkgs/development/python-modules/pyomo/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pyomo/default.nix b/pkgs/development/python-modules/pyomo/default.nix index a257a337ca0c..30f1a4115079 100644 --- a/pkgs/development/python-modules/pyomo/default.nix +++ b/pkgs/development/python-modules/pyomo/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { version = "6.7.0"; format = "setuptools"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { repo = "pyomo"; From ec05ba5b4e91c28ea1df06ebb70fa8751cfc08d3 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 5 Dec 2023 16:39:01 +0100 Subject: [PATCH 44/71] phpunit: add `meta.mainProgram` --- pkgs/by-name/ph/phpunit/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/ph/phpunit/package.nix b/pkgs/by-name/ph/phpunit/package.nix index e9c87ebbdb32..e68a56fd2ae4 100644 --- a/pkgs/by-name/ph/phpunit/package.nix +++ b/pkgs/by-name/ph/phpunit/package.nix @@ -18,6 +18,7 @@ php.buildComposerProject (finalAttrs: { description = "PHP Unit Testing framework"; homepage = "https://phpunit.de"; license = lib.licenses.bsd3; + mainProgram = "phpunit"; maintainers = [ lib.maintainers.onny ] ++ lib.teams.php.members; }; }) From fbb493629fa10294f7a2fe8655fac6a4dc49dfcb Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 5 Dec 2023 16:39:20 +0100 Subject: [PATCH 45/71] phpPackages.composer: add `meta.mainProgram` --- pkgs/development/php-packages/composer/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/php-packages/composer/default.nix b/pkgs/development/php-packages/composer/default.nix index 40c6dc80fadf..905de4ccb30a 100644 --- a/pkgs/development/php-packages/composer/default.nix +++ b/pkgs/development/php-packages/composer/default.nix @@ -36,6 +36,7 @@ php.buildComposerProject (finalAttrs: { description = "Dependency Manager for PHP"; homepage = "https://getcomposer.org/"; license = lib.licenses.mit; + mainProgram = "composer"; maintainers = lib.teams.php.members; }; }) From 254477deb4b773a9ba64aed115576d5434f6638b Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 5 Dec 2023 16:39:28 +0100 Subject: [PATCH 46/71] phpPackages.grumphp: add `meta.mainProgram` --- pkgs/development/php-packages/grumphp/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/php-packages/grumphp/default.nix b/pkgs/development/php-packages/grumphp/default.nix index 6367dd996bf2..62608a21acac 100644 --- a/pkgs/development/php-packages/grumphp/default.nix +++ b/pkgs/development/php-packages/grumphp/default.nix @@ -43,6 +43,7 @@ php.buildComposerProject (finalAttrs: { description = "A PHP code-quality tool"; homepage = "https://github.com/phpro/grumphp"; license = lib.licenses.mit; + mainProgram = "grumphp"; maintainers = lib.teams.php.members; }; }) From 66447698978f2bdc7fbd3ba9b930b6f72f5a9a70 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 5 Dec 2023 16:39:37 +0100 Subject: [PATCH 47/71] phpPackages.psalm: add `meta.mainProgram` --- pkgs/development/php-packages/psalm/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/php-packages/psalm/default.nix b/pkgs/development/php-packages/psalm/default.nix index b6d15066f055..5463fec0d541 100644 --- a/pkgs/development/php-packages/psalm/default.nix +++ b/pkgs/development/php-packages/psalm/default.nix @@ -20,6 +20,7 @@ php.buildComposerProject (finalAttrs: { description = "A static analysis tool for finding errors in PHP applications"; homepage = "https://github.com/vimeo/psalm"; license = lib.licenses.mit; + mainProgram = "psalm"; maintainers = lib.teams.php.members; }; }) From 2144d651ac707cfd301cab13448d43c167f95d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Reyrol?= Date: Tue, 5 Dec 2023 16:44:44 +0100 Subject: [PATCH 48/71] symfony-cli: 5.7.3 -> 5.7.4 --- pkgs/development/tools/symfony-cli/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/symfony-cli/default.nix b/pkgs/development/tools/symfony-cli/default.nix index f150ebc0d450..c011c1048ecd 100644 --- a/pkgs/development/tools/symfony-cli/default.nix +++ b/pkgs/development/tools/symfony-cli/default.nix @@ -7,14 +7,14 @@ buildGoModule rec { pname = "symfony-cli"; - version = "5.7.3"; - vendorHash = "sha256-xC5EHP4Zb9lgvbxVkoVBxdQ4+f34zqRf4XapntZMTTc="; + version = "5.7.4"; + vendorHash = "sha256-2+Q93tm3ooOd/m6aUWAwFGh5CzARPNISNx0Tcrjc7NY="; src = fetchFromGitHub { owner = "symfony-cli"; repo = "symfony-cli"; rev = "v${version}"; - hash = "sha256-mxyGdyR1yZY+YOyf9ngk6P2oBmUL+IbwLWaCvZziSIM="; + hash = "sha256-d4cI/Nyn2XPvdZFLY7GHIAcmIUnzgyehGxZPylUD3EU="; }; ldflags = [ From ca4fd336225d1cebd753007be54669d215bf2ee4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 5 Dec 2023 16:47:13 +0100 Subject: [PATCH 49/71] python311Packages.habluetooth: 0.5.1 -> 0.6.1 Diff: https://github.com/Bluetooth-Devices/habluetooth/compare/refs/tags/v0.5.1...v0.6.1 Changelog: https://github.com/Bluetooth-Devices/habluetooth/blob/0.6.1/CHANGELOG.md --- pkgs/development/python-modules/habluetooth/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/habluetooth/default.nix b/pkgs/development/python-modules/habluetooth/default.nix index f42d8413dd32..5ed70ed10a85 100644 --- a/pkgs/development/python-modules/habluetooth/default.nix +++ b/pkgs/development/python-modules/habluetooth/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "habluetooth"; - version = "0.5.1"; + version = "0.6.1"; pyproject = true; disabled = pythonOlder "3.9"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = "habluetooth"; rev = "refs/tags/v${version}"; - hash = "sha256-olR900l/xJug5DeXb8CR0vQBzjzegdiCLCp6AIQu7Tg="; + hash = "sha256-Ha+tK3uThYvDcFsNA3JIzSG6IGUsAcls7ArJJpO3ZSQ="; }; postPatch = '' From 26401d463e99de79fda40da1d57ceae7eca8f711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Reyrol?= Date: Fri, 17 Nov 2023 12:44:19 +0100 Subject: [PATCH 50/71] phpExtensions.php-spx: change pname to spx --- pkgs/development/php-packages/php-spx/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/php-packages/php-spx/default.nix b/pkgs/development/php-packages/php-spx/default.nix index 52beeacf3bbe..020927ccf491 100644 --- a/pkgs/development/php-packages/php-spx/default.nix +++ b/pkgs/development/php-packages/php-spx/default.nix @@ -4,7 +4,7 @@ let version = "0.4.14"; in buildPecl { inherit version; - pname = "php-spx"; + pname = "spx"; src = fetchFromGitHub { owner = "NoiseByNorthwest"; From d1de0b1b8a845c1254c1f1489b5e66acb2eb2e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 4 Dec 2023 16:24:39 -0800 Subject: [PATCH 51/71] warp: 0.6.1 -> 0.6.2 Diff: https://gitlab.gnome.org/World/warp/-/compare/v0.6.1...v0.6.2 --- pkgs/applications/networking/warp/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/warp/default.nix b/pkgs/applications/networking/warp/default.nix index b39b102c2f2f..54e688c2e770 100644 --- a/pkgs/applications/networking/warp/default.nix +++ b/pkgs/applications/networking/warp/default.nix @@ -21,14 +21,14 @@ stdenv.mkDerivation rec { pname = "warp"; - version = "0.6.1"; + version = "0.6.2"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; repo = pname; rev = "v${version}"; - hash = "sha256-Uc9N2kRTpi9cCFskngkiclLpEcp4dtI2mhldG4s/GFY="; + hash = "sha256-pntHIY0cScDKhWR6kXp6YrEbBQiQjUId3MrJzy5l+K8="; }; postPatch = '' @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-GN9TjsGBU3D/mc6/XtRAk5pliKRPTQ9f3fMdS6weCaE="; + hash = "sha256-Go/a7aVHF1Yt3yIccKJIVeFy5rckXhSKfd13hdhlLUQ="; }; nativeBuildInputs = [ @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { meta = { description = "Fast and secure file transfer"; - homepage = "https://apps.gnome.org/app/app.drey.Warp"; + homepage = "https://apps.gnome.org/Warp/"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ dotlambda foo-dogsquared ]; platforms = lib.platforms.all; From f9a2a9f18aaa3441681a3888cf8b127308eb3682 Mon Sep 17 00:00:00 2001 From: Marco Burro Date: Fri, 24 Nov 2023 16:57:56 +0100 Subject: [PATCH 52/71] phpExtensions.php-spx: rename extension and folder Configure allowAliases for old extension name --- pkgs/development/php-packages/{php-spx => spx}/default.nix | 0 pkgs/top-level/php-packages.nix | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) rename pkgs/development/php-packages/{php-spx => spx}/default.nix (100%) diff --git a/pkgs/development/php-packages/php-spx/default.nix b/pkgs/development/php-packages/spx/default.nix similarity index 100% rename from pkgs/development/php-packages/php-spx/default.nix rename to pkgs/development/php-packages/spx/default.nix diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index cda91b8c627b..08e863c38552 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -312,8 +312,6 @@ lib.makeScope pkgs.newScope (self: with self; { phalcon = callPackage ../development/php-packages/phalcon { }; - php-spx = callPackage ../development/php-packages/php-spx { }; - pinba = callPackage ../development/php-packages/pinba { }; protobuf = callPackage ../development/php-packages/protobuf { }; @@ -332,6 +330,8 @@ lib.makeScope pkgs.newScope (self: with self; { inherit (pkgs) darwin; }; + spx = callPackage ../development/php-packages/spx { }; + sqlsrv = callPackage ../development/php-packages/sqlsrv { }; ssh2 = callPackage ../development/php-packages/ssh2 { }; @@ -345,6 +345,8 @@ lib.makeScope pkgs.newScope (self: with self; { xdebug = callPackage ../development/php-packages/xdebug { }; yaml = callPackage ../development/php-packages/yaml { }; + } // lib.optionalAttrs config.allowAliases { + php-spx = throw "php-spx is deprecated, use spx instead"; } // ( # Core extensions let From 4d1f62836e26369630434fab2e77c4e3336e94b4 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 5 Dec 2023 18:30:52 +0100 Subject: [PATCH 53/71] scripts/create-amis.sh: Update region list --- nixos/maintainers/scripts/ec2/create-amis.sh | 54 +++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/nixos/maintainers/scripts/ec2/create-amis.sh b/nixos/maintainers/scripts/ec2/create-amis.sh index 0c1656efaf1c..d182c5c2a479 100755 --- a/nixos/maintainers/scripts/ec2/create-amis.sh +++ b/nixos/maintainers/scripts/ec2/create-amis.sh @@ -27,31 +27,37 @@ var ${bucket:=nixos-amis} var ${service_role_name:=vmimport} # Output of the command: -# > aws ec2 describe-regions --all-regions --query "Regions[].{Name:RegionName}" --output text | sort +# $ nix-shell -I nixpkgs=. -p awscli --run 'aws ec2 describe-regions --region us-east-1 --all-regions --query "Regions[].{Name:RegionName}" --output text | sort | sed -e s/^/\ \ /' var ${regions:= - af-south-1 - ap-east-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-south-1 - ap-southeast-1 - ap-southeast-2 - ap-southeast-3 - ca-central-1 - eu-central-1 - eu-north-1 - eu-south-1 - eu-west-1 - eu-west-2 - eu-west-3 - me-south-1 - sa-east-1 - us-east-1 - us-east-2 - us-west-1 - us-west-2 - } + af-south-1 + ap-east-1 + ap-northeast-1 + ap-northeast-2 + ap-northeast-3 + ap-south-1 + ap-south-2 + ap-southeast-1 + ap-southeast-2 + ap-southeast-3 + ap-southeast-4 + ca-central-1 + eu-central-1 + eu-central-2 + eu-north-1 + eu-south-1 + eu-south-2 + eu-west-1 + eu-west-2 + eu-west-3 + il-central-1 + me-central-1 + me-south-1 + sa-east-1 + us-east-1 + us-east-2 + us-west-1 + us-west-2 +} regions=($regions) From d1964e1d2c84f8bed0de41931b107de5f250b7ba Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Dec 2023 18:04:53 +0000 Subject: [PATCH 54/71] libsForQt5.qtutilities: 6.13.2 -> 6.13.3 --- pkgs/development/libraries/qtutilities/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/qtutilities/default.nix b/pkgs/development/libraries/qtutilities/default.nix index 860e39227513..aa0611aaef20 100644 --- a/pkgs/development/libraries/qtutilities/default.nix +++ b/pkgs/development/libraries/qtutilities/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "qtutilities"; - version = "6.13.2"; + version = "6.13.3"; src = fetchFromGitHub { owner = "Martchus"; repo = "qtutilities"; rev = "v${finalAttrs.version}"; - hash = "sha256-Kdvr3T9hynLCj99+Rc1L0Gq7xkiM0a6xovuqhAncrek="; + hash = "sha256-/3PEbUMphblB3HgLkDb4l7GykuXL/ZOsKBrs8h72uwE="; }; nativeBuildInputs = [ From 44a8d8f0450c47125db0d47e17ffdc8f8cc93834 Mon Sep 17 00:00:00 2001 From: Behrad Jafari <55258336+BehradJi@users.noreply.github.com> Date: Tue, 5 Dec 2023 21:38:42 +0330 Subject: [PATCH 55/71] interception-tools-plugins: Add recurseIntoAttrs Makes the plugins be built by Hydra and listed on search.nixos.org --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c9a80d2a5741..a7ef9cf08e72 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7102,7 +7102,7 @@ with pkgs; ibus-theme-tools = callPackage ../tools/misc/ibus-theme-tools { }; interception-tools = callPackage ../tools/inputmethods/interception-tools { }; - interception-tools-plugins = { + interception-tools-plugins = recurseIntoAttrs { caps2esc = callPackage ../tools/inputmethods/interception-tools/caps2esc.nix { }; dual-function-keys = callPackage ../tools/inputmethods/interception-tools/dual-function-keys.nix { }; }; From b62d471f62a2042394869922010a713aaa5a3486 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 5 Dec 2023 14:03:11 +0100 Subject: [PATCH 56/71] nh: init at 3.4.12 --- pkgs/by-name/nh/nh/package.nix | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pkgs/by-name/nh/nh/package.nix diff --git a/pkgs/by-name/nh/nh/package.nix b/pkgs/by-name/nh/nh/package.nix new file mode 100644 index 000000000000..c32b16876dd8 --- /dev/null +++ b/pkgs/by-name/nh/nh/package.nix @@ -0,0 +1,59 @@ +{ lib +, rustPlatform +, installShellFiles +, makeWrapper +, fetchFromGitHub +, nvd +, use-nom ? true +, nix-output-monitor ? null +}: + +assert use-nom -> nix-output-monitor != null; + +let + version = "3.4.12"; + runtimeDeps = [ nvd ] ++ lib.optionals use-nom [ nix-output-monitor ]; +in +rustPlatform.buildRustPackage { + inherit version; + pname = "nh"; + + src = fetchFromGitHub { + owner = "ViperML"; + repo = "nh"; + rev = "refs/tags/v${version}"; + hash = "sha256-V5TQ/1loQnegDjfLh61DxBWEQZivYEBq2kQpT0fn2cQ="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; + + preFixup = '' + mkdir completions + $out/bin/nh completions --shell bash > completions/nh.bash + $out/bin/nh completions --shell zsh > completions/nh.zsh + $out/bin/nh completions --shell fish > completions/nh.fish + + installShellCompletion completions/* + ''; + + postFixup = '' + wrapProgram $out/bin/nh \ + --prefix PATH : ${lib.makeBinPath runtimeDeps} \ + ${lib.optionalString use-nom "--set-default NH_NOM 1"} + ''; + + cargoHash = "sha256-Ul4DM8WmKvKG32zBXzpdzHZknpTQAVvrxFcEd/C1buA="; + + meta = { + description = "Yet another nix cli helper"; + homepage = "https://github.com/ViperML/nh"; + license = lib.licenses.eupl12; + mainProgram = "nh"; + maintainers = with lib.maintainers; [ drupol viperML ]; + }; +} From a7891f2adaf409a95b2c0d8e373270993951e69d Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 4 Dec 2023 16:29:18 +0000 Subject: [PATCH 57/71] cudaPackages.setupCudaHook: fix cudart flags --- .../compilers/cudatoolkit/extension.nix | 13 +++++++++++++ .../compilers/cudatoolkit/redist/overrides.nix | 16 ---------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/pkgs/development/compilers/cudatoolkit/extension.nix b/pkgs/development/compilers/cudatoolkit/extension.nix index 93800a0dbc6b..be482e2cc799 100644 --- a/pkgs/development/compilers/cudatoolkit/extension.nix +++ b/pkgs/development/compilers/cudatoolkit/extension.nix @@ -54,11 +54,24 @@ final: prev: let { name = "setup-cuda-hook"; + # Point NVCC at a compatible compiler substitutions.ccRoot = "${backendStdenv.cc}"; # Required in addition to ccRoot as otherwise bin/gcc is looked up # when building CMakeCUDACompilerId.cu substitutions.ccFullPath = "${backendStdenv.cc}/bin/${backendStdenv.cc.targetPrefix}c++"; + + # Required by cmake's enable_language(CUDA) to build a test program + # When implementing cross-compilation support: this is + # final.pkgs.targetPackages.cudaPackages.cuda_cudart + # Given the multiple-outputs each CUDA redist has, we can specify the exact components we + # need from the package. CMake requires: + # - the cuda_runtime.h header, which is in the dev output + # - the dynamic library, which is in the lib output + # - the static library, which is in the static output + substitutions.cudartInclude = "${final.cuda_cudart.dev}"; + substitutions.cudartLib = "${final.cuda_cudart.lib}"; + substitutions.cudartStatic = "${final.cuda_cudart.static}"; } ./hooks/setup-cuda-hook.sh) { }); diff --git a/pkgs/development/compilers/cudatoolkit/redist/overrides.nix b/pkgs/development/compilers/cudatoolkit/redist/overrides.nix index 5cc560fa0fd2..16b03b93b1db 100644 --- a/pkgs/development/compilers/cudatoolkit/redist/overrides.nix +++ b/pkgs/development/compilers/cudatoolkit/redist/overrides.nix @@ -52,22 +52,6 @@ in ); cuda_nvcc = prev.cuda_nvcc.overrideAttrs (oldAttrs: { - # Required by cmake's enable_language(CUDA) to build a test program - # When implementing cross-compilation support: this is - # final.pkgs.targetPackages.cudaPackages.cuda_cudart - env = { - # Given the multiple-outputs each CUDA redist has, we can specify the exact components we - # need from the package. CMake requires: - # - the cuda_runtime.h header, which is in the dev output - # - the dynamic library, which is in the lib output - # - the static library, which is in the static output - cudartInclude = "${final.cuda_cudart.dev}"; - cudartLib = "${final.cuda_cudart.lib}"; - cudartStatic = "${final.cuda_cudart.static}"; - }; - - # Point NVCC at a compatible compiler - # Desiredata: whenever a package (e.g. magma) adds cuda_nvcc to # nativeBuildInputs (offsets `(-1, 0)`), magma should also source the # setupCudaHook, i.e. we want it the hook to be propagated into the From 182e6b41d08d37c8eb817212b88b37b671abfb22 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 4 Dec 2023 18:56:55 +0000 Subject: [PATCH 58/71] cudaPackages.setupCudaHook: rewrite cudartFlags, remove infinite recursion in cudatoolkit We don't need to add the extra nvcc flags to locate cudart when using cudatoolkit because it comes in the merged layout and nvcc doesn't have any trouble locating dependencies in the same prefix --- pkgs/development/compilers/cudatoolkit/extension.nix | 10 +++++++--- .../compilers/cudatoolkit/hooks/setup-cuda-hook.sh | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/cudatoolkit/extension.nix b/pkgs/development/compilers/cudatoolkit/extension.nix index be482e2cc799..d75d288f5577 100644 --- a/pkgs/development/compilers/cudatoolkit/extension.nix +++ b/pkgs/development/compilers/cudatoolkit/extension.nix @@ -69,9 +69,13 @@ final: prev: let # - the cuda_runtime.h header, which is in the dev output # - the dynamic library, which is in the lib output # - the static library, which is in the static output - substitutions.cudartInclude = "${final.cuda_cudart.dev}"; - substitutions.cudartLib = "${final.cuda_cudart.lib}"; - substitutions.cudartStatic = "${final.cuda_cudart.static}"; + substitutions.cudartFlags = let cudart = final.cuda_cudart; in + builtins.concatStringsSep " " (final.lib.optionals (final ? cuda_cudart) ([ + "-I${final.lib.getDev cudart}/include" + "-L${final.lib.getLib cudart}/lib" + ] ++ final.lib.optionals (builtins.elem "static" cudart.outputs) [ + "-L${cudart.static}/lib" + ])); } ./hooks/setup-cuda-hook.sh) { }); diff --git a/pkgs/development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh b/pkgs/development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh index 5ea57594211c..0272e7938b9a 100644 --- a/pkgs/development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh +++ b/pkgs/development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh @@ -55,8 +55,9 @@ setupCUDAToolkitCompilers() { # CMake's enable_language(CUDA) runs a compiler test and it doesn't account for # CUDAToolkit_ROOT. We have to help it locate libcudart - if [[ -z "${nvccDontPrependCudartFlags-}" ]] ; then - export NVCC_APPEND_FLAGS+=" -L@cudartLib@/lib -L@cudartStatic@/lib -I@cudartInclude@/include" + local cudartFlags="@cudartFlags@" + if [[ -z "${nvccDontPrependCudartFlags-}" ]] && [[ -n "${cudartFlags:-}" ]] ; then + export NVCC_APPEND_FLAGS+=" $cudartFlags" fi } From e084a6c648fecd473ff6190a5acac3369b292530 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 4 Dec 2023 20:36:52 +0000 Subject: [PATCH 59/71] cudaPackages_11_3.saxpy: fallback to the cudatoolkit runfile --- .../compilers/cudatoolkit/saxpy/default.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/development/compilers/cudatoolkit/saxpy/default.nix b/pkgs/development/compilers/cudatoolkit/saxpy/default.nix index f347b43d1d11..2da6da29004d 100644 --- a/pkgs/development/compilers/cudatoolkit/saxpy/default.nix +++ b/pkgs/development/compilers/cudatoolkit/saxpy/default.nix @@ -1,12 +1,13 @@ { autoAddOpenGLRunpathHook , backendStdenv , cmake -, cuda_cccl -, cuda_cudart +, cuda_cccl ? null +, cuda_cudart ? null , cudaFlags -, cuda_nvcc +, cuda_nvcc ? null +, cudatoolkit ? null , lib -, libcublas +, libcublas ? null , setupCudaHook , stdenv }: @@ -17,23 +18,24 @@ backendStdenv.mkDerivation { src = ./.; - buildInputs = [ + buildInputs = lib.optionals (cuda_cudart != null) [ libcublas cuda_cudart cuda_cccl + ] ++ lib.optionals (cuda_cudart == null) [ + cudatoolkit ]; nativeBuildInputs = [ cmake - # NOTE: this needs to be pkgs.buildPackages.cudaPackages_XX_Y.cuda_nvcc for - # cross-compilation to work. This should work automatically once we move to - # spliced scopes. Delete this comment once that happens - cuda_nvcc - # Alternatively, we could remove the propagated hook from cuda_nvcc and add # directly: # setupCudaHook autoAddOpenGLRunpathHook + ] ++ lib.optionals (cuda_nvcc != null) [ + cuda_nvcc + ] ++ lib.optionals (cuda_nvcc == null) [ + cudatoolkit ]; cmakeFlags = [ From d031523a012688079e3bef68abaab2f8c5d099af Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 4 Dec 2023 20:40:34 +0000 Subject: [PATCH 60/71] cudaPackages.cuda_nvcc: fix hook's offsets (-1, -1) -> (-1, 0) Cf. explanations in https://github.com/NixOS/nixpkgs/pull/271078 --- .../compilers/cudatoolkit/redist/overrides.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pkgs/development/compilers/cudatoolkit/redist/overrides.nix b/pkgs/development/compilers/cudatoolkit/redist/overrides.nix index 16b03b93b1db..71e70e8d7b70 100644 --- a/pkgs/development/compilers/cudatoolkit/redist/overrides.nix +++ b/pkgs/development/compilers/cudatoolkit/redist/overrides.nix @@ -52,18 +52,7 @@ in ); cuda_nvcc = prev.cuda_nvcc.overrideAttrs (oldAttrs: { - # Desiredata: whenever a package (e.g. magma) adds cuda_nvcc to - # nativeBuildInputs (offsets `(-1, 0)`), magma should also source the - # setupCudaHook, i.e. we want it the hook to be propagated into the - # same nativeBuildInputs. - # - # Logically, cuda_nvcc should include the hook in depsHostHostPropagated, - # so that the final offsets for the propagated hook would be `(-1, 0) + - # (0, 0) = (-1, 0)`. - # - # In practice, TargetTarget appears to work: - # https://gist.github.com/fd80ff142cd25e64603618a3700e7f82 - depsTargetTargetPropagated = [ + propagatedBuildInputs = [ final.setupCudaHook ]; From 37ec2cb6b173c7d5b78ec704db533454f9bc84ba Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 4 Dec 2023 20:47:11 +0000 Subject: [PATCH 61/71] cudaPackages.setupCudaHook: source only from nativeBuildInputs --- .../development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh b/pkgs/development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh index 0272e7938b9a..0fa8883081c5 100644 --- a/pkgs/development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh +++ b/pkgs/development/compilers/cudatoolkit/hooks/setup-cuda-hook.sh @@ -1,5 +1,8 @@ # shellcheck shell=bash +# Only run the hook from nativeBuildInputs +(( "$hostOffset" == -1 && "$targetOffset" == 0)) || return 0 + echo Sourcing setup-cuda-hook >&2 extendCUDAToolkit_ROOT() { From b9635cfa4d659ca652ab4c400988d6c8b1e453c0 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Tue, 5 Dec 2023 19:14:05 +0000 Subject: [PATCH 62/71] tiny-cuda-nn: cuda_cccl required with the newer cuda --- pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix b/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix index d046c6864539..b613b112b2a8 100644 --- a/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix +++ b/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix @@ -15,6 +15,7 @@ cuda-common-redist = with cudaPackages; [ cuda_cudart # cuda_runtime.h + cuda_cccl.dev # libcublas # cublas_v2.h libcusolver # cusolverDn.h libcusparse # cusparse.h From 18a2e518cdcef0764cfd7a96c39fdc0e7874e9fd Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Tue, 5 Dec 2023 19:14:42 +0000 Subject: [PATCH 63/71] tiny-cuda-nn: prune runtime closure --- .../libraries/science/math/tiny-cuda-nn/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix b/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix index b613b112b2a8..2036c4c86253 100644 --- a/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix +++ b/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix @@ -14,11 +14,15 @@ inherit (cudaPackages) backendStdenv cudaFlags; cuda-common-redist = with cudaPackages; [ - cuda_cudart # cuda_runtime.h + cuda_cudart.dev # cuda_runtime.h + cuda_cudart.lib cuda_cccl.dev # - libcublas # cublas_v2.h - libcusolver # cusolverDn.h - libcusparse # cusparse.h + libcublas.dev # cublas_v2.h + libcublas.lib + libcusolver.dev # cusolverDn.h + libcusolver.lib + libcusparse.dev # cusparse.h + libcusparse.lib ]; cuda-native-redist = symlinkJoin { From b8bf2d1f0dcd6b8b537e774ecddde372fddb0010 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 5 Dec 2023 21:23:55 +0100 Subject: [PATCH 64/71] phpPackages.box: 4.5.0 -> 4.5.1 --- pkgs/development/php-packages/box/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/php-packages/box/default.nix b/pkgs/development/php-packages/box/default.nix index fec3b438abbe..0a1595ca6b91 100644 --- a/pkgs/development/php-packages/box/default.nix +++ b/pkgs/development/php-packages/box/default.nix @@ -2,16 +2,16 @@ php.buildComposerProject (finalAttrs: { pname = "box"; - version = "4.5.0"; + version = "4.5.1"; src = fetchFromGitHub { owner = "box-project"; repo = "box"; rev = finalAttrs.version; - hash = "sha256-6icHXRxqre2RBIRoc3zfQnxGRHh2kIen2oLJ3eQjD/0="; + hash = "sha256-3YfnFd8OZ15nQnXOkhNz2FQygElFn+JOrenKUeyTkXA="; }; - vendorHash = "sha256-n/F/il1u+3amSVf8fr0scZSkXuwxW43iq5F2XQJ3xfM="; + vendorHash = "sha256-0ul4NLGK+Z+VN1nv4xSGsh2JcJEXeYAYFhxDn7r3kVY="; meta = { changelog = "https://github.com/box-project/box/releases/tag/${finalAttrs.version}"; From b5ca84b4507550b956a4ba38a8f6ad64d1f201de Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Mon, 13 Nov 2023 12:44:13 -0500 Subject: [PATCH 65/71] npmHooks.npmInstallHook: only overwrite npm cache for `npm pack` rather than for entire hook --- .../node/build-npm-package/hooks/npm-install-hook.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh index a2f77bdc6d43..1e446bb1b051 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh +++ b/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh @@ -5,16 +5,14 @@ npmInstallHook() { runHook preInstall - # `npm pack` writes to cache - npm config delete cache - local -r packageOut="$out/lib/node_modules/$(@jq@ --raw-output '.name' package.json)" + # `npm pack` writes to cache so temporarily override it while IFS= read -r file; do local dest="$packageOut/$(dirname "$file")" mkdir -p "$dest" cp "${npmWorkspace-.}/$file" "$dest" - done < <(@jq@ --raw-output '.[0].files | map(.path) | join("\n")' <<< "$(npm pack --json --dry-run --loglevel=warn --no-foreground-scripts ${npmWorkspace+--workspace=$npmWorkspace} $npmPackFlags "${npmPackFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}")") + done < <(@jq@ --raw-output '.[0].files | map(.path) | join("\n")' <<< "$(npm_config_cache="$HOME/.npm" npm pack --json --dry-run --loglevel=warn --no-foreground-scripts ${npmWorkspace+--workspace=$npmWorkspace} $npmPackFlags "${npmPackFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}")") # Based on code from Python's buildPythonPackage wrap.sh script, for # supporting both the case when makeWrapperArgs is an array and a From 7ad508ade792c2a264339d0df92e40563d31db70 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Mon, 4 Dec 2023 13:02:08 -0500 Subject: [PATCH 66/71] fish: 3.6.1 -> 3.6.4 Diff: https://github.com/fish-shell/fish-shell/compare/3.6.1...3.6.4 --- pkgs/shells/fish/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index 1fa5b9c6151a..b756da0754eb 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -135,7 +135,7 @@ let fish = stdenv.mkDerivation rec { pname = "fish"; - version = "3.6.1"; + version = "3.6.4"; src = fetchurl { # There are differences between the release tarball and the tarball GitHub @@ -145,7 +145,7 @@ let # --version`), as well as the local documentation for all builtins (and # maybe other things). url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${pname}-${version}.tar.xz"; - hash = "sha256-VUArtHymc52KuiXkF4CQW1zhvOCl4N0X3KkItbwLSbI="; + hash = "sha256-Dz9hDlgN4JL76ILIqnZiPs+Ruxb98FQyQebpDV1Lw5M="; }; # Fix FHS paths in tests @@ -156,6 +156,8 @@ let sed -i 's|L"/bin/echo"|L"${coreutils}/bin/echo"|' src/fish_tests.cpp sed -i 's|L"/bin/c"|L"${coreutils}/bin/c"|' src/fish_tests.cpp sed -i 's|L"/bin/ca"|L"${coreutils}/bin/ca"|' src/fish_tests.cpp + # disable flakey test + sed -i '/{TEST_GROUP("history_races"), history_tests_t::test_history_races},/d' src/fish_tests.cpp # tests/checks/cd.fish sed -i 's|/bin/pwd|${coreutils}/bin/pwd|' tests/checks/cd.fish From 04b28d5c69bb6abf8a68c9d0619a07fc4b235798 Mon Sep 17 00:00:00 2001 From: Sandro Date: Tue, 5 Dec 2023 22:27:26 +0100 Subject: [PATCH 67/71] discourse: stop redis (#244037) --- pkgs/servers/web-apps/discourse/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index 893404a6084f..320eac3bc8ce 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -279,6 +279,7 @@ let popd &>/dev/null redis-server >/dev/null & + REDIS_PID=$! initdb -A trust $NIX_BUILD_TOP/postgres >/dev/null postgres -D $NIX_BUILD_TOP/postgres -k $NIX_BUILD_TOP >/dev/null & @@ -304,6 +305,8 @@ let bundle exec rake db:migrate >/dev/null chmod -R +w tmp + + kill $REDIS_PID ''; buildPhase = '' From 6b014e92def834ffd2101942031e09ac1772760f Mon Sep 17 00:00:00 2001 From: happysalada Date: Tue, 5 Dec 2023 08:49:09 +0900 Subject: [PATCH 68/71] nixos/clamav: fix /run/clamav being removed --- nixos/modules/services/security/clamav.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/security/clamav.nix b/nixos/modules/services/security/clamav.nix index 72a195d3a04e..4713e91caf3f 100644 --- a/nixos/modules/services/security/clamav.nix +++ b/nixos/modules/services/security/clamav.nix @@ -3,7 +3,6 @@ with lib; let clamavUser = "clamav"; stateDir = "/var/lib/clamav"; - runDir = "/run/clamav"; clamavGroup = clamavUser; cfg = config.services.clamav; pkg = pkgs.clamav; @@ -117,9 +116,8 @@ in services.clamav.daemon.settings = { DatabaseDirectory = stateDir; - LocalSocket = "${runDir}/clamd.ctl"; - PidFile = "${runDir}/clamd.pid"; - TemporaryDirectory = "/tmp"; + LocalSocket = "/run/clamav/clamd.ctl"; + PidFile = "/run/clamav/clamd.pid"; User = "clamav"; Foreground = true; }; @@ -182,7 +180,6 @@ in ExecStart = "${pkg}/bin/freshclam"; SuccessExitStatus = "1"; # if databases are up to date StateDirectory = "clamav"; - RuntimeDirectory = "clamav"; User = clamavUser; Group = clamavGroup; PrivateTmp = "yes"; @@ -204,7 +201,6 @@ in serviceConfig = { Type = "oneshot"; StateDirectory = "clamav"; - RuntimeDirectory = "clamav"; User = clamavUser; Group = clamavGroup; PrivateTmp = "yes"; @@ -230,7 +226,6 @@ in Type = "oneshot"; ExecStart = "${pkgs.fangfrisch}/bin/fangfrisch --conf ${fangfrischConfigFile} refresh"; StateDirectory = "clamav"; - RuntimeDirectory = "clamav"; User = clamavUser; Group = clamavGroup; PrivateTmp = "yes"; From 93c790aef367e2f72fd9a9a22741ef1ed7136fc4 Mon Sep 17 00:00:00 2001 From: happysalada Date: Tue, 5 Dec 2023 08:49:33 +0900 Subject: [PATCH 69/71] nixos/clamav: add scanner service --- nixos/modules/services/security/clamav.nix | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/nixos/modules/services/security/clamav.nix b/nixos/modules/services/security/clamav.nix index 4713e91caf3f..d3164373ec01 100644 --- a/nixos/modules/services/security/clamav.nix +++ b/nixos/modules/services/security/clamav.nix @@ -98,6 +98,29 @@ in ''; }; }; + + scanner = { + enable = mkEnableOption (lib.mdDoc "ClamAV scanner"); + + interval = mkOption { + type = types.str; + default = "*-*-* 04:00:00"; + description = lib.mdDoc '' + How often clamdscan is invoked. See systemd.time(7) for more + information about the format. + By default this runs using 10 cores at most, be sure to run it at a time of low traffic. + ''; + }; + + scanDirectories = mkOption { + type = with types; listOf str; + default = [ "/home" "/var/lib" "/tmp" "/etc" "/var/tmp" ]; + description = lib.mdDoc '' + List of directories to scan. + The default includes everything I could think of that is valid for nixos. Feel free to contribute a PR to add to the default if you see something missing. + ''; + }; + }; }; }; @@ -232,5 +255,25 @@ in PrivateDevices = "yes"; }; }; + + systemd.timers.clamdscan = mkIf cfg.scanner.enable { + description = "Timer for ClamAV virus scanner"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = cfg.scanner.interval; + Unit = "clamdscan.service"; + }; + }; + + systemd.services.clamdscan = mkIf cfg.scanner.enable { + description = "ClamAV virus scanner"; + after = optionals cfg.updater.enable [ "clamav-freshclam.service" ]; + wants = optionals cfg.updater.enable [ "clamav-freshclam.service" ]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkg}/bin/clamdscan --multiscan --fdpass --infected --allmatch ${lib.concatStringsSep " " cfg.scanner.scanDirectories}"; + }; + }; }; } From 21d23dddd8b8ecaee8ea2690b7c029d99ceec81e Mon Sep 17 00:00:00 2001 From: happysalada Date: Tue, 5 Dec 2023 11:42:28 +0900 Subject: [PATCH 70/71] nixos/windmill: init module --- nixos/modules/module-list.nix | 1 + nixos/modules/services/web-apps/windmill.nix | 177 +++++++++++++++++++ pkgs/by-name/wi/windmill/package.nix | 2 +- 3 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/services/web-apps/windmill.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index fee7c35ed8f4..4a93cd1fd9c8 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1334,6 +1334,7 @@ ./services/web-apps/vikunja.nix ./services/web-apps/whitebophir.nix ./services/web-apps/wiki-js.nix + ./services/web-apps/windmill.nix ./services/web-apps/wordpress.nix ./services/web-apps/writefreely.nix ./services/web-apps/youtrack.nix diff --git a/nixos/modules/services/web-apps/windmill.nix b/nixos/modules/services/web-apps/windmill.nix new file mode 100644 index 000000000000..8e940dabdc1f --- /dev/null +++ b/nixos/modules/services/web-apps/windmill.nix @@ -0,0 +1,177 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.services.windmill; +in +{ + options.services.windmill = { + enable = lib.mkEnableOption (lib.mdDoc "windmill service"); + + serverPort = lib.mkOption { + type = lib.types.port; + default = 8001; + description = lib.mdDoc "Port the windmill server listens on."; + }; + + lspPort = lib.mkOption { + type = lib.types.port; + default = 3001; + description = lib.mdDoc "Port the windmill lsp listens on."; + }; + + database = { + name = lib.mkOption { + type = lib.types.str; + # the simplest database setup is to have the database named like the user. + default = "windmill"; + description = lib.mdDoc "Database name."; + }; + + user = lib.mkOption { + type = lib.types.str; + # the simplest database setup is to have the database user like the name. + default = "windmill"; + description = lib.mdDoc "Database user."; + }; + + urlPath = lib.mkOption { + type = lib.types.path; + description = lib.mdDoc '' + Path to the file containing the database url windmill should connect to. This is not deducted from database user and name as it might contain a secret + ''; + example = "config.age.secrets.DATABASE_URL_FILE.path"; + }; + createLocally = lib.mkOption { + type = lib.types.bool; + default = true; + description = lib.mdDoc "Whether to create a local database automatically."; + }; + }; + + baseUrl = lib.mkOption { + type = lib.types.str; + description = lib.mdDoc '' + The base url that windmill will be served on. + ''; + example = "https://windmill.example.com"; + }; + + logLevel = lib.mkOption { + type = lib.types.enum [ "error" "warn" "info" "debug" "trace" ]; + default = "info"; + description = lib.mdDoc "Log level"; + }; + }; + + config = lib.mkIf cfg.enable { + + services.postgresql = lib.optionalAttrs (cfg.database.createLocally) { + enable = lib.mkDefault true; + + ensureDatabases = [ cfg.database.name ]; + ensureUsers = [ + { name = cfg.database.user; + ensureDBOwnership = true; + } + ]; + + }; + + systemd.services = + let + serviceConfig = { + DynamicUser = true; + # using the same user to simplify db connection + User = cfg.database.user; + ExecStart = "${pkgs.windmill}/bin/windmill"; + + Restart = "always"; + LoadCredential = [ + "DATABASE_URL_FILE:${cfg.database.urlPath}" + ]; + }; + in + { + + # coming from https://github.com/windmill-labs/windmill/blob/main/init-db-as-superuser.sql + # modified to not grant priviledges on all tables + # create role windmill_user and windmill_admin only if they don't exist + postgresql.postStart = lib.mkIf cfg.database.createLocally (lib.mkAfter '' + $PSQL -tA <<"EOF" +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT FROM pg_catalog.pg_roles + WHERE rolname = 'windmill_user' + ) THEN + CREATE ROLE windmill_user; + GRANT ALL PRIVILEGES ON DATABASE ${cfg.database.name} TO windmill_user; + ELSE + RAISE NOTICE 'Role "windmill_user" already exists. Skipping.'; + END IF; + IF NOT EXISTS ( + SELECT FROM pg_catalog.pg_roles + WHERE rolname = 'windmill_admin' + ) THEN + CREATE ROLE windmill_admin WITH BYPASSRLS; + GRANT windmill_user TO windmill_admin; + ELSE + RAISE NOTICE 'Role "windmill_admin" already exists. Skipping.'; + END IF; + GRANT windmill_admin TO windmill; +END +$$; +EOF + ''); + + windmill-server = { + description = "Windmill server"; + after = [ "network.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service"; + wantedBy = [ "multi-user.target" ]; + + serviceConfig = serviceConfig // { StateDirectory = "windmill";}; + + environment = { + DATABASE_URL_FILE = "%d/DATABASE_URL_FILE"; + PORT = builtins.toString cfg.serverPort; + WM_BASE_URL = cfg.baseUrl; + RUST_LOG = cfg.logLevel; + MODE = "server"; + }; + }; + + windmill-worker = { + description = "Windmill worker"; + after = [ "network.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service"; + wantedBy = [ "multi-user.target" ]; + + serviceConfig = serviceConfig // { StateDirectory = "windmill-worker";}; + + environment = { + DATABASE_URL_FILE = "%d/DATABASE_URL_FILE"; + WM_BASE_URL = cfg.baseUrl; + RUST_LOG = cfg.logLevel; + MODE = "worker"; + WORKER_GROUP = "default"; + KEEP_JOB_DIR = "false"; + }; + }; + + windmill-worker-native = { + description = "Windmill worker native"; + after = [ "network.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service"; + wantedBy = [ "multi-user.target" ]; + + serviceConfig = serviceConfig // { StateDirectory = "windmill-worker-native";}; + + environment = { + DATABASE_URL_FILE = "%d/DATABASE_URL_FILE"; + WM_BASE_URL = cfg.baseUrl; + RUST_LOG = cfg.logLevel; + MODE = "worker"; + WORKER_GROUP = "native"; + }; + }; + }; + }; +} diff --git a/pkgs/by-name/wi/windmill/package.nix b/pkgs/by-name/wi/windmill/package.nix index e9d7c4ee598a..6a1f9e771f7e 100644 --- a/pkgs/by-name/wi/windmill/package.nix +++ b/pkgs/by-name/wi/windmill/package.nix @@ -146,7 +146,7 @@ rustPlatform.buildRustPackage { wrapProgram "$out/bin/windmill" \ --prefix PATH : ${lib.makeBinPath [go pythonEnv deno nsjail bash]} \ - --prefix LD_LIBRARY_PATH : "${stdenv.cc.cc.lib}/lib" \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [stdenv.cc.cc.lib]} \ --set PYTHON_PATH "${pythonEnv}/bin/python3" \ --set GO_PATH "${go}/bin/go" \ --set DENO_PATH "${deno}/bin/deno" \ From 19b79e77c6f2af55aa0d069cd67362be677140e5 Mon Sep 17 00:00:00 2001 From: Dee Anzorge Date: Tue, 5 Dec 2023 04:23:58 +0100 Subject: [PATCH 71/71] noto-fonts-color-emoji: 2.038 -> 2.042 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emoji 15.0 → 15.1 https://github.com/googlefonts/noto-emoji/releases/tag/v2.042 --- pkgs/data/fonts/noto-fonts/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/noto-fonts/default.nix b/pkgs/data/fonts/noto-fonts/default.nix index fee51ebacf4a..b5a5d26b5122 100644 --- a/pkgs/data/fonts/noto-fonts/default.nix +++ b/pkgs/data/fonts/noto-fonts/default.nix @@ -166,7 +166,7 @@ rec { noto-fonts-color-emoji = let - version = "2.038"; + version = "2.042"; emojiPythonEnv = buildPackages.python3.withPackages (p: with p; [ fonttools nototools ]); in @@ -178,7 +178,7 @@ rec { owner = "googlefonts"; repo = "noto-emoji"; rev = "v${version}"; - sha256 = "1rgmcc6nqq805iqr8kvxxlk5cf50q714xaxk3ld6rjrd69kb8ix9"; + hash = "sha256-otJQMXrBIPrxD1vCdgcrZ2h1a9XAMbqEBFumjz1XJ54="; }; depsBuildBuild = [