diff --git a/doc/functions/library/attrsets.xml b/doc/functions/library/attrsets.xml index a30f4edf4c1..052bfa1f6ae 100644 --- a/doc/functions/library/attrsets.xml +++ b/doc/functions/library/attrsets.xml @@ -1474,7 +1474,7 @@ lib.attrsets.zipAttrsWith
<function>lib.attrsets.zipAttrs</function> - zipAttrsWith :: [ AttrSet ] -> AttrSet + zipAttrs :: [ AttrSet ] -> AttrSet diff --git a/doc/languages-frameworks/ocaml.section.md b/doc/languages-frameworks/ocaml.section.md index 47035551d41..e4813d7dd2d 100644 --- a/doc/languages-frameworks/ocaml.section.md +++ b/doc/languages-frameworks/ocaml.section.md @@ -38,8 +38,8 @@ Here is a simple package example. - It uses the `fetchFromGitHub` fetcher to get its source. -- `useDune2 = true` ensures that the latest version of Dune is used for the - build (this may become the default value in a future release). +- `useDune2 = true` ensures that Dune version 2 is used for the + build (this is the default; set to `false` to use Dune version 1). - It sets the optional `doCheck` attribute such that tests will be run with `dune runtest -p angstrom` after the build (`dune build -p angstrom`) is diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index dd22c099e68..47547d7f409 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5631,6 +5631,12 @@ github = "jduan"; githubId = 452450; }; + jdupak = { + name = "Jakub Dupak"; + email = "dev@jakubdupak.com"; + github = "jdupak"; + githubId = 22683640; + }; jecaro = { email = "jeancharles.quillet@gmail.com"; github = "jecaro"; diff --git a/nixos/doc/manual/development/unit-handling.section.md b/nixos/doc/manual/development/unit-handling.section.md index bd4fe9e670f..a7ccb3dbd04 100644 --- a/nixos/doc/manual/development/unit-handling.section.md +++ b/nixos/doc/manual/development/unit-handling.section.md @@ -17,7 +17,8 @@ checks: them and comparing their contents. If they are different but only `X-Reload-Triggers` in the `[Unit]` section is changed, **reload** the unit. The NixOS module system allows setting these triggers with the option - [systemd.services.\.reloadTriggers](#opt-systemd.services). If the + [systemd.services.\.reloadTriggers](#opt-systemd.services). There are + some additional keys in the `[Unit]` section that are ignored as well. If the unit files differ in any way, the following actions are performed: - `.path` and `.slice` units are ignored. There is no need to restart them @@ -33,6 +34,9 @@ checks: - The rest of the units (mostly `.service` units) are then **reload**ed if `X-ReloadIfChanged` in the `[Service]` section is set to `true` (exposed via [systemd.services.\.reloadIfChanged](#opt-systemd.services)). + A little exception is done for units that were deactivated in the meantime, + for example because they require a unit that got stopped before. These + are **start**ed instead of reloaded. - If the reload flag is not set, some more flags decide if the unit is skipped. These flags are `X-RestartIfChanged` in the `[Service]` section diff --git a/nixos/doc/manual/development/writing-modules.chapter.md b/nixos/doc/manual/development/writing-modules.chapter.md index 2e3c6b34f1f..0c41cbd3cb7 100644 --- a/nixos/doc/manual/development/writing-modules.chapter.md +++ b/nixos/doc/manual/development/writing-modules.chapter.md @@ -90,6 +90,17 @@ modules: `systemd.services` (the set of all systemd services) and `systemd.timers` (the list of commands to be executed periodically by `systemd`). +Care must be taken when writing systemd services using `Exec*` directives. By +default systemd performs substitution on `%` specifiers in these +directives, expands environment variables from `$FOO` and `${FOO}`, splits +arguments on whitespace, and splits commands on `;`. All of these must be escaped +to avoid unexpected substitution or splitting when interpolating into an `Exec*` +directive, e.g. when using an `extraArgs` option to pass additional arguments to +the service. The functions `utils.escapeSystemdExecArg` and +`utils.escapeSystemdExecArgs` are provided for this, see [Example: Escaping in +Exec directives](#exec-escaping-example) for an example. When using these +functions system environment substitution should *not* be disabled explicitly. + ::: {#locate-example .example} ::: {.title} **Example: NixOS Module for the "locate" Service** @@ -153,6 +164,37 @@ in { ``` ::: +::: {#exec-escaping-example .example} +::: {.title} +**Example: Escaping in Exec directives** +::: +```nix +{ config, lib, pkgs, utils, ... }: + +with lib; + +let + cfg = config.services.echo; + echoAll = pkgs.writeScript "echo-all" '' + #! ${pkgs.runtimeShell} + for s in "$@"; do + printf '%s\n' "$s" + done + ''; + args = [ "a%Nything" "lang=\${LANG}" ";" "/bin/sh -c date" ]; +in { + systemd.services.echo = + { description = "Echo to the journal"; + wantedBy = [ "multi-user.target" ]; + serviceConfig.Type = "oneshot"; + serviceConfig.ExecStart = '' + ${echoAll} ${utils.escapeSystemdExecArgs args} + ''; + }; +} +``` +::: + ```{=docbook} diff --git a/nixos/doc/manual/from_md/development/unit-handling.section.xml b/nixos/doc/manual/from_md/development/unit-handling.section.xml index 57c4754c001..4c980e1213a 100644 --- a/nixos/doc/manual/from_md/development/unit-handling.section.xml +++ b/nixos/doc/manual/from_md/development/unit-handling.section.xml @@ -38,8 +38,9 @@ reload the unit. The NixOS module system allows setting these triggers with the option systemd.services.<name>.reloadTriggers. - If the unit files differ in any way, the following actions are - performed: + There are some additional keys in the [Unit] + section that are ignored as well. If the unit files differ in + any way, the following actions are performed: @@ -71,6 +72,11 @@ [Service] section is set to true (exposed via systemd.services.<name>.reloadIfChanged). + A little exception is done for units that were deactivated + in the meantime, for example because they require a unit + that got stopped before. These are + started instead of + reloaded. diff --git a/nixos/doc/manual/from_md/development/writing-modules.chapter.xml b/nixos/doc/manual/from_md/development/writing-modules.chapter.xml index e33c24f4f12..367731eda09 100644 --- a/nixos/doc/manual/from_md/development/writing-modules.chapter.xml +++ b/nixos/doc/manual/from_md/development/writing-modules.chapter.xml @@ -122,6 +122,25 @@ services) and systemd.timers (the list of commands to be executed periodically by systemd). + + Care must be taken when writing systemd services using + Exec* directives. By default systemd performs + substitution on %<char> specifiers in these + directives, expands environment variables from + $FOO and ${FOO}, splits + arguments on whitespace, and splits commands on + ;. All of these must be escaped to avoid + unexpected substitution or splitting when interpolating into an + Exec* directive, e.g. when using an + extraArgs option to pass additional arguments to + the service. The functions + utils.escapeSystemdExecArg and + utils.escapeSystemdExecArgs are provided for + this, see Example: Escaping in + Exec directives for an example. When using these functions + system environment substitution should not be + disabled explicitly. + Example: NixOS Module for the @@ -183,6 +202,36 @@ in { }; }; } + + + + Example: Escaping in Exec + directives + + +{ config, lib, pkgs, utils, ... }: + +with lib; + +let + cfg = config.services.echo; + echoAll = pkgs.writeScript "echo-all" '' + #! ${pkgs.runtimeShell} + for s in "$@"; do + printf '%s\n' "$s" + done + ''; + args = [ "a%Nything" "lang=\${LANG}" ";" "/bin/sh -c date" ]; +in { + systemd.services.echo = + { description = "Echo to the journal"; + wantedBy = [ "multi-user.target" ]; + serviceConfig.Type = "oneshot"; + serviceConfig.ExecStart = '' + ${echoAll} ${utils.escapeSystemdExecArgs args} + ''; + }; +} diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 4a2177ca9e2..d3a944533ab 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -249,6 +249,17 @@ services.prosody-filer. + + + systembus-notify, + allow system level notifications to reach the users. Available + as + services.systembus-notify. + Please keep in mind that this service should only be enabled + on machines with fully trusted users, as any local user is + able to DoS user sessions by spamming notifications. + + ethercalc, @@ -1374,6 +1385,16 @@ warning. + + + The pomerium-cli command has been moved out + of the pomerium package into the + pomerium-cli package, following upstream’s + repository split. If you are using the + pomerium-cli command, you should now + install the pomerium-cli package. + + The option diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index b8fa641a565..fe30cbc3cf5 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -72,6 +72,8 @@ In addition to numerous new and upgraded packages, this release has the followin - [prosody-filer](https://github.com/ThomasLeister/prosody-filer), a server for handling XMPP HTTP Upload requests. Available at [services.prosody-filer](#opt-services.prosody-filer.enable). +- [systembus-notify](https://github.com/rfjakob/systembus-notify), allow system level notifications to reach the users. Available as [services.systembus-notify](opt-services.systembus-notify.enable). Please keep in mind that this service should only be enabled on machines with fully trusted users, as any local user is able to DoS user sessions by spamming notifications. + - [ethercalc](https://github.com/audreyt/ethercalc), an online collaborative spreadsheet. Available as [services.ethercalc](options.html#opt-services.ethercalc.enable). @@ -503,6 +505,11 @@ In addition to numerous new and upgraded packages, this release has the followin Reason is that the old name has been deprecated upstream. Using the old option name will still work, but produce a warning. +- The `pomerium-cli` command has been moved out of the `pomerium` package into + the `pomerium-cli` package, following upstream's repository split. If you are + using the `pomerium-cli` command, you should now install the `pomerium-cli` + package. + - The option [services.networking.networkmanager.enableFccUnlock](#opt-networking.networkmanager.enableFccUnlock) was added to support FCC unlock procedures. Since release 1.18.4, the ModemManager diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 733f9ca522b..ae68c3920c5 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -45,6 +45,26 @@ rec { replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"] (removePrefix "/" s); + # Quotes an argument for use in Exec* service lines. + # systemd accepts "-quoted strings with escape sequences, toJSON produces + # a subset of these. + # Additionally we escape % to disallow expansion of % specifiers. Any lone ; + # in the input will be turned it ";" and thus lose its special meaning. + # Every $ is escaped to $$, this makes it unnecessary to disable environment + # substitution for the directive. + escapeSystemdExecArg = arg: + let + s = if builtins.isPath arg then "${arg}" + else if builtins.isString arg then arg + else if builtins.isInt arg || builtins.isFloat arg then toString arg + else throw "escapeSystemdExecArg only allows strings, paths and numbers"; + in + replaceChars [ "%" "$" ] [ "%%" "$$" ] (builtins.toJSON s); + + # Quotes a list of arguments into a single string for use in a Exec* + # line. + escapeSystemdExecArgs = concatMapStringsSep " " escapeSystemdExecArg; + # Returns a system path for a given shell package toShellPath = shell: if types.shellPackage.check shell then diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index ff95d6500b9..13703968167 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -987,6 +987,7 @@ ./services/system/nscd.nix ./services/system/saslauthd.nix ./services/system/self-deploy.nix + ./services/system/systembus-notify.nix ./services/system/uptimed.nix ./services/torrent/deluge.nix ./services/torrent/flexget.nix diff --git a/nixos/modules/programs/captive-browser.nix b/nixos/modules/programs/captive-browser.nix index dc054504ea4..aad554c2bd6 100644 --- a/nixos/modules/programs/captive-browser.nix +++ b/nixos/modules/programs/captive-browser.nix @@ -1,8 +1,12 @@ { config, lib, pkgs, ... }: -with lib; let cfg = config.programs.captive-browser; + + inherit (lib) + concatStringsSep escapeShellArgs optionalString + literalExpression mkEnableOption mkIf mkOption mkOptionDefault types; + browserDefault = chromium: concatStringsSep " " [ ''env XDG_CONFIG_HOME="$PREV_CONFIG_HOME"'' ''${chromium}/bin/chromium'' @@ -15,6 +19,15 @@ let ''-no-default-browser-check'' ''http://cache.nixos.org/'' ]; + + desktopItem = pkgs.makeDesktopItem { + name = "captive-browser"; + desktopName = "Captive Portal Browser"; + exec = "/run/wrappers/bin/captive-browser"; + icon = "nix-snowflake"; + categories = [ "Network" ]; + }; + in { ###### interface @@ -84,6 +97,11 @@ in ###### implementation config = mkIf cfg.enable { + environment.systemPackages = [ + (pkgs.runCommandNoCC "captive-browser-desktop-item" { } '' + install -Dm444 -t $out/share/applications ${desktopItem}/share/applications/*.desktop + '') + ]; programs.captive-browser.dhcp-dns = let diff --git a/nixos/modules/services/audio/squeezelite.nix b/nixos/modules/services/audio/squeezelite.nix index 05506f5bcc7..36295e21c60 100644 --- a/nixos/modules/services/audio/squeezelite.nix +++ b/nixos/modules/services/audio/squeezelite.nix @@ -1,50 +1,46 @@ { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) mkEnableOption mkIf mkOption optionalString types; + dataDir = "/var/lib/squeezelite"; cfg = config.services.squeezelite; + pkg = if cfg.pulseAudio then pkgs.squeezelite-pulse else pkgs.squeezelite; + bin = "${pkg}/bin/${pkg.pname}"; -in { +in +{ ###### interface - options = { + options.services.squeezelite = { + enable = mkEnableOption "Squeezelite, a software Squeezebox emulator"; - services.squeezelite= { - - enable = mkEnableOption "Squeezelite, a software Squeezebox emulator"; - - extraArguments = mkOption { - default = ""; - type = types.str; - description = '' - Additional command line arguments to pass to Squeezelite. - ''; - }; + pulseAudio = mkEnableOption "pulseaudio support"; + extraArguments = mkOption { + default = ""; + type = types.str; + description = '' + Additional command line arguments to pass to Squeezelite. + ''; }; - }; ###### implementation config = mkIf cfg.enable { - - systemd.services.squeezelite= { + systemd.services.squeezelite = { wantedBy = [ "multi-user.target" ]; after = [ "network.target" "sound.target" ]; description = "Software Squeezebox emulator"; serviceConfig = { DynamicUser = true; - ExecStart = "${pkgs.squeezelite}/bin/squeezelite -N ${dataDir}/player-name ${cfg.extraArguments}"; + ExecStart = "${bin} -N ${dataDir}/player-name ${cfg.extraArguments}"; StateDirectory = builtins.baseNameOf dataDir; SupplementaryGroups = "audio"; }; }; - }; - } diff --git a/nixos/modules/services/misc/jellyfin.nix b/nixos/modules/services/misc/jellyfin.nix index 64b74ddd708..04cf82f8a46 100644 --- a/nixos/modules/services/misc/jellyfin.nix +++ b/nixos/modules/services/misc/jellyfin.nix @@ -70,7 +70,8 @@ in LockPersonality = true; PrivateTmp = true; - PrivateDevices = true; + # Disabled to allow Jellyfin to access hw accel devices endpoints + # PrivateDevices = true; PrivateUsers = true; # Disabled as it does not allow Jellyfin to interface with CUDA devices diff --git a/nixos/modules/services/system/earlyoom.nix b/nixos/modules/services/system/earlyoom.nix index b355df056bc..ddd5bcebcdd 100644 --- a/nixos/modules/services/system/earlyoom.nix +++ b/nixos/modules/services/system/earlyoom.nix @@ -1,81 +1,73 @@ { config, lib, pkgs, ... }: -with lib; - let - ecfg = config.services.earlyoom; + cfg = config.services.earlyoom; + + inherit (lib) + mkDefault mkEnableOption mkIf mkOption types + mkRemovedOptionModule + concatStringsSep optional; + in { - options = { - services.earlyoom = { + options.services.earlyoom = { + enable = mkEnableOption "Early out of memory killing"; - enable = mkOption { - type = types.bool; - default = false; - description = '' - Enable early out of memory killing. - ''; - }; + freeMemThreshold = mkOption { + type = types.ints.between 1 100; + default = 10; + description = '' + Minimum of availabe memory (in percent). + If the free memory falls below this threshold and the analog is true for + + the killing begins. + ''; + }; - freeMemThreshold = mkOption { - type = types.int; - default = 10; - description = '' - Minimum of availabe memory (in percent). - If the free memory falls below this threshold and the analog is true for - - the killing begins. - ''; - }; + freeSwapThreshold = mkOption { + type = types.ints.between 1 100; + default = 10; + description = '' + Minimum of availabe swap space (in percent). + If the available swap space falls below this threshold and the analog + is true for + the killing begins. + ''; + }; - freeSwapThreshold = mkOption { - type = types.int; - default = 10; - description = '' - Minimum of availabe swap space (in percent). - If the available swap space falls below this threshold and the analog - is true for - the killing begins. - ''; - }; + # TODO: remove or warn after 1.7 (https://github.com/rfjakob/earlyoom/commit/7ebc4554) + ignoreOOMScoreAdjust = mkOption { + type = types.bool; + default = false; + description = '' + Ignore oom_score_adjust values of processes. + ''; + }; - # TODO: remove or warn after 1.7 (https://github.com/rfjakob/earlyoom/commit/7ebc4554) - ignoreOOMScoreAdjust = mkOption { - type = types.bool; - default = false; - description = '' - Ignore oom_score_adjust values of processes. - ''; - }; + enableDebugInfo = mkOption { + type = types.bool; + default = false; + description = '' + Enable debugging messages. + ''; + }; - enableDebugInfo = mkOption { - type = types.bool; - default = false; - description = '' - Enable debugging messages. - ''; - }; + enableNotifications = mkOption { + type = types.bool; + default = false; + description = '' + Send notifications about killed processes via the system d-bus. - notificationsCommand = mkOption { - type = types.nullOr types.str; - default = null; - description = '' - This option is deprecated and ignored by earlyoom since 1.6. - Use instead. - ''; - }; + WARNING: enabling this option (while convenient) should *not* be done on a + machine where you do not trust the other users as it allows any other + local user to DoS your session by spamming notifications. - enableNotifications = mkOption { - type = types.bool; - default = false; - description = '' - Send notifications about killed processes via the system d-bus. - To actually see the notifications in your GUI session, you need to have - systembus-notify running as your user. + To actually see the notifications in your GUI session, you need to have + systembus-notify running as your user which this + option handles. - See README for details. - ''; - }; + See README for details. + ''; }; }; @@ -83,37 +75,30 @@ in (mkRemovedOptionModule [ "services" "earlyoom" "useKernelOOMKiller" ] '' This option is deprecated and ignored by earlyoom since 1.2. '') + (mkRemovedOptionModule [ "services" "earlyoom" "notificationsCommand" ] '' + This option is deprecated and ignored by earlyoom since 1.6. + '') ]; - config = mkIf ecfg.enable { - assertions = [ - { assertion = ecfg.freeMemThreshold > 0 && ecfg.freeMemThreshold <= 100; - message = "Needs to be a positive percentage"; } - { assertion = ecfg.freeSwapThreshold > 0 && ecfg.freeSwapThreshold <= 100; - message = "Needs to be a positive percentage"; } - ]; - - # TODO: reimplement this option as -N after 1.7 (https://github.com/rfjakob/earlyoom/commit/afe03606) - warnings = optional (ecfg.notificationsCommand != null) - "`services.earlyoom.notificationsCommand` is deprecated and ignored by earlyoom since 1.6."; + config = mkIf cfg.enable { + services.systembus-notify.enable = mkDefault cfg.enableNotifications; systemd.services.earlyoom = { description = "Early OOM Daemon for Linux"; wantedBy = [ "multi-user.target" ]; - path = optional ecfg.enableNotifications pkgs.dbus; + path = optional cfg.enableNotifications pkgs.dbus; serviceConfig = { - StandardOutput = "null"; StandardError = "journal"; ExecStart = concatStringsSep " " ([ "${pkgs.earlyoom}/bin/earlyoom" - "-m ${toString ecfg.freeMemThreshold}" - "-s ${toString ecfg.freeSwapThreshold}" - ] ++ optional ecfg.ignoreOOMScoreAdjust "-i" - ++ optional ecfg.enableDebugInfo "-d" - ++ optional ecfg.enableNotifications "-n"); + "-m ${toString cfg.freeMemThreshold}" + "-s ${toString cfg.freeSwapThreshold}" + ] + ++ optional cfg.ignoreOOMScoreAdjust "-i" + ++ optional cfg.enableDebugInfo "-d" + ++ optional cfg.enableNotifications "-n" + ); }; }; - - environment.systemPackages = optional ecfg.enableNotifications pkgs.systembus-notify; }; } diff --git a/nixos/modules/services/system/systembus-notify.nix b/nixos/modules/services/system/systembus-notify.nix new file mode 100644 index 00000000000..e918bc552ec --- /dev/null +++ b/nixos/modules/services/system/systembus-notify.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.systembus-notify; + + inherit (lib) mkEnableOption mkIf; + +in +{ + options.services.systembus-notify = { + enable = mkEnableOption '' + System bus notification support + + WARNING: enabling this option (while convenient) should *not* be done on a + machine where you do not trust the other users as it allows any other + local user to DoS your session by spamming notifications. + ''; + }; + + config = mkIf cfg.enable { + systemd = { + packages = with pkgs; [ systembus-notify ]; + + user.services.systembus-notify.wantedBy = [ "graphical-session.target" ]; + }; + }; +} diff --git a/nixos/modules/services/web-servers/pomerium.nix b/nixos/modules/services/web-servers/pomerium.nix index 2bc7d01c7c2..0b460755f50 100644 --- a/nixos/modules/services/web-servers/pomerium.nix +++ b/nixos/modules/services/web-servers/pomerium.nix @@ -69,11 +69,16 @@ in CERTIFICATE_KEY_FILE = "key.pem"; }; startLimitIntervalSec = 60; + script = '' + if [[ -v CREDENTIALS_DIRECTORY ]]; then + cd "$CREDENTIALS_DIRECTORY" + fi + exec "${pkgs.pomerium}/bin/pomerium" -config "${cfgFile}" + ''; serviceConfig = { DynamicUser = true; StateDirectory = [ "pomerium" ]; - ExecStart = "${pkgs.pomerium}/bin/pomerium -config ${cfgFile}"; PrivateUsers = false; # breaks CAP_NET_BIND_SERVICE MemoryDenyWriteExecute = false; # breaks LuaJIT @@ -99,7 +104,6 @@ in AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ]; - WorkingDirectory = mkIf (cfg.useACMEHost != null) "$CREDENTIALS_DIRECTORY"; LoadCredential = optionals (cfg.useACMEHost != null) [ "fullchain.pem:/var/lib/acme/${cfg.useACMEHost}/fullchain.pem" "key.pem:/var/lib/acme/${cfg.useACMEHost}/key.pem" @@ -124,7 +128,7 @@ in Type = "oneshot"; TimeoutSec = 60; ExecCondition = "/run/current-system/systemd/bin/systemctl -q is-active pomerium.service"; - ExecStart = "/run/current-system/systemd/bin/systemctl restart pomerium.service"; + ExecStart = "/run/current-system/systemd/bin/systemctl --no-block restart pomerium.service"; }; }; }); diff --git a/nixos/modules/services/web-servers/tomcat.nix b/nixos/modules/services/web-servers/tomcat.nix index f9446fe125a..877097cf378 100644 --- a/nixos/modules/services/web-servers/tomcat.nix +++ b/nixos/modules/services/web-servers/tomcat.nix @@ -23,8 +23,8 @@ in package = mkOption { type = types.package; - default = pkgs.tomcat85; - defaultText = literalExpression "pkgs.tomcat85"; + default = pkgs.tomcat9; + defaultText = literalExpression "pkgs.tomcat9"; example = lib.literalExpression "pkgs.tomcat9"; description = '' Which tomcat package to use. @@ -127,7 +127,7 @@ in webapps = mkOption { type = types.listOf types.path; default = [ tomcat.webapps ]; - defaultText = literalExpression "[ pkgs.tomcat85.webapps ]"; + defaultText = literalExpression "[ config.services.tomcat.package.webapps ]"; description = "List containing WAR files or directories with WAR files which are web applications to be deployed on Tomcat"; }; @@ -201,6 +201,7 @@ in { uid = config.ids.uids.tomcat; description = "Tomcat user"; home = "/homeless-shelter"; + group = "tomcat"; extraGroups = cfg.extraGroups; }; diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index a1653d451fe..07ee281feec 100644 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -10,6 +10,8 @@ use Net::DBus; use Sys::Syslog qw(:standard :macros); use Cwd 'abs_path'; +## no critic(CodeLayout::ProhibitParensWithBuiltins) + my $out = "@out@"; my $curSystemd = abs_path("/run/current-system/sw/bin"); @@ -36,13 +38,13 @@ my $dryReloadByActivationFile = "/run/nixos/dry-activation-reload-list"; make_path("/run/nixos", { mode => oct(755) }); -my $action = shift @ARGV; +my $action = shift(@ARGV); if ("@localeArchive@" ne "") { $ENV{LOCALE_ARCHIVE} = "@localeArchive@"; } -if (!defined $action || ($action ne "switch" && $action ne "boot" && $action ne "test" && $action ne "dry-activate")) { +if (!defined($action) || ($action ne "switch" && $action ne "boot" && $action ne "test" && $action ne "dry-activate")) { print STDERR < 'quiet') // "") =~ /ID="?nixos"?/s; openlog("nixos", "", LOG_USER); # Install or update the bootloader. if ($action eq "switch" || $action eq "boot") { - system("@installBootLoader@ $out") == 0 or exit 1; + system('@installBootLoader@', $out) == 0 or exit 1; } # Just in case the new configuration hangs the system, do a sync now. system("@coreutils@/bin/sync", "-f", "/nix/store") unless ($ENV{"NIXOS_NO_SYNC"} // "") eq "1"; -exit 0 if $action eq "boot"; +exit(0) if $action eq "boot"; # Check if we can activate the new configuration. my $oldVersion = read_file("/run/current-system/init-interface-version", err_mode => 'quiet') // ""; @@ -83,7 +85,7 @@ Warning: the new NixOS configuration has an ‘init’ that is incompatible with the current configuration. The new configuration won\'t take effect until you reboot the system. EOF - exit 100; + exit(100); } # Ignore SIGHUP so that we're not killed if we're running on (say) @@ -104,14 +106,27 @@ sub getActiveUnits { return $res; } +# Returns whether a systemd unit is active +sub unit_is_active { + my ($unit_name) = @_; + + my $mgr = Net::DBus->system->get_service('org.freedesktop.systemd1')->get_object('/org/freedesktop/systemd1'); + my $units = $mgr->ListUnitsByNames([$unit_name]); + if (scalar(@{$units}) == 0) { + return 0; + } + my $active_state = $units->[0]->[3]; ## no critic (ValuesAndExpressions::ProhibitMagicNumbers) + return $active_state eq 'active' || $active_state eq 'activating'; +} + sub parseFstab { my ($filename) = @_; my ($fss, $swaps); foreach my $line (read_file($filename, err_mode => 'quiet')) { - chomp $line; + chomp($line); $line =~ s/^\s*#.*//; next if $line =~ /^\s*$/; - my @xs = split / /, $line; + my @xs = split(/ /, $line); if ($xs[2] eq "swap") { $swaps->{$xs[0]} = { options => $xs[3] // "" }; } else { @@ -133,17 +148,16 @@ sub parseFstab { sub parseSystemdIni { my ($unitContents, $path) = @_; # Tie the ini file to a hash for easier access - my %fileContents; - tie %fileContents, "Config::IniFiles", (-file => $path, -allowempty => 1, -allowcontinue => 1); + tie(my %fileContents, 'Config::IniFiles', (-file => $path, -allowempty => 1, -allowcontinue => 1)); ## no critic(Miscellanea::ProhibitTies) # Copy over all sections - foreach my $sectionName (keys %fileContents) { + foreach my $sectionName (keys(%fileContents)) { if ($sectionName eq "Install") { # Skip the [Install] section because it has no relevant keys for us next; } # Copy over all keys - foreach my $iniKey (keys %{$fileContents{$sectionName}}) { + foreach my $iniKey (keys(%{$fileContents{$sectionName}})) { # Ensure the value is an array so it's easier to work with my $iniValue = $fileContents{$sectionName}{$iniKey}; my @iniValues; @@ -181,7 +195,7 @@ sub parse_unit { # Replace \ with \\ so glob() still works with units that have a \ in them # Valid characters in unit names are ASCII letters, digits, ":", "-", "_", ".", and "\" $unit_path =~ s/\\/\\\\/gmsx; - foreach (glob "${unit_path}{,.d/*.conf}") { + foreach (glob("${unit_path}{,.d/*.conf}")) { parseSystemdIni(\%unit_data, "$_") } return %unit_data; @@ -194,7 +208,7 @@ sub parseSystemdBool { my @values = @{$unitConfig->{$sectionName}{$boolName} // []}; # Return default if value is not set - if (scalar @values lt 1 || not defined $values[-1]) { + if (scalar(@values) lt 1 || not defined($values[-1])) { return $default; } # If value is defined multiple times, use the last definition @@ -211,7 +225,7 @@ sub recordUnit { # The opposite of recordUnit, removes a unit name from a file sub unrecord_unit { my ($fn, $unit) = @_; - edit_file { s/^$unit\n//msx } $fn if $action ne "dry-activate"; + edit_file(sub { s/^$unit\n//msx }, $fn) if $action ne "dry-activate"; } # Compare the contents of two unit files and return whether the unit @@ -226,6 +240,16 @@ sub unrecord_unit { sub compare_units { my ($old_unit, $new_unit) = @_; my $ret = 0; + # Keys to ignore in the [Unit] section + my %unit_section_ignores = map { $_ => 1 } qw( + X-Reload-Triggers + Description Documentation + OnFailure OnSuccess OnFailureJobMode + IgnoreOnIsolate StopWhenUnneeded + RefuseManualStart RefuseManualStop + AllowIsolate CollectMode + SourcePath + ); my $comp_array = sub { my ($a, $b) = @_; @@ -233,11 +257,23 @@ sub compare_units { }; # Comparison hash for the sections - my %section_cmp = map { $_ => 1 } keys %{$new_unit}; + my %section_cmp = map { $_ => 1 } keys(%{$new_unit}); # Iterate over the sections - foreach my $section_name (keys %{$old_unit}) { + foreach my $section_name (keys(%{$old_unit})) { # Missing section in the new unit? - if (not exists $section_cmp{$section_name}) { + if (not exists($section_cmp{$section_name})) { + # If the [Unit] section was removed, make sure that only keys + # were in it that are ignored + if ($section_name eq 'Unit') { + foreach my $ini_key (keys(%{$old_unit->{'Unit'}})) { + if (not defined($unit_section_ignores{$ini_key})) { + return 1; + } + } + next; # check the next section + } else { + return 1; + } if ($section_name eq 'Unit' and %{$old_unit->{'Unit'}} == 1 and defined(%{$old_unit->{'Unit'}}{'X-Reload-Triggers'})) { # If a new [Unit] section was removed that only contained X-Reload-Triggers, # do nothing. @@ -248,15 +284,15 @@ sub compare_units { } delete $section_cmp{$section_name}; # Comparison hash for the section contents - my %ini_cmp = map { $_ => 1 } keys %{$new_unit->{$section_name}}; + my %ini_cmp = map { $_ => 1 } keys(%{$new_unit->{$section_name}}); # Iterate over the keys of the section - foreach my $ini_key (keys %{$old_unit->{$section_name}}) { + foreach my $ini_key (keys(%{$old_unit->{$section_name}})) { delete $ini_cmp{$ini_key}; my @old_value = @{$old_unit->{$section_name}{$ini_key}}; # If the key is missing in the new unit, they are different... if (not $new_unit->{$section_name}{$ini_key}) { - # ... unless the key that is now missing was the reload trigger - if ($section_name eq 'Unit' and $ini_key eq 'X-Reload-Triggers') { + # ... unless the key that is now missing is one of the ignored keys + if ($section_name eq 'Unit' and defined($unit_section_ignores{$ini_key})) { next; } return 1; @@ -264,19 +300,30 @@ sub compare_units { my @new_value = @{$new_unit->{$section_name}{$ini_key}}; # If the contents are different, the units are different if (not $comp_array->(\@old_value, \@new_value)) { - # Check if only the reload triggers changed - if ($section_name eq 'Unit' and $ini_key eq 'X-Reload-Triggers') { - $ret = 2; - } else { - return 1; + # Check if only the reload triggers changed or one of the ignored keys + if ($section_name eq 'Unit') { + if ($ini_key eq 'X-Reload-Triggers') { + $ret = 2; + next; + } elsif (defined($unit_section_ignores{$ini_key})) { + next; + } } + return 1; } } # A key was introduced that was missing in the old unit if (%ini_cmp) { - if ($section_name eq 'Unit' and %ini_cmp == 1 and defined($ini_cmp{'X-Reload-Triggers'})) { - # If the newly introduced key was the reload triggers, reload the unit - $ret = 2; + if ($section_name eq 'Unit') { + foreach my $ini_key (keys(%ini_cmp)) { + if ($ini_key eq 'X-Reload-Triggers') { + $ret = 2; + } elsif (defined($unit_section_ignores{$ini_key})) { + next; + } else { + return 1; + } + } } else { return 1; } @@ -284,10 +331,14 @@ sub compare_units { } # A section was introduced that was missing in the old unit if (%section_cmp) { - if (%section_cmp == 1 and defined($section_cmp{'Unit'}) and %{$new_unit->{'Unit'}} == 1 and defined(%{$new_unit->{'Unit'}}{'X-Reload-Triggers'})) { - # If a new [Unit] section was introduced that only contains X-Reload-Triggers, - # reload instead of restarting - $ret = 2; + if (%section_cmp == 1 and defined($section_cmp{'Unit'})) { + foreach my $ini_key (keys(%{$new_unit->{'Unit'}})) { + if (not defined($unit_section_ignores{$ini_key})) { + return 1; + } elsif ($ini_key eq 'X-Reload-Triggers') { + $ret = 2; + } + } } else { return 1; } @@ -343,11 +394,11 @@ sub handleModifiedUnit { my $socket_activated = 0; if ($unit =~ /\.service$/) { my @sockets = split(/ /, join(" ", @{$unitInfo{Service}{Sockets} // []})); - if (scalar @sockets == 0) { + if (scalar(@sockets) == 0) { @sockets = ("$baseName.socket"); } foreach my $socket (@sockets) { - if (defined $activePrev->{$socket}) { + if (defined($activePrev->{$socket})) { # We can now be sure this is a socket-activate unit $unitsToStop->{$socket} = 1; @@ -355,7 +406,11 @@ sub handleModifiedUnit { # exist in new configuration: if (-e "$out/etc/systemd/system/$socket") { $unitsToStart->{$socket} = 1; - recordUnit($startListFile, $socket); + if ($unitsToStart eq $unitsToRestart) { + recordUnit($restartListFile, $socket); + } else { + recordUnit($startListFile, $socket); + } $socket_activated = 1; } # Remove from units to reload so we don't restart and reload @@ -373,7 +428,11 @@ sub handleModifiedUnit { # service gets restarted if we're interrupted. if (!$socket_activated) { $unitsToStart->{$unit} = 1; - recordUnit($startListFile, $unit); + if ($unitsToStart eq $unitsToRestart) { + recordUnit($restartListFile, $unit); + } else { + recordUnit($startListFile, $unit); + } } $unitsToStop->{$unit} = 1; @@ -401,8 +460,8 @@ $unitsToRestart{$_} = 1 foreach $unitsToReload{$_} = 1 foreach split('\n', read_file($reloadListFile, err_mode => 'quiet') // ""); -my $activePrev = getActiveUnits; -while (my ($unit, $state) = each %{$activePrev}) { +my $activePrev = getActiveUnits(); +while (my ($unit, $state) = each(%{$activePrev})) { my $baseUnit = $unit; my $prevUnitFile = "/etc/systemd/system/$baseUnit"; @@ -462,9 +521,9 @@ while (my ($unit, $state) = each %{$activePrev}) { my %old_unit_info = parse_unit($prevUnitFile); my %new_unit_info = parse_unit($newUnitFile); my $diff = compare_units(\%old_unit_info, \%new_unit_info); - if ($diff eq 1) { + if ($diff == 1) { handleModifiedUnit($unit, $baseName, $newUnitFile, \%new_unit_info, $activePrev, \%unitsToStop, \%unitsToStart, \%unitsToReload, \%unitsToRestart, \%unitsToSkip); - } elsif ($diff eq 2 and not $unitsToRestart{$unit}) { + } elsif ($diff == 2 and not $unitsToRestart{$unit}) { $unitsToReload{$unit} = 1; recordUnit($reloadListFile, $unit); } @@ -475,11 +534,11 @@ while (my ($unit, $state) = each %{$activePrev}) { sub pathToUnitName { my ($path) = @_; # Use current version of systemctl binary before daemon is reexeced. - open my $cmd, "-|", "$curSystemd/systemd-escape", "--suffix=mount", "-p", $path + open(my $cmd, "-|", "$curSystemd/systemd-escape", "--suffix=mount", "-p", $path) or die "Unable to escape $path!\n"; - my $escaped = join "", <$cmd>; - chomp $escaped; - close $cmd or die; + my $escaped = join("", <$cmd>); + chomp($escaped); + close($cmd) or die('Unable to close systemd-escape pipe'); return $escaped; } @@ -488,13 +547,13 @@ sub pathToUnitName { # automatically by starting local-fs.target. FIXME: might be nicer if # we generated units for all mounts; then we could unify this with the # unit checking code above. -my ($prevFss, $prevSwaps) = parseFstab "/etc/fstab"; -my ($newFss, $newSwaps) = parseFstab "$out/etc/fstab"; -foreach my $mountPoint (keys %$prevFss) { +my ($prevFss, $prevSwaps) = parseFstab("/etc/fstab"); +my ($newFss, $newSwaps) = parseFstab("$out/etc/fstab"); +foreach my $mountPoint (keys(%$prevFss)) { my $prev = $prevFss->{$mountPoint}; my $new = $newFss->{$mountPoint}; my $unit = pathToUnitName($mountPoint); - if (!defined $new) { + if (!defined($new)) { # Filesystem entry disappeared, so unmount it. $unitsToStop{$unit} = 1; } elsif ($prev->{fsType} ne $new->{fsType} || $prev->{device} ne $new->{device}) { @@ -510,10 +569,10 @@ foreach my $mountPoint (keys %$prevFss) { } # Also handles swap devices. -foreach my $device (keys %$prevSwaps) { +foreach my $device (keys(%$prevSwaps)) { my $prev = $prevSwaps->{$device}; my $new = $newSwaps->{$device}; - if (!defined $new) { + if (!defined($new)) { # Swap entry disappeared, so turn it off. Can't use # "systemctl stop" here because systemd has lots of alias # units that prevent a stop from actually calling @@ -544,8 +603,8 @@ if ($prevSystemdSystemConfig ne $newSystemdSystemConfig) { sub filterUnits { my ($units) = @_; my @res; - foreach my $unit (sort(keys %{$units})) { - push @res, $unit if !defined $unitsToFilter{$unit}; + foreach my $unit (sort(keys(%{$units}))) { + push(@res, $unit) if !defined($unitsToFilter{$unit}); } return @res; } @@ -556,9 +615,9 @@ my @unitsToStopFiltered = filterUnits(\%unitsToStop); # Show dry-run actions. if ($action eq "dry-activate") { print STDERR "would stop the following units: ", join(", ", @unitsToStopFiltered), "\n" - if scalar @unitsToStopFiltered > 0; - print STDERR "would NOT stop the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n" - if scalar(keys %unitsToSkip) > 0; + if scalar(@unitsToStopFiltered) > 0; + print STDERR "would NOT stop the following changed units: ", join(", ", sort(keys(%unitsToSkip))), "\n" + if scalar(keys(%unitsToSkip)) > 0; print STDERR "would activate the configuration...\n"; system("$out/dry-activate", "$out"); @@ -579,7 +638,7 @@ if ($action eq "dry-activate") { $baseName =~ s/\.[a-z]*$//; # Start units if they were not active previously - if (not defined $activePrev->{$unit}) { + if (not defined($activePrev->{$unit})) { $unitsToStart{$unit} = 1; next; } @@ -599,28 +658,28 @@ if ($action eq "dry-activate") { unlink($dryReloadByActivationFile); print STDERR "would restart systemd\n" if $restartSystemd; - print STDERR "would reload the following units: ", join(", ", sort(keys %unitsToReload)), "\n" - if scalar(keys %unitsToReload) > 0; - print STDERR "would restart the following units: ", join(", ", sort(keys %unitsToRestart)), "\n" - if scalar(keys %unitsToRestart) > 0; + print STDERR "would reload the following units: ", join(", ", sort(keys(%unitsToReload))), "\n" + if scalar(keys(%unitsToReload)) > 0; + print STDERR "would restart the following units: ", join(", ", sort(keys(%unitsToRestart))), "\n" + if scalar(keys(%unitsToRestart)) > 0; my @unitsToStartFiltered = filterUnits(\%unitsToStart); print STDERR "would start the following units: ", join(", ", @unitsToStartFiltered), "\n" - if scalar @unitsToStartFiltered; + if scalar(@unitsToStartFiltered); exit 0; } syslog(LOG_NOTICE, "switching to system configuration $out"); -if (scalar (keys %unitsToStop) > 0) { +if (scalar(keys(%unitsToStop)) > 0) { print STDERR "stopping the following units: ", join(", ", @unitsToStopFiltered), "\n" - if scalar @unitsToStopFiltered; + if scalar(@unitsToStopFiltered); # Use current version of systemctl binary before daemon is reexeced. - system("$curSystemd/systemctl", "stop", "--", sort(keys %unitsToStop)); + system("$curSystemd/systemctl", "stop", "--", sort(keys(%unitsToStop))); } -print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n" - if scalar(keys %unitsToSkip) > 0; +print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys(%unitsToSkip))), "\n" + if scalar(keys(%unitsToSkip)) > 0; # Activate the new configuration (i.e., update /etc, make accounts, # and so on). @@ -644,7 +703,7 @@ foreach (split('\n', read_file($restartByActivationFile, err_mode => 'quiet') // $baseName =~ s/\.[a-z]*$//; # Start units if they were not active previously - if (not defined $activePrev->{$unit}) { + if (not defined($activePrev->{$unit})) { $unitsToStart{$unit} = 1; recordUnit($startListFile, $unit); next; @@ -681,7 +740,7 @@ system("@systemd@/bin/systemctl", "reset-failed"); system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3; # Reload user units -open my $listActiveUsers, '-|', '@systemd@/bin/loginctl', 'list-users', '--no-legend'; +open(my $listActiveUsers, '-|', '@systemd@/bin/loginctl', 'list-users', '--no-legend'); while (my $f = <$listActiveUsers>) { next unless $f =~ /^\s*(?\d+)\s+(?\S+)/; my ($uid, $name) = ($+{uid}, $+{user}); @@ -693,25 +752,43 @@ while (my $f = <$listActiveUsers>) { "@systemd@/bin/systemctl --user start nixos-activation.service"); } -close $listActiveUsers; +close($listActiveUsers); # Set the new tmpfiles print STDERR "setting up tmpfiles\n"; system("@systemd@/bin/systemd-tmpfiles", "--create", "--remove", "--exclude-prefix=/dev") == 0 or $res = 3; +# Before reloading we need to ensure that the units are still active. They may have been +# deactivated because one of their requirements got stopped. If they are inactive +# but should have been reloaded, the user probably expects them to be started. +if (scalar(keys(%unitsToReload)) > 0) { + for my $unit (keys(%unitsToReload)) { + if (!unit_is_active($unit)) { + # Figure out if we need to start the unit + my %unit_info = parse_unit("$out/etc/systemd/system/$unit"); + if (!(parseSystemdBool(\%unit_info, 'Unit', 'RefuseManualStart', 0) || parseSystemdBool(\%unit_info, 'Unit', 'X-OnlyManualStart', 0))) { + $unitsToStart{$unit} = 1; + recordUnit($startListFile, $unit); + } + # Don't reload the unit, reloading would fail + delete %unitsToReload{$unit}; + unrecord_unit($reloadListFile, $unit); + } + } +} # Reload units that need it. This includes remounting changed mount # units. -if (scalar(keys %unitsToReload) > 0) { - print STDERR "reloading the following units: ", join(", ", sort(keys %unitsToReload)), "\n"; - system("@systemd@/bin/systemctl", "reload", "--", sort(keys %unitsToReload)) == 0 or $res = 4; +if (scalar(keys(%unitsToReload)) > 0) { + print STDERR "reloading the following units: ", join(", ", sort(keys(%unitsToReload))), "\n"; + system("@systemd@/bin/systemctl", "reload", "--", sort(keys(%unitsToReload))) == 0 or $res = 4; unlink($reloadListFile); } # Restart changed services (those that have to be restarted rather # than stopped and started). -if (scalar(keys %unitsToRestart) > 0) { - print STDERR "restarting the following units: ", join(", ", sort(keys %unitsToRestart)), "\n"; - system("@systemd@/bin/systemctl", "restart", "--", sort(keys %unitsToRestart)) == 0 or $res = 4; +if (scalar(keys(%unitsToRestart)) > 0) { + print STDERR "restarting the following units: ", join(", ", sort(keys(%unitsToRestart))), "\n"; + system("@systemd@/bin/systemctl", "restart", "--", sort(keys(%unitsToRestart))) == 0 or $res = 4; unlink($restartListFile); } @@ -723,17 +800,17 @@ if (scalar(keys %unitsToRestart) > 0) { # systemd. my @unitsToStartFiltered = filterUnits(\%unitsToStart); print STDERR "starting the following units: ", join(", ", @unitsToStartFiltered), "\n" - if scalar @unitsToStartFiltered; -system("@systemd@/bin/systemctl", "start", "--", sort(keys %unitsToStart)) == 0 or $res = 4; + if scalar(@unitsToStartFiltered); +system("@systemd@/bin/systemctl", "start", "--", sort(keys(%unitsToStart))) == 0 or $res = 4; unlink($startListFile); # Print failed and new units. my (@failed, @new); -my $activeNew = getActiveUnits; -while (my ($unit, $state) = each %{$activeNew}) { +my $activeNew = getActiveUnits(); +while (my ($unit, $state) = each(%{$activeNew})) { if ($state->{state} eq "failed") { - push @failed, $unit; + push(@failed, $unit); next; } @@ -743,7 +820,7 @@ while (my ($unit, $state) = each %{$activeNew}) { chomp($main_status); if ($main_status ne "0") { - push @failed, $unit; + push(@failed, $unit); next; } } @@ -751,19 +828,19 @@ while (my ($unit, $state) = each %{$activeNew}) { # Ignore scopes since they are not managed by this script but rather # created and managed by third-party services via the systemd dbus API. # This only lists units that are not failed (including ones that are in auto-restart but have not failed previously) - if ($state->{state} ne "failed" && !defined $activePrev->{$unit} && $unit !~ /\.scope$/msx) { - push @new, $unit; + if ($state->{state} ne "failed" && !defined($activePrev->{$unit}) && $unit !~ /\.scope$/msx) { + push(@new, $unit); } } -if (scalar @new > 0) { +if (scalar(@new) > 0) { print STDERR "the following new units were started: ", join(", ", sort(@new)), "\n" } -if (scalar @failed > 0) { - my @failed_sorted = sort @failed; +if (scalar(@failed) > 0) { + my @failed_sorted = sort(@failed); print STDERR "warning: the following units failed: ", join(", ", @failed_sorted), "\n\n"; - system "@systemd@/bin/systemctl status --no-pager --full '" . join("' '", @failed_sorted) . "' >&2"; + system("@systemd@/bin/systemctl status --no-pager --full '" . join("' '", @failed_sorted) . "' >&2"); $res = 4; } @@ -773,4 +850,4 @@ if ($res == 0) { syslog(LOG_ERR, "switching to system configuration $out failed (status $res)"); } -exit $res; +exit($res); diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py index adc89306309..fa879437fd8 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py @@ -15,9 +15,12 @@ import re import datetime import glob import os.path -from typing import Tuple, List, Optional +from typing import NamedTuple, List, Optional -SystemIdentifier = Tuple[Optional[str], int, Optional[str]] +class SystemIdentifier(NamedTuple): + profile: Optional[str] + generation: int + specialisation: Optional[str] def copy_if_not_exists(source: str, dest: str) -> None: @@ -151,7 +154,14 @@ def get_generations(profile: Optional[str] = None) -> List[SystemIdentifier]: gen_lines.pop() configurationLimit = @configurationLimit@ - configurations: List[SystemIdentifier] = [ (profile, int(line.split()[0]), None) for line in gen_lines ] + configurations = [ + SystemIdentifier( + profile=profile, + generation=int(line.split()[0]), + specialisation=None + ) + for line in gen_lines + ] return configurations[-configurationLimit:] @@ -160,7 +170,7 @@ def get_specialisations(profile: Optional[str], generation: int, _: Optional[str system_dir(profile, generation, None), "specialisation") if not os.path.exists(specialisations_dir): return [] - return [(profile, generation, spec) for spec in os.listdir(specialisations_dir)] + return [SystemIdentifier(profile, generation, spec) for spec in os.listdir(specialisations_dir)] def remove_old_entries(gens: List[SystemIdentifier]) -> None: @@ -271,7 +281,8 @@ def main() -> None: if os.readlink(system_dir(*gen)) == args.default_config: write_loader_conf(*gen) except OSError as e: - print("ignoring generation '{}' in the list of boot entries because of the following error:\n{}".format(*gen, e), file=sys.stderr) + profile = f"profile '{gen.profile}'" if gen.profile else "default profile" + print("ignoring {} in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr) for root, _, files in os.walk('@efiSysMountPoint@/efi/nixos/.extra-files', topdown=False): relative_root = root.removeprefix("@efiSysMountPoint@/efi/nixos/.extra-files").removeprefix("/") diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 043d8a56d0c..001518d02cb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -503,6 +503,7 @@ in systemd-boot = handleTest ./systemd-boot.nix {}; systemd-confinement = handleTest ./systemd-confinement.nix {}; systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {}; + systemd-escaping = handleTest ./systemd-escaping.nix {}; systemd-journal = handleTest ./systemd-journal.nix {}; systemd-machinectl = handleTest ./systemd-machinectl.nix {}; systemd-networkd = handleTest ./systemd-networkd.nix {}; @@ -524,6 +525,7 @@ in tinc = handleTest ./tinc {}; tinydns = handleTest ./tinydns.nix {}; tinywl = handleTest ./tinywl.nix {}; + tomcat = handleTest ./tomcat.nix {}; tor = handleTest ./tor.nix {}; # traefik test relies on docker-containers traefik = handleTestOn ["x86_64-linux"] ./traefik.nix {}; diff --git a/nixos/tests/empty-file b/nixos/tests/empty-file new file mode 100644 index 00000000000..e69de29bb2d diff --git a/nixos/tests/switch-test.nix b/nixos/tests/switch-test.nix index 78eb71f0a28..93eee4babc2 100644 --- a/nixos/tests/switch-test.nix +++ b/nixos/tests/switch-test.nix @@ -64,6 +64,11 @@ in { }; }; + simpleServiceDifferentDescription.configuration = { + imports = [ simpleService.configuration ]; + systemd.services.test.description = "Test unit"; + }; + simpleServiceModified.configuration = { imports = [ simpleService.configuration ]; systemd.services.test.serviceConfig.X-Test = true; @@ -203,6 +208,39 @@ in { systemd.services."escaped\\x2ddash".serviceConfig.X-Test = "test"; }; + unitWithRequirement.configuration = { + systemd.services.required-service = { + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = "${pkgs.coreutils}/bin/true"; + ExecReload = "${pkgs.coreutils}/bin/true"; + }; + }; + systemd.services.test-service = { + wantedBy = [ "multi-user.target" ]; + requires = [ "required-service.service" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = "${pkgs.coreutils}/bin/true"; + ExecReload = "${pkgs.coreutils}/bin/true"; + }; + }; + }; + + unitWithRequirementModified.configuration = { + imports = [ unitWithRequirement.configuration ]; + systemd.services.required-service.serviceConfig.X-Test = "test"; + systemd.services.test-service.reloadTriggers = [ "test" ]; + }; + + unitWithRequirementModifiedNostart.configuration = { + imports = [ unitWithRequirement.configuration ]; + systemd.services.test-service.unitConfig.RefuseManualStart = true; + }; + restart-and-reload-by-activation-script.configuration = { systemd.services = rec { simple-service = { @@ -350,6 +388,31 @@ in { systemd.timers.test-timer.timerConfig.OnCalendar = lib.mkForce "Fri 2012-11-23 16:00:00"; }; + hybridSleepModified.configuration = { + systemd.targets.hybrid-sleep.unitConfig.X-Test = true; + }; + + target.configuration = { + systemd.targets.test-target.wantedBy = [ "multi-user.target" ]; + # We use this service to figure out whether the target was modified. + # This is the only way because targets are filtered and therefore not + # printed when they are started/stopped. + systemd.services.test-service = { + bindsTo = [ "test-target.target" ]; + serviceConfig.ExecStart = "${pkgs.coreutils}/bin/sleep infinity"; + }; + }; + + targetModified.configuration = { + imports = [ target.configuration ]; + systemd.targets.test-target.unitConfig.X-Test = true; + }; + + targetModifiedStopOnReconfig.configuration = { + imports = [ target.configuration ]; + systemd.targets.test-target.unitConfig.X-StopOnReconfiguration = true; + }; + path.configuration = { systemd.paths.test-watch = { wantedBy = [ "paths.target" ]; @@ -472,6 +535,15 @@ in { assert_lacks(out, "\nstarting the following units:") assert_lacks(out, "the following new units were started:") + # Only changing the description does nothing + out = switch_to_specialisation("${machine}", "simpleServiceDifferentDescription") + assert_lacks(out, "stopping the following units:") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_lacks(out, "\nstarting the following units:") + assert_lacks(out, "the following new units were started:") + # Restart the simple service out = switch_to_specialisation("${machine}", "simpleServiceModified") assert_contains(out, "stopping the following units: test.service\n") @@ -535,6 +607,32 @@ in { assert_contains(out, "\nstarting the following units: escaped\\x2ddash.service\n") assert_lacks(out, "the following new units were started:") + # Ensure units that require changed units are properly reloaded + out = switch_to_specialisation("${machine}", "unitWithRequirement") + assert_contains(out, "stopping the following units: escaped\\x2ddash.service\n") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_lacks(out, "\nstarting the following units:") + assert_contains(out, "the following new units were started: required-service.service, test-service.service\n") + + out = switch_to_specialisation("${machine}", "unitWithRequirementModified") + assert_contains(out, "stopping the following units: required-service.service\n") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_contains(out, "\nstarting the following units: required-service.service, test-service.service\n") + assert_lacks(out, "the following new units were started:") + + # Unless the unit asks to be not restarted + out = switch_to_specialisation("${machine}", "unitWithRequirementModifiedNostart") + assert_contains(out, "stopping the following units: required-service.service\n") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_contains(out, "\nstarting the following units: required-service.service\n") + assert_lacks(out, "the following new units were started:") + with subtest("failing units"): # Let the simple service fail switch_to_specialisation("${machine}", "simpleServiceModified") @@ -821,6 +919,55 @@ in { out = machine.succeed("systemctl show test-timer.timer") assert_contains(out, "OnCalendar=Fri 2012-11-23 16:00:00") + with subtest("targets"): + # Modifying some special targets like hybrid-sleep.target does nothing + out = switch_to_specialisation("${machine}", "hybridSleepModified") + assert_contains(out, "stopping the following units: test-timer.timer\n") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_lacks(out, "\nstarting the following units:") + assert_lacks(out, "the following new units were started:") + + # Adding a new target starts it + out = switch_to_specialisation("${machine}", "target") + assert_lacks(out, "stopping the following units:") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_lacks(out, "\nstarting the following units:") + assert_contains(out, "the following new units were started: test-target.target\n") + + # Changing a target doesn't print anything because the unit is filtered + machine.systemctl("start test-service.service") + out = switch_to_specialisation("${machine}", "targetModified") + assert_lacks(out, "stopping the following units:") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_lacks(out, "\nstarting the following units:") + assert_lacks(out, "the following new units were started:") + machine.succeed("systemctl is-active test-service.service") # target was not restarted + + # With X-StopOnReconfiguration, the target gets stopped and started + out = switch_to_specialisation("${machine}", "targetModifiedStopOnReconfig") + assert_lacks(out, "stopping the following units:") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_lacks(out, "\nstarting the following units:") + assert_lacks(out, "the following new units were started:") + machine.fail("systemctl is-active test-service.servce") # target was restarted + + # Remove the target by switching to the old specialisation + out = switch_to_specialisation("${machine}", "timerModified") + assert_contains(out, "stopping the following units: test-target.target\n") + assert_lacks(out, "NOT restarting the following changed units:") + assert_lacks(out, "reloading the following units:") + assert_lacks(out, "\nrestarting the following units:") + assert_lacks(out, "\nstarting the following units:") + assert_contains(out, "the following new units were started: test-timer.timer\n") + with subtest("paths"): out = switch_to_specialisation("${machine}", "path") assert_contains(out, "stopping the following units: test-timer.timer\n") diff --git a/nixos/tests/systemd-escaping.nix b/nixos/tests/systemd-escaping.nix new file mode 100644 index 00000000000..7f93eb5e4f7 --- /dev/null +++ b/nixos/tests/systemd-escaping.nix @@ -0,0 +1,45 @@ +import ./make-test-python.nix ({ pkgs, ... }: + +let + echoAll = pkgs.writeScript "echo-all" '' + #! ${pkgs.runtimeShell} + for s in "$@"; do + printf '%s\n' "$s" + done + ''; + # deliberately using a local empty file instead of pkgs.emptyFile to have + # a non-store path in the test + args = [ "a%Nything" "lang=\${LANG}" ";" "/bin/sh -c date" ./empty-file 4.2 23 ]; +in +{ + name = "systemd-escaping"; + + machine = { pkgs, lib, utils, ... }: { + systemd.services.echo = + assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ [] ])).success; + assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ {} ])).success; + assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ null ])).success; + assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ false ])).success; + assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ (_:_) ])).success; + { description = "Echo to the journal"; + serviceConfig.Type = "oneshot"; + serviceConfig.ExecStart = '' + ${echoAll} ${utils.escapeSystemdExecArgs args} + ''; + }; + }; + + testScript = '' + machine.wait_for_unit("multi-user.target") + machine.succeed("systemctl start echo.service") + # skip the first 'Starting ...' line + logs = machine.succeed("journalctl -u echo.service -o cat").splitlines()[1:] + assert "a%Nything" == logs[0] + assert "lang=''${LANG}" == logs[1] + assert ";" == logs[2] + assert "/bin/sh -c date" == logs[3] + assert "/nix/store/ij3gw72f4n5z4dz6nnzl1731p9kmjbwr-empty-file" == logs[4] + assert "4.2" in logs[5] # toString produces extra fractional digits! + assert "23" == logs[6] + ''; +}) diff --git a/nixos/tests/tomcat.nix b/nixos/tests/tomcat.nix new file mode 100644 index 00000000000..e383f224e3d --- /dev/null +++ b/nixos/tests/tomcat.nix @@ -0,0 +1,21 @@ +import ./make-test-python.nix ({ pkgs, ... }: + +{ + name = "tomcat"; + + machine = { pkgs, ... }: { + services.tomcat.enable = true; + }; + + testScript = '' + machine.wait_for_unit("tomcat.service") + machine.wait_for_open_port(8080) + machine.wait_for_file("/var/tomcat/webapps/examples"); + machine.succeed( + "curl --fail http://localhost:8080/examples/servlets/servlet/HelloWorldExample | grep 'Hello World!'" + ) + machine.succeed( + "curl --fail http://localhost:8080/examples/jsp/jsp2/simpletag/hello.jsp | grep 'Hello, world!'" + ) + ''; +}) diff --git a/pkgs/applications/audio/squeezelite/default.nix b/pkgs/applications/audio/squeezelite/default.nix index 31fe69b00de..5fc0d6f4200 100644 --- a/pkgs/applications/audio/squeezelite/default.nix +++ b/pkgs/applications/audio/squeezelite/default.nix @@ -1,39 +1,50 @@ -{ lib, stdenv, fetchFromGitHub -, alsa-lib, flac, libmad, libvorbis, mpg123 +{ lib +, stdenv +, fetchFromGitHub +, alsa-lib +, flac +, libmad +, libpulseaudio +, libvorbis +, mpg123 +, audioBackend ? "alsa" , dsdSupport ? true -, faad2Support ? true, faad2 -, ffmpegSupport ? true, ffmpeg -, opusSupport ? true, opusfile -, resampleSupport ? true, soxr -, sslSupport ? true, openssl +, faad2Support ? true +, faad2 +, ffmpegSupport ? true +, ffmpeg +, opusSupport ? true +, opusfile +, resampleSupport ? true +, soxr +, sslSupport ? true +, openssl }: let - concatStringsSep = lib.concatStringsSep; - optional = lib.optional; - opts = [ "-DLINKALL" ] - ++ optional dsdSupport "-DDSD" - ++ optional (!faad2Support) "-DNO_FAAD" - ++ optional ffmpegSupport "-DFFMPEG" - ++ optional opusSupport "-DOPUS" - ++ optional resampleSupport "-DRESAMPLE" - ++ optional sslSupport "-DUSE_SSL"; + inherit (lib) optional optionalString; -in stdenv.mkDerivation { - pname = "squeezelite"; + pulseSupport = audioBackend == "pulse"; + binName = "squeezelite${optionalString pulseSupport "-pulse"}"; + +in +stdenv.mkDerivation { + # the nixos module uses the pname as the binary name + pname = binName; # versions are specified in `squeezelite.h` # see https://github.com/ralph-irving/squeezelite/issues/29 - version = "1.9.6.1196"; + version = "1.9.9.1401"; src = fetchFromGitHub { - owner = "ralph-irving"; - repo = "squeezelite"; - rev = "2b508464dce2cbdb2a3089c58df2a6fbc36328c0"; - sha256 = "024ypr1da2r079k3hgiifzd3d3wcfprhbl5zdm40zm0c7frzmr8i"; + owner = "ralph-irving"; + repo = "squeezelite"; + rev = "894df3ea80f66a27a9ae5fab918acf62a6798b8b"; + hash = "sha256-LIi+9vb0+56AGvVrLx4gQaUkUNjIi6PmqrLViLT1DSU="; }; - buildInputs = [ alsa-lib flac libmad libvorbis mpg123 ] + buildInputs = [ flac libmad libvorbis mpg123 ] + ++ lib.singleton (if pulseSupport then libpulseaudio else alsa-lib) ++ optional faad2Support faad2 ++ optional ffmpegSupport ffmpeg ++ optional opusSupport opusfile @@ -47,15 +58,22 @@ in stdenv.mkDerivation { --replace "" "" ''; - preBuild = '' - export OPTS="${concatStringsSep " " opts}" - ''; + EXECUTABLE = binName; + + OPTS = [ "-DLINKALL" ] + ++ optional dsdSupport "-DDSD" + ++ optional (!faad2Support) "-DNO_FAAD" + ++ optional ffmpegSupport "-DFFMPEG" + ++ optional opusSupport "-DOPUS" + ++ optional pulseSupport "-DPULSEAUDIO" + ++ optional resampleSupport "-DRESAMPLE" + ++ optional sslSupport "-DUSE_SSL"; installPhase = '' runHook preInstall - install -Dm755 -t $out/bin squeezelite - install -Dm644 -t $out/share/doc/squeezelite *.txt *.md + install -Dm555 -t $out/bin ${binName} + install -Dm444 -t $out/share/doc/squeezelite *.txt *.md runHook postInstall ''; @@ -63,7 +81,7 @@ in stdenv.mkDerivation { meta = with lib; { description = "Lightweight headless squeezebox client emulator"; homepage = "https://github.com/ralph-irving/squeezelite"; - license = with licenses; [ gpl3 ] ++ optional dsdSupport bsd2; + license = with licenses; [ gpl3Plus ] ++ optional dsdSupport bsd2; maintainers = with maintainers; [ samdoshi ]; platforms = platforms.linux; }; diff --git a/pkgs/applications/editors/jetbrains/darwin.nix b/pkgs/applications/editors/jetbrains/darwin.nix new file mode 100644 index 00000000000..b1002e23582 --- /dev/null +++ b/pkgs/applications/editors/jetbrains/darwin.nix @@ -0,0 +1,37 @@ +{ lib +, stdenvNoCC +, undmg +, ... +}: + +{ meta +, name +, product +, productShort ? product +, src +, version +, ... +}: + +let + loname = lib.toLower productShort; +in + stdenvNoCC.mkDerivation { + inherit meta src version; + desktopName = product; + installPhase = '' + runHook preInstall + APP_DIR="$out/Applications/${product}.app" + mkdir -p "$APP_DIR" + cp -Tr "${product}.app" "$APP_DIR" + mkdir -p "$out/bin" + cat << EOF > "$out/bin/${loname}" + open -na '$APP_DIR' --args "\$@" + EOF + chmod +x "$out/bin/${loname}" + runHook postInstall + ''; + nativeBuildInputs = [ undmg ]; + pname = lib.concatStringsSep "-" (lib.init (lib.splitString "-" name)); + sourceRoot = "."; + } diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index 5f4700c1662..b47c1270790 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -10,7 +10,18 @@ with lib; let - mkJetBrainsProduct = callPackage ./common.nix { inherit vmopts; }; + platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ]; + ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" ]; + + inherit (stdenv.hostPlatform) system; + + versions = builtins.fromJSON (readFile (./versions.json)); + versionKey = if stdenv.isLinux then "linux" else system; + products = versions.${versionKey} or (throw "Unsupported system: ${system}"); + + package = if stdenv.isDarwin then ./darwin.nix else ./linux.nix; + mkJetBrainsProduct = callPackage package { inherit vmopts; }; + # Sorted alphabetically buildClion = { name, version, src, license, description, wmClass, ... }: @@ -19,13 +30,12 @@ let product = "CLion"; meta = with lib; { homepage = "https://www.jetbrains.com/clion/"; - inherit description license; + inherit description license platforms; longDescription = '' Enhancing productivity for every C and C++ developer on Linux, macOS and Windows. ''; maintainers = with maintainers; [ edwtjo mic92 ]; - platforms = platforms.linux; }; }).overrideAttrs (attrs: { nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [ @@ -58,14 +68,13 @@ let product = "DataGrip"; meta = with lib; { homepage = "https://www.jetbrains.com/datagrip/"; - inherit description license; + inherit description license platforms; longDescription = '' DataGrip is a new IDE from JetBrains built for database admins. It allows you to quickly migrate and refactor relational databases, construct efficient, statically checked SQL queries and much more. ''; maintainers = with maintainers; [ ]; - platforms = platforms.linux; }; }); @@ -75,7 +84,7 @@ let product = "Goland"; meta = with lib; { homepage = "https://www.jetbrains.com/go/"; - inherit description license; + inherit description license platforms; longDescription = '' Goland is the codename for a new commercial IDE by JetBrains aimed at providing an ergonomic environment for Go development. @@ -83,10 +92,9 @@ let and tool integrations specific for the Go language ''; maintainers = [ maintainers.miltador ]; - platforms = platforms.linux; }; }).overrideAttrs (attrs: { - postFixup = (attrs.postFixup or "") + '' + postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux '' interp="$(cat $NIX_CC/nix-support/dynamic-linker)" patchelf --set-interpreter $interp $out/goland*/plugins/go/lib/dlv/linux/dlv @@ -98,10 +106,10 @@ let ''; }); - buildIdea = { name, version, src, license, description, wmClass, ... }: + buildIdea = { name, version, src, license, description, wmClass, product, ... }: (mkJetBrainsProduct { - inherit name version src wmClass jdk; - product = "IDEA"; + inherit name version src wmClass jdk product; + productShort = "IDEA"; extraLdPath = [ zlib ]; extraWrapperArgs = [ ''--set M2_HOME "${maven}/maven"'' @@ -116,18 +124,18 @@ let with JUnit, TestNG, popular SCMs, Ant & Maven. Also known as IntelliJ. ''; - maintainers = with maintainers; [ edwtjo gytis-ivaskevicius ]; - platforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" ]; + maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot ]; + platforms = ideaPlatforms; }; }); - buildMps = { name, version, src, license, description, wmClass, ... }: + buildMps = { name, version, src, license, description, wmClass, product, ... }: (mkJetBrainsProduct rec { - inherit name version src wmClass jdk; - product = "MPS"; + inherit name version src wmClass jdk product; + productShort = "MPS"; meta = with lib; { homepage = "https://www.jetbrains.com/mps/"; - inherit license description; + inherit license description platforms; longDescription = '' A metaprogramming system which uses projectional editing which allows users to overcome the limits of language @@ -135,7 +143,6 @@ let diagrams. ''; maintainers = with maintainers; [ rasendubi ]; - platforms = platforms.linux; }; }); @@ -145,24 +152,23 @@ let product = "PhpStorm"; meta = with lib; { homepage = "https://www.jetbrains.com/phpstorm/"; - inherit description license; + inherit description license platforms; longDescription = '' PhpStorm provides an editor for PHP, HTML and JavaScript with on-the-fly code analysis, error prevention and automated refactorings for PHP and JavaScript code. ''; maintainers = with maintainers; [ schristo ma27 ]; - platforms = platforms.linux; }; }); - buildPycharm = { name, version, src, license, description, wmClass, ... }: + buildPycharm = { name, version, src, license, description, wmClass, product, ... }: (mkJetBrainsProduct { - inherit name version src wmClass jdk; - product = "PyCharm"; + inherit name version src wmClass jdk product; + productShort = "PyCharm"; meta = with lib; { homepage = "https://www.jetbrains.com/pycharm/"; - inherit description license; + inherit description license platforms; longDescription = '' Python IDE with complete set of tools for productive development with Python programming language. In addition, the @@ -177,11 +183,8 @@ let and productive development! ''; maintainers = with maintainers; [ ]; - platforms = platforms.linux; }; - }).override { - propagatedUserEnvPkgs = [ python3 ]; - }; + }); buildRider = { name, version, src, license, description, wmClass, ... }: (mkJetBrainsProduct { @@ -189,7 +192,7 @@ let product = "Rider"; meta = with lib; { homepage = "https://www.jetbrains.com/rider/"; - inherit description license; + inherit description license platforms; longDescription = '' JetBrains Rider is a new .NET IDE based on the IntelliJ platform and ReSharper. Rider supports .NET Core, @@ -199,7 +202,6 @@ let ASP.NET Core web applications. ''; maintainers = [ maintainers.miltador ]; - platforms = platforms.linux; }; }).overrideAttrs (attrs: { postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + '' @@ -215,10 +217,9 @@ let product = "RubyMine"; meta = with lib; { homepage = "https://www.jetbrains.com/ruby/"; - inherit description license; + inherit description license platforms; longDescription = description; maintainers = with maintainers; [ edwtjo ]; - platforms = platforms.linux; }; }); @@ -228,14 +229,13 @@ let product = "WebStorm"; meta = with lib; { homepage = "https://www.jetbrains.com/webstorm/"; - inherit description license; + inherit description license platforms; longDescription = '' WebStorm provides an editor for HTML, JavaScript (incl. Node.js), and CSS with on-the-fly code analysis, error prevention and automated refactorings for JavaScript code. ''; maintainers = with maintainers; [ abaldeau ]; - platforms = platforms.linux; }; }).overrideAttrs (attrs: { postPatch = (attrs.postPatch or "") + optionalString (stdenv.isLinux) '' @@ -244,6 +244,7 @@ let rm -r jbr ''; }); + in { @@ -251,12 +252,12 @@ in clion = buildClion rec { name = "clion-${version}"; - version = "2021.3.3"; /* updated by script */ + version = products.clion.version; description = "C/C++ IDE. New. Intelligent. Cross-platform"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz"; - sha256 = "03gil00srq3jljc13iyb7v1yc6l6yhdhqm9d1ld2j2pympl6p61m"; /* updated by script */ + url = products.clion.url; + sha256 = products.clion.sha256; }; wmClass = "jetbrains-clion"; update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml @@ -264,12 +265,12 @@ in datagrip = buildDataGrip rec { name = "datagrip-${version}"; - version = "2021.3.4"; /* updated by script */ + version = products.datagrip.version; description = "Your Swiss Army Knife for Databases and SQL"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/datagrip/${name}.tar.gz"; - sha256 = "09dkxj5vn99gkgc1yd18w7gqkw2vzci0z9q2fcih0zn7lvqp0im3"; /* updated by script */ + url = products.datagrip.url; + sha256 = products.datagrip.sha256; }; wmClass = "jetbrains-datagrip"; update-channel = "DataGrip RELEASE"; @@ -277,12 +278,12 @@ in goland = buildGoland rec { name = "goland-${version}"; - version = "2021.3.3"; /* updated by script */ + version = products.goland.version; description = "Up and Coming Go IDE"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/go/${name}.tar.gz"; - sha256 = "18z4mvxhds5fgdwcfywc4pj8s9ifvsknhradgzmxsvji0fbp0awx"; /* updated by script */ + url = products.goland.url; + sha256 = products.goland.sha256; }; wmClass = "jetbrains-goland"; update-channel = "GoLand RELEASE"; @@ -290,12 +291,13 @@ in idea-community = buildIdea rec { name = "idea-community-${version}"; - version = "2021.3.2"; /* updated by script */ + product = "IntelliJ IDEA CE"; + version = products.idea-community.version; description = "Integrated Development Environment (IDE) by Jetbrains, community edition"; license = lib.licenses.asl20; src = fetchurl { - url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz"; - sha256 = "1j889b2r950bl9wiqq1z8v8s2qicidfcdar300cy666i8rc25qlr"; /* updated by script */ + url = products.idea-community.url; + sha256 = products.idea-community.sha256; }; wmClass = "jetbrains-idea-ce"; update-channel = "IntelliJ IDEA RELEASE"; @@ -303,12 +305,13 @@ in idea-ultimate = buildIdea rec { name = "idea-ultimate-${version}"; - version = "2021.3.2"; /* updated by script */ + product = "IntelliJ IDEA"; + version = products.idea-ultimate.version; description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz"; - sha256 = "0w36qnqgkvw6j1ks09h515237bhqfaixrimzg2r494ic98amvkps"; /* updated by script */ + url = products.idea-ultimate.url; + sha256 = products.idea-ultimate.sha256; }; wmClass = "jetbrains-idea"; update-channel = "IntelliJ IDEA RELEASE"; @@ -316,13 +319,13 @@ in mps = buildMps rec { name = "mps-${version}"; - version = "2021.3"; /* updated by script */ - versionMajorMinor = "2021.3"; /* updated by script */ + product = "MPS ${products.mps.version-major-minor}"; + version = products.mps.version; description = "Create your own domain-specific language"; license = lib.licenses.asl20; src = fetchurl { - url = "https://download.jetbrains.com/mps/${versionMajorMinor}/MPS-${version}.tar.gz"; - sha256 = "0zw5xqdlhjfg0smfjl8xy7drf9spiwqbmqq8z22x4zb61lpvdbp9"; /* updated by script */ + url = products.mps.url; + sha256 = products.mps.sha256; }; wmClass = "jetbrains-mps"; update-channel = "MPS RELEASE"; @@ -330,12 +333,12 @@ in phpstorm = buildPhpStorm rec { name = "phpstorm-${version}"; - version = "2021.3.2"; /* updated by script */ + version = products.phpstorm.version; description = "Professional IDE for Web and PHP developers"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz"; - sha256 = "1qi0zq3gzcfnikky37g2dqgmzm7r1883k6asris8nph389qk86vn"; /* updated by script */ + url = products.phpstorm.url; + sha256 = products.phpstorm.sha256; }; wmClass = "jetbrains-phpstorm"; update-channel = "PhpStorm RELEASE"; @@ -343,12 +346,13 @@ in pycharm-community = buildPycharm rec { name = "pycharm-community-${version}"; - version = "2021.3.2"; /* updated by script */ + product = "PyCharm CE"; + version = products.pycharm-community.version; description = "PyCharm Community Edition"; license = lib.licenses.asl20; src = fetchurl { - url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "1s36basydp7cxgbgdapjhkslx0x9vv3639xhm84ny76hf7s03bpi"; /* updated by script */ + url = products.pycharm-community.url; + sha256 = products.pycharm-community.sha256; }; wmClass = "jetbrains-pycharm-ce"; update-channel = "PyCharm RELEASE"; @@ -356,12 +360,13 @@ in pycharm-professional = buildPycharm rec { name = "pycharm-professional-${version}"; - version = "2021.3.2"; /* updated by script */ + product = "PyCharm"; + version = products.pycharm-professional.version; description = "PyCharm Professional Edition"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "0rwykngqgby05mh47kls8wzi68gfka2z04k6kdmsxwn1hhx5gnbb"; /* updated by script */ + url = products.pycharm-professional.url; + sha256 = products.pycharm-professional.sha256; }; wmClass = "jetbrains-pycharm"; update-channel = "PyCharm RELEASE"; @@ -369,12 +374,12 @@ in rider = buildRider rec { name = "rider-${version}"; - version = "2021.3.3"; /* updated by script */ + version = products.rider.version; description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz"; - sha256 = "13q6hk5l3fqmz818z5wj014jd5iglpdcpi8zlpgaim1jg5fpvi8x"; /* updated by script */ + url = products.rider.url; + sha256 = products.rider.sha256; }; wmClass = "jetbrains-rider"; update-channel = "Rider RELEASE"; @@ -382,12 +387,12 @@ in ruby-mine = buildRubyMine rec { name = "ruby-mine-${version}"; - version = "2021.3.2"; /* updated by script */ + version = products.ruby-mine.version; description = "The Most Intelligent Ruby and Rails IDE"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz"; - sha256 = "18ny40zl9hgkynkc5yyy2xqngl9diifh2gqrfnz7rfq14kp10xb9"; /* updated by script */ + url = products.ruby-mine.url; + sha256 = products.ruby-mine.sha256; }; wmClass = "jetbrains-rubymine"; update-channel = "RubyMine RELEASE"; @@ -395,12 +400,12 @@ in webstorm = buildWebStorm rec { name = "webstorm-${version}"; - version = "2021.3.2"; /* updated by script */ + version = products.webstorm.version; description = "Professional IDE for Web and JavaScript development"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz"; - sha256 = "0q2hn48499hv7licpl84ly0bhiizya8a69dl2vjvgscj3cdkr98q"; /* updated by script */ + url = products.webstorm.url; + sha256 = products.webstorm.sha256; }; wmClass = "jetbrains-webstorm"; update-channel = "WebStorm RELEASE"; diff --git a/pkgs/applications/editors/jetbrains/common.nix b/pkgs/applications/editors/jetbrains/linux.nix similarity index 83% rename from pkgs/applications/editors/jetbrains/common.nix rename to pkgs/applications/editors/jetbrains/linux.nix index a5e0a2611f0..d150368ca82 100644 --- a/pkgs/applications/editors/jetbrains/common.nix +++ b/pkgs/applications/editors/jetbrains/linux.nix @@ -3,17 +3,15 @@ , vmopts ? null }: -{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args: +{ name, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args: with lib; -let loName = toLower product; - hiName = toUpper product; +let loName = toLower productShort; + hiName = toUpper productShort; mainProgram = concatStringsSep "-" (init (splitString "-" name)); vmoptsName = loName - + ( if (with stdenv.hostPlatform; (is32bit || isDarwin)) - then "" - else "64" ) + + lib.optionalString stdenv.hostPlatform.is64bit "64" + ".vmoptions"; in @@ -36,7 +34,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec { nativeBuildInputs = [ makeWrapper patchelf unzip ]; - postPatch = lib.optionalString (!stdenv.isDarwin) '' + postPatch = '' get_file_size() { local fname="$1" echo $(ls -l $fname | cut -d ' ' -f5) @@ -73,7 +71,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec { item=${desktopItem} makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \ - --prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \ + --prefix PATH : "$out/libexec/${name}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([ # Some internals want libstdc++.so.6 stdenv.cc.cc.lib libsecret e2fsprogs diff --git a/pkgs/applications/editors/jetbrains/update.pl b/pkgs/applications/editors/jetbrains/update.pl deleted file mode 100755 index 201c51094dc..00000000000 --- a/pkgs/applications/editors/jetbrains/update.pl +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i perl -p perl perlPackages.LWPProtocolHttps perlPackages.FileSlurp - -use strict; -use List::Util qw(reduce); -use File::Slurp; -use LWP::Simple; - -my $only_free = grep { $_ eq "--only-free" } @ARGV; - -sub semantic_less { - my ($a, $b) = @_; - $a =~ s/\b(\d+)\b/sprintf("%010s", $1)/eg; - $b =~ s/\b(\d+)\b/sprintf("%010s", $1)/eg; - return $a lt $b; -} - -sub get_latest_versions { - my @channels = get("https://www.jetbrains.com/updates/updates.xml") =~ /()/gs; - my %h = {}; - for my $ch (@channels) { - my ($id) = $ch =~ /^)/gs; - my $latest_build = reduce { - my ($aversion) = $a =~ /^]*version="([^"]+)"/; die "no version in $a" unless $aversion; - my ($bversion) = $b =~ /^]*version="([^"]+)"/; die "no version in $b" unless $bversion; - semantic_less($aversion, $bversion) ? $b : $a; - } @builds; - next unless $latest_build; - - # version as in download url - my ($version) = $latest_build =~ /^]*version="([^"]+)"/; - my ($fullNumber) = $latest_build =~ /^]*fullNumber="([^"]+)"/; - my $latest_version_full1 = "$version-$fullNumber"; - $latest_version_full1 =~ s/\s*EAP//; - - my ($latest_version) = $latest_build =~ /^]*version="([^"]+)"/; - ($latest_version) = $latest_build =~ /^]*fullNumber="([^"]+)"/ if $latest_version =~ / /; - - $h{$id} = $latest_version; - $h{"full1_" . $id} = $latest_version_full1; - } - return %h; -} - -my %latest_versions = get_latest_versions(); -# for my $ch (sort keys %latest_versions) { -# print("$ch $latest_versions{$ch}\n"); -# } - -sub update_nix_block { - my ($block) = @_; - my ($channel) = $block =~ /update-channel\s*=\s*"([^"]+)"/; - if ($channel) { - if ($latest_versions{$channel}) { - my ($version) = $block =~ /version\s*=\s*"([^"]+)"/; - die "no version in $block" unless $version; - if ($version eq $latest_versions{$channel}) { - print("$channel is up to date at $version\n"); - } elsif ($only_free && $block =~ /licenses\.unfree/) { - print("$channel is unfree, skipping\n"); - } else { - my $version_string = $latest_versions{$channel}; - my $versionMajorMinor = $version_string =~ s/^([0-9]+[.][0-9]+).*/$1/r; - - print("updating $channel: $version -> $version_string\n"); - my ($url) = $block =~ /url\s*=\s*"([^"]+)"/; - # try to interpret some nix - my ($name) = $block =~ /name\s*=\s*"([^"]+)"/; - $name =~ s/\$\{version\}/$version_string/; - # Some url pattern contain variables more than once - $url =~ s/\$\{name\}/$name/g; - $url =~ s/\$\{version\}/$version_string/g; - $url =~ s/\$\{versionMajorMinor\}/$versionMajorMinor/g; - die "$url still has some interpolation" if $url =~ /\$/; - my ($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/; - unless ( $sha256 ) { - my $full_version = $latest_versions{"full1_" . $channel}; - $url =~ s/$version_string/$full_version/; - ($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/; - $version_string = $full_version; - } - die "invalid sha256 in $url.sha256" unless $sha256; - my ($sha256Base32) = readpipe("nix-hash --type sha256 --to-base32 $sha256"); - chomp $sha256Base32; - print "Jetbrains published SHA256: $sha256\n"; - print "Conversion into base32 yields: $sha256Base32\n"; - $block =~ s#version\s*=\s*"([^"]+)".+$#version = "$version_string"; /* updated by script */#m; - $block =~ s#versionMajorMinor\s*=\s*"([^"]+)".+$#versionMajorMinor = "$versionMajorMinor"; /* updated by script */#m; - $block =~ s#sha256\s*=\s*"([^"]+)".+$#sha256 = "$sha256Base32"; /* updated by script */#m; - } - } else { - warn "unknown update-channel $channel"; - } - } - return $block; -} - -my $nix = read_file 'default.nix'; -$nix =~ s/(= build\w+ rec \{.+?\n \};\n)/update_nix_block($1)/gse; -write_file 'default.nix', $nix; diff --git a/pkgs/applications/editors/jetbrains/update.py b/pkgs/applications/editors/jetbrains/update.py new file mode 100755 index 00000000000..5301a85ba9a --- /dev/null +++ b/pkgs/applications/editors/jetbrains/update.py @@ -0,0 +1,97 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i python3 -p python3 python3.pkgs.packaging python3.pkgs.requests python3.pkgs.xmltodict +import hashlib +import json +import pathlib +import logging +import requests +import sys +import xmltodict +from packaging import version + +updates_url = "https://www.jetbrains.com/updates/updates.xml" +versions_file_path = pathlib.Path(__file__).parent.joinpath("versions.json").resolve() + +logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) + + +def one_or_more(x): + return x if isinstance(x, list) else [x] + + +def download_channels(): + logging.info("Checking for updates from %s", updates_url) + updates_response = requests.get(updates_url) + updates_response.raise_for_status() + root = xmltodict.parse(updates_response.text) + products = root["products"]["product"] + return { + channel["@name"]: channel + for product in products + for channel in one_or_more(product["channel"]) + } + + +def build_version(build): + return version.parse(build["@version"]) + + +def latest_build(channel): + builds = one_or_more(channel["build"]) + latest = max(builds, key=build_version) + return latest + + +def download_sha256(url): + download_response = requests.get(url) + download_response.raise_for_status() + h = hashlib.sha256() + h.update(download_response.content) + return h.hexdigest() + + +channels = download_channels() + + +def update_product(name, product): + update_channel = product["update-channel"] + logging.info("Updating %s", name) + channel = channels.get(update_channel) + if channel is None: + logging.error("Failed to find channel %s.", update_channel) + logging.error("Check that the update-channel in %s matches the name in %s", versions_file_path, updates_url) + else: + try: + build = latest_build(channel) + version = build["@version"] + parsed_version = build_version(build) + version_major_minor = f"{parsed_version.major}.{parsed_version.minor}" + download_url = product["url-template"].format(version = version, versionMajorMinor = version_major_minor) + product["url"] = download_url + product["version-major-minor"] = version_major_minor + if "sha256" not in product or product.get("version") != version: + logging.info("Found a newer version %s.", version) + product["version"] = version + product["sha256"] = download_sha256(download_url) + else: + logging.info("Already at the latest version %s.", version) + except Exception as e: + logging.exception("Update failed:", exc_info=e) + logging.warning("Skipping %s due to the above error.", name) + logging.warning("It may be out-of-date. Fix the error and rerun.") + + +def update_products(products): + for name, product in products.items(): + update_product(name, product) + + +with open(versions_file_path, "r") as versions_file: + versions = json.load(versions_file) + +for products in versions.values(): + update_products(products) + +with open(versions_file_path, "w") as versions_file: + json.dump(versions, versions_file, indent=2) + versions_file.write("\n") diff --git a/pkgs/applications/editors/jetbrains/versions.json b/pkgs/applications/editors/jetbrains/versions.json new file mode 100644 index 00000000000..83f486edfcf --- /dev/null +++ b/pkgs/applications/editors/jetbrains/versions.json @@ -0,0 +1,296 @@ +{ + "linux": { + "clion": { + "update-channel": "CLion RELEASE", + "url-template": "https://download.jetbrains.com/cpp/CLion-{version}.tar.gz", + "version": "2021.3.3", + "sha256": "35986be8adfe0a291a0d2d550c1bf4861ae6c33ecbc71198a472e0ac01a0f10d", + "url": "https://download.jetbrains.com/cpp/CLion-2021.3.3.tar.gz", + "version-major-minor": "2021.3" + }, + "datagrip": { + "update-channel": "DataGrip RELEASE", + "url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}.tar.gz", + "version": "2021.3.4", + "sha256": "a34670f1a6c77e00237302a70f22fb5bf089dfe128341fd89b2f25bb8becb325", + "url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4.tar.gz", + "version-major-minor": "2021.3" + }, + "goland": { + "update-channel": "GoLand RELEASE", + "url-template": "https://download.jetbrains.com/go/goland-{version}.tar.gz", + "version": "2021.3.3", + "sha256": "9d2b709703516eddeb7f4d6568a7de2e268de4258c7bc7787baee806fbaee4a3", + "url": "https://download.jetbrains.com/go/goland-2021.3.3.tar.gz", + "version-major-minor": "2021.3" + }, + "idea-community": { + "update-channel": "IntelliJ IDEA RELEASE", + "url-template": "https://download.jetbrains.com/idea/ideaIC-{version}.tar.gz", + "version": "2021.3.2", + "sha256": "99e2225846d118e3190023abc65c8b2c62a1d1463f601c79a20b9494c54a08c9", + "url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2.tar.gz", + "version-major-minor": "2021.3" + }, + "idea-ultimate": { + "update-channel": "IntelliJ IDEA RELEASE", + "url-template": "https://download.jetbrains.com/idea/ideaIU-{version}-no-jbr.tar.gz", + "version": "2021.3.2", + "sha256": "face5d154a2c9244b278bfc6dca37218ae3344090526a0679086eff9b0c56670", + "url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2-no-jbr.tar.gz", + "version-major-minor": "2021.3" + }, + "mps": { + "update-channel": "MPS RELEASE", + "url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}.tar.gz", + "version": "2021.3", + "sha256": "e9aeb62f0d667dd285f808e3ba308f572797dbf11d51e9aa06cf49481bee857f", + "url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3.tar.gz", + "version-major-minor": "2021.3" + }, + "phpstorm": { + "update-channel": "PhpStorm RELEASE", + "url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}.tar.gz", + "version": "2021.3.2", + "sha256": "761b347142035e8b74cc5a9939100af9d45f1f6ee29de1e78cd6b1ff06fe20e2", + "url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2.tar.gz", + "version-major-minor": "2021.3" + }, + "pycharm-community": { + "update-channel": "PyCharm RELEASE", + "url-template": "https://download.jetbrains.com/python/pycharm-community-{version}.tar.gz", + "version": "2021.3.2", + "sha256": "f1ae01f471d01c6f09aab0a761c6dea9834ef584f2aaf6d6ebecdce6b55a66e8", + "url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2.tar.gz", + "version-major-minor": "2021.3" + }, + "pycharm-professional": { + "update-channel": "PyCharm RELEASE", + "url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}.tar.gz", + "version": "2021.3.2", + "sha256": "6bd9573a84c1f2ae6b9b6612f0859aee21133f479ace43602dc0af879f9d9e67", + "url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.tar.gz", + "version-major-minor": "2021.3" + }, + "rider": { + "update-channel": "Rider RELEASE", + "url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}.tar.gz", + "version": "2021.3.3", + "sha256": "1dc57d5d7932d4a8dea51fc5cbdaa52f9626490092978f02fa15bb41cb84068f", + "url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3.tar.gz", + "version-major-minor": "2021.3" + }, + "ruby-mine": { + "update-channel": "RubyMine RELEASE", + "url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}.tar.gz", + "version": "2021.3.2", + "sha256": "697510ee2401bb7cbe75193f015d8c2dd1677117defbc2a6f5f3c1443f20dea2", + "url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2.tar.gz", + "version-major-minor": "2021.3" + }, + "webstorm": { + "update-channel": "WebStorm RELEASE", + "url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}.tar.gz", + "version": "2021.3.2", + "sha256": "18a53c1b1b92e9b7e516b425a390f23f46b880a704d1cb223d1ba64410b15060", + "url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2.tar.gz", + "version-major-minor": "2021.3" + } + }, + "x86_64-darwin": { + "clion": { + "update-channel": "CLion RELEASE", + "url-template": "https://download.jetbrains.com/cpp/CLion-{version}.dmg", + "version": "2021.3.3", + "sha256": "342a4d8549ae4623a5edfa7f9737887cf0a25c1a61bb414b54b742b1c5a1a84d", + "url": "https://download.jetbrains.com/cpp/CLion-2021.3.3.dmg", + "version-major-minor": "2021.3" + }, + "datagrip": { + "update-channel": "DataGrip RELEASE", + "url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}.dmg", + "version": "2021.3.4", + "sha256": "27e709d2ced66d37a615d8c56885828e49a08962708e28df1a20f324c626bf52", + "url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4.dmg", + "version-major-minor": "2021.3" + }, + "goland": { + "update-channel": "GoLand RELEASE", + "url-template": "https://download.jetbrains.com/go/goland-{version}.dmg", + "version": "2021.3.3", + "sha256": "4b245b6fe0cf588adbf36e68f12397d5fd311b0b6d49f17ba374ebaa10d207c9", + "url": "https://download.jetbrains.com/go/goland-2021.3.3.dmg", + "version-major-minor": "2021.3" + }, + "idea-community": { + "update-channel": "IntelliJ IDEA RELEASE", + "url-template": "https://download.jetbrains.com/idea/ideaIC-{version}.dmg", + "version": "2021.3.2", + "sha256": "20d8cee2bbedaeb0ea388f795e13d08eca5b59e59d4e980ac2d8bc07c9fed3e9", + "url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2.dmg", + "version-major-minor": "2021.3" + }, + "idea-ultimate": { + "update-channel": "IntelliJ IDEA RELEASE", + "url-template": "https://download.jetbrains.com/idea/ideaIU-{version}.dmg", + "version": "2021.3.2", + "sha256": "9f574562b866e6ccc3d2f9b4c245c45844d1d0fd54be3dbdcc893d40ba1cf54a", + "url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2.dmg", + "version-major-minor": "2021.3" + }, + "mps": { + "update-channel": "MPS RELEASE", + "url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}-macos.dmg", + "version": "2021.3", + "sha256": "2c5517518fec31ac960e4309fa848ad831f9048ef15df1b362e12aa8f41d9dbd", + "url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3-macos.dmg", + "version-major-minor": "2021.3" + }, + "phpstorm": { + "update-channel": "PhpStorm RELEASE", + "url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}.dmg", + "version": "2021.3.2", + "sha256": "596a9d5fdc30d5fba65ddd482da90f9d555fed748b930587562022bfe7df4e14", + "url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2.dmg", + "version-major-minor": "2021.3" + }, + "pycharm-community": { + "update-channel": "PyCharm RELEASE", + "url-template": "https://download.jetbrains.com/python/pycharm-community-{version}.dmg", + "version": "2021.3.2", + "sha256": "b8f41f5dddeda0ed5f5c81ba57d2560ccc6e227987882fb6bf305b5d1d8c6909", + "url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2.dmg", + "version-major-minor": "2021.3" + }, + "pycharm-professional": { + "update-channel": "PyCharm RELEASE", + "url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}.dmg", + "version": "2021.3.2", + "sha256": "188b998660e7cfb7ac1364c818c008a5608ab2aeb17c6cc19d1d9dda547d3775", + "url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.dmg", + "version-major-minor": "2021.3" + }, + "rider": { + "update-channel": "Rider RELEASE", + "url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}.dmg", + "version": "2021.3.3", + "sha256": "41a0939cb6258a0fb303268c5a466a663cf3588af14bcbb351be4c3a1d158094", + "url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3.dmg", + "version-major-minor": "2021.3" + }, + "ruby-mine": { + "update-channel": "RubyMine RELEASE", + "url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}.dmg", + "version": "2021.3.2", + "sha256": "ba27c14b21d66ca96a64ceb7dc5d9f0952254a5f405b3201f51d2ad3cc749a96", + "url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2.dmg", + "version-major-minor": "2021.3" + }, + "webstorm": { + "update-channel": "WebStorm RELEASE", + "url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}.dmg", + "version": "2021.3.2", + "sha256": "932d4920f831d1ceae68a474444c37d986277d8d3288d3aab93dd43d99336a36", + "url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2.dmg", + "version-major-minor": "2021.3" + } + }, + "aarch64-darwin": { + "clion": { + "update-channel": "CLion RELEASE", + "url-template": "https://download.jetbrains.com/cpp/CLion-{version}-aarch64.dmg", + "version": "2021.3.3", + "sha256": "fbf651fa4a5925fe729be30ca8a6fa3be84dc4d7827dbcf74f4d28c52b903cc2", + "url": "https://download.jetbrains.com/cpp/CLion-2021.3.3-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "datagrip": { + "update-channel": "DataGrip RELEASE", + "url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}-aarch64.dmg", + "version": "2021.3.4", + "sha256": "7a77ba9fce56c781ae6a4fc65eaab4bcc10780b6bd679b04d74146719e42890a", + "url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "goland": { + "update-channel": "GoLand RELEASE", + "url-template": "https://download.jetbrains.com/go/goland-{version}-aarch64.dmg", + "version": "2021.3.3", + "sha256": "54397d48e20fb534206e13f84b35868b1eaea13175176487b1239b23db4e13db", + "url": "https://download.jetbrains.com/go/goland-2021.3.3-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "idea-community": { + "update-channel": "IntelliJ IDEA RELEASE", + "url-template": "https://download.jetbrains.com/idea/ideaIC-{version}-aarch64.dmg", + "version": "2021.3.2", + "sha256": "79e540fb0cd480837b3a954e4802f4f252073955393e8927c9c1b28c37112d51", + "url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "idea-ultimate": { + "update-channel": "IntelliJ IDEA RELEASE", + "url-template": "https://download.jetbrains.com/idea/ideaIU-{version}-aarch64.dmg", + "version": "2021.3.2", + "sha256": "511c6aed9c5cd4c7665a9bac9ba94582977013244cbe88b820eb5464fce91a1c", + "url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "mps": { + "update-channel": "MPS RELEASE", + "url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}-macos-aarch64.dmg", + "version": "2021.3", + "url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3-macos-aarch64.dmg", + "sha256": "3ace6d45db718dffd80bf126a76735fb65099de292112a01cc078aa61c475a70", + "version-major-minor": "2021.3" + }, + "phpstorm": { + "update-channel": "PhpStorm RELEASE", + "url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}-aarch64.dmg", + "version": "2021.3.2", + "sha256": "ba15c3f843c85141a9adaec1c4611224a853bd98649148751e34ac304591a314", + "url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "pycharm-community": { + "update-channel": "PyCharm RELEASE", + "url-template": "https://download.jetbrains.com/python/pycharm-community-{version}-aarch64.dmg", + "version": "2021.3.2", + "sha256": "407bf395cfb6d61f1c0861c7679b197238780e82a019e10162b8cd7130edb15a", + "url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "pycharm-professional": { + "update-channel": "PyCharm RELEASE", + "url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}-aarch64.dmg", + "version": "2021.3.2", + "sha256": "12fa34d1e60a555bac230acea9cd46c7adfe9ca42ff3e458c79d33e5b88eb8db", + "url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "rider": { + "update-channel": "Rider RELEASE", + "url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}-aarch64.dmg", + "version": "2021.3.3", + "sha256": "65603860d1fd3134c5659f5a06de7cac17f3183a01056b79cfe72242b99adb37", + "url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "ruby-mine": { + "update-channel": "RubyMine RELEASE", + "url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}-aarch64.dmg", + "version": "2021.3.2", + "sha256": "33773222b2fa14300de5ed12ca96c3442b933f66cef67cebc9610e5cef51c75e", + "url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2-aarch64.dmg", + "version-major-minor": "2021.3" + }, + "webstorm": { + "update-channel": "WebStorm RELEASE", + "url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}-aarch64.dmg", + "version": "2021.3.2", + "sha256": "f4788ec0c55123b1f4e14934792f65bf8040e2a2ee673e985b50b8feded60408", + "url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2-aarch64.dmg", + "version-major-minor": "2021.3" + } + } +} diff --git a/pkgs/applications/editors/sigil/default.nix b/pkgs/applications/editors/sigil/default.nix index 0da5a2c2550..b93fbd6110f 100644 --- a/pkgs/applications/editors/sigil/default.nix +++ b/pkgs/applications/editors/sigil/default.nix @@ -6,13 +6,13 @@ mkDerivation rec { pname = "sigil"; - version = "1.9.1"; + version = "1.9.2"; src = fetchFromGitHub { repo = "Sigil"; owner = "Sigil-Ebook"; rev = version; - sha256 = "sha256-PsHliyJu61QFTFZUgDtxguu18GBVTOGMW6pPYjHhvG0="; + sha256 = "sha256-LfP3qUzoHuYSpkTz1queVGTWOP9v9kbgbgvvtiMK6Eo="; }; pythonPath = with python3Packages; [ lxml ]; diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index 7fc805a8b11..370647de1fc 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -14,17 +14,17 @@ let archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz"; sha256 = { - x86_64-linux = "09hqcym8dj4d8r5ibdzypdmjxdw4ix24zq688vnb4kfas2jbb3hi"; - x86_64-darwin = "1wij82gl1wqrprrfn9cfih19wr4h3bn2xapr1l2l0mkansrzsvg5"; - aarch64-linux = "09x93i190lmxb3ygzjcmb7ag3dz7ixf07yk7zqc7ljrnn5f0b6ag"; - aarch64-darwin = "1k7glnqy0vjx55chjpwbgwipcvzb0vx0wmvqis865pvzmr0d06a0"; - armv7l-linux = "0vkivg1f61k8vkr0j9dm7fw2klh45xxnp07pill1gmrwxafm5bra"; + x86_64-linux = "0x8vc6gj83mn767wi285k0hxhlh5gh1lcvq63na89vglja4ipna4"; + x86_64-darwin = "1x47xfq0fgd10wq6aa8gq55aqrl1ir1f6v1mm6324yny16pf20k2"; + aarch64-linux = "1ibg2qvpnwfwwzgby2xva9xz138b13x9q8vf1xf6plazv0arla1l"; + aarch64-darwin = "100834mqix7b46frlqf0jz4qs673lavxm8sizfjm7c9y0xxy4ld3"; + armv7l-linux = "100yfkzvnjccp1g3p353jr2vicvkjc0skiwmmzgad6i8j1m9js62"; }.${system}; in callPackage ./generic.nix rec { # Please backport all compatible updates to the stable release. # This is important for the extension ecosystem. - version = "1.65.1"; + version = "1.65.2"; pname = "vscode"; executableName = "code" + lib.optionalString isInsiders "-insiders"; diff --git a/pkgs/applications/emulators/cdemu/vhba.nix b/pkgs/applications/emulators/cdemu/vhba.nix index aeadcf5c1c1..40792c81ac1 100644 --- a/pkgs/applications/emulators/cdemu/vhba.nix +++ b/pkgs/applications/emulators/cdemu/vhba.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-csWowcRSgF5M74yv787MLSXOGXrkxnODCCgC5a3Nd7Y="; }; - makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" ]; + makeFlags = kernel.makeFlags ++ [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" ]; nativeBuildInputs = kernel.moduleBuildDependencies; meta = with lib; { diff --git a/pkgs/applications/emulators/fceux/default.nix b/pkgs/applications/emulators/fceux/default.nix index 9289fb081f0..0247a10f0e5 100644 --- a/pkgs/applications/emulators/fceux/default.nix +++ b/pkgs/applications/emulators/fceux/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "fceux"; - version = "2.6.2"; + version = "2.6.3"; src = fetchFromGitHub { owner = "TASEmulators"; repo = pname; rev = "${pname}-${version}"; - sha256 = "sha256-yQX58m/sMW/8Jr5cm2SrVXTiF7qyZOgOZg1v0qEyiLw="; + sha256 = "sha256-jNR9AB8s2S9ehYsompkV2GOLsaXIQzldeQ1WRCxdDG0="; }; nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; diff --git a/pkgs/applications/graphics/lightburn/default.nix b/pkgs/applications/graphics/lightburn/default.nix index bbc0c2d9128..05a99527e5f 100644 --- a/pkgs/applications/graphics/lightburn/default.nix +++ b/pkgs/applications/graphics/lightburn/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { pname = "lightburn"; - version = "1.1.01"; + version = "1.1.03"; nativeBuildInputs = [ p7zip @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/LightBurnSoftware/deployment/releases/download/${version}/LightBurn-Linux64-v${version}.7z"; - sha256 = "sha256-HgyqpZTf9GTsbDi1+e20YNoFIPYtTHQd8KC626G0038="; + sha256 = "sha256-X7hAkzVqIABpyFokiYaMGZqSda69cKhKghFDWDEVOow="; }; buildInputs = [ diff --git a/pkgs/applications/graphics/nsxiv/default.nix b/pkgs/applications/graphics/nsxiv/default.nix index 8c414c37247..c1ebbd57c0d 100644 --- a/pkgs/applications/graphics/nsxiv/default.nix +++ b/pkgs/applications/graphics/nsxiv/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "nsxiv"; - version = "28"; + version = "29"; src = fetchFromGitHub { owner = "nsxiv"; repo = pname; rev = "v${version}"; - hash = "sha256-12RmEAzZdeanrRtnan96loXT7qSjIMjcWf296XmNE+A="; + hash = "sha256-JUF2cF6QeAXk6G76uMu3reaMgxp2RcqHDbamkNufwqE="; }; buildInputs = [ diff --git a/pkgs/applications/misc/charm/default.nix b/pkgs/applications/misc/charm/default.nix index 2379b702ee8..907bc7a53e0 100644 --- a/pkgs/applications/misc/charm/default.nix +++ b/pkgs/applications/misc/charm/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "charm"; - version = "0.10.2"; + version = "0.10.3"; src = fetchFromGitHub { owner = "charmbracelet"; repo = "charm"; rev = "v${version}"; - sha256 = "sha256-kyfyRq/5QWMoiMooEpLv7UkehGxFlrfGEq9jA3OHiIs="; + sha256 = "sha256-7WdSIpmpN8Zz2k5PveYZoCueQo5sLxLLZvZdzxRlkaE="; }; - vendorSha256 = "sha256-LB5fwySDOH+kOYYdGdtLAvETmI6fFP2QT6l2eAS3Ijg="; + vendorSha256 = "sha256-5cqZxh2uvmJV7DtAGzQwt//heF3kF9mjyB0KAs8nWZY="; doCheck = false; diff --git a/pkgs/applications/misc/mediaelch/default.nix b/pkgs/applications/misc/mediaelch/default.nix index 7cfe873a44e..2381e89640a 100644 --- a/pkgs/applications/misc/mediaelch/default.nix +++ b/pkgs/applications/misc/mediaelch/default.nix @@ -18,13 +18,13 @@ mkDerivation rec { pname = "mediaelch"; - version = "2.8.14"; + version = "2.8.16"; src = fetchFromGitHub { owner = "Komet"; repo = "MediaElch"; rev = "v${version}"; - sha256 = "sha256-yHThX5Xs+8SijNKgmg+4Mawbwi3zHA/DJQoIBy0Wchs="; + sha256 = "sha256-83bHfIRVAC+3RkCYmV+TBjjQxaFMHfVyxt5Jq44dzeI="; fetchSubmodules = true; }; diff --git a/pkgs/applications/misc/otpclient/default.nix b/pkgs/applications/misc/otpclient/default.nix index afc0ac71d5d..1f5f3d18729 100644 --- a/pkgs/applications/misc/otpclient/default.nix +++ b/pkgs/applications/misc/otpclient/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { pname = "otpclient"; - version = "2.4.8"; + version = "2.4.9.1"; src = fetchFromGitHub { owner = "paolostivanin"; repo = pname; rev = "v${version}"; - sha256 = "sha256-2exqMYcxg0UxlH+ZANQv2MFii9dZ6nizB4vxGR9cAwk="; + sha256 = "sha256-QcdPyuwbGK12Kul+gGTfRGmXfghr0qugpBEcrgATOT4="; }; buildInputs = [ gtk3 jansson libgcrypt libzip libpng libcotp zbar ]; diff --git a/pkgs/applications/misc/systembus-notify/default.nix b/pkgs/applications/misc/systembus-notify/default.nix index 6e5405ce988..770cd858401 100644 --- a/pkgs/applications/misc/systembus-notify/default.nix +++ b/pkgs/applications/misc/systembus-notify/default.nix @@ -1,5 +1,30 @@ -{ lib, stdenv, fetchFromGitHub, systemd }: +{ lib +, stdenv +, fetchFromGitHub +, formats +, systemd +}: +let + ini = formats.ini { }; + + unit = ini.generate "systembus-notify.service" { + Unit = { + Description = "system bus notification daemon"; + }; + + Service = { + Type = "exec"; + ExecStart = "@out@/bin/systembus-notify"; + PrivateTmp = true; + ProtectHome = true; + ProtectSystem = "strict"; + Restart = "on-failure"; + Slice = "background.slice"; + }; + }; + +in stdenv.mkDerivation rec { pname = "systembus-notify"; version = "1.1"; @@ -8,23 +33,32 @@ stdenv.mkDerivation rec { owner = "rfjakob"; repo = "systembus-notify"; rev = "v${version}"; - sha256 = "1pdn45rfpwhrf20hs87qmk2j8sr7ab8161f81019wnypnb1q2fsv"; + sha256 = "sha256-WzuBw7LXW54CCMgFE9BSJ2skxaz4IA2BcBny63Ihtt0="; }; buildInputs = [ systemd ]; installPhase = '' runHook preInstall - install -Dm755 systembus-notify -t $out/bin - install -Dm644 systembus-notify.desktop -t $out/etc/xdg/autostart + + install -Dm555 -t $out/bin systembus-notify + install -Dm444 -t $out/share/systembus-notify systembus-notify.desktop + + install -d $out/lib/systemd/user + substitute ${unit} $out/lib/systemd/user/${unit.name} \ + --subst-var out + runHook postInstall ''; + # requires a running dbus instance + doCheck = false; + meta = with lib; { description = "System bus notification daemon"; homepage = "https://github.com/rfjakob/systembus-notify"; license = licenses.mit; + maintainers = with maintainers; [ peterhoeg ]; platforms = platforms.linux; - maintainers = with maintainers; []; }; } diff --git a/pkgs/applications/networking/browsers/surf/default.nix b/pkgs/applications/networking/browsers/surf/default.nix index 7bf3ee9e75b..c79aa1d6f1d 100644 --- a/pkgs/applications/networking/browsers/surf/default.nix +++ b/pkgs/applications/networking/browsers/surf/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { inherit patches; - installFlags = [ "PREFIX=$(out)" ]; + makeFlags = [ "PREFIX=$(out)" ]; # Add run-time dependencies to PATH. Append them to PATH so the user can # override the dependencies with their own PATH. diff --git a/pkgs/applications/networking/cluster/cloudfoundry-cli/default.nix b/pkgs/applications/networking/cluster/cloudfoundry-cli/default.nix index a4b49adb1e2..4667b130e8d 100644 --- a/pkgs/applications/networking/cluster/cloudfoundry-cli/default.nix +++ b/pkgs/applications/networking/cluster/cloudfoundry-cli/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "cloudfoundry-cli"; - version = "8.0.0"; + version = "8.3.0"; src = fetchFromGitHub { owner = "cloudfoundry"; repo = "cli"; rev = "v${version}"; - sha256 = "00cwnfylra0msbb423ad21if98s6smzccsyidqsl4r2mrlkhahwm"; + sha256 = "sha256-tC9U0yvuMEwO4mzWyUC+v+/H0EzgwTu02waTQrx19Bs="; }; - vendorSha256 = "0fcgyyd11xfhn8i11bqnaw3h51bj1y8s37b4d8wzv31dr8zswqsc"; + vendorSha256 = "sha256-aXq92SI4cgJrmo67SEfg8YKPEpO2UW2fcYnKq9TmAQg="; subPackages = [ "." ]; diff --git a/pkgs/applications/networking/cluster/terraform-providers/update-all-providers b/pkgs/applications/networking/cluster/terraform-providers/update-all-providers index 57e1ab32f08..d7a05cf24a6 100755 --- a/pkgs/applications/networking/cluster/terraform-providers/update-all-providers +++ b/pkgs/applications/networking/cluster/terraform-providers/update-all-providers @@ -5,7 +5,7 @@ # Update all providers which have specified provider source address set -euo pipefail -providers=$( +readarray -t providers < <( jq -r 'to_entries | map_values(.value + { alias: .key }) | .[] @@ -13,10 +13,13 @@ providers=$( | .alias' providers.json ) -echo "Will update providers:" -echo "${providers}" +cat < read_attr() { - jq -r ".\"${provider_name}\".\"$1\"" providers.json + jq -r ".\"${provider}\".\"$1\"" providers.json } # Usage: update_attr update_attr() { if [[ $2 == "null" ]]; then - jq -S ".\"${provider_name}\".\"$1\" = null" providers.json | sponge providers.json + jq -S ".\"${provider}\".\"$1\" = null" providers.json | sponge providers.json else - jq -S ".\"${provider_name}\".\"$1\" = \"$2\"" providers.json | sponge providers.json + jq -S ".\"${provider}\".\"$1\" = \"$2\"" providers.json | sponge providers.json fi } -prefetch_github() { - # of a given owner, repo and rev, fetch the tarball and return the output of - # `nix-prefetch-url` - local owner=$1 - local repo=$2 - local rev=$3 - nix-prefetch-url --unpack "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz" +repo_root=$(git rev-parse --show-toplevel) + +generate_hash() { + nix-prefetch -I nixpkgs="${repo_root}" \ + "{ sha256 }: (import ${repo_root} {}).terraform-providers.${provider}.$1.overrideAttrs (_: { $2 = sha256; })" } -old_source_address="$(read_attr provider-source-address)" -old_vendor_sha256=$(read_attr vendorSha256) -old_version=$(read_attr version) +echo_provider() { + echo "== terraform-providers.${provider}: $* ==" +} if [[ ${provider} =~ ^[^/]+/[^/]+$ ]]; then + echo_provider "init" source_address=registry.terraform.io/${provider} + provider=$(basename "${provider}") + update_attr "provider-source-address" "${source_address}" + update_attr version "0" + # create empty stings so nix-prefetch works + update_attr sha256 "" + update_attr vendorSha256 "" else - source_address=${old_source_address} + source_address="$(read_attr provider-source-address)" fi -if [[ ${source_address} == "null" ]]; then - echo "Could not find the source address for provider: ${provider}" - exit 1 -fi -update_attr "provider-source-address" "${source_address}" + +old_vendor_sha256=$(read_attr vendorSha256) +old_version=$(read_attr version) # The provider source address (used inside Terraform `required_providers` block) is # used to compute the registry API endpoint @@ -125,8 +126,10 @@ registry_response=$(curl -s https://"${source_address/\///v1/providers/}") version="$(jq -r '.version' <<<"${registry_response}")" if [[ ${old_version} == "${version}" && ${force} != 1 && -z ${vendorSha256} && ${old_vendor_sha256} != "${vendorSha256}" ]]; then - echo "${provider_name} is already at version ${version}" + echo_provider "already at version ${version}" exit +else + echo_provider "updating from ${old_version} to ${version}" fi update_attr version "${version}" @@ -138,28 +141,23 @@ repo="$(echo "${provider_source_url}" | cut -d '/' -f 5)" update_attr repo "${repo}" rev="$(jq -r '.tag' <<<"${registry_response}")" update_attr rev "${rev}" -sha256=$(prefetch_github "${org}" "${repo}" "${rev}") +echo_provider "calculating sha256" +sha256=$(generate_hash src outputHash) update_attr sha256 "${sha256}" if [[ -z ${vendorSha256} ]]; then if [[ ${old_vendor_sha256} == null ]]; then vendorSha256=null - elif [[ -n ${old_vendor_sha256} ]]; then - echo "=== Calculating vendorSha256 ===" - vendorSha256=$(nix-prefetch -I nixpkgs=../../../../.. "{ sha256 }: (import ../../../../.. {}).terraform-providers.${provider_name}.go-modules.overrideAttrs (_: { vendorSha256 = sha256; })") - # Deal with nix unstable - if [[ ${vendorSha256} == sha256-* ]]; then - vendorSha256=$(nix --extra-experimental-features nix-command hash to-base32 "${vendorSha256}") - fi + else + echo_provider "calculating vendorSha256" + vendorSha256=$(generate_hash go-modules vendorSha256) fi fi -if [[ -n ${vendorSha256} ]]; then - update_attr vendorSha256 "${vendorSha256}" -fi +update_attr vendorSha256 "${vendorSha256}" # Check that the provider builds if [[ ${build} == 1 ]]; then - echo "=== Building terraform-providers.${provider_name} ===" - nix-build --no-out-link ../../../../.. -A "terraform-providers.${provider_name}" + echo_provider "building" + nix-build --no-out-link "${repo_root}" -A "terraform-providers.${provider}" fi diff --git a/pkgs/applications/networking/cluster/vcluster/default.nix b/pkgs/applications/networking/cluster/vcluster/default.nix index b41e443ba32..7f1476d7fbf 100644 --- a/pkgs/applications/networking/cluster/vcluster/default.nix +++ b/pkgs/applications/networking/cluster/vcluster/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "vcluster"; - version = "0.5.3"; + version = "0.6.0"; src = fetchFromGitHub { owner = "loft-sh"; repo = pname; rev = "v${version}"; - sha256 = "sha256-+rLDRVfB6wZ1wYoLE2wwRxzS6GmI6KYtOKdXZd+LnnU="; + sha256 = "sha256-kY12bsZyDb36KE2dWx6RVYlKTbJh+XFQcBpFXoCLgEM="; }; vendorSha256 = null; diff --git a/pkgs/applications/networking/instant-messengers/cinny/default.nix b/pkgs/applications/networking/instant-messengers/cinny/default.nix index c46c19896d5..1e2dc88a4d5 100644 --- a/pkgs/applications/networking/instant-messengers/cinny/default.nix +++ b/pkgs/applications/networking/instant-messengers/cinny/default.nix @@ -4,11 +4,11 @@ let configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf); in stdenv.mkDerivation rec { pname = "cinny"; - version = "1.7.0"; + version = "1.8.0"; src = fetchurl { url = "https://github.com/ajbura/cinny/releases/download/v${version}/cinny-v${version}.tar.gz"; - sha256 = "0133dbzxy0n0i6bn2p3lx33kpabnf9kzs9mv4xws30hbns25q99k"; + sha256 = "0pbapzl3pfx87ns4vp7088kkhl34c0ihbq90r3d0iz6sa16mcs79"; }; installPhase = '' diff --git a/pkgs/applications/networking/instant-messengers/qtox/default.nix b/pkgs/applications/networking/instant-messengers/qtox/default.nix index e315938c571..3f6d374c399 100644 --- a/pkgs/applications/networking/instant-messengers/qtox/default.nix +++ b/pkgs/applications/networking/instant-messengers/qtox/default.nix @@ -28,13 +28,13 @@ mkDerivation rec { pname = "qtox"; - version = "1.17.5"; + version = "1.17.6"; src = fetchFromGitHub { owner = "qTox"; repo = "qTox"; rev = "v${version}"; - sha256 = "sha256-H3qFEw/TkzOxEXtZs0k89wWMnhrOkF7VapUKtCUhGns="; + sha256 = "sha256-naKWoodSMw0AEtACvkASFmw9t0H0d2pcqOW79NNTYF0="; }; buildInputs = [ diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix index f1a2a752fd2..99ee871c917 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix @@ -24,7 +24,7 @@ let in stdenv.mkDerivation rec { pname = "signal-desktop"; - version = "5.34.0"; # Please backport all updates to the stable channel. + version = "5.35.0"; # Please backport all updates to the stable channel. # All releases have a limited lifetime and "expire" 90 days after the release. # When releases "expire" the application becomes unusable until an update is # applied. The expiration date for the current release can be extracted with: @@ -34,7 +34,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb"; - sha256 = "sha256-uU4WJtd9qwrjHgsK0oDg/pCf/5lfNhoMDEd/lHUnLwk="; + sha256 = "sha256-2KF2OLq6/vHElgloxn+kgQisJC+HAkpOBfsKfEPW35c="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/networking/juju/default.nix b/pkgs/applications/networking/juju/default.nix index 1adb61b8934..6810dbe679f 100644 --- a/pkgs/applications/networking/juju/default.nix +++ b/pkgs/applications/networking/juju/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "juju"; - version = "2.9.11"; + version = "2.9.25"; src = fetchFromGitHub { owner = "juju"; repo = "juju"; rev = "juju-${version}"; - sha256 = "sha256-KcvlnEfDzwhFzwaWLYuRGa8nh6MkjqZ+u+qJSJZl13U="; + sha256 = "sha256-h4w12dmGEviV2N0BWXQKt1eUVxdbgwRKLQghnd6bLFI="; }; - vendorSha256 = "sha256-0KGeMJDv1BdqM1/uMk+mKpK+Nejz9PiCAfRy96pu3OQ="; + vendorSha256 = "sha256-AATK4tDg2eW8Bt8gU88tIk6I+qp5ZeUtXzD74/59c7w="; # Disable tests because it attempts to use a mongodb instance doCheck = false; diff --git a/pkgs/applications/networking/nextdns/default.nix b/pkgs/applications/networking/nextdns/default.nix index a18257dfeb6..c06291c719e 100644 --- a/pkgs/applications/networking/nextdns/default.nix +++ b/pkgs/applications/networking/nextdns/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "nextdns"; - version = "1.37.7"; + version = "1.37.10"; src = fetchFromGitHub { owner = "nextdns"; repo = "nextdns"; rev = "v${version}"; - sha256 = "sha256-L5PeT4Y2oWM1WUJaBK9xgrpfkpvKM1+sA29A3AiDE38="; + sha256 = "sha256-iwxgDBIuTClikvXF+3mCjFKKV0upN+K+aL85ewYkMXo="; }; vendorSha256 = "sha256-6hWD05lXteqL7egj9tiRVHlevKM33i+a+zBUZs7PF7I="; diff --git a/pkgs/applications/science/computer-architecture/qtrvsim/default.nix b/pkgs/applications/science/computer-architecture/qtrvsim/default.nix new file mode 100644 index 00000000000..24d9f642ec5 --- /dev/null +++ b/pkgs/applications/science/computer-architecture/qtrvsim/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, cmake, wrapQtAppsHook, qtbase }: + +stdenv.mkDerivation rec { + pname = "QtRVSim"; + version = "0.9.1"; + + src = fetchFromGitHub { + owner = "cvut"; + repo = "qtrvsim"; + rev = "refs/tags/v${version}"; + sha256 = "AOksVS0drIBnK4RCxZw40yVxf4E8GjG9kU0rIZsY9gA="; + }; + + nativeBuildInputs = [ cmake wrapQtAppsHook ]; + + buildInputs = [ qtbase ]; + + meta = with lib; { + description = "RISC-V CPU simulator for education purposes"; + longDescription = '' + RISC-V CPU simulator for education purposes with pipeline and cache visualization. + Developed at FEE CTU for computer architecture classes. + ''; + homepage = "https://github.com/cvut/qtrvsim"; + license = licenses.gpl3Plus; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ jdupak ]; + mainProgram = "qtrvsim_gui"; + }; +} diff --git a/pkgs/applications/version-management/git-repo/default.nix b/pkgs/applications/version-management/git-repo/default.nix index f4eeb4aac12..7fe27da6080 100644 --- a/pkgs/applications/version-management/git-repo/default.nix +++ b/pkgs/applications/version-management/git-repo/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "git-repo"; - version = "2.21"; + version = "2.22"; src = fetchFromGitHub { owner = "android"; repo = "tools_repo"; rev = "v${version}"; - sha256 = "sha256-nl/NFbyL0MWgvpwaqkCOkKuSquFTQRKZ7Ski5qYRL9w="; + sha256 = "sha256-oVwvoZdjD6V3CHECZOYBSYVtCX1XwW5fynyCn7Oj+Bc="; }; # Fix 'NameError: name 'ssl' is not defined' diff --git a/pkgs/applications/video/go-chromecast/default.nix b/pkgs/applications/video/go-chromecast/default.nix index 0ffb5170dc2..99ddd7b24b6 100644 --- a/pkgs/applications/video/go-chromecast/default.nix +++ b/pkgs/applications/video/go-chromecast/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "go-chromecast"; - version = "0.2.11"; + version = "0.2.12"; src = fetchFromGitHub { owner = "vishen"; repo = pname; rev = "v${version}"; - sha256 = "sha256-BCOyeXo3uoR4ry/nFbF+//U62/hHnPK+tbG+8Rv6Rv0="; + sha256 = "sha256-h8qWwMaEhXnj6ZSrKAXBVbrMR0je41EoOtFeN9XlCuk="; }; - vendorSha256 = "sha256-idxElk4Sy7SE9G1OMRw8YH4o8orBa80qhBXPA+ar620="; + vendorSha256 = "sha256-PpMLHuJR6irp+QHhzguwGtBy30HM7DR0tNGiwB07M5E="; ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" "-X main.date=unknown" ]; diff --git a/pkgs/applications/virtualization/docker-slim/default.nix b/pkgs/applications/virtualization/docker-slim/default.nix index cd8a1f5041a..3bc0f225de6 100644 --- a/pkgs/applications/virtualization/docker-slim/default.nix +++ b/pkgs/applications/virtualization/docker-slim/default.nix @@ -6,7 +6,7 @@ buildGoPackage rec { pname = "docker-slim"; - version = "1.37.3"; + version = "1.37.4"; goPackagePath = "github.com/docker-slim/docker-slim"; @@ -14,7 +14,7 @@ buildGoPackage rec { owner = "docker-slim"; repo = "docker-slim"; rev = version; - sha256 = "sha256-jzwQ3nrhLDiQXcVkPiXrRAmpLQOD8ILBnoCEUiEbxzw="; + sha256 = "sha256-iz1V+wcrJf0grOe81kwbXPBqnvXpHnh7IMDdugaUOH0="; }; subPackages = [ "cmd/docker-slim" "cmd/docker-slim-sensor" ]; diff --git a/pkgs/applications/virtualization/firecracker/default.nix b/pkgs/applications/virtualization/firecracker/default.nix index c2769a0ccf3..9d35e87f161 100644 --- a/pkgs/applications/virtualization/firecracker/default.nix +++ b/pkgs/applications/virtualization/firecracker/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { sourceRoot = "."; src = dlbin { x86_64-linux = "sha256-yeWVsrvH3yYlS2uH/TkSleHjXvIDnHWcZSvLgV+CGF0="; - aarch64-linux = "sha256-75UC+HeVUfUk1HRvTJsOHbHHkgr6me1OtxDF7lahf68="; + aarch64-linux = "sha256-9ggRmijwXE9adVFv5XommgvdpeeWnWUFES+Ep2GrBVo="; }; dontConfigure = true; diff --git a/pkgs/applications/virtualization/flintlock/default.nix b/pkgs/applications/virtualization/flintlock/default.nix new file mode 100644 index 00000000000..d258604496e --- /dev/null +++ b/pkgs/applications/virtualization/flintlock/default.nix @@ -0,0 +1,49 @@ +{ lib +, cni-plugins +, buildGoModule +, firecracker +, containerd +, runc +, makeWrapper +, fetchFromGitHub +}: + +buildGoModule rec{ + pname = "flintlock"; + version = "0.1.0-alpha.9"; + + src = fetchFromGitHub { + owner = "weaveworks"; + repo = "flintlock"; + rev = "v${version}"; + sha256 = "sha256-Xw3g2wh0fPUknSuAKoJL3jxVZS50wSPZ9Wz05zkTVXM="; + }; + + vendorSha256 = "sha256-EjVlM6AD+O/z6+R5TRBmmRWbrP4C+qyvsnEjwOkDkUE="; + + subPackages = [ "cmd/flintlock-metrics" "cmd/flintlockd" ]; + + ldflags = [ "-s" "-w" "-X github.com/weaveworks/flintlock/internal/version.Version=v${version}" ]; + + nativeBuildInputs = [ + makeWrapper + ]; + + buildInputs = [ + firecracker + ]; + + postInstall = '' + for prog in flintlockd flintlock-metrics; do + wrapProgram "$out/bin/$prog" --prefix PATH : ${lib.makeBinPath [ cni-plugins firecracker containerd runc ]} + done + ''; + + meta = with lib; { + description = "Create and manage the lifecycle of MicroVMs backed by containerd"; + homepage = "https://github.com/weaveworks/flintlock"; + license = licenses.mpl20; + platforms = [ "x86_64-linux" "aarch64-linux" ]; + maintainers = with maintainers; [ techknowlogick ]; + }; +} diff --git a/pkgs/applications/virtualization/open-vm-tools/default.nix b/pkgs/applications/virtualization/open-vm-tools/default.nix index c3721bbe36e..6018608a3f1 100644 --- a/pkgs/applications/virtualization/open-vm-tools/default.nix +++ b/pkgs/applications/virtualization/open-vm-tools/default.nix @@ -1,5 +1,5 @@ -{ stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook -, bash, fuse, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto +{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper, autoreconfHook +, bash, fuse3, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto , libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst , pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which , libdrm, udev @@ -8,13 +8,13 @@ stdenv.mkDerivation rec { pname = "open-vm-tools"; - version = "11.3.5"; + version = "12.0.0"; src = fetchFromGitHub { owner = "vmware"; repo = "open-vm-tools"; rev = "stable-${version}"; - sha256 = "03fahljrijq4ij8a4v8d7806mpf22ppkgr61n5s974g3xfdvpl13"; + sha256 = "sha256-agWTGf8x6bxZ7S5bU2scHt8IdLLe/hZdaEMfHIK9d8U="; }; sourceRoot = "${src.name}/open-vm-tools"; @@ -22,10 +22,24 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ]; - buildInputs = [ fuse glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ] + buildInputs = [ fuse3 glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ] ++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ]; + patches = [ + # glibc 2.35 and GCC 11 & 12 reporting possible array bounds overflow + # Will be fixed in the release after 12.0.0 + (fetchpatch { + url = "https://github.com/vmware/open-vm-tools/commit/de6d129476724668b8903e2a87654f50ba21b1b2.patch"; + sha256 = "1cqhm868g40kcp8qzzwq10zd4bah9ypaw1qawnli5d240mlkpfhh"; + }) + ]; + + prePatch = '' + cd .. + ''; + postPatch = '' + cd open-vm-tools sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' Makefile.am sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am sed -i 's,usr/bin,''${prefix}/usr/bin,' scripts/Makefile.am @@ -43,6 +57,7 @@ stdenv.mkDerivation rec { "--without-kernel-modules" "--without-xmlsecurity" "--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d" + "--with-fuse=fuse3" ] ++ lib.optional (!withX) "--without-x"; enableParallelBuilding = true; diff --git a/pkgs/applications/virtualization/x11docker/default.nix b/pkgs/applications/virtualization/x11docker/default.nix index 67345952655..bad1e98296c 100644 --- a/pkgs/applications/virtualization/x11docker/default.nix +++ b/pkgs/applications/virtualization/x11docker/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg, getopt, gnugrep, gawk, ps, mount, iproute2 }: stdenv.mkDerivation rec { pname = "x11docker"; - version = "7.1.1"; + version = "7.1.3"; src = fetchFromGitHub { owner = "mviereck"; repo = "x11docker"; rev = "v${version}"; - sha256 = "sha256-SUHWqcDL/oDljCpngkhUvzOvMIlZSc1p0j0wjupPBqw="; + sha256 = "sha256-eSarw5RG2ckup9pNlZtAyZAN8IPZy94RRfej9ppiLfo="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/applications/window-managers/berry/default.nix b/pkgs/applications/window-managers/berry/default.nix index 82127c2733e..f6ba52013f6 100644 --- a/pkgs/applications/window-managers/berry/default.nix +++ b/pkgs/applications/window-managers/berry/default.nix @@ -55,6 +55,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { + homepage = "https://berrywm.org/"; description = "A healthy, bite-sized window manager"; longDescription = '' berry is a healthy, bite-sized window manager written in C for unix @@ -69,7 +70,6 @@ stdenv.mkDerivation rec { - Intuitively place new windows in unoccupied spaces. - Virtual desktops. ''; - homepage = "https://berrywm.org/"; license = licenses.mit; maintainers = [ maintainers.AndersonTorres ]; platforms = platforms.linux; diff --git a/pkgs/applications/window-managers/icewm/default.nix b/pkgs/applications/window-managers/icewm/default.nix index deac4bed607..75cb96f27f4 100644 --- a/pkgs/applications/window-managers/icewm/default.nix +++ b/pkgs/applications/window-managers/icewm/default.nix @@ -40,13 +40,13 @@ stdenv.mkDerivation rec { pname = "icewm"; - version = "2.9.4"; + version = "2.9.6"; src = fetchFromGitHub { - owner = "ice-wm"; + owner = "ice-wm"; repo = pname; rev = version; - hash = "sha256-ne2lqo9CAhGgC8dd9R03zhFXy9nPBQR0NcfAY0DeVj4="; + hash = "sha256-qC8gEVJ/cmsEbF8jMzv7zyvVcjlbXhgHU3ixe7RLcnA="; }; nativeBuildInputs = [ @@ -55,6 +55,7 @@ stdenv.mkDerivation rec { perl pkg-config ]; + buildInputs = [ expat fontconfig @@ -108,11 +109,11 @@ stdenv.mkDerivation rec { system. Application windows can be managed by keyboard and mouse. Windows can be iconified to the taskbar, to the tray, to the desktop or be made hidden. They are controllable by a quick switch window (Alt+Tab) and in a - window list. A handful of configurable focus models are - menu-selectable. Setups with multiple monitors are supported by RandR and - Xinerama. IceWM is very configurable, themeable and well documented. It - includes an optional external background wallpaper manager with - transparency support, a simple session manager and a system tray. + window list. A handful of configurable focus models are menu-selectable. + Setups with multiple monitors are supported by RandR and Xinerama. IceWM + is very configurable, themeable and well documented. It includes an + optional external background wallpaper manager with transparency support, + a simple session manager and a system tray. ''; license = licenses.lgpl2Only; maintainers = [ maintainers.AndersonTorres ]; diff --git a/pkgs/applications/window-managers/labwc/default.nix b/pkgs/applications/window-managers/labwc/default.nix index 580fd29faa0..f58b71ef03a 100644 --- a/pkgs/applications/window-managers/labwc/default.nix +++ b/pkgs/applications/window-managers/labwc/default.nix @@ -21,20 +21,15 @@ stdenv.mkDerivation rec { pname = "labwc"; - version = "0.4.0"; + version = "0.5.0"; src = fetchFromGitHub { owner = "labwc"; repo = pname; rev = version; - hash = "sha256-O9jVDR7UROt5u8inUsZjbzB3dQTosiLYqXkeOyGrbaM="; + hash = "sha256-G0EQuXSHftl4JLXKIro+tmhbApwAhlzcjPEL7DP6LHk="; }; - patches = [ - # Required to fix the build with wlroots 0.15.1: - ./relax-the-version-constraint-for-wlroots.patch - ]; - nativeBuildInputs = [ meson ninja @@ -64,6 +59,6 @@ stdenv.mkDerivation rec { description = "A Wayland stacking compositor, similar to Openbox"; license = licenses.gpl2Plus; maintainers = with maintainers; [ AndersonTorres ]; - platforms = platforms.unix; + inherit (wayland.meta) platforms; }; } diff --git a/pkgs/applications/window-managers/labwc/relax-the-version-constraint-for-wlroots.patch b/pkgs/applications/window-managers/labwc/relax-the-version-constraint-for-wlroots.patch deleted file mode 100644 index 9a790f28516..00000000000 --- a/pkgs/applications/window-managers/labwc/relax-the-version-constraint-for-wlroots.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 21d8bfcf7899f5ec50b29f523ace4c19cbfbe919 Mon Sep 17 00:00:00 2001 -From: Michael Weiss -Date: Fri, 4 Feb 2022 21:17:05 +0100 -Subject: [PATCH] build: Relax the version constraint for wlroots to accept - patch releases - -Patch releases only contain backwards compatible changes (mainly bug -fixes) so we want to allow them. This fixes the build with the recently -released wlroots 0.15.1 and uses the same version constraints as other -projects that depend on wlroots (e.g., Sway). ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index f950b8e..1905dda 100644 ---- a/meson.build -+++ b/meson.build -@@ -37,7 +37,7 @@ if git.found() - endif - add_project_arguments('-DLABWC_VERSION=@0@'.format(version), language: 'c') - --wlroots_version = ['=0.15.0'] -+wlroots_version = ['>=0.15.0', '<0.16.0'] - wlroots_proj = subproject( - 'wlroots', - default_options: ['default_library=static', 'examples=false'], --- -2.34.1 diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index e4d6f02a94b..82f768daa5f 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -1,6 +1,6 @@ { - # Content-addressable Nix mirrors. + # Content-addressable Nix mirrors hashedMirrors = [ "https://tarballs.nixos.org" ]; @@ -8,52 +8,48 @@ # Mirrors for mirror://site/filename URIs, where "site" is # "sourceforge", "gnu", etc. - luarocks = [ - "https://luarocks.org/" - "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/" - "https://luafr.org/moonrocks/" - "http://luarocks.logiceditor.com/rocks/" + # Alsa Project + alsa = [ + "https://www.alsa-project.org/files/pub/" + "ftp://ftp.alsa-project.org/pub/" + "http://alsa.cybermirror.org/" + "http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/" ]; - # SourceForge. - sourceforge = [ - "https://downloads.sourceforge.net/" - "https://prdownloads.sourceforge.net/" - "https://netcologne.dl.sourceforge.net/sourceforge/" - "https://versaweb.dl.sourceforge.net/sourceforge/" - "https://freefr.dl.sourceforge.net/sourceforge/" - "https://osdn.dl.sourceforge.net/sourceforge/" - "https://kent.dl.sourceforge.net/sourceforge/" + # Apache + apache = [ + "https://www-eu.apache.org/dist/" + "https://ftp.wayne.edu/apache/" + "https://www.apache.org/dist/" + "https://archive.apache.org/dist/" # fallback for old releases + "https://apache.cs.uu.nl/" + "https://apache.cs.utah.edu/" + "http://ftp.tudelft.nl/apache/" + "ftp://ftp.funet.fi/pub/mirrors/apache.org/" ]; - # OSDN (formerly SourceForge.jp). - osdn = [ - "https://osdn.dl.osdn.jp/" - "https://osdn.mirror.constant.com/" - "https://mirrors.gigenet.com/OSDN/" - "https://osdn.dl.sourceforge.jp/" - "https://jaist.dl.sourceforge.jp/" + # Bioconductor mirrors (from https://bioconductor.org/about/mirrors/) + # The commented-out ones don't seem to allow direct package downloads; + # they serve error messages that result in hash mismatches instead + bioc = [ + # http://bioc.ism.ac.jp/ + # http://bioc.openanalytics.eu/ + # http://bioconductor.fmrp.usp.br/ + # http://mirror.aarnet.edu.au/pub/bioconductor/ + # http://watson.nci.nih.gov/bioc_mirror/ + "https://bioconductor.statistik.tu-dortmund.de/packages/" + "https://mirrors.ustc.edu.cn/bioc/" + "http://bioconductor.jp/packages/" ]; - # GNU (https://www.gnu.org/prep/ftp.html). - gnu = [ - # This one redirects to a (supposedly) nearby and (supposedly) up-to-date - # mirror. - "https://ftpmirror.gnu.org/" - - "https://ftp.nluug.nl/pub/gnu/" - "https://mirrors.kernel.org/gnu/" - "https://mirror.ibcp.fr/pub/gnu/" - "https://mirror.dogado.de/gnu/" - "https://mirror.tochlab.net/pub/gnu/" - - # This one is the master repository, and thus it's always up-to-date. - "https://ftp.gnu.org/pub/gnu/" - - "ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/" + # BitlBee mirrors, see https://www.bitlbee.org/main.php/mirrors.html + bitlbee = [ + "https://get.bitlbee.org/" + "https://ftp.snt.utwente.nl/pub/software/bitlbee/" + "http://bitlbee.intergenia.de/" ]; - # GCC. + # GCC gcc = [ "https://bigsearcher.com/mirrors/gcc/" "https://mirror.koddos.net/gcc/" @@ -63,7 +59,37 @@ "ftp://gcc.gnu.org/pub/gcc/" ]; - # GnuPG. + # GNOME + gnome = [ + # This one redirects to some mirror closeby, so it should be all you need + "https://download.gnome.org/" + + "https://fr2.rpmfind.net/linux/gnome.org/" + "https://ftp.acc.umu.se/pub/GNOME/" + "https://ftp.belnet.be/mirror/ftp.gnome.org/" + "ftp://ftp.cse.buffalo.edu/pub/Gnome/" + "ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/" + ]; + + # GNU (https://www.gnu.org/prep/ftp.html) + gnu = [ + # This one redirects to a (supposedly) nearby and (supposedly) up-to-date + # mirror + "https://ftpmirror.gnu.org/" + + "https://ftp.nluug.nl/pub/gnu/" + "https://mirrors.kernel.org/gnu/" + "https://mirror.ibcp.fr/pub/gnu/" + "https://mirror.dogado.de/gnu/" + "https://mirror.tochlab.net/pub/gnu/" + + # This one is the master repository, and thus it's always up-to-date + "https://ftp.gnu.org/pub/gnu/" + + "ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/" + ]; + + # GnuPG gnupg = [ "https://gnupg.org/ftp/gcrypt/" "https://mirrors.dotsrc.org/gcrypt/" @@ -72,11 +98,13 @@ "http://www.ring.gr.jp/pub/net/" ]; - # kernel.org's /pub (/pub/{linux,software}) tree. - kernel = [ - "https://cdn.kernel.org/pub/" - "http://linux-kernel.uio.no/pub/" - "ftp://ftp.funet.fi/pub/mirrors/ftp.kernel.org/pub/" + # ImageMagick mirrors, see https://www.imagemagick.org/script/mirror.php + imagemagick = [ + "https://www.imagemagick.org/download/" + "https://mirror.checkdomain.de/imagemagick/" + "https://ftp.nluug.nl/ImageMagick/" + "https://ftp.sunet.se/mirror/imagemagick.org/ftp/" + "ftp://ftp.sunet.se/mirror/imagemagick.org/ftp/" # also contains older versions removed from most mirrors ]; # Mirrors from https://download.kde.org/ls-lR.mirrorlist @@ -89,195 +117,47 @@ "https://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/" ]; - # Gentoo files. - gentoo = [ - "https://ftp.snt.utwente.nl/pub/os/linux/gentoo/" - "https://distfiles.gentoo.org/" - "https://mirrors.kernel.org/gentoo/" - ]; - - savannah = [ - # Mirrors from https://download-mirror.savannah.gnu.org/releases/00_MIRRORS.html - "https://mirror.easyname.at/nongnu/" - "https://savannah.c3sl.ufpr.br/" - "https://mirror.csclub.uwaterloo.ca/nongnu/" - "https://mirror.cedia.org.ec/nongnu/" - "https://ftp.igh.cnrs.fr/pub/nongnu/" - "https://mirror6.layerjet.com/nongnu" - "https://mirror.netcologne.de/savannah/" - "https://ftp.cc.uoc.gr/mirrors/nongnu.org/" - "https://nongnu.uib.no/" - "https://ftp.acc.umu.se/mirror/gnu.org/savannah/" - "http://mirror2.klaus-uwe.me/nongnu/" - "http://mirrors.fe.up.pt/pub/nongnu/" - "http://ftp.twaren.net/Unix/NonGNU/" - "http://savannah-nongnu-org.ip-connect.vn.ua/" - "http://www.mirrorservice.org/sites/download.savannah.gnu.org/releases/" - "http://gnu.mirrors.pair.com/savannah/savannah/" - "ftp://mirror.easyname.at/nongnu/" - "ftp://mirror2.klaus-uwe.me/nongnu/" - "ftp://mirror.csclub.uwaterloo.ca/nongnu/" - "ftp://ftp.igh.cnrs.fr/pub/nongnu/" - "ftp://mirror.netcologne.de/savannah/" - "ftp://nongnu.uib.no/pub/nongnu/" - "ftp://mirrors.fe.up.pt/pub/nongnu/" - "ftp://ftp.twaren.net/Unix/NonGNU/" - "ftp://savannah-nongnu-org.ip-connect.vn.ua/mirror/savannah.nongnu.org/" - "ftp://ftp.mirrorservice.org/sites/download.savannah.gnu.org/releases/" - ]; - - samba = [ - "https://www.samba.org/ftp/" - "http://www.samba.org/ftp/" - ]; - - # BitlBee mirrors, see https://www.bitlbee.org/main.php/mirrors.html . - bitlbee = [ - "https://get.bitlbee.org/" - "https://ftp.snt.utwente.nl/pub/software/bitlbee/" - "http://bitlbee.intergenia.de/" - ]; - - # ImageMagick mirrors, see https://www.imagemagick.org/script/mirror.php - imagemagick = [ - "https://www.imagemagick.org/download/" - "https://mirror.checkdomain.de/imagemagick/" - "https://ftp.nluug.nl/ImageMagick/" - "https://ftp.sunet.se/mirror/imagemagick.org/ftp/" - "ftp://ftp.sunet.se/mirror/imagemagick.org/ftp/" # also contains older versions removed from most mirrors - ]; - - # CPAN mirrors. - cpan = [ - "https://cpan.metacpan.org/" - "https://cpan.perl.org/" - "https://mirrors.kernel.org/CPAN/" - "https://backpan.perl.org/" # for old releases - ]; - - # CentOS. - centos = [ - # For old releases - "https://vault.centos.org/" - "https://archive.kernel.org/centos-vault/" - "https://ftp.jaist.ac.jp/pub/Linux/CentOS-vault/" - "https://mirrors.aliyun.com/centos-vault/" - "https://mirror.chpc.utah.edu/pub/vault.centos.org/" - "https://mirror.math.princeton.edu/pub/centos-vault/" - "https://mirrors.tripadvisor.com/centos-vault/" - "http://mirror.centos.org/centos/" - ]; - - # Debian. - debian = [ - "https://httpredir.debian.org/debian/" - "https://ftp.debian.org/debian/" - "https://mirrors.edge.kernel.org/debian/" - "ftp://ftp.de.debian.org/debian/" - "ftp://ftp.fr.debian.org/debian/" - "ftp://ftp.nl.debian.org/debian/" - "ftp://ftp.ru.debian.org/debian/" - "http://archive.debian.org/debian-archive/debian/" - "ftp://ftp.funet.fi/pub/mirrors/ftp.debian.org/debian/" - ]; - - # Ubuntu. - ubuntu = [ - "https://nl.archive.ubuntu.com/ubuntu/" - "https://old-releases.ubuntu.com/ubuntu/" - "https://mirrors.edge.kernel.org/ubuntu/" - "http://de.archive.ubuntu.com/ubuntu/" - "http://archive.ubuntu.com/ubuntu/" - ]; - - # Fedora (please only add full mirrors that carry old Fedora distributions as well). - # See: https://mirrors.fedoraproject.org/publiclist (but not all carry old content). - fedora = [ - "https://archives.fedoraproject.org/pub/fedora/" - "https://fedora.osuosl.org/" - "https://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/" - "https://ftp.linux.cz/pub/linux/fedora/" - "https://archives.fedoraproject.org/pub/archive/fedora/" - "http://ftp.nluug.nl/pub/os/Linux/distr/fedora/" - "http://mirror.csclub.uwaterloo.ca/fedora/" - "http://mirror.1000mbps.com/fedora/" - ]; - - # openSUSE. - opensuse = [ - "https://opensuse.hro.nl/opensuse/distribution/" - "https://ftp.funet.fi/pub/linux/mirrors/opensuse/distribution/" - "https://ftp.opensuse.org/pub/opensuse/distribution/" - "https://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/" - "https://mirrors.edge.kernel.org/opensuse/distribution/" - "http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/" - ]; - - gnome = [ - # This one redirects to some mirror closeby, so it should be all you need. - "https://download.gnome.org/" - - "https://fr2.rpmfind.net/linux/gnome.org/" - "https://ftp.acc.umu.se/pub/GNOME/" - "https://ftp.belnet.be/mirror/ftp.gnome.org/" - "ftp://ftp.cse.buffalo.edu/pub/Gnome/" - "ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/" - ]; - - xfce = [ - "https://archive.xfce.org/" - "https://mirror.netcologne.de/xfce/" - "https://archive.be.xfce.org/xfce/" - "https://archive.al-us.xfce.org/" - "http://archive.se.xfce.org/xfce/" - "http://mirror.perldude.de/archive.xfce.org/" - "http://archive.be2.xfce.org/" - "http://ftp.udc.es/xfce/" - ]; - - # X.org. - xorg = [ - "https://xorg.freedesktop.org/releases/" - "https://ftp.x.org/archive/" - ]; - - apache = [ - "https://www-eu.apache.org/dist/" - "https://ftp.wayne.edu/apache/" - "https://www.apache.org/dist/" - "https://archive.apache.org/dist/" # fallback for old releases - "https://apache.cs.uu.nl/" - "https://apache.cs.utah.edu/" - "http://ftp.tudelft.nl/apache/" - "ftp://ftp.funet.fi/pub/mirrors/apache.org/" - ]; - - postgresql = [ - "https://ftp.postgresql.org/pub/" + # kernel.org's /pub (/pub/{linux,software}) tree + kernel = [ + "https://cdn.kernel.org/pub/" + "http://linux-kernel.uio.no/pub/" + "ftp://ftp.funet.fi/pub/mirrors/ftp.kernel.org/pub/" ]; + # Metalab, now IBiblio metalab = [ "ftp://ftp.gwdg.de/pub/linux/metalab/" "ftp://ftp.metalab.unc.edu/pub/linux/" ]; - # Bioconductor mirrors (from https://bioconductor.org/about/mirrors/) - # The commented-out ones don't seem to allow direct package downloads; - # they serve error messages that result in hash mismatches instead. - bioc = [ - # http://bioc.ism.ac.jp/ - # http://bioc.openanalytics.eu/ - # http://bioconductor.fmrp.usp.br/ - # http://mirror.aarnet.edu.au/pub/bioconductor/ - # http://watson.nci.nih.gov/bioc_mirror/ - "https://bioconductor.statistik.tu-dortmund.de/packages/" - "https://mirrors.ustc.edu.cn/bioc/" - "http://bioconductor.jp/packages/" + # MySQL + mysql = [ + "https://cdn.mysql.com/Downloads/" ]; - # Hackage mirrors - hackage = [ - "https://hackage.haskell.org/package/" + # Maven Central + maven = [ + "https://repo1.maven.org/maven2/" + ]; + + # Mozilla projects + mozilla = [ + "https://download.cdn.mozilla.net/pub/mozilla.org/" + "https://archive.mozilla.org/pub/" + ]; + + # OSDN (formerly SourceForge.jp) + osdn = [ + "https://osdn.dl.osdn.jp/" + "https://osdn.mirror.constant.com/" + "https://mirrors.gigenet.com/OSDN/" + "https://osdn.dl.sourceforge.jp/" + "https://jaist.dl.sourceforge.jp/" + ]; + + # PostgreSQL + postgresql = [ + "https://ftp.postgresql.org/pub/" ]; # Roy marples mirrors @@ -329,25 +209,114 @@ "http://ftp.ntua.gr/pub/sagemath/spkg/upstream/" ]; - # MySQL mirrors - mysql = [ - "https://cdn.mysql.com/Downloads/" + # SAMBA + samba = [ + "https://www.samba.org/ftp/" + "http://www.samba.org/ftp/" ]; - # OpenBSD mirrors - openbsd = [ - "https://ftp.openbsd.org/pub/OpenBSD/" - "ftp://ftp.nluug.nl/pub/OpenBSD/" - "ftp://ftp-stud.fht-esslingen.de/pub/OpenBSD/" + # GNU Savannah + savannah = [ + # Mirrors from https://download-mirror.savannah.gnu.org/releases/00_MIRRORS.html + "https://mirror.easyname.at/nongnu/" + "https://savannah.c3sl.ufpr.br/" + "https://mirror.csclub.uwaterloo.ca/nongnu/" + "https://mirror.cedia.org.ec/nongnu/" + "https://ftp.igh.cnrs.fr/pub/nongnu/" + "https://mirror6.layerjet.com/nongnu" + "https://mirror.netcologne.de/savannah/" + "https://ftp.cc.uoc.gr/mirrors/nongnu.org/" + "https://nongnu.uib.no/" + "https://ftp.acc.umu.se/mirror/gnu.org/savannah/" + "http://mirror2.klaus-uwe.me/nongnu/" + "http://mirrors.fe.up.pt/pub/nongnu/" + "http://ftp.twaren.net/Unix/NonGNU/" + "http://savannah-nongnu-org.ip-connect.vn.ua/" + "http://www.mirrorservice.org/sites/download.savannah.gnu.org/releases/" + "http://gnu.mirrors.pair.com/savannah/savannah/" + "ftp://mirror.easyname.at/nongnu/" + "ftp://mirror2.klaus-uwe.me/nongnu/" + "ftp://mirror.csclub.uwaterloo.ca/nongnu/" + "ftp://ftp.igh.cnrs.fr/pub/nongnu/" + "ftp://mirror.netcologne.de/savannah/" + "ftp://nongnu.uib.no/pub/nongnu/" + "ftp://mirrors.fe.up.pt/pub/nongnu/" + "ftp://ftp.twaren.net/Unix/NonGNU/" + "ftp://savannah-nongnu-org.ip-connect.vn.ua/mirror/savannah.nongnu.org/" + "ftp://ftp.mirrorservice.org/sites/download.savannah.gnu.org/releases/" ]; - # Steam Runtime mirrors + # SourceForge + sourceforge = [ + "https://downloads.sourceforge.net/" + "https://prdownloads.sourceforge.net/" + "https://netcologne.dl.sourceforge.net/sourceforge/" + "https://versaweb.dl.sourceforge.net/sourceforge/" + "https://freefr.dl.sourceforge.net/sourceforge/" + "https://osdn.dl.sourceforge.net/sourceforge/" + "https://kent.dl.sourceforge.net/sourceforge/" + ]; + + # Steam Runtime steamrt = [ "https://repo.steampowered.com/steamrt/" "https://public.abbradar.moe/steamrt/" ]; - # Python PyPI mirrors + # TCSH shell + tcsh = [ + "https://astron.com/pub/tcsh/" + "https://astron.com/pub/tcsh/old/" + "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/" + "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/old/" + "ftp://ftp.astron.com/pub/tcsh/" + "ftp://ftp.astron.com/pub/tcsh/old/" + "ftp://ftp.funet.fi/pub/unix/shells/tcsh/" + "ftp://ftp.funet.fi/pub/unix/shells/tcsh/old/" + ]; + + # XFCE + xfce = [ + "https://archive.xfce.org/" + "https://mirror.netcologne.de/xfce/" + "https://archive.be.xfce.org/xfce/" + "https://archive.al-us.xfce.org/" + "http://archive.se.xfce.org/xfce/" + "http://mirror.perldude.de/archive.xfce.org/" + "http://archive.be2.xfce.org/" + "http://ftp.udc.es/xfce/" + ]; + + # X.org + xorg = [ + "https://xorg.freedesktop.org/releases/" + "https://ftp.x.org/archive/" + ]; + + ### Programming languages' package repos + + # Perl CPAN + cpan = [ + "https://cpan.metacpan.org/" + "https://cpan.perl.org/" + "https://mirrors.kernel.org/CPAN/" + "https://backpan.perl.org/" # for old releases + ]; + + # Haskell Hackage + hackage = [ + "https://hackage.haskell.org/package/" + ]; + + # Lua Rocks + luarocks = [ + "https://luarocks.org/" + "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/" + "https://luafr.org/moonrocks/" + "http://luarocks.logiceditor.com/rocks/" + ]; + + # Python PyPI pypi = [ "https://files.pythonhosted.org/packages/source/" # pypi.io is a more semantic link, but atm it’s referencing @@ -355,27 +324,85 @@ "https://pypi.io/packages/source/" ]; - # Python Test-PyPI mirror + # Python Test-PyPI testpypi = [ "https://test.pypi.io/packages/source/" ]; - # Mozilla projects. - mozilla = [ - "https://download.cdn.mozilla.net/pub/mozilla.org/" - "https://archive.mozilla.org/pub/" + ### Linux distros + + # CentOS + centos = [ + # For old releases + "https://vault.centos.org/" + "https://archive.kernel.org/centos-vault/" + "https://ftp.jaist.ac.jp/pub/Linux/CentOS-vault/" + "https://mirrors.aliyun.com/centos-vault/" + "https://mirror.chpc.utah.edu/pub/vault.centos.org/" + "https://mirror.math.princeton.edu/pub/centos-vault/" + "https://mirrors.tripadvisor.com/centos-vault/" + "http://mirror.centos.org/centos/" ]; - # Maven Central - maven = [ - "https://repo1.maven.org/maven2/" + # Debian + debian = [ + "https://httpredir.debian.org/debian/" + "https://ftp.debian.org/debian/" + "https://mirrors.edge.kernel.org/debian/" + "ftp://ftp.de.debian.org/debian/" + "ftp://ftp.fr.debian.org/debian/" + "ftp://ftp.nl.debian.org/debian/" + "ftp://ftp.ru.debian.org/debian/" + "http://archive.debian.org/debian-archive/debian/" + "ftp://ftp.funet.fi/pub/mirrors/ftp.debian.org/debian/" ]; - # Alsa Project - alsa = [ - "https://www.alsa-project.org/files/pub/" - "ftp://ftp.alsa-project.org/pub/" - "http://alsa.cybermirror.org/" - "http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/" + # Fedora + # Please add only full mirrors that carry old Fedora distributions as well + # See: https://mirrors.fedoraproject.org/publiclist (but not all carry old content) + fedora = [ + "https://archives.fedoraproject.org/pub/fedora/" + "https://fedora.osuosl.org/" + "https://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/" + "https://ftp.linux.cz/pub/linux/fedora/" + "https://archives.fedoraproject.org/pub/archive/fedora/" + "http://ftp.nluug.nl/pub/os/Linux/distr/fedora/" + "http://mirror.csclub.uwaterloo.ca/fedora/" + "http://mirror.1000mbps.com/fedora/" + ]; + + # Gentoo + gentoo = [ + "https://ftp.snt.utwente.nl/pub/os/linux/gentoo/" + "https://distfiles.gentoo.org/" + "https://mirrors.kernel.org/gentoo/" + ]; + + # openSUSE + opensuse = [ + "https://opensuse.hro.nl/opensuse/distribution/" + "https://ftp.funet.fi/pub/linux/mirrors/opensuse/distribution/" + "https://ftp.opensuse.org/pub/opensuse/distribution/" + "https://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/" + "https://mirrors.edge.kernel.org/opensuse/distribution/" + "http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/" + ]; + + # Ubuntu + ubuntu = [ + "https://nl.archive.ubuntu.com/ubuntu/" + "https://old-releases.ubuntu.com/ubuntu/" + "https://mirrors.edge.kernel.org/ubuntu/" + "http://de.archive.ubuntu.com/ubuntu/" + "http://archive.ubuntu.com/ubuntu/" + ]; + + # ... and other OSes in general + + # OpenBSD + openbsd = [ + "https://ftp.openbsd.org/pub/OpenBSD/" + "ftp://ftp.nluug.nl/pub/OpenBSD/" + "ftp://ftp-stud.fht-esslingen.de/pub/OpenBSD/" ]; } diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index 6bdec501630..18e8784cfab 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -2,7 +2,7 @@ { pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args: -let Dune = if args.useDune2 or false then dune_2 else dune_1; in +let Dune = if args.useDune2 or true then dune_2 else dune_1; in if (args ? minimumOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion) || (args ? minimalOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimalOCamlVersion) diff --git a/pkgs/data/fonts/sudo/default.nix b/pkgs/data/fonts/sudo/default.nix index 45450a7c20f..b78880824c7 100644 --- a/pkgs/data/fonts/sudo/default.nix +++ b/pkgs/data/fonts/sudo/default.nix @@ -1,11 +1,11 @@ { lib, fetchzip }: let - version = "0.62"; + version = "0.63.1"; in fetchzip { name = "sudo-font-${version}"; url = "https://github.com/jenskutilek/sudo-font/releases/download/v${version}/sudo.zip"; - sha256 = "sha256-I0E2zYbfEFBEIBNC7nnJb+hOaBgGZkAIg08YpA8awso="; + sha256 = "sha256-z/1Y2eJMrQ+43UIt4HWcLwjYs+hfCY/g4iRxJ+yBAqw="; postFetch = '' mkdir -p $out/share/fonts/ diff --git a/pkgs/data/misc/v2ray-geoip/default.nix b/pkgs/data/misc/v2ray-geoip/default.nix index 12163691668..b92014b30e0 100644 --- a/pkgs/data/misc/v2ray-geoip/default.nix +++ b/pkgs/data/misc/v2ray-geoip/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "v2ray-geoip"; - version = "202203020509"; + version = "202203100039"; src = fetchFromGitHub { owner = "v2fly"; repo = "geoip"; - rev = "9dce4df2c1f409bad67f579910a4edf522251e7b"; - sha256 = "sha256-fR0lzvVQjWA3KbzLhuvoB15Z+7RAv34Wf5W7KRZ//QA="; + rev = "564c2c8de36d3680a1d5f209d6bb05e4f3f70dfc"; + sha256 = "sha256-JPpzIppgKQox8T6VC/kzhpLy+YAcuHdH5L6zqciOXow="; }; installPhase = '' diff --git a/pkgs/development/compilers/fasm/bin.nix b/pkgs/development/compilers/fasm/bin.nix index 9f4263b08ed..d9f809c0a0a 100644 --- a/pkgs/development/compilers/fasm/bin.nix +++ b/pkgs/development/compilers/fasm/bin.nix @@ -3,11 +3,11 @@ stdenvNoCC.mkDerivation rec { pname = "fasm-bin"; - version = "1.73.29"; + version = "1.73.30"; src = fetchurl { url = "https://flatassembler.net/fasm-${version}.tgz"; - sha256 = "sha256-Yyj02DRo9wTkJ01ukOwElHr1ZyZFPOMTibwyAkqYISs="; + sha256 = "sha256-dRlQUaWIHbu+DwQBFh6Tf4o2u0LTRw/Ehp2hT9LC8QE="; }; installPhase = '' diff --git a/pkgs/development/compilers/llvm/14/default.nix b/pkgs/development/compilers/llvm/14/default.nix index 5a91fb17fe6..ce126f7b502 100644 --- a/pkgs/development/compilers/llvm/14/default.nix +++ b/pkgs/development/compilers/llvm/14/default.nix @@ -19,7 +19,7 @@ let release_version = "14.0.0"; - candidate = "rc2"; # empty or "rcN" + candidate = "rc4"; # empty or "rcN" dash-candidate = lib.optionalString (candidate != "") "-${candidate}"; rev = ""; # When using a Git commit rev-version = ""; # When using a Git commit @@ -30,7 +30,7 @@ let owner = "llvm"; repo = "llvm-project"; rev = if rev != "" then rev else "llvmorg-${version}"; - sha256 = "sha256-5wJEaWvwJohtjqlIsBkqQ5rE6rcWw07MaQnN1RxPb5w="; + sha256 = "0xm3hscg6xv48rjdi7sg9ky960af1qyg5k3jyavnaqimlaj9wxgp"; }; llvm_meta = { diff --git a/pkgs/development/compilers/llvm/14/llvm/default.nix b/pkgs/development/compilers/llvm/14/llvm/default.nix index d2059cc66ba..05aac728b45 100644 --- a/pkgs/development/compilers/llvm/14/llvm/default.nix +++ b/pkgs/development/compilers/llvm/14/llvm/default.nix @@ -209,6 +209,9 @@ in stdenv.mkDerivation (rec { checkTarget = "check-all"; + # For the update script: + passthru.monorepoSrc = monorepoSrc; + requiredSystemFeatures = [ "big-parallel" ]; meta = llvm_meta // { homepage = "https://llvm.org/"; diff --git a/pkgs/development/compilers/llvm/update.sh b/pkgs/development/compilers/llvm/update.sh index 603c603f275..95ad356dbd9 100755 --- a/pkgs/development/compilers/llvm/update.sh +++ b/pkgs/development/compilers/llvm/update.sh @@ -20,7 +20,11 @@ sed -Ei \ readonly ATTRSET="llvmPackages_$VERSION_MAJOR" -if [ "$VERSION_MAJOR" -ge "13" ]; then +if [ "$VERSION_MAJOR" -ge "14" ]; then + readonly SOURCES=( + "llvm.monorepoSrc" + ) +elif [ "$VERSION_MAJOR" -eq "13" ]; then readonly SOURCES=( "llvm.src" ) @@ -43,7 +47,7 @@ fi for SOURCE in "${SOURCES[@]}"; do echo "Updating the hash of $SOURCE:" declare ATTR="$ATTRSET.$SOURCE" - declare OLD_HASH="$(nix eval -f . $ATTR.outputHash)" + declare OLD_HASH="$(nix --extra-experimental-features nix-command eval -f . $ATTR.outputHash)" declare NEW_HASH="\"$(nix-prefetch-url -A $ATTR)\"" find "$DIR" -type f -exec sed -i "s/$OLD_HASH/$NEW_HASH/" {} + done diff --git a/pkgs/development/compilers/ocaml/4.14.nix b/pkgs/development/compilers/ocaml/4.14.nix new file mode 100644 index 00000000000..96e1c13d285 --- /dev/null +++ b/pkgs/development/compilers/ocaml/4.14.nix @@ -0,0 +1,9 @@ +import ./generic.nix { + major_version = "4"; + minor_version = "14"; + patch_version = "0-beta1"; + src = fetchTarball { + url = "https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.0~beta1.tar.xz"; + sha256 = "0jiz20hb58jbbk8j38agx11ra4hg0v3prmzc5a9j70lm09mnzfcd"; + }; +} diff --git a/pkgs/development/libraries/cimg/default.nix b/pkgs/development/libraries/cimg/default.nix index 47e9ffa925a..4a482c9da45 100644 --- a/pkgs/development/libraries/cimg/default.nix +++ b/pkgs/development/libraries/cimg/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "cimg"; - version = "3.0.0"; + version = "3.0.2"; src = fetchFromGitHub { owner = "dtschump"; repo = "CImg"; rev = "v.${version}"; - hash = "sha256-dC4VuWTz0uyFxLjBQ+2ggndHaCErcoI7tJMfkqbWmeg="; + hash = "sha256-OWpztnyVXCg+uoAb6e/2eUK2ebBalDlz6Qcjf17IeMk="; }; outputs = [ "out" "doc" ]; diff --git a/pkgs/development/libraries/elpa/default.nix b/pkgs/development/libraries/elpa/default.nix index 76152996a1d..2a71b82af3c 100644 --- a/pkgs/development/libraries/elpa/default.nix +++ b/pkgs/development/libraries/elpa/default.nix @@ -18,13 +18,13 @@ assert blas.isILP64 == scalapack.isILP64; stdenv.mkDerivation rec { pname = "elpa"; - version = "2021.11.001"; + version = "2021.11.002"; passthru = { inherit (blas) isILP64; }; src = fetchurl { url = "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/${version}/elpa-${version}.tar.gz"; - sha256 = "0bw0nwzwvjfmijfwznmrghypd3q237a3h5g5fcdncilrqnk1sdpv"; + sha256 = "sha256-V28cru14g7gTlmQP2g9QQYOGbPbL1Lxx0Tg7oiCPH5c="; }; patches = [ diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix index 0411086c78c..eae934a4ebb 100644 --- a/pkgs/development/libraries/vte/default.nix +++ b/pkgs/development/libraries/vte/default.nix @@ -21,6 +21,7 @@ , zlib , icu , systemd +, systemdSupport ? stdenv.hostPlatform.isLinux }: stdenv.mkDerivation rec { @@ -63,6 +64,7 @@ stdenv.mkDerivation rec { pcre2 zlib icu + ] ++ lib.optionals systemdSupport [ systemd ]; @@ -73,6 +75,10 @@ stdenv.mkDerivation rec { pango ]; + mesonFlags = lib.optionals (!systemdSupport) [ + "-D_systemd=false" + ]; + postPatch = '' patchShebangs perf/* patchShebangs src/box_drawing_generate.sh diff --git a/pkgs/development/libraries/zchunk/default.nix b/pkgs/development/libraries/zchunk/default.nix index c2ddda7a6c5..c639eb7b30e 100644 --- a/pkgs/development/libraries/zchunk/default.nix +++ b/pkgs/development/libraries/zchunk/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "zchunk"; - version = "1.1.16"; + version = "1.2.0"; src = fetchFromGitHub { owner = "zchunk"; repo = pname; rev = version; - hash = "sha256-+8FkivLTZXdu0+1wu+7T98y6rQzIHbG9l15Abrbln1o="; + hash = "sha256-7H1WF5VkpA65xCdEa0Sw4r4jj+kGhDVCMr5AeE+3Ii4="; }; nativeBuildInputs = [ @@ -47,5 +47,6 @@ stdenv.mkDerivation rec { license = licenses.bsd2; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; + broken = stdenv.isDarwin; # does not find argp-standalone }; } diff --git a/pkgs/development/ocaml-modules/facile/default.nix b/pkgs/development/ocaml-modules/facile/default.nix index 8834de53a8f..df228603e9f 100644 --- a/pkgs/development/ocaml-modules/facile/default.nix +++ b/pkgs/development/ocaml-modules/facile/default.nix @@ -4,6 +4,8 @@ buildDunePackage rec { pname = "facile"; version = "1.1.4"; + useDune2 = false; + src = fetchurl { url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz"; sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp"; diff --git a/pkgs/development/ocaml-modules/genspio/default.nix b/pkgs/development/ocaml-modules/genspio/default.nix index db3c42bca36..963cd1dab13 100644 --- a/pkgs/development/ocaml-modules/genspio/default.nix +++ b/pkgs/development/ocaml-modules/genspio/default.nix @@ -6,6 +6,8 @@ buildDunePackage rec { pname = "genspio"; version = "0.0.2"; + useDune2 = false; + src = fetchFromGitHub { owner = "hammerlab"; repo = pname; @@ -13,7 +15,7 @@ buildDunePackage rec { sha256 = "0cp6p1f713sfv4p2r03bzvjvakzn4ili7hf3a952b3w1k39hv37x"; }; - minimumOCamlVersion = "4.03"; + minimalOCamlVersion = "4.03"; propagatedBuildInputs = [ nonstd sosa ]; diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage.nix b/pkgs/development/ocaml-modules/janestreet/janePackage.nix index 63c4a900fce..da268757601 100644 --- a/pkgs/development/ocaml-modules/janestreet/janePackage.nix +++ b/pkgs/development/ocaml-modules/janestreet/janePackage.nix @@ -5,7 +5,9 @@ buildDunePackage (args // { inherit version buildInputs; - minimumOCamlVersion = "4.04"; + useDune2 = false; + + minimalOCamlVersion = "4.04"; src = fetchFromGitHub { owner = "janestreet"; diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix b/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix index 3d280a509ac..5b918683570 100644 --- a/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix +++ b/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix @@ -5,6 +5,8 @@ buildDunePackage (args // { inherit version; + useDune2 = false; + minimalOCamlVersion = "4.07"; src = fetchFromGitHub { diff --git a/pkgs/development/ocaml-modules/lwt/camlp4.nix b/pkgs/development/ocaml-modules/lwt/camlp4.nix index 88bb3d6759a..e48d7cfa185 100644 --- a/pkgs/development/ocaml-modules/lwt/camlp4.nix +++ b/pkgs/development/ocaml-modules/lwt/camlp4.nix @@ -11,7 +11,9 @@ buildDunePackage rec { sha256 = "1lv8z6ljfy47yvxmwf5jrvc5d3dc90r1n291x53j161sf22ddrk9"; }; - minimumOCamlVersion = "4.02"; + useDune2 = false; + + minimalOCamlVersion = "4.02"; propagatedBuildInputs = [ camlp4 ]; diff --git a/pkgs/development/ocaml-modules/nonstd/default.nix b/pkgs/development/ocaml-modules/nonstd/default.nix index 9de535154ee..82b1feed540 100644 --- a/pkgs/development/ocaml-modules/nonstd/default.nix +++ b/pkgs/development/ocaml-modules/nonstd/default.nix @@ -4,7 +4,9 @@ buildDunePackage rec { pname = "nonstd"; version = "0.0.3"; - minimumOCamlVersion = "4.02"; + useDune2 = false; + + minimalOCamlVersion = "4.02"; src = fetchzip { url = "https://bitbucket.org/smondet/${pname}/get/${pname}.${version}.tar.gz"; diff --git a/pkgs/development/ocaml-modules/ocamlfuse/default.nix b/pkgs/development/ocaml-modules/ocamlfuse/default.nix index 4dcaca42788..13ac62f6451 100644 --- a/pkgs/development/ocaml-modules/ocamlfuse/default.nix +++ b/pkgs/development/ocaml-modules/ocamlfuse/default.nix @@ -1,14 +1,14 @@ { lib, buildDunePackage, fetchFromGitHub, camlidl, fuse, dune-configurator }: -buildDunePackage { +buildDunePackage rec { pname = "ocamlfuse"; - version = "2.7.1_cvs6_e35e76b"; + version = "2.7.1_cvs7"; src = fetchFromGitHub { owner = "astrada"; repo = "ocamlfuse"; - rev = "e35e76bee3b06806256b5bfca108b7697267cd5c"; - sha256 = "1v9g0wh7rnjkrjrnw50145g6ry38plyjs8fq8w0nlzwizhf3qhff"; + rev = "v${version}"; + sha256 = "6nmPXZx38hBGlg+gV9nnlRpPfeSAqDj4zBPcjUNvTRo="; }; # This currently fails with dune diff --git a/pkgs/development/ocaml-modules/owee/default.nix b/pkgs/development/ocaml-modules/owee/default.nix index 9eb81003d47..7b15437a7ed 100644 --- a/pkgs/development/ocaml-modules/owee/default.nix +++ b/pkgs/development/ocaml-modules/owee/default.nix @@ -1,20 +1,19 @@ -{ lib, buildDunePackage, fetchFromGitHub }: +{ lib, buildDunePackage, fetchurl }: buildDunePackage rec { - minimumOCamlVersion = "4.06"; + minimalOCamlVersion = "4.06"; + useDune2 = true; pname = "owee"; - version = "0.3"; + version = "0.4"; - src = fetchFromGitHub { - owner = "let-def"; - repo = "owee"; - rev = "v${version}"; - sha256 = "0jp8ca57488d7sj2nqy4yxcdpda6sxx51yyi8k6888hbinhyqp0j"; + src = fetchurl { + url = "https://github.com/let-def/owee/releases/download/v${version}/owee-${version}.tbz"; + sha256 = "sha256:055bi0yfdki1pqagbhrwmfvigyawjgsmqw04zhpp6hds8513qzvb"; }; meta = { description = "An experimental OCaml library to work with DWARF format"; - inherit (src.meta) homepage; + homepage = "https://github.com/let-def/owee/"; license = lib.licenses.mit; maintainers = [ lib.maintainers.vbgl ]; }; diff --git a/pkgs/development/ocaml-modules/spacetime_lib/default.nix b/pkgs/development/ocaml-modules/spacetime_lib/default.nix index 009b2ce3261..442d06e4f69 100644 --- a/pkgs/development/ocaml-modules/spacetime_lib/default.nix +++ b/pkgs/development/ocaml-modules/spacetime_lib/default.nix @@ -1,4 +1,7 @@ -{ lib, fetchFromGitHub, buildDunePackage, owee }: +{ lib, fetchFromGitHub, buildDunePackage, ocaml, owee }: + +lib.throwIfNot (lib.versionAtLeast "4.12" ocaml.version) + "spacetime_lib is not available for OCaml ${ocaml.version}" buildDunePackage rec { pname = "spacetime_lib"; diff --git a/pkgs/development/php-packages/box/default.nix b/pkgs/development/php-packages/box/default.nix index b19b275019d..bc0f4ac636c 100644 --- a/pkgs/development/php-packages/box/default.nix +++ b/pkgs/development/php-packages/box/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/box/box.phar makeWrapper ${php}/bin/php $out/bin/box \ --add-flags "-d phar.readonly=0 $out/libexec/box/box.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/deployer/default.nix b/pkgs/development/php-packages/deployer/default.nix index 7679fb5ea51..661a6310958 100644 --- a/pkgs/development/php-packages/deployer/default.nix +++ b/pkgs/development/php-packages/deployer/default.nix @@ -14,6 +14,7 @@ mkDerivation rec { nativeBuildInputs = [ makeWrapper installShellFiles ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/deployer/deployer.phar makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$out/libexec/deployer/deployer.phar" @@ -22,6 +23,7 @@ mkDerivation rec { installShellCompletion --cmd dep \ --bash <($out/bin/dep autocomplete --install) \ --zsh <($out/bin/dep autocomplete --install) + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/phing/default.nix b/pkgs/development/php-packages/phing/default.nix index a8835241d09..6c5af7d5d27 100644 --- a/pkgs/development/php-packages/phing/default.nix +++ b/pkgs/development/php-packages/phing/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/phing/phing.phar makeWrapper ${php}/bin/php $out/bin/phing \ --add-flags "$out/libexec/phing/phing.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/phive/default.nix b/pkgs/development/php-packages/phive/default.nix new file mode 100644 index 00000000000..f564cb53692 --- /dev/null +++ b/pkgs/development/php-packages/phive/default.nix @@ -0,0 +1,31 @@ +{ mkDerivation, fetchurl, makeWrapper, lib, php }: + +mkDerivation rec { + pname = "phive"; + version = "0.15.0"; + + src = fetchurl { + url = "https://github.com/phar-io/phive/releases/download/${version}/phive-${version}.phar"; + sha256 = "sha256-crMr8d5nsVt7+zQ5xPeph/JXmTEn6jJFVtp3mOgylB4="; + }; + + dontUnpack = true; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + install -D $src $out/libexec/phive/phive.phar + makeWrapper ${php}/bin/php $out/bin/phive \ + --add-flags "$out/libexec/phive/phive.phar" + runHook postInstall + ''; + + meta = with lib; { + description = "The Phar Installation and Verification Environment (PHIVE)"; + homepage = "https://github.com/phar-io/phive"; + license = licenses.bsd3; + maintainers = with maintainers; teams.php.members; + }; +} diff --git a/pkgs/development/php-packages/php-cs-fixer/default.nix b/pkgs/development/php-packages/php-cs-fixer/default.nix index 292d0b2ca08..90bd1af0078 100644 --- a/pkgs/development/php-packages/php-cs-fixer/default.nix +++ b/pkgs/development/php-packages/php-cs-fixer/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/php-cs-fixer/php-cs-fixer.phar makeWrapper ${php}/bin/php $out/bin/php-cs-fixer \ --add-flags "$out/libexec/php-cs-fixer/php-cs-fixer.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/php-parallel-lint/default.nix b/pkgs/development/php-packages/php-parallel-lint/default.nix index 50fd23540ee..d0335142490 100644 --- a/pkgs/development/php-packages/php-parallel-lint/default.nix +++ b/pkgs/development/php-packages/php-parallel-lint/default.nix @@ -20,15 +20,19 @@ mkDerivation { ]; buildPhase = '' + runHook preBuild composer dump-autoload box build + runHook postBuild ''; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D parallel-lint.phar $out/libexec/php-parallel-lint/php-parallel-lint.phar makeWrapper ${php}/bin/php $out/bin/php-parallel-lint \ --add-flags "$out/libexec/php-parallel-lint/php-parallel-lint.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/phpcbf/default.nix b/pkgs/development/php-packages/phpcbf/default.nix index cef7c2986e8..1cc6f46bd09 100644 --- a/pkgs/development/php-packages/phpcbf/default.nix +++ b/pkgs/development/php-packages/phpcbf/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/phpcbf/phpcbf.phar makeWrapper ${php}/bin/php $out/bin/phpcbf \ --add-flags "$out/libexec/phpcbf/phpcbf.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/phpcs/default.nix b/pkgs/development/php-packages/phpcs/default.nix index baad111cec5..877f587717d 100644 --- a/pkgs/development/php-packages/phpcs/default.nix +++ b/pkgs/development/php-packages/phpcs/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/phpcs/phpcs.phar makeWrapper ${php}/bin/php $out/bin/phpcs \ --add-flags "$out/libexec/phpcs/phpcs.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/phpmd/default.nix b/pkgs/development/php-packages/phpmd/default.nix index 763fd857c35..228fd25ea55 100644 --- a/pkgs/development/php-packages/phpmd/default.nix +++ b/pkgs/development/php-packages/phpmd/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/phpmd/phpmd.phar makeWrapper ${php}/bin/php $out/bin/phpmd \ --add-flags "$out/libexec/phpmd/phpmd.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/phpstan/default.nix b/pkgs/development/php-packages/phpstan/default.nix index 41840f5ba9e..bced843d955 100644 --- a/pkgs/development/php-packages/phpstan/default.nix +++ b/pkgs/development/php-packages/phpstan/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/phpstan/phpstan.phar makeWrapper ${php}/bin/php $out/bin/phpstan \ --add-flags "$out/libexec/phpstan/phpstan.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/psalm/default.nix b/pkgs/development/php-packages/psalm/default.nix index a772ae441a5..01f79c36397 100644 --- a/pkgs/development/php-packages/psalm/default.nix +++ b/pkgs/development/php-packages/psalm/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin install -D $src $out/libexec/psalm/psalm.phar makeWrapper ${php}/bin/php $out/bin/psalm \ --add-flags "$out/libexec/psalm/psalm.phar" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/php-packages/psysh/default.nix b/pkgs/development/php-packages/psysh/default.nix index 5b7c02eefd8..f1105dea911 100644 --- a/pkgs/development/php-packages/psysh/default.nix +++ b/pkgs/development/php-packages/psysh/default.nix @@ -16,10 +16,12 @@ mkDerivation { nativeBuildInputs = [ makeWrapper ]; installPhase = '' + runHook preInstall mkdir -p $out/bin tar -xzf $src -C $out/bin chmod +x $out/bin/psysh wrapProgram $out/bin/psysh --prefix PATH : "${lib.makeBinPath [ php ]}" + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/development/python-modules/aio-geojson-client/default.nix b/pkgs/development/python-modules/aio-geojson-client/default.nix index f00a75961b9..b0629483d01 100644 --- a/pkgs/development/python-modules/aio-geojson-client/default.nix +++ b/pkgs/development/python-modules/aio-geojson-client/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "aio-geojson-client"; - version = "0.16"; + version = "0.17"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "exxamalte"; repo = "python-aio-geojson-client"; rev = "v${version}"; - hash = "sha256-u3SwrSxeBJrBTHfqKY/mAb2p1jqW2AvRsHomKsI81gM="; + hash = "sha256-5GiQgtbvYeleovFbXO2vlr2XPsDIWZiElM64O+urMcY="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/allure-behave/default.nix b/pkgs/development/python-modules/allure-behave/default.nix new file mode 100644 index 00000000000..e7cd81d5b5d --- /dev/null +++ b/pkgs/development/python-modules/allure-behave/default.nix @@ -0,0 +1,38 @@ +{ lib +, fetchPypi +, buildPythonPackage +, pythonOlder +, behave +, allure-python-commons +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "allure-behave"; + version = "2.9.45"; + + disabled = pythonOlder "3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-aK0SgQIXpuUoSTz8jg5IPKQM2Xvk2EfkSGigsy/GFNo="; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + pythonImportsCheck = [ "allure_behave" ]; + + propagatedBuildInputs = [ + allure-python-commons + behave + ]; + + meta = with lib; { + description = "Allure behave integration."; + homepage = "https://github.com/allure-framework/allure-python"; + license = licenses.asl20; + maintainers = with maintainers; [ happysalada ]; + }; +} diff --git a/pkgs/development/python-modules/parts/default.nix b/pkgs/development/python-modules/parts/default.nix index 4c798f43c25..088510714a0 100644 --- a/pkgs/development/python-modules/parts/default.nix +++ b/pkgs/development/python-modules/parts/default.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "parts"; - version = "1.2.2"; + version = "1.3.0"; format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "6463d5c49142d14029196a6a781b57bc98ba5b3d93244f4ed637f534d08129c1"; + sha256 = "sha256-NrhNpWyzqwn1bNnuqmcyKcUED0A4v7VJE4ZlTHFafJY="; }; # Project has no tests diff --git a/pkgs/development/python-modules/pudb/default.nix b/pkgs/development/python-modules/pudb/default.nix index 0ae60b381c6..406d81e15bb 100644 --- a/pkgs/development/python-modules/pudb/default.nix +++ b/pkgs/development/python-modules/pudb/default.nix @@ -1,7 +1,6 @@ { lib , buildPythonPackage , dataclasses -, isPy3k , fetchPypi , jedi , pygments @@ -14,14 +13,14 @@ buildPythonPackage rec { pname = "pudb"; - version = "2022.1"; + version = "2022.1.1"; format = "setuptools"; - disabled = !isPy3k; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "e827a4b489dcad561189535db6677becbf32164b2b44df00786eb2d5e00c587e"; + hash = "sha256-2zvdZkI8nSkHTBwsSfyyJL0Nbwgxn+0bTn6taDkUCD8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pyathena/default.nix b/pkgs/development/python-modules/pyathena/default.nix index c9db28324e9..fe9d3276e1b 100644 --- a/pkgs/development/python-modules/pyathena/default.nix +++ b/pkgs/development/python-modules/pyathena/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "pyathena"; - version = "2.5.0"; + version = "2.5.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "PyAthena"; inherit version; - sha256 = "sha256-2Z0KjJm6cWhMTKXa2zBs3Ef2i/e1tqQYZx5sSKIT9a4="; + sha256 = "sha256-GTcDiDtZGgTpdl6YBgPuztv7heEPZ/ymhup/4JwfELA="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/types-requests/default.nix b/pkgs/development/python-modules/types-requests/default.nix index 165c65f3a9e..c62190ff5da 100644 --- a/pkgs/development/python-modules/types-requests/default.nix +++ b/pkgs/development/python-modules/types-requests/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "types-requests"; - version = "2.27.11"; + version = "2.27.12"; format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-an7SSyF4CvSlteJMMQss2IX7YS31/ZVYTQPYfl8qGVo="; + sha256 = "sha256-/ROC+i4o6shI+u2wMyhAIE8G8MtRcAjjx7goLKU+VtI="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/types-urllib3/default.nix b/pkgs/development/python-modules/types-urllib3/default.nix index 7bffc7826a3..235535ce971 100644 --- a/pkgs/development/python-modules/types-urllib3/default.nix +++ b/pkgs/development/python-modules/types-urllib3/default.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "types-urllib3"; - version = "1.26.10"; + version = "1.26.11"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-omiY9TDmw/Q/JbkH8riESGho/9Vqn6qUy/mz624WXWo="; + hash = "sha256-JNZORBFohR6wXx0CLeGK4xVY9WScjxEX44TC6F4xMVs="; }; # Module doesn't have tests diff --git a/pkgs/development/python-modules/unidiff/default.nix b/pkgs/development/python-modules/unidiff/default.nix index 7dfd5c9d276..4c776070ae6 100644 --- a/pkgs/development/python-modules/unidiff/default.nix +++ b/pkgs/development/python-modules/unidiff/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "unidiff"; - version = "0.7.0"; + version = "0.7.3"; src = fetchPypi { inherit pname version; - sha256 = "91bb13b4969514a400679d9ae5e29a6ffad85346087677f8b5e2e036af817447"; + sha256 = "sha256-1fLlOpoA2zIkqMNjSbU4Dg4i0a7GxpSxT7lIPuk8YgU="; }; pythonImportsCheck = [ "unidiff" ]; diff --git a/pkgs/development/python-modules/wled/default.nix b/pkgs/development/python-modules/wled/default.nix index 3b88afa7e65..3bd0d5b55b9 100644 --- a/pkgs/development/python-modules/wled/default.nix +++ b/pkgs/development/python-modules/wled/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "wled"; - version = "0.13.0"; + version = "0.13.1"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "frenck"; repo = "python-wled"; rev = "v${version}"; - sha256 = "sha256-n+TIzlnyPeSywTQr7wlGNezsbQ2+S/WYt1H95+Id2Rw="; + sha256 = "sha256-QQPrAfk+BX8mjqn9ISim9hLEZR2nbgxbkwCv+91yeRY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/tools/analysis/actionlint/default.nix b/pkgs/development/tools/analysis/actionlint/default.nix index 602f6815fb9..68112b01cfb 100644 --- a/pkgs/development/tools/analysis/actionlint/default.nix +++ b/pkgs/development/tools/analysis/actionlint/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "actionlint"; - version = "1.6.9"; + version = "1.6.10"; subPackages = [ "cmd/actionlint" ]; @@ -10,10 +10,10 @@ buildGoModule rec { owner = "rhysd"; repo = "actionlint"; rev = "v${version}"; - sha256 = "sha256-UDa/qFtRTED6d+lPbjNknX9qFZ3QZ9jiD0ByvLsGARk="; + sha256 = "sha256-RFsNJiCeSAeEWOUnfBpeIZKoS2mlXazYMQd1M6yFLGU="; }; - vendorSha256 = "sha256-0tytdTZxnWYl8AxaquF0ArY3dy51j8H2kzw69qcSHzk="; + vendorSha256 = "sha256-CxNER8aQftMG14M+x6bPwcXgUZRkUDYZtFg1cPxxg+I="; nativeBuildInputs = [ ronn installShellFiles ]; diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix index 36c85285704..6ef9806bf37 100644 --- a/pkgs/development/tools/analysis/flow/default.nix +++ b/pkgs/development/tools/analysis/flow/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "flow"; - version = "0.172.0"; + version = "0.173.0"; src = fetchFromGitHub { owner = "facebook"; repo = "flow"; rev = "v${version}"; - sha256 = "sha256-N3mP1dhul7Ljn278CJmge4IrVllQJsc73A3/7mTSU70="; + sha256 = "sha256-F0t85/sq9p+eNEf2XAGxw+ZWeRgUbkhrKFdGASijuAs="; }; installPhase = '' diff --git a/pkgs/development/tools/buildkit/default.nix b/pkgs/development/tools/buildkit/default.nix index b9ae4e4dd88..df644935cf1 100644 --- a/pkgs/development/tools/buildkit/default.nix +++ b/pkgs/development/tools/buildkit/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "buildkit"; - version = "0.9.3"; + version = "0.10.0"; src = fetchFromGitHub { owner = "moby"; repo = "buildkit"; rev = "v${version}"; - sha256 = "sha256-xjuHMjJjA4sx2Hrr6tPpvKtSmhGZ3AZka733DLxmYfk="; + sha256 = "sha256-Pdnu0zG1LteAob0YUuG/XDh2pfBj5UO2GrkWFlMZeGY="; }; vendorSha256 = null; diff --git a/pkgs/development/tools/cloud-nuke/default.nix b/pkgs/development/tools/cloud-nuke/default.nix index 4fa198f32c0..f1f44a57775 100644 --- a/pkgs/development/tools/cloud-nuke/default.nix +++ b/pkgs/development/tools/cloud-nuke/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "cloud-nuke"; - version = "0.10.0"; + version = "0.11.0"; src = fetchFromGitHub { owner = "gruntwork-io"; repo = pname; rev = "v${version}"; - sha256 = "sha256-y1YpPYTejeZjz4nJmyAPT8rYaEguaJpBfAAfF38dpA4="; + sha256 = "sha256-G1RQEKb3vK8lg0jakCtIMgQXmWqfsq0QWHwU8TAbBbE="; }; vendorSha256 = "sha256-McCbogZvgm9pnVjay9O2CxAh+653JnDMcU4CHD0PTPI="; diff --git a/pkgs/development/tools/mold/default.nix b/pkgs/development/tools/mold/default.nix index 00bcd3a5f12..db1c13da2f9 100644 --- a/pkgs/development/tools/mold/default.nix +++ b/pkgs/development/tools/mold/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "mold"; - version = "1.1"; + version = "1.1.1"; src = fetchFromGitHub { owner = "rui314"; repo = pname; rev = "v${version}"; - sha256 = "sha256-+uIP/U7H9P7oy78TL1edX9+JNYUzpwro105PYj3D6Yk="; + sha256 = "sha256-+uPVt3w3A25JFyENxqhAcjZMRzSowi2uHwGjkeQP8Og="; }; buildInputs = [ zlib openssl ]; diff --git a/pkgs/development/tools/ocaml/dune/3.nix b/pkgs/development/tools/ocaml/dune/3.nix index 59ea9c43512..f6f45944a81 100644 --- a/pkgs/development/tools/ocaml/dune/3.nix +++ b/pkgs/development/tools/ocaml/dune/3.nix @@ -6,11 +6,11 @@ else stdenv.mkDerivation rec { pname = "dune"; - version = "3.0.2"; + version = "3.0.3"; src = fetchurl { url = "https://github.com/ocaml/dune/releases/download/${version}/fiber-${version}.tbz"; - sha256 = "sha256-o108qIeWMOX0VU/wWdc5bg/UDCT2CCcw/Xx3nFiDbes="; + sha256 = "sha256-1QRJmhZY8Nmcrvv/1zhvLjHUbOynMWcVf+RobEHlcy8="; }; nativeBuildInputs = [ ocaml findlib ]; diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix index a08aaac832e..39f6d5f7aa2 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix @@ -6,6 +6,8 @@ buildDunePackage rec { version = "3.2.1"; pname = "js_of_ocaml-camlp4"; + useDune2 = false; + src = fetchFromGitHub { owner = "ocsigen"; repo = "js_of_ocaml"; diff --git a/pkgs/development/tools/profiling/systemtap/default.nix b/pkgs/development/tools/profiling/systemtap/default.nix index 31eafb1086b..ac00e341878 100644 --- a/pkgs/development/tools/profiling/systemtap/default.nix +++ b/pkgs/development/tools/profiling/systemtap/default.nix @@ -16,8 +16,8 @@ let pname = "systemtap"; inherit version; src = fetchgit { inherit url rev sha256; }; - nativeBuildInputs = [ pkg-config cpio ]; - buildInputs = [ elfutils gettext python3 python3.pkgs.setuptools ]; + nativeBuildInputs = [ pkg-config cpio python3 python3.pkgs.setuptools ]; + buildInputs = [ elfutils gettext ]; enableParallelBuilding = true; }; diff --git a/pkgs/development/tools/wllvm/default.nix b/pkgs/development/tools/wllvm/default.nix index 85dbc4f731a..0234c936dc1 100644 --- a/pkgs/development/tools/wllvm/default.nix +++ b/pkgs/development/tools/wllvm/default.nix @@ -1,13 +1,12 @@ { lib, python3Packages }: python3Packages.buildPythonApplication rec { - version = "1.2.8"; + version = "1.3.1"; pname = "wllvm"; - name = "${pname}-${version}"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "1d88fzg4ba4r3hwrinnv6agiyj3xxdy4yryb8wz2ml51nc6bi591"; + sha256 = "sha256-PgV6V18FyezIZpqMQEbyv98MaVM7h7T7/Kvg3yMMwzE="; }; meta = with lib; { diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index b813d6451ee..fa2fe98f76c 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -17,15 +17,15 @@ rustPlatform.buildRustPackage rec { pname = "deno"; - version = "1.19.3"; + version = "1.19.1"; src = fetchFromGitHub { owner = "denoland"; repo = pname; rev = "v${version}"; - sha256 = "sha256-mm4hCRjQitFvSA3ow/p/N+UgG3P7FC440Obfqz3KVbQ="; + sha256 = "sha256-BqwiconG5hn5RPV+hlKu6e6+GjZA4Im/dD+no3IduYw="; }; - cargoSha256 = "sha256-tSIYs52pZk/h2hVJLHUbwlsl2gdu2Mszs9OBR52EQKQ="; + cargoSha256 = "sha256-q/5AezLQgN7WdGsbHoxX5riJMlxw3cTFhVs5OvCeI5U="; # Install completions post-install nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/development/web/deno/librusty_v8.nix b/pkgs/development/web/deno/librusty_v8.nix index ce8209ab650..a1ea206fabd 100644 --- a/pkgs/development/web/deno/librusty_v8.nix +++ b/pkgs/development/web/deno/librusty_v8.nix @@ -11,11 +11,11 @@ let }; in fetch_librusty_v8 { - version = "0.40.2"; + version = "0.40.0"; shas = { - x86_64-linux = "sha256-RtEKNDQdL0orI0B4953RaT18KeWPZJIdhPnYbJGj2eM="; - aarch64-linux = "sha256-TL5boy1X/OgOt17H6PYEA5D3MJbChCULrB38ykC5Ghk="; - x86_64-darwin = "sha256-ABnHMABtggrHoTjeFB8YVH6PV2HvVlPZTQWaeRnRZaE="; - aarch64-darwin = "sha256-PGrRmNJxS49K9jviQTxRJlTq1SAn+8epXXNJaexTAWU="; + x86_64-linux = "sha256-VHkopvK6f5lxdFLBywHe0Z+su2g5hgBsLcTxrwFgq0Y="; + aarch64-linux = "sha256-awWjziqqUDAl9fcLADUjytLFds1y93y5gZoOtvReL9w="; + x86_64-darwin = "sha256-WlRnGiJK3iFgTjNzr25rvmmiPAICPRLaD5hbys7MoJA="; + aarch64-darwin = "sha256-zblcAQVwnLQWh85wajg8CalqxycSR+4WGoSC2dnX7jA="; }; } diff --git a/pkgs/games/freedroidrpg/default.nix b/pkgs/games/freedroidrpg/default.nix index e0582c524ec..84fd9c154a2 100644 --- a/pkgs/games/freedroidrpg/default.nix +++ b/pkgs/games/freedroidrpg/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, lib, stdenv, pkg-config, gettext, python3, SDL, SDL_image, SDL_gfx, SDL_mixer, libogg, libvorbis, lua5_3, libjpeg, libpng, zlib, libiconv }: +{ fetchurl, fetchpatch, lib, stdenv, pkg-config, gettext, python3, SDL, SDL_image, SDL_gfx, SDL_mixer, libogg, libvorbis, lua5_3, libjpeg, libpng, zlib, libiconv }: let version = "0.16.1"; @@ -11,6 +11,15 @@ in stdenv.mkDerivation { sha256 = "0n4kn38ncmcy3lrxmq8fjry6c1z50z4q1zcqfig0j4jb0dsz2va2"; }; + patches = [ + # Pull upstream fix for -fno-common tolchains. + (fetchpatch { + name = "fno-common.patch"; + url = "https://gitlab.com/freedroid/freedroid-src/-/commit/e610d427374226b79da5258d979936459f30c761.patch"; + sha256 = "1s7sw4dkc7b6i72j6x47driq6v0k3wss48l9ivd4fw40n3iaxjb1"; + }) + ]; + nativeBuildInputs = [ pkg-config gettext python3 ]; buildInputs = [ diff --git a/pkgs/os-specific/linux/akvcam/default.nix b/pkgs/os-specific/linux/akvcam/default.nix index 700389a4a18..0724118431c 100644 --- a/pkgs/os-specific/linux/akvcam/default.nix +++ b/pkgs/os-specific/linux/akvcam/default.nix @@ -12,7 +12,8 @@ stdenv.mkDerivation rec { }; sourceRoot = "source/src"; - makeFlags = [ + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags ++ [ "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; diff --git a/pkgs/os-specific/linux/apfs/default.nix b/pkgs/os-specific/linux/apfs/default.nix index 62437d662b9..98fd83ed5d5 100644 --- a/pkgs/os-specific/linux/apfs/default.nix +++ b/pkgs/os-specific/linux/apfs/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { hardeningDisable = [ "pic" ]; nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KERNELRELEASE=${kernel.modDirVersion}" "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" diff --git a/pkgs/os-specific/linux/batman-adv/default.nix b/pkgs/os-specific/linux/batman-adv/default.nix index 354f4b1bff2..123c42e8397 100644 --- a/pkgs/os-specific/linux/batman-adv/default.nix +++ b/pkgs/os-specific/linux/batman-adv/default.nix @@ -12,11 +12,13 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags ++ [ + "KERNELPATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; hardeningDisable = [ "pic" ]; preBuild = '' - makeFlags="KERNELPATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" sed -i -e "s,INSTALL_MOD_DIR=,INSTALL_MOD_PATH=$out INSTALL_MOD_DIR=," \ -e /depmod/d Makefile ''; diff --git a/pkgs/os-specific/linux/can-isotp/default.nix b/pkgs/os-specific/linux/can-isotp/default.nix index 9c30aae86fe..73edb3be9ec 100644 --- a/pkgs/os-specific/linux/can-isotp/default.nix +++ b/pkgs/os-specific/linux/can-isotp/default.nix @@ -13,16 +13,13 @@ stdenv.mkDerivation { sha256 = "1laax93czalclg7cy9iq1r7hfh9jigh7igj06y9lski75ap2vhfq"; }; - KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; - INSTALL_MOD_PATH = "\${out}"; + makeFlags = kernel.makeFlags ++ [ + "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; - buildPhase = '' - make modules - ''; - - installPhase = '' - make modules_install - ''; + buildFlags = [ "modules" ]; + installTargets = [ "modules_install" ]; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/cryptodev/default.nix b/pkgs/os-specific/linux/cryptodev/default.nix index f09679ba212..cc3a1d81109 100644 --- a/pkgs/os-specific/linux/cryptodev/default.nix +++ b/pkgs/os-specific/linux/cryptodev/default.nix @@ -11,6 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-vJQ10rG5FGbeEOqCUmH/pZ0P77kAW/MtUarywbtIyHw="; }; + nativeBuildInputs = kernel.moduleBuildDependencies; hardeningDisable = [ "pic" ]; KERNEL_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; diff --git a/pkgs/os-specific/linux/digimend/default.nix b/pkgs/os-specific/linux/digimend/default.nix index 6b5f66f825b..e26509d3a7c 100644 --- a/pkgs/os-specific/linux/digimend/default.nix +++ b/pkgs/os-specific/linux/digimend/default.nix @@ -13,8 +13,6 @@ stdenv.mkDerivation rec { sha256 = "1l54j85540386a8aypqka7p5hy1b63cwmpsscv9rmmf10f78v8mm"; }; - INSTALL_MOD_PATH = "\${out}"; - postPatch = '' sed 's/udevadm /true /' -i Makefile sed 's/depmod /true /' -i Makefile @@ -38,10 +36,11 @@ stdenv.mkDerivation rec { rm -r $out/lib/udev ''; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KVERSION=${kernel.modDirVersion}" "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "DESTDIR=${placeholder "out"}" + "INSTALL_MOD_PATH=${placeholder "out"}" ]; meta = with lib; { diff --git a/pkgs/os-specific/linux/dpdk-kmods/default.nix b/pkgs/os-specific/linux/dpdk-kmods/default.nix index a188336cbe5..694e508dcd0 100644 --- a/pkgs/os-specific/linux/dpdk-kmods/default.nix +++ b/pkgs/os-specific/linux/dpdk-kmods/default.nix @@ -11,6 +11,9 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; + makeFlags = kernel.makeFlags ++ [ + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; KSRC = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; nativeBuildInputs = kernel.moduleBuildDependencies; @@ -18,10 +21,9 @@ stdenv.mkDerivation rec { preBuild = "cd linux/igb_uio"; installPhase = '' - make -C ${KSRC} M=$(pwd) modules_install + make -C ${KSRC} M=$(pwd) modules_install $makeFlags ''; - INSTALL_MOD_PATH = placeholder "out"; enableParallelBuilding = true; meta = with lib; { diff --git a/pkgs/os-specific/linux/ena/default.nix b/pkgs/os-specific/linux/ena/default.nix index 1257217a520..5873a2fe2c1 100644 --- a/pkgs/os-specific/linux/ena/default.nix +++ b/pkgs/os-specific/linux/ena/default.nix @@ -14,6 +14,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; # linux 3.12 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; @@ -27,7 +28,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - strip -S ena.ko + $STRIP -S ena.ko dest=$out/lib/modules/${kernel.modDirVersion}/misc mkdir -p $dest cp ena.ko $dest/ diff --git a/pkgs/os-specific/linux/evdi/default.nix b/pkgs/os-specific/linux/evdi/default.nix index e40448be435..721a49ed4a5 100644 --- a/pkgs/os-specific/linux/evdi/default.nix +++ b/pkgs/os-specific/linux/evdi/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ kernel libdrm ]; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KVER=${kernel.modDirVersion}" "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; diff --git a/pkgs/os-specific/linux/fwts/module.nix b/pkgs/os-specific/linux/fwts/module.nix index 737d3316e21..72f25aa800e 100644 --- a/pkgs/os-specific/linux/fwts/module.nix +++ b/pkgs/os-specific/linux/fwts/module.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; diff --git a/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix b/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix index ab2e099d970..bcea220cc96 100644 --- a/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix +++ b/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KERNEL_SOURCE_DIR=${kernel.dev}/${kerneldir}/build" "INSTALL_MOD_PATH=$(out)" ]; diff --git a/pkgs/os-specific/linux/hid-nintendo/default.nix b/pkgs/os-specific/linux/hid-nintendo/default.nix index e9ee88252ea..7d01120b2f3 100644 --- a/pkgs/os-specific/linux/hid-nintendo/default.nix +++ b/pkgs/os-specific/linux/hid-nintendo/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "-C" "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "M=$(sourceRoot)" diff --git a/pkgs/os-specific/linux/jool/default.nix b/pkgs/os-specific/linux/jool/default.nix index 2fd10778e2c..9246ca679a6 100644 --- a/pkgs/os-specific/linux/jool/default.nix +++ b/pkgs/os-specific/linux/jool/default.nix @@ -16,13 +16,12 @@ stdenv.mkDerivation { sed -e 's@/lib/modules/\$(.*)@${kernel.dev}/lib/modules/${kernel.modDirVersion}@' -i src/mod/*/Makefile ''; - buildPhase = '' - make -C src/mod - ''; + makeFlags = kernel.makeFlags ++ [ + "-C src/mod" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; - installPhase = '' - make -C src/mod modules_install INSTALL_MOD_PATH=$out - ''; + installTargets = "modules_install"; meta = with lib; { homepage = "https://www.jool.mx/"; diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 4f12337c893..1ac9cbe00ea 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -56,7 +56,7 @@ let hasAttr getAttr optional optionals optionalString optionalAttrs maintainers platforms; # Dependencies that are required to build kernel modules - moduleBuildDependencies = optional (lib.versionAtLeast version "4.14") libelf; + moduleBuildDependencies = [ perl ] ++ optional (lib.versionAtLeast version "4.14") libelf; installkernel = writeTextFile { name = "installkernel"; executable=true; text = '' diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index 8753f34087c..99ffb7756da 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -9,16 +9,16 @@ stdenv.mkDerivation rec { sha256 = "0hzksx2fw008jdsgfzpws9g7imy6ryw09ai5y0knvrmvr68nvj57"; }; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = kernel.moduleBuildDependencies; hardeningDisable = [ "pic" ]; NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; - preConfigure = '' - export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - export INSTALL_MOD_PATH="$out" - ''; + makeFlags = kernel.makeFlags ++ [ + "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; installTargets = [ "modules_install" ]; diff --git a/pkgs/os-specific/linux/mba6x_bl/default.nix b/pkgs/os-specific/linux/mba6x_bl/default.nix index fe9c11ace1f..04a89ad038d 100644 --- a/pkgs/os-specific/linux/mba6x_bl/default.nix +++ b/pkgs/os-specific/linux/mba6x_bl/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" ]; diff --git a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix index 070b4a6207e..0b4fec4dfb4 100644 --- a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix +++ b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix @@ -11,14 +11,17 @@ stdenv.mkDerivation rec { sha256 = "sha256-o6yGiR+Y5SnX1johdi7fQWP5ts7HdDMqeju75UOhgik="; }; + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; + buildPhase = '' make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ - -j$NIX_BUILD_CORES M=$(pwd) modules + -j$NIX_BUILD_CORES M=$(pwd) modules $makeFlags ''; installPhase = '' make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ - INSTALL_MOD_PATH=$out M=$(pwd) modules_install + INSTALL_MOD_PATH=$out M=$(pwd) modules_install $makeFlags ''; meta = with lib; { diff --git a/pkgs/os-specific/linux/netatop/default.nix b/pkgs/os-specific/linux/netatop/default.nix index 28f989929a4..dec1399d169 100644 --- a/pkgs/os-specific/linux/netatop/default.nix +++ b/pkgs/os-specific/linux/netatop/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation { sha256 = "0qjw8glfdmngfvbn1w63q128vxdz2jlabw13y140ga9i5ibl6vvk"; }; + nativeBuildInputs = kernel.moduleBuildDependencies; buildInputs = [ kmod zlib ]; hardeningDisable = [ "pic" ]; @@ -36,6 +37,8 @@ stdenv.mkDerivation { kmod=${kmod} substituteAllInPlace netatop.service ''; + makeFlags = kernel.makeFlags; + preInstall = '' mkdir -p $out/lib/systemd/system $out/bin $out/sbin $out/share/man/man{4,8} mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra diff --git a/pkgs/os-specific/linux/openrazer/driver.nix b/pkgs/os-specific/linux/openrazer/driver.nix index 6e387de0719..2de63580ac3 100644 --- a/pkgs/os-specific/linux/openrazer/driver.nix +++ b/pkgs/os-specific/linux/openrazer/driver.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (common // { nativeBuildInputs = kernel.moduleBuildDependencies; - buildFlags = [ + makeFlags = kernel.makeFlags ++ [ "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; diff --git a/pkgs/os-specific/linux/r8168/default.nix b/pkgs/os-specific/linux/r8168/default.nix index 91e15db2eeb..680cc531af4 100644 --- a/pkgs/os-specific/linux/r8168/default.nix +++ b/pkgs/os-specific/linux/r8168/default.nix @@ -27,11 +27,13 @@ in stdenv.mkDerivation rec { # avoid using the Makefile directly -- it doesn't understand # any kernel but the current. # based on the ArchLinux pkgbuild: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/r8168 + makeFlags = kernel.makeFlags ++ [ + "-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "M=$(PWD)/src" + "modules" + ]; preBuild = '' - makeFlagsArray+=("-C${kernel.dev}/lib/modules/${kernel.modDirVersion}/build") - makeFlagsArray+=("M=$PWD/src") makeFlagsArray+=("EXTRA_CFLAGS=-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN -DCONFIG_ASPM -DENABLE_S5WOL -DENABLE_EEE") - makeFlagsArray+=("modules") ''; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/rtl8189es/default.nix b/pkgs/os-specific/linux/rtl8189es/default.nix index 500359f7e4f..d6b5785210b 100644 --- a/pkgs/os-specific/linux/rtl8189es/default.nix +++ b/pkgs/os-specific/linux/rtl8189es/default.nix @@ -2,17 +2,16 @@ stdenv.mkDerivation rec { name = "rtl8189es-${kernel.version}-${version}"; - version = "2020-10-03"; + version = "2021-10-01"; src = fetchFromGitHub { owner = "jwrdegoede"; repo = "rtl8189ES_linux"; - rev = "03ac413135a355b55b693154c44b70f86a39732e"; - sha256 = "0wiikviwyvy6h55rgdvy7csi1zqniqg26p8x44rd6mhbw0g00h56"; + rev = "be378f47055da1bae42ff6ec1d62f1a5052ef097"; + sha256 = "sha256-+19q1Xux2BjquavY+s0UDzTubEt6BEUZ9XVDVmj36us="; }; - nativeBuildInputs = [ bc nukeReferences ]; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = [ bc nukeReferences ] ++ kernel.moduleBuildDependencies; hardeningDisable = [ "pic" "format" ]; @@ -23,13 +22,10 @@ stdenv.mkDerivation rec { substituteInPlace ./Makefile --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/" ''; - makeFlags = [ - "ARCH=${stdenv.hostPlatform.linuxArch}" + makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n")) ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) - ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ - "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; preInstall = '' diff --git a/pkgs/os-specific/linux/rtl8192eu/default.nix b/pkgs/os-specific/linux/rtl8192eu/default.nix index b33330611b8..6fa15358582 100644 --- a/pkgs/os-specific/linux/rtl8192eu/default.nix +++ b/pkgs/os-specific/linux/rtl8192eu/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = kernel.moduleBuildDependencies ++ [ bc ]; - makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; + makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/rtl8814au/default.nix b/pkgs/os-specific/linux/rtl8814au/default.nix index f9ca60b1112..f12adf73d5f 100644 --- a/pkgs/os-specific/linux/rtl8814au/default.nix +++ b/pkgs/os-specific/linux/rtl8814au/default.nix @@ -11,7 +11,8 @@ stdenv.mkDerivation { sha256 = "0lk3ldff489ggbqmlfi4zvnp1cvxj1b06m0fhpzai82070klzzmj"; }; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; hardeningDisable = [ "pic" ]; diff --git a/pkgs/os-specific/linux/rtl8821ce/default.nix b/pkgs/os-specific/linux/rtl8821ce/default.nix index 75e12a1b7a4..27303c02980 100644 --- a/pkgs/os-specific/linux/rtl8821ce/default.nix +++ b/pkgs/os-specific/linux/rtl8821ce/default.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - nativeBuildInputs = [ bc ]; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; prePatch = '' substituteInPlace ./Makefile \ diff --git a/pkgs/os-specific/linux/rtl8821cu/default.nix b/pkgs/os-specific/linux/rtl8821cu/default.nix index 9229a3c1306..0ea0682214b 100644 --- a/pkgs/os-specific/linux/rtl8821cu/default.nix +++ b/pkgs/os-specific/linux/rtl8821cu/default.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - nativeBuildInputs = [ bc ]; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; prePatch = '' substituteInPlace ./Makefile \ diff --git a/pkgs/os-specific/linux/rtl88x2bu/default.nix b/pkgs/os-specific/linux/rtl88x2bu/default.nix index 31d8f50a528..e092d145abd 100644 --- a/pkgs/os-specific/linux/rtl88x2bu/default.nix +++ b/pkgs/os-specific/linux/rtl88x2bu/default.nix @@ -13,10 +13,10 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - nativeBuildInputs = [ bc ]; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; - prePatch = '' + prePatch = '' substituteInPlace ./Makefile \ --replace /lib/modules/ "${kernel.dev}/lib/modules/" \ --replace '$(shell uname -r)' "${kernel.modDirVersion}" \ diff --git a/pkgs/os-specific/linux/rtw88/default.nix b/pkgs/os-specific/linux/rtw88/default.nix index c3f849df118..529ee621892 100644 --- a/pkgs/os-specific/linux/rtw88/default.nix +++ b/pkgs/os-specific/linux/rtw88/default.nix @@ -14,7 +14,8 @@ stdenv.mkDerivation { hash = "sha256-PRzWXC1lre8gt1GfVdnaG836f5YK57P9a8tG20yef0w="; }; - makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/rtw89/default.nix b/pkgs/os-specific/linux/rtw89/default.nix index 6b0f06c5bdc..6ff208fa6dd 100644 --- a/pkgs/os-specific/linux/rtw89/default.nix +++ b/pkgs/os-specific/linux/rtw89/default.nix @@ -14,7 +14,8 @@ stdenv.mkDerivation { sha256 = "0cvawyi1ksw9xkr8pzwipsl7b8hnmrb17w5cblyicwih8fqaw632"; }; - makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/v4l2loopback/default.nix b/pkgs/os-specific/linux/v4l2loopback/default.nix index c1aa7be2af6..095d873e66c 100644 --- a/pkgs/os-specific/linux/v4l2loopback/default.nix +++ b/pkgs/os-specific/linux/v4l2loopback/default.nix @@ -16,12 +16,9 @@ stdenv.mkDerivation rec { preBuild = '' substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install" sed -i '/depmod/d' Makefile - export PATH=${kmod}/sbin:$PATH ''; - nativeBuildInputs = kernel.moduleBuildDependencies; - - buildInputs = [ kmod ]; + nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; postInstall = '' make install-utils PREFIX=$bin @@ -29,7 +26,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "bin" ]; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KERNELRELEASE=${kernel.modDirVersion}" "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; diff --git a/pkgs/os-specific/linux/veikk-linux-driver/default.nix b/pkgs/os-specific/linux/veikk-linux-driver/default.nix index a1019d7b7fd..8cf4896ae02 100644 --- a/pkgs/os-specific/linux/veikk-linux-driver/default.nix +++ b/pkgs/os-specific/linux/veikk-linux-driver/default.nix @@ -15,9 +15,9 @@ stdenv.mkDerivation rec { buildInputs = [ kernel ]; - buildPhase = '' - make BUILD_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build - ''; + makeFlags = kernel.makeFlags ++ [ + "BUILD_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; installPhase = '' mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/veikk diff --git a/pkgs/os-specific/linux/xmm7360-pci/default.nix b/pkgs/os-specific/linux/xmm7360-pci/default.nix index 6a589ff889c..435ff94afb7 100644 --- a/pkgs/os-specific/linux/xmm7360-pci/default.nix +++ b/pkgs/os-specific/linux/xmm7360-pci/default.nix @@ -11,10 +11,12 @@ stdenv.mkDerivation rec { sha256 = "1wdb0phqg9rj9g9ycqdya0m7lx24kzjlh25yw0ifp898ddxrrr0c"; }; - makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; + makeFlags = kernel.makeFlags ++ [ + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; nativeBuildInputs = kernel.moduleBuildDependencies; - INSTALL_MOD_PATH = placeholder "out"; installFlags = [ "DEPMOD=true" ]; meta = with lib; { diff --git a/pkgs/os-specific/linux/xpadneo/default.nix b/pkgs/os-specific/linux/xpadneo/default.nix index c1874877620..c5aa09a8860 100644 --- a/pkgs/os-specific/linux/xpadneo/default.nix +++ b/pkgs/os-specific/linux/xpadneo/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = kernel.moduleBuildDependencies; buildInputs = [ bluez ]; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "-C" "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "M=$(sourceRoot)" diff --git a/pkgs/servers/http/pomerium/default.nix b/pkgs/servers/http/pomerium/default.nix index cbf2fe19435..8a5580d5d0d 100644 --- a/pkgs/servers/http/pomerium/default.nix +++ b/pkgs/servers/http/pomerium/default.nix @@ -4,6 +4,7 @@ , envoy , zip , nixosTests +, pomerium-cli }: let @@ -11,18 +12,17 @@ let in buildGoModule rec { pname = "pomerium"; - version = "0.15.7"; + version = "0.17.0"; src = fetchFromGitHub { owner = "pomerium"; repo = "pomerium"; rev = "v${version}"; - hash = "sha256:0adlk4ylny1z43x1dw3ny0s1932vhb61hpf5wdz4r65y8k9qyfgr"; + hash = "sha256:1hv76i6k9f0kp527nxlxqhklsvkh2cmfnqlszmlk2hxij31qnf8q"; }; - vendorSha256 = "sha256:1fszfbra84pcs8v1h2kf7iy603vf9v2ysg6il76aqmqrxmb1p7nv"; + vendorSha256 = "sha256:1cq4m5a7z64yg3v1c68d15ilw78il6p53vaqzxgn338zjggr3kig"; subPackages = [ "cmd/pomerium" - "cmd/pomerium-cli" ]; ldflags = let @@ -74,11 +74,11 @@ buildGoModule rec { installPhase = '' install -Dm0755 $GOPATH/bin/pomerium $out/bin/pomerium - install -Dm0755 $GOPATH/bin/pomerium-cli $out/bin/pomerium-cli ''; passthru.tests = { inherit (nixosTests) pomerium; + inherit pomerium-cli; }; meta = with lib; { diff --git a/pkgs/servers/sql/postgresql/ext/rum.nix b/pkgs/servers/sql/postgresql/ext/rum.nix new file mode 100644 index 00000000000..ce7dcbd7a48 --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/rum.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "rum"; + version = "1.3.9"; + + src = fetchFromGitHub { + owner = "postgrespro"; + repo = "rum"; + rev = version; + sha256 = "sha256-xdCj9hzBg7VtAIHpIFpeeaK6U4aRrCsoQrPKdABSl+Y="; + }; + + buildInputs = [ postgresql ]; + + makeFlags = [ "USE_PGXS=1" ]; + + installPhase = '' + install -D -t $out/lib *.so + install -D -t $out/share/postgresql/extension *.control + install -D -t $out/share/postgresql/extension *.sql + ''; + + meta = with lib; { + description = "Full text search index method for PostgreSQL"; + homepage = "https://github.com/postgrespro/rum"; + license = licenses.postgresql; + platforms = postgresql.meta.platforms; + maintainers = with maintainers; [ DeeUnderscore ]; + }; +} diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix index f3df8a99ca2..fec106f32ac 100644 --- a/pkgs/servers/sql/postgresql/packages.nix +++ b/pkgs/servers/sql/postgresql/packages.nix @@ -61,4 +61,6 @@ self: super: { pg_safeupdate = super.callPackage ./ext/pg_safeupdate.nix { }; repmgr = super.callPackage ./ext/repmgr.nix { }; + + rum = super.callPackage ./ext/rum.nix { }; } diff --git a/pkgs/servers/tailscale/default.nix b/pkgs/servers/tailscale/default.nix index 0d564352c73..8decb2f4d29 100644 --- a/pkgs/servers/tailscale/default.nix +++ b/pkgs/servers/tailscale/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "tailscale"; - version = "1.22.0"; + version = "1.22.1"; src = fetchFromGitHub { owner = "tailscale"; repo = "tailscale"; rev = "v${version}"; - sha256 = "sha256-kBxZFzny61xsLynD0sWz4dd8BzbdZkah0ATnHo3txRM="; + sha256 = "sha256-VUML5GwHrRYPd9lnOZuMA3T1SfdC0rVLP5m1yf+SA0A="; }; nativeBuildInputs = lib.optionals stdenv.isLinux [ makeWrapper ]; diff --git a/pkgs/shells/tcsh/default.nix b/pkgs/shells/tcsh/default.nix index 1befd289757..4357ca605b1 100644 --- a/pkgs/shells/tcsh/default.nix +++ b/pkgs/shells/tcsh/default.nix @@ -7,20 +7,11 @@ stdenv.mkDerivation rec { pname = "tcsh"; - version = "6.23.02"; + version = "6.24.00"; src = fetchurl { - urls = [ - "https://astron.com/pub/tcsh/old/${pname}-${version}.tar.gz" - "https://astron.com/pub/tcsh/${pname}-${version}.tar.gz" - "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/old/${pname}-${version}.tar.gz" - "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/${pname}-${version}.tar.gz" - "ftp://ftp.funet.fi/pub/unix/shells/tcsh/old/${pname}-${version}.tar.gz" - "ftp://ftp.funet.fi/pub/unix/shells/tcsh/${pname}-${version}.tar.gz" - "ftp://ftp.astron.com/pub/tcsh/old/${pname}-${version}.tar.gz" - "ftp://ftp.astron.com/pub/tcsh/${pname}-${version}.tar.gz" - ]; - hash = "sha256-wD+AQFE2cxswkdpzWoHN2EgAhRAySrMl8jWv9wnkRus="; + url = "mirror://tcsh/${pname}-${version}.tar.gz"; + hash = "sha256-YL4sUEvY8fpuQksZVkldfnztUqKslNtf0n9La/yPdPA="; }; buildInputs = [ @@ -28,6 +19,7 @@ stdenv.mkDerivation rec { ]; patches = lib.optional stdenv.hostPlatform.isMusl + # Use system malloc (fetchpatch { name = "sysmalloc.patch"; url = "https://git.alpinelinux.org/aports/plain/community/tcsh/001-sysmalloc.patch?id=184585c046cdd56512f1a76e426dd799b368f8cf"; diff --git a/pkgs/tools/admin/aliyun-cli/default.nix b/pkgs/tools/admin/aliyun-cli/default.nix index 9a65f647d11..94f793f47fd 100644 --- a/pkgs/tools/admin/aliyun-cli/default.nix +++ b/pkgs/tools/admin/aliyun-cli/default.nix @@ -2,17 +2,17 @@ buildGoModule rec { pname = "aliyun-cli"; - version = "3.0.110"; + version = "3.0.112"; src = fetchFromGitHub { rev = "v${version}"; owner = "aliyun"; repo = pname; fetchSubmodules = true; - sha256 = "sha256-Omi82feAq0tBuMSuA25JtDatfSJwWcxK3KkWkSI9ax4="; + sha256 = "sha256-gzZFxZMLq0TS8bxnQTTEno6OdAu/5tqr0Tl1cF8Rm3c="; }; - vendorSha256 = "sha256-c7LsCNcxdHwDBEknXJt9AyrmFcem8YtUYy06vNDBdDY="; + vendorSha256 = "sha256-FQvBq8+80h7m271gjraV445ayWcpkemOtVswfmHzUM0="; subPackages = [ "main" ]; diff --git a/pkgs/tools/misc/nncp/default.nix b/pkgs/tools/misc/nncp/default.nix index 3fda2a6cdad..a3b010b13fb 100644 --- a/pkgs/tools/misc/nncp/default.nix +++ b/pkgs/tools/misc/nncp/default.nix @@ -3,12 +3,12 @@ stdenv.mkDerivation rec { pname = "nncp"; - version = "8.7.1"; + version = "8.7.2"; outputs = [ "out" "doc" "info" ]; src = fetchurl { url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz"; - hash = "sha256-zrTRl69ajZ6Tt0nVwPULU+Z0ajGK9Hs2S/XLMj1sTr0="; + hash = "sha256-oO7JsPMwWd4z8TCEWZgF0PShyMN56SW6z+jclNHdwj0="; }; nativeBuildInputs = [ go redo-apenwarr ]; diff --git a/pkgs/tools/misc/zellij/default.nix b/pkgs/tools/misc/zellij/default.nix index 3463c5ccb6d..7fc1c6e335a 100644 --- a/pkgs/tools/misc/zellij/default.nix +++ b/pkgs/tools/misc/zellij/default.nix @@ -15,16 +15,16 @@ rustPlatform.buildRustPackage rec { pname = "zellij"; - version = "0.25.0"; + version = "0.26.0"; src = fetchFromGitHub { owner = "zellij-org"; repo = "zellij"; rev = "v${version}"; - sha256 = "sha256-MTSM8fYAcNcmjg6bkOEN+U5+WilaEy52EJOfyoIy3Zg="; + sha256 = "sha256-8PgEsRh2nBOIvKeX9SJ853NN8Szb4geKwv2qvTtkMxk="; }; - cargoSha256 = "sha256-2QEDrxTz7I9hF+WfVKkGLXHWZjQ5by/zuO16NGOJSKk="; + cargoSha256 = "sha256-YaqaXn1Ol5RfwAzWi7767vt1je+wqWFtfgxMOSIy9UI="; nativeBuildInputs = [ mandown diff --git a/pkgs/tools/networking/minio-client/default.nix b/pkgs/tools/networking/minio-client/default.nix index 4fbdec621b4..eb73a33e01f 100644 --- a/pkgs/tools/networking/minio-client/default.nix +++ b/pkgs/tools/networking/minio-client/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "minio-client"; - version = "2022-03-03T21-12-24Z"; + version = "2022-03-09T02-08-36Z"; src = fetchFromGitHub { owner = "minio"; repo = "mc"; rev = "RELEASE.${version}"; - sha256 = "sha256-z+t8aMyGlqXcooCzJgn0xxOhuS+p3/qMTBJByDJPd40="; + sha256 = "sha256-OaV0Xb3nNeZJLayGperQah0JQ7BlGFPWa1//Kt5+EiU="; }; - vendorSha256 = "sha256-mk0ga3o6LeZ4uwV3vlP6qyFXLiORwNQLhXoCxSmvXsU="; + vendorSha256 = "sha256-Wdw9mZ3UupoJ4yDwS4f3mOmCn+7TvHmx4aRu+96pHM4="; subPackages = [ "." ]; diff --git a/pkgs/tools/networking/sockperf/default.nix b/pkgs/tools/networking/sockperf/default.nix index 598fb482c38..48eea919b14 100644 --- a/pkgs/tools/networking/sockperf/default.nix +++ b/pkgs/tools/networking/sockperf/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "sockperf"; - version = "3.7"; + version = "3.8"; src = fetchFromGitHub { owner = "Mellanox"; repo = "sockperf"; rev = version; - sha256 = "MtpV21lCEAv7ARxk0dAxoOxxlqDM+skdQnPlqOvksjw="; + sha256 = "sha256-S5ZSGctOOnMD+AqlSAkRHMW8O1Rt8/952fali0kv/EU="; }; nativeBuildInputs = [ autoreconfHook doxygen ]; diff --git a/pkgs/tools/networking/ytcc/default.nix b/pkgs/tools/networking/ytcc/default.nix index 46b6e649b5c..028c50a352c 100644 --- a/pkgs/tools/networking/ytcc/default.nix +++ b/pkgs/tools/networking/ytcc/default.nix @@ -2,13 +2,13 @@ python3Packages.buildPythonApplication rec { pname = "ytcc"; - version = "2.5.4"; + version = "2.5.5"; src = fetchFromGitHub { owner = "woefe"; repo = "ytcc"; rev = "v${version}"; - sha256 = "sha256-nYHfmksZnIZGMSSFDhW7ajvv1F5h3aJo8IXw6yYOEw0="; + sha256 = "sha256-DjyVcjU2dVku5ademm6DygMnzWHB7iMqPfU56BBjAwU="; }; nativeBuildInputs = [ gettext installShellFiles ]; diff --git a/pkgs/tools/nix/nix-output-monitor/default.nix b/pkgs/tools/nix/nix-output-monitor/default.nix index caa9abb9a1d..0f78600a050 100644 --- a/pkgs/tools/nix/nix-output-monitor/default.nix +++ b/pkgs/tools/nix/nix-output-monitor/default.nix @@ -6,6 +6,7 @@ async, attoparsec, base, + bytestring, cassava, containers, data-default, @@ -36,13 +37,14 @@ unix, vector, wcwidth, + word8, }: mkDerivation { pname = "nix-output-monitor"; - version = "1.1.1.0"; + version = "1.1.2.0"; src = fetchzip { - url = "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/v1.1.1.0.tar.gz"; - sha256 = "1zw7x1snyycl1bp5w7jh8wwnynqvw3g4glr293bnzi5jyirj5wlg"; + url = "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/v1.1.2.0.tar.gz"; + sha256 = "03qhy4xzika41pxlmvpz3psgy54va72ipn9v1lv33l6369ikrhl1"; }; isLibrary = true; isExecutable = true; @@ -51,6 +53,7 @@ mkDerivation { async attoparsec base + bytestring cassava containers data-default @@ -74,12 +77,14 @@ mkDerivation { unix vector wcwidth + word8 ]; executableHaskellDepends = [ ansi-terminal async attoparsec base + bytestring cassava containers data-default @@ -103,12 +108,14 @@ mkDerivation { unix vector wcwidth + word8 ]; testHaskellDepends = [ ansi-terminal async attoparsec base + bytestring cassava containers data-default @@ -134,6 +141,7 @@ mkDerivation { unix vector wcwidth + word8 ]; homepage = "https://github.com/maralorn/nix-output-monitor"; description = "Parses output of nix-build to show additional information"; @@ -148,11 +156,9 @@ mkDerivation { ${expect}/bin/unbuffer nix-build "\$@" 2>&1 | exec $out/bin/nom EOF chmod a+x $out/bin/nom-build - installShellCompletion --zsh --name _nom-build ${ - builtins.toFile "completion.zsh" '' - #compdef nom-build - compdef nom-build=nix-build - '' - } + installShellCompletion --zsh --name _nom-build ${builtins.toFile "completion.zsh" '' + #compdef nom-build + compdef nom-build=nix-build + ''} ''; } diff --git a/pkgs/tools/package-management/cargo-release/default.nix b/pkgs/tools/package-management/cargo-release/default.nix index 0c791bbf80f..49a6d645060 100644 --- a/pkgs/tools/package-management/cargo-release/default.nix +++ b/pkgs/tools/package-management/cargo-release/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-release"; - version = "0.20.2"; + version = "0.20.3"; src = fetchFromGitHub { owner = "crate-ci"; repo = "cargo-release"; rev = "v${version}"; - sha256 = "sha256-KWLZdFpRwtdP17x71IU2MGFwd1SNnTRcgTUoW1p5Px4="; + sha256 = "sha256-oYnqrNqbn/OsJd0Lh6rQ2pt7FrLOp5p3MoavC56dWQc="; }; - cargoSha256 = "sha256-CTaEWANx3s7YCm8pqGWuvGqR362YtVjmbnc9V3kC8pI="; + cargoSha256 = "sha256-LtDIzqHzzur+GxxvUHciNQCRmxqdmaXSG4ncMV3Rx3c="; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/tools/package-management/nix-eval-jobs/default.nix b/pkgs/tools/package-management/nix-eval-jobs/default.nix index dfcf11045cb..1023d23432c 100644 --- a/pkgs/tools/package-management/nix-eval-jobs/default.nix +++ b/pkgs/tools/package-management/nix-eval-jobs/default.nix @@ -11,12 +11,12 @@ }: stdenv.mkDerivation rec { pname = "nix-eval-jobs"; - version = "0.0.3"; + version = "0.0.4"; src = fetchFromGitHub { owner = "nix-community"; repo = pname; rev = "v${version}"; - hash = "sha256:0flnqn1vkr55sipii82vwjfkhv4p835d01f6yhlpbalxwy2kr14r"; + hash = "sha256-SCwvFlBYUlxCucjMO4GHhEQWZFZt0lRKJncm6hvDx9I="; }; buildInputs = [ boost diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index a6b7fa3a900..8eb8fef8298 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -73,13 +73,13 @@ in lib.makeExtensible (self: { stable = self.nix_2_7; unstable = lib.lowPrio (common rec { - version = "2.7"; - suffix = "pre20220221_${lib.substring 0 7 src.rev}"; + version = "2.8"; + suffix = "pre20220311_${lib.substring 0 7 src.rev}"; src = fetchFromGitHub { owner = "NixOS"; repo = "nix"; - rev = "caf51729450d4c57d48ddbef8e855e9bf65f8792"; - sha256 = "sha256-2fbza6fWPjyTyVEqWIp0jk/Z4epjSDe1u4lbEu+v7Iw="; + rev = "d5322698a2abbc6d141e1d244e17b0d226a2f18b"; + sha256 = "sha256-7rQSktGC8+DmeyGOnzFMy1QwAYnw4JJphv+lEwFCwfU="; }; }); }) diff --git a/pkgs/tools/security/gitleaks/default.nix b/pkgs/tools/security/gitleaks/default.nix index ff70782dabe..a574c347629 100644 --- a/pkgs/tools/security/gitleaks/default.nix +++ b/pkgs/tools/security/gitleaks/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "gitleaks"; - version = "8.3.0"; + version = "8.4.0"; src = fetchFromGitHub { owner = "zricethezav"; repo = pname; rev = "v${version}"; - sha256 = "sha256-D6leHpGZNQ9Xt4PSU0Dwte6N3bMge7itkZtcUl0mIrQ="; + sha256 = "sha256-z3YGRDgBGpr2hixIayih4wxGWPtYL0EPAuTYVPByzQc="; }; - vendorSha256 = "sha256-JZOalUOIeV51Nttm6xeBos+/8fleSBpUiXa8ekVuYJA="; + vendorSha256 = "sha256-J1xX+r+Mph1QkqjK87tqGDkYvPZp0lHgdRhd88WZi1c="; ldflags = [ "-s" diff --git a/pkgs/tools/security/pomerium-cli/default.nix b/pkgs/tools/security/pomerium-cli/default.nix new file mode 100644 index 00000000000..7dc7e3a7a90 --- /dev/null +++ b/pkgs/tools/security/pomerium-cli/default.nix @@ -0,0 +1,58 @@ +{ buildGoModule +, fetchFromGitHub +, lib +, pomerium +}: + +let + inherit (lib) concatStringsSep concatMap id mapAttrsToList; +in +buildGoModule rec { + pname = "pomerium-cli"; + version = pomerium.version; + src = fetchFromGitHub { + owner = "pomerium"; + repo = "cli"; + rev = "v${version}"; + hash = "sha256:0230b22xjnpykj8bcdahzzlsvlrd63z2cmg6yb246c5ngjs835q1"; + }; + + vendorSha256 = "sha256:0xx22lmh6wip1d1bjrp4lgab3q9yilw54v4lg24lf3xhbsr5si9b"; + subPackages = [ + "cmd/pomerium-cli" + ]; + + ldflags = let + # Set a variety of useful meta variables for stamping the build with. + setVars = { + "github.com/pomerium/cli/version" = { + Version = "v${version}"; + BuildMeta = "nixpkgs"; + ProjectName = "pomerium-cli"; + ProjectURL = "github.com/pomerium/cli"; + }; + }; + concatStringsSpace = list: concatStringsSep " " list; + mapAttrsToFlatList = fn: list: concatMap id (mapAttrsToList fn list); + varFlags = concatStringsSpace ( + mapAttrsToFlatList (package: packageVars: + mapAttrsToList (variable: value: + "-X ${package}.${variable}=${value}" + ) packageVars + ) setVars); + in [ + "${varFlags}" + ]; + + installPhase = '' + install -Dm0755 $GOPATH/bin/pomerium-cli $out/bin/pomerium-cli + ''; + + meta = with lib; { + homepage = "https://pomerium.io"; + description = "Client-side helper for Pomerium authenticating reverse proxy"; + license = licenses.asl20; + maintainers = with maintainers; [ lukegb ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/security/sops/default.nix b/pkgs/tools/security/sops/default.nix index 1cf89143925..9752d78a183 100644 --- a/pkgs/tools/security/sops/default.nix +++ b/pkgs/tools/security/sops/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "sops"; - version = "3.7.1"; + version = "3.7.2"; src = fetchFromGitHub { rev = "v${version}"; owner = "mozilla"; repo = pname; - sha256 = "0z3jcyl245yjszzjf2h6l1dwa092vxzvfmnivmwi6jvpsdcv33h1"; + sha256 = "sha256-NMuYMvaBSxKHvpqFkMfnMDvcXxTstqzracuSTT1VB1A="; }; - vendorSha256 = "1mnwgsbpi56ql0lbpn7dkaps96x9b1lmhlk5cd6d40da7xj616n7"; + vendorSha256 = "sha256-00/7O9EcGojUExJPtYWndb16VqrNby/5GsVs8Ak/Isc="; doCheck = false; diff --git a/pkgs/tools/security/swtpm/default.nix b/pkgs/tools/security/swtpm/default.nix index 648165d8262..39128084352 100644 --- a/pkgs/tools/security/swtpm/default.nix +++ b/pkgs/tools/security/swtpm/default.nix @@ -16,35 +16,40 @@ stdenv.mkDerivation rec { pname = "swtpm"; - version = "0.7.1"; + version = "0.7.2"; src = fetchFromGitHub { owner = "stefanberger"; repo = "swtpm"; rev = "v${version}"; - sha256 = "sha256-LJQF8PlRkhCJ8rjZzDetg1BFuTb7GBJ8lW6u5hO134k="; + sha256 = "sha256-qeyPCJTNnwuaCosHzqnrQc0JNznGBfDTLsuDmuKREjU="; }; nativeBuildInputs = [ pkg-config unixtools.netstat expect socat perl # for pod2man + python3 autoreconfHook ]; checkInputs = [ - python3 which + which ]; buildInputs = [ libtpms - openssl libtasn1 libseccomp - fuse glib json-glib + openssl libtasn1 + glib json-glib gnutls + ] ++ lib.optionals stdenv.isLinux [ + fuse + libseccomp ]; configureFlags = [ - "--with-cuse" "--localstatedir=/var" + ] ++ lib.optionals stdenv.isLinux [ + "--with-cuse" ]; postPatch = '' @@ -56,9 +61,31 @@ stdenv.mkDerivation rec { # Use the correct path to the certtool binary # instead of relying on it being in the environment - substituteInPlace src/swtpm_localca/swtpm_localca.c --replace \ + substituteInPlace src/swtpm_localca/swtpm_localca.c \ + --replace \ + '# define CERTTOOL_NAME "gnutls-certtool"' \ + '# define CERTTOOL_NAME "${gnutls}/bin/certtool"' \ + --replace \ '# define CERTTOOL_NAME "certtool"' \ '# define CERTTOOL_NAME "${gnutls}/bin/certtool"' + + substituteInPlace tests/common --replace \ + 'CERTTOOL=gnutls-certtool;;' \ + 'CERTTOOL=certtool;;' + + # Fix error on macOS: + # stat: invalid option -- '%' + # This is caused by the stat program not being the BSD version, + # as is expected by the test + substituteInPlace tests/common --replace \ + 'if [[ "$(uname -s)" =~ (Linux|CYGWIN_NT-) ]]; then' \ + 'if [[ "$(uname -s)" =~ (Linux|Darwin|CYGWIN_NT-) ]]; then' + + # Otherwise certtool seems to pick up the system language on macOS, + # which might cause a test to fail + substituteInPlace tests/test_swtpm_setup_create_cert --replace \ + '$CERTTOOL' \ + 'LC_ALL=C.UTF-8 $CERTTOOL' ''; doCheck = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a532e3c092f..fb43f3d9e98 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5543,6 +5543,8 @@ with pkgs; flawfinder = callPackage ../development/tools/flawfinder { }; + flintlock = callPackage ../applications/virtualization/flintlock { }; + flip-link = callPackage ../development/tools/flip-link { }; flips = callPackage ../tools/compression/flips { }; @@ -21620,6 +21622,7 @@ with pkgs; pflogsumm = callPackage ../servers/mail/postfix/pflogsumm.nix { }; pomerium = callPackage ../servers/http/pomerium { }; + pomerium-cli = callPackage ../tools/security/pomerium-cli { }; postgrey = callPackage ../servers/mail/postgrey { }; @@ -29069,7 +29072,9 @@ with pkgs; psst = callPackage ../applications/audio/psst { }; - squeezelite = callPackage ../applications/audio/squeezelite { }; + squeezelite = callPackage ../applications/audio/squeezelite { audioBackend = "alsa"; }; + + squeezelite-pulse = callPackage ../applications/audio/squeezelite { audioBackend = "pulse"; }; ltunify = callPackage ../tools/misc/ltunify { }; @@ -33800,6 +33805,8 @@ with pkgs; qMasterPassword = libsForQt5.callPackage ../applications/misc/qMasterPassword { }; + qtrvsim = libsForQt5.callPackage ../applications/science/computer-architecture/qtrvsim { }; + py-wmi-client = callPackage ../tools/networking/py-wmi-client { }; qdl = callPackage ../tools/misc/qdl { }; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index c883066ced5..cc126dc320d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1580,6 +1580,8 @@ in let inherit (pkgs) callPackage; in rec ocamlPackages_4_13 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.13.nix { }); + ocamlPackages_4_14 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.14.nix { }); + ocamlPackages_latest = ocamlPackages_4_13; ocamlPackages = ocamlPackages_4_13; diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 81628686a31..1da6e934c24 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -144,6 +144,8 @@ lib.makeScope pkgs.newScope (self: with self; { phing = callPackage ../development/php-packages/phing { }; + phive = callPackage ../development/php-packages/phive { }; + php-cs-fixer = callPackage ../development/php-packages/php-cs-fixer { }; php-parallel-lint = callPackage ../development/php-packages/php-parallel-lint { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9e9fb29a35f..57c8e10d0b4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -466,6 +466,8 @@ in { allpairspy = callPackage ../development/python-modules/allpairspy { }; + allure-behave = callPackage ../development/python-modules/allure-behave { }; + allure-python-commons = callPackage ../development/python-modules/allure-python-commons { }; allure-python-commons-test = callPackage ../development/python-modules/allure-python-commons-test { };