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 2328e7e7299b..dedf4b469ec0 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
@@ -390,6 +390,16 @@
include serif fonts.
+
+
+ The interface that allows activation scripts to restart units
+ has been reworked. Restarting and reloading is now done by a
+ single file
+ /run/nixos/activation-restart-list that
+ honors restartIfChanged and
+ reloadIfChanged of the units.
+
+
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md
index 600d25bf4a40..5f2a53a414ab 100644
--- a/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/nixos/doc/manual/release-notes/rl-2205.section.md
@@ -125,6 +125,8 @@ In addition to numerous new and upgraded packages, this release has the followin
`pkgs.noto-fonts-cjk` is currently an alias of `pkgs.noto-fonts-cjk-sans` and
doesn't include serif fonts.
+- The interface that allows activation scripts to restart units has been reworked. Restarting and reloading is now done by a single file `/run/nixos/activation-restart-list` that honors `restartIfChanged` and `reloadIfChanged` of the units.
+
## Other Notable Changes {#sec-release-22.05-notable-changes}
- The option [services.redis.servers](#opt-services.redis.servers) was added
diff --git a/nixos/modules/services/networking/adguardhome.nix b/nixos/modules/services/networking/adguardhome.nix
index 05713adbd83a..98ddf0716087 100644
--- a/nixos/modules/services/networking/adguardhome.nix
+++ b/nixos/modules/services/networking/adguardhome.nix
@@ -87,6 +87,22 @@ in {
};
config = mkIf cfg.enable {
+ assertions = [
+ {
+ assertion = cfg.settings != { }
+ -> (hasAttrByPath [ "dns" "bind_host" ] cfg.settings)
+ || (hasAttrByPath [ "dns" "bind_hosts" ] cfg.settings);
+ message =
+ "AdGuard setting dns.bind_host or dns.bind_hosts needs to be configured for a minimal working configuration";
+ }
+ {
+ assertion = cfg.settings != { }
+ -> hasAttrByPath [ "dns" "bootstrap_dns" ] cfg.settings;
+ message =
+ "AdGuard setting dns.bootstrap_dns needs to be configured for a minimal working configuration";
+ }
+ ];
+
systemd.services.adguardhome = {
description = "AdGuard Home: Network-level blocker";
after = [ "network.target" ];
@@ -96,7 +112,7 @@ in {
StartLimitBurst = 10;
};
- preStart = ''
+ preStart = optionalString (cfg.settings != { }) ''
if [ -e "$STATE_DIRECTORY/AdGuardHome.yaml" ] \
&& [ "${toString cfg.mutableSettings}" = "1" ]; then
# Writing directly to AdGuardHome.yaml results in empty file
diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix
index 2d498d4dbbcf..85d3ea5bd751 100644
--- a/nixos/modules/services/networking/mosquitto.nix
+++ b/nixos/modules/services/networking/mosquitto.nix
@@ -556,7 +556,7 @@ in
systemd.services.mosquitto = {
description = "Mosquitto MQTT Broker Daemon";
wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
+ after = [ "network-online.target" ];
serviceConfig = {
Type = "notify";
NotifyAccess = "main";
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 3fbab8b94c93..93fff889d6bc 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -18,11 +18,13 @@ my $startListFile = "/run/nixos/start-list";
my $restartListFile = "/run/nixos/restart-list";
my $reloadListFile = "/run/nixos/reload-list";
-# Parse restart/reload requests by the activation script
+# Parse restart/reload requests by the activation script.
+# Activation scripts may write newline-separated units to this
+# file and switch-to-configuration will handle them. While
+# `stopIfChanged = true` is ignored, switch-to-configuration will
+# handle `restartIfChanged = false` and `reloadIfChanged = true`.
my $restartByActivationFile = "/run/nixos/activation-restart-list";
-my $reloadByActivationFile = "/run/nixos/activation-reload-list";
my $dryRestartByActivationFile = "/run/nixos/dry-activation-restart-list";
-my $dryReloadByActivationFile = "/run/nixos/dry-activation-reload-list";
make_path("/run/nixos", { mode => oct(755) });
@@ -382,7 +384,6 @@ sub filterUnits {
}
my @unitsToStopFiltered = filterUnits(\%unitsToStop);
-my @unitsToStartFiltered = filterUnits(\%unitsToStart);
# Show dry-run actions.
@@ -395,21 +396,39 @@ if ($action eq "dry-activate") {
print STDERR "would activate the configuration...\n";
system("$out/dry-activate", "$out");
- $unitsToRestart{$_} = 1 foreach
- split('\n', read_file($dryRestartByActivationFile, err_mode => 'quiet') // "");
+ # Handle the activation script requesting the restart or reload of a unit.
+ foreach (split('\n', read_file($dryRestartByActivationFile, err_mode => 'quiet') // "")) {
+ my $unit = $_;
+ my $baseUnit = $unit;
+ my $newUnitFile = "$out/etc/systemd/system/$baseUnit";
- $unitsToReload{$_} = 1 foreach
- split('\n', read_file($dryReloadByActivationFile, err_mode => 'quiet') // "");
+ # Detect template instances.
+ if (!-e $newUnitFile && $unit =~ /^(.*)@[^\.]*\.(.*)$/) {
+ $baseUnit = "$1\@.$2";
+ $newUnitFile = "$out/etc/systemd/system/$baseUnit";
+ }
+
+ my $baseName = $baseUnit;
+ $baseName =~ s/\.[a-z]*$//;
+
+ # Start units if they were not active previously
+ if (not defined $activePrev->{$unit}) {
+ $unitsToStart{$unit} = 1;
+ next;
+ }
+
+ handleModifiedUnit($unit, $baseName, $newUnitFile, $activePrev, \%unitsToRestart, \%unitsToRestart, \%unitsToReload, \%unitsToRestart, \%unitsToSkip);
+ }
+ unlink($dryRestartByActivationFile);
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;
+ my @unitsToStartFiltered = filterUnits(\%unitsToStart);
print STDERR "would start the following units: ", join(", ", @unitsToStartFiltered), "\n"
if scalar @unitsToStartFiltered;
- unlink($dryRestartByActivationFile);
- unlink($dryReloadByActivationFile);
exit 0;
}
@@ -433,13 +452,31 @@ print STDERR "activating the configuration...\n";
system("$out/activate", "$out") == 0 or $res = 2;
# Handle the activation script requesting the restart or reload of a unit.
-# We can only restart and reload (not stop/start) because the units to be
-# stopped are already stopped before the activation script is run.
-$unitsToRestart{$_} = 1 foreach
- split('\n', read_file($restartByActivationFile, err_mode => 'quiet') // "");
+foreach (split('\n', read_file($restartByActivationFile, err_mode => 'quiet') // "")) {
+ my $unit = $_;
+ my $baseUnit = $unit;
+ my $newUnitFile = "$out/etc/systemd/system/$baseUnit";
-$unitsToReload{$_} = 1 foreach
- split('\n', read_file($reloadByActivationFile, err_mode => 'quiet') // "");
+ # Detect template instances.
+ if (!-e $newUnitFile && $unit =~ /^(.*)@[^\.]*\.(.*)$/) {
+ $baseUnit = "$1\@.$2";
+ $newUnitFile = "$out/etc/systemd/system/$baseUnit";
+ }
+
+ my $baseName = $baseUnit;
+ $baseName =~ s/\.[a-z]*$//;
+
+ # Start units if they were not active previously
+ if (not defined $activePrev->{$unit}) {
+ $unitsToStart{$unit} = 1;
+ recordUnit($startListFile, $unit);
+ next;
+ }
+
+ handleModifiedUnit($unit, $baseName, $newUnitFile, $activePrev, \%unitsToRestart, \%unitsToRestart, \%unitsToReload, \%unitsToRestart, \%unitsToSkip);
+}
+# We can remove the file now because it has been propagated to the other restart/reload files
+unlink($restartByActivationFile);
# Restart systemd if necessary. Note that this is done using the
# current version of systemd, just in case the new one has trouble
@@ -480,7 +517,6 @@ 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);
- unlink($reloadByActivationFile);
}
# Restart changed services (those that have to be restarted rather
@@ -489,7 +525,6 @@ 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);
- unlink($restartByActivationFile);
}
# Start all active targets, as well as changed units we stopped above.
@@ -498,6 +533,7 @@ if (scalar(keys %unitsToRestart) > 0) {
# that are symlinks to other units. We shouldn't start both at the
# same time because we'll get a "Failed to add path to set" error from
# 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;
diff --git a/nixos/tests/adguardhome.nix b/nixos/tests/adguardhome.nix
new file mode 100644
index 000000000000..ddbe8ff9c117
--- /dev/null
+++ b/nixos/tests/adguardhome.nix
@@ -0,0 +1,57 @@
+import ./make-test-python.nix {
+ name = "adguardhome";
+
+ nodes = {
+ minimalConf = { ... }: {
+ services.adguardhome = { enable = true; };
+ };
+
+ declarativeConf = { ... }: {
+ services.adguardhome = {
+ enable = true;
+
+ mutableSettings = false;
+ settings = {
+ dns = {
+ bind_host = "0.0.0.0";
+ bootstrap_dns = "127.0.0.1";
+ };
+ };
+ };
+ };
+
+ mixedConf = { ... }: {
+ services.adguardhome = {
+ enable = true;
+
+ mutableSettings = true;
+ settings = {
+ dns = {
+ bind_host = "0.0.0.0";
+ bootstrap_dns = "127.0.0.1";
+ };
+ };
+ };
+ };
+ };
+
+ testScript = ''
+ with subtest("Minimal config test"):
+ minimalConf.wait_for_unit("adguardhome.service")
+ minimalConf.wait_for_open_port(3000)
+
+ with subtest("Declarative config test, DNS will be reachable"):
+ declarativeConf.wait_for_unit("adguardhome.service")
+ declarativeConf.wait_for_open_port(53)
+ declarativeConf.wait_for_open_port(3000)
+
+ with subtest("Mixed config test, check whether merging works"):
+ mixedConf.wait_for_unit("adguardhome.service")
+ mixedConf.wait_for_open_port(53)
+ mixedConf.wait_for_open_port(3000)
+ # Test whether merging works properly, even if nothing is changed
+ mixedConf.systemctl("restart adguardhome.service")
+ mixedConf.wait_for_unit("adguardhome.service")
+ mixedConf.wait_for_open_port(3000)
+ '';
+}
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 6dee3baa9d51..2bc34d6fd786 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -23,6 +23,7 @@ in
{
_3proxy = handleTest ./3proxy.nix {};
acme = handleTest ./acme.nix {};
+ adguardhome = handleTest ./adguardhome.nix {};
aesmd = handleTest ./aesmd.nix {};
agda = handleTest ./agda.nix {};
airsonic = handleTest ./airsonic.nix {};
diff --git a/nixos/tests/switch-test.nix b/nixos/tests/switch-test.nix
index daad9134885f..1c32bf6beb95 100644
--- a/nixos/tests/switch-test.nix
+++ b/nixos/tests/switch-test.nix
@@ -45,6 +45,50 @@ import ./make-test-python.nix ({ pkgs, ...} : {
systemd.services.test.restartIfChanged = false;
};
+ restart-and-reload-by-activation-script.configuration = {
+ systemd.services = rec {
+ simple-service = {
+ # No wantedBy so we can check if the activation script restart triggers them
+ serviceConfig = {
+ Type = "oneshot";
+ RemainAfterExit = true;
+ ExecStart = "${pkgs.coreutils}/bin/true";
+ ExecReload = "${pkgs.coreutils}/bin/true";
+ };
+ };
+
+ simple-restart-service = simple-service // {
+ stopIfChanged = false;
+ };
+
+ simple-reload-service = simple-service // {
+ reloadIfChanged = true;
+ };
+
+ no-restart-service = simple-service // {
+ restartIfChanged = false;
+ };
+ };
+
+ system.activationScripts.restart-and-reload-test = {
+ supportsDryActivation = true;
+ deps = [];
+ text = ''
+ if [ "$NIXOS_ACTION" = dry-activate ]; then
+ f=/run/nixos/dry-activation-restart-list
+ else
+ f=/run/nixos/activation-restart-list
+ fi
+ cat <> "$f"
+ simple-service.service
+ simple-restart-service.service
+ simple-reload-service.service
+ no-restart-service.service
+ EOF
+ '';
+ };
+ };
+
mount.configuration = {
systemd.mounts = [
{
@@ -261,6 +305,32 @@ import ./make-test-python.nix ({ pkgs, ...} : {
assert_lacks(out, "as well:")
assert_contains(out, "would start the following units: test.service\n")
+ with subtest("restart and reload by activation script"):
+ out = switch_to_specialisation("${machine}", "restart-and-reload-by-activation-script")
+ assert_contains(out, "stopping the following units: test.service\n")
+ assert_lacks(out, "NOT restarting the following changed units:")
+ assert_lacks(out, "reloading the following units:")
+ assert_lacks(out, "restarting the following units:")
+ assert_contains(out, "\nstarting the following units: no-restart-service.service, simple-reload-service.service, simple-restart-service.service, simple-service.service\n")
+ assert_lacks(out, "as well:")
+ # Switch to the same system where the example services get restarted
+ # by the activation script
+ out = switch_to_specialisation("${machine}", "restart-and-reload-by-activation-script")
+ assert_lacks(out, "stopping the following units:")
+ assert_lacks(out, "NOT restarting the following changed units:")
+ assert_contains(out, "reloading the following units: simple-reload-service.service\n")
+ assert_contains(out, "restarting the following units: simple-restart-service.service, simple-service.service\n")
+ assert_lacks(out, "\nstarting the following units:")
+ assert_lacks(out, "as well:")
+ # The same, but in dry mode
+ out = switch_to_specialisation("${machine}", "restart-and-reload-by-activation-script", action="dry-activate")
+ assert_lacks(out, "would stop the following units:")
+ assert_lacks(out, "would NOT stop the following changed units:")
+ assert_contains(out, "would reload the following units: simple-reload-service.service\n")
+ assert_contains(out, "would restart the following units: simple-restart-service.service, simple-service.service\n")
+ assert_lacks(out, "\nwould start the following units:")
+ assert_lacks(out, "as well:")
+
with subtest("mounts"):
switch_to_specialisation("${machine}", "mount")
out = machine.succeed("mount | grep 'on /testmount'")
diff --git a/pkgs/applications/networking/instant-messengers/franz/generic.nix b/pkgs/applications/networking/instant-messengers/franz/generic.nix
index d63318ecfaf7..4496af4a1dfa 100644
--- a/pkgs/applications/networking/instant-messengers/franz/generic.nix
+++ b/pkgs/applications/networking/instant-messengers/franz/generic.nix
@@ -24,6 +24,7 @@
, libnotify
, xdg-utils
, mesa
+, libappindicator-gtk3
}:
# Helper function for building a derivation for Franz and forks.
@@ -68,7 +69,7 @@ stdenv.mkDerivation rec {
expat
stdenv.cc.cc
];
- runtimeDependencies = [ stdenv.cc.cc.lib (lib.getLib udev) libnotify ];
+ runtimeDependencies = [ stdenv.cc.cc.lib (lib.getLib udev) libnotify libappindicator-gtk3 ];
unpackPhase = "dpkg-deb -x $src .";
diff --git a/pkgs/development/python-modules/pdm-pep517/default.nix b/pkgs/development/python-modules/pdm-pep517/default.nix
new file mode 100644
index 000000000000..11d677e11004
--- /dev/null
+++ b/pkgs/development/python-modules/pdm-pep517/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchPypi
+, git
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+ pname = "pdm-pep517";
+ version = "0.9.4";
+ format = "pyproject";
+ disabled = pythonOlder "3.7";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "sha256-2o2FuuvS5PW7uhxl3EGBP75CZ3dcyjPoug1k0irl51c=";
+ };
+
+ preCheck = ''
+ HOME=$TMPDIR
+
+ git config --global user.name nobody
+ git config --global user.email nobody@example.com
+ '';
+
+ checkInputs = [
+ pytestCheckHook
+ git
+ ];
+
+ meta = with lib; {
+ homepage = "https://github.com/pdm-project/pdm-pep517";
+ description = "Yet another PEP 517 backend.";
+ license = licenses.mit;
+ maintainers = with maintainers; [ cpcloud ];
+ };
+}
diff --git a/pkgs/development/python-modules/pythonfinder/default.nix b/pkgs/development/python-modules/pythonfinder/default.nix
new file mode 100644
index 000000000000..bf9cb69721c4
--- /dev/null
+++ b/pkgs/development/python-modules/pythonfinder/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, pytestCheckHook
+, attrs
+, cached-property
+, click
+, six
+, packaging
+, pytest-cov
+, pytest-timeout
+}:
+
+buildPythonPackage rec {
+ pname = "pythonfinder";
+ version = "1.2.9";
+ format = "pyproject";
+
+ src = fetchFromGitHub {
+ owner = "sarugaku";
+ repo = pname;
+ rev = version;
+ sha256 = "sha256-tPMqVKbYwBRvb8/GyYNxO8lwJLcUUQyRoCoF5tg6rxs=";
+ };
+
+ propagatedBuildInputs = [
+ attrs
+ cached-property
+ click
+ six
+ packaging
+ ];
+
+ checkInputs = [
+ pytestCheckHook
+ pytest-cov
+ pytest-timeout
+ ];
+
+ pytestFlagsArray = [ "--no-cov" ];
+
+ # these tests invoke git in a subprocess and
+ # for some reason git can't be found even if included in checkInputs
+ disabledTests = [
+ "test_shims_are_kept"
+ "test_shims_are_removed"
+ ];
+
+ meta = with lib; {
+ homepage = "https://github.com/sarugaku/pythonfinder";
+ description = "Cross Platform Search Tool for Finding Pythons";
+ license = licenses.mit;
+ maintainers = with maintainers; [ cpcloud ];
+ };
+}
diff --git a/pkgs/development/python-modules/types-freezegun/default.nix b/pkgs/development/python-modules/types-freezegun/default.nix
new file mode 100644
index 000000000000..89672d26e8b2
--- /dev/null
+++ b/pkgs/development/python-modules/types-freezegun/default.nix
@@ -0,0 +1,24 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+ pname = "types-freezegun";
+ version = "1.1.6";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0kxiv0yjbbvp1zx694ir149b26kjzvb6600fh397v32b8jvs8w2w";
+ };
+
+ # Module doesn't have tests
+ doCheck = false;
+
+ meta = with lib; {
+ description = "Typing stubs for freezegun";
+ homepage = "https://github.com/python/typeshed";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ jpetrucciani ];
+ };
+}
diff --git a/pkgs/development/python-modules/types-tabulate/default.nix b/pkgs/development/python-modules/types-tabulate/default.nix
new file mode 100644
index 000000000000..504ca4f8eb8d
--- /dev/null
+++ b/pkgs/development/python-modules/types-tabulate/default.nix
@@ -0,0 +1,24 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+ pname = "types-tabulate";
+ version = "0.8.5";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "sha256-A/KDvzhOoSG3tqWK+zj03vl/MHBPyhOg2mhpNrDzkqw=";
+ };
+
+ # Module doesn't have tests
+ doCheck = false;
+
+ meta = with lib; {
+ description = "Typing stubs for tabulate";
+ homepage = "https://github.com/python/typeshed";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ jpetrucciani ];
+ };
+}
diff --git a/pkgs/development/tools/build-managers/mill/default.nix b/pkgs/development/tools/build-managers/mill/default.nix
index b012522c83ef..49d454d86864 100644
--- a/pkgs/development/tools/build-managers/mill/default.nix
+++ b/pkgs/development/tools/build-managers/mill/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "mill";
- version = "0.9.12";
+ version = "0.10.0";
src = fetchurl {
url = "https://github.com/com-lihaoyi/mill/releases/download/${version}/${version}-assembly";
- sha256 = "sha256-ct4SsIs6ErWl2XbxfqX3FTOU9K9tTKo8YWu1QT83iTI=";
+ sha256 = "sha256:1acm1z24cw2yzykwwjfrcf66mi16xvsrnrrhrsd9yqrajqab707n";
};
nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/games/amoeba/default.nix b/pkgs/games/amoeba/default.nix
index 61f5a5bf824d..0e21a9a1b9ea 100644
--- a/pkgs/games/amoeba/default.nix
+++ b/pkgs/games/amoeba/default.nix
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchurl, amoeba-data, alsa-lib, expat, freetype, gtk2, libvorbis, libGLU, xorg, pkg-config }:
stdenv.mkDerivation rec {
- name = "amoeba-${version}-${debver}";
+ pname = "amoeba";
version = "1.1";
debver = "29.1";
diff --git a/pkgs/games/crawl/default.nix b/pkgs/games/crawl/default.nix
index 02e34e5f749d..e5eea7ece628 100644
--- a/pkgs/games/crawl/default.nix
+++ b/pkgs/games/crawl/default.nix
@@ -7,7 +7,7 @@
}:
stdenv.mkDerivation rec {
- name = "crawl-${version}${lib.optionalString tileMode "-tiles"}";
+ pname = "crawl${lib.optionalString tileMode "-tiles"}";
version = "0.27.1";
src = fetchFromGitHub {
diff --git a/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix b/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix
index 93f51df1819d..316d1308eb79 100644
--- a/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix
+++ b/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix
@@ -9,7 +9,8 @@ let
in
stdenv.mkDerivation {
- name = "dwarf-therapist-${dwarf-therapist.version}";
+ pname = "dwarf-therapist";
+ version = dwarf-therapist.version;
wrapper = substituteAll {
src = ./dwarf-therapist.in;
diff --git a/pkgs/games/dwarf-fortress/unfuck.nix b/pkgs/games/dwarf-fortress/unfuck.nix
index 5b25cf4ff409..27b54667f0b9 100644
--- a/pkgs/games/dwarf-fortress/unfuck.nix
+++ b/pkgs/games/dwarf-fortress/unfuck.nix
@@ -72,7 +72,8 @@ let
in
stdenv.mkDerivation {
- name = "dwarf_fortress_unfuck-${release.unfuckRelease}";
+ pname = "dwarf_fortress_unfuck";
+ version = release.unfuckRelease;
src = fetchFromGitHub {
owner = "svenstaro";
diff --git a/pkgs/games/dwarf-fortress/wrapper/default.nix b/pkgs/games/dwarf-fortress/wrapper/default.nix
index ce989b98ffbd..3d1c3ead0604 100644
--- a/pkgs/games/dwarf-fortress/wrapper/default.nix
+++ b/pkgs/games/dwarf-fortress/wrapper/default.nix
@@ -92,7 +92,8 @@ let
in
stdenv.mkDerivation {
- name = "dwarf-fortress-${dwarf-fortress.dfVersion}";
+ pname = "dwarf-fortress";
+ version = dwarf-fortress.dfVersion;
dfInit = substituteAll {
name = "dwarf-fortress-init";
diff --git a/pkgs/games/gnubg/default.nix b/pkgs/games/gnubg/default.nix
index 7402049a9d82..6f50869e6c69 100644
--- a/pkgs/games/gnubg/default.nix
+++ b/pkgs/games/gnubg/default.nix
@@ -1,8 +1,8 @@
{ lib, stdenv, fetchurl, pkg-config, glib, python3, gtk2, readline }:
-let version = "1.06.002"; in
-stdenv.mkDerivation {
- name = "gnubg-"+version;
+stdenv.mkDerivation rec {
+ pname = "gnubg";
+ version = "1.06.002";
src = fetchurl {
url = "http://gnubg.org/media/sources/gnubg-release-${version}-sources.tar.gz";
diff --git a/pkgs/games/hhexen/default.nix b/pkgs/games/hhexen/default.nix
index 0306c54ef4ee..19a0b783efdd 100644
--- a/pkgs/games/hhexen/default.nix
+++ b/pkgs/games/hhexen/default.nix
@@ -1,7 +1,7 @@
{ lib, fetchurl, SDL, stdenv }:
stdenv.mkDerivation rec {
- name = "hhexen";
+ pname = "hhexen";
version = "1.6.3";
src = fetchurl {
url = "mirror://sourceforge/hhexen/hhexen-${version}-src.tgz";
diff --git a/pkgs/games/instead/default.nix b/pkgs/games/instead/default.nix
index 5c35219c19bf..cafdd2b84f0d 100644
--- a/pkgs/games/instead/default.nix
+++ b/pkgs/games/instead/default.nix
@@ -1,8 +1,6 @@
{ lib, stdenv, fetchurl, SDL2, SDL2_ttf, SDL2_image, SDL2_mixer, pkg-config, lua, zlib, unzip }:
let
- version = "3.3.2";
-
# I took several games at random from https://instead.syscall.ru/games/
games = [
(fetchurl {
@@ -28,8 +26,9 @@ let
];
in
-stdenv.mkDerivation {
- name = "instead-" + version;
+stdenv.mkDerivation rec {
+ pname = "instead";
+ version = "3.3.2";
src = fetchurl {
url = "mirror://sourceforge/project/instead/instead/${version}/instead_${version}.tar.gz";
diff --git a/pkgs/games/moon-buggy/default.nix b/pkgs/games/moon-buggy/default.nix
index b623d7bd5396..12eb6b24a806 100644
--- a/pkgs/games/moon-buggy/default.nix
+++ b/pkgs/games/moon-buggy/default.nix
@@ -1,16 +1,15 @@
{lib, stdenv, fetchurl, ncurses}:
stdenv.mkDerivation rec {
- baseName = "moon-buggy";
+ pname = "moon-buggy";
version = "1.0.51";
- name = "${baseName}-${version}";
buildInputs = [
ncurses
];
src = fetchurl {
- url = "http://m.seehuhn.de/programs/${name}.tar.gz";
+ url = "http://m.seehuhn.de/programs/moon-buggy-${version}.tar.gz";
sha256 = "0gyjwlpx0sd728dwwi7pwks4zfdy9rm1w1xbhwg6zip4r9nc2b9m";
};
diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix
index f9939f063c80..2b29bddad93c 100644
--- a/pkgs/games/nethack/default.nix
+++ b/pkgs/games/nethack/default.nix
@@ -20,9 +20,9 @@ let
in stdenv.mkDerivation rec {
version = "3.6.6";
- name = if x11Mode then "nethack-x11-${version}"
- else if qtMode then "nethack-qt-${version}"
- else "nethack-${version}";
+ pname = if x11Mode then "nethack-x11"
+ else if qtMode then "nethack-qt"
+ else "nethack";
src = fetchurl {
url = "https://nethack.org/download/${version}/nethack-${lib.replaceStrings ["."] [""] version}-src.tgz";
diff --git a/pkgs/games/planetaryannihilation/default.nix b/pkgs/games/planetaryannihilation/default.nix
index c29af6d810f5..2debd15f814e 100644
--- a/pkgs/games/planetaryannihilation/default.nix
+++ b/pkgs/games/planetaryannihilation/default.nix
@@ -1,26 +1,15 @@
{ lib, stdenv, config, fetchurl, patchelf, makeWrapper, gtk2, glib, udev, alsa-lib, atk
-, nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg }:
+, nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg, requireFile }:
-# TODO: use dynamic attributes once Nix 1.7 is out
-assert ((config.planetary_annihilation or null).url or null) != null;
-assert ((config.planetary_annihilation or null).sha256 or null) != null;
+stdenv.mkDerivation rec {
+ pname = "planetary-annihalation";
+ version = "62857";
-/* to setup:
- $ cat ~/.config/nixpkgs/config.nix
- {
- planetary_annihilation = {
- url = "file:///home/user/PA_Linux_62857.tar.bz2";
+ src = requireFile {
+ message = "This file has to be downloaded manually via nix-prefetch-url.";
+ name = "PA_Linux_${version}.tar.bz2";
sha256 = "0imi3k5144dsn3ka9khx3dj76klkw46ga7m6rddqjk4yslwabh3k";
};
-}
-*/
-
-stdenv.mkDerivation {
- name = "planetary-annihalation";
-
- src = fetchurl {
- inherit (config.planetary_annihilation) url sha256;
- };
nativeBuildInputs = [ patchelf makeWrapper ];
diff --git a/pkgs/games/xconq/default.nix b/pkgs/games/xconq/default.nix
index 8f4366fbcb87..10a959a676b4 100644
--- a/pkgs/games/xconq/default.nix
+++ b/pkgs/games/xconq/default.nix
@@ -2,12 +2,11 @@
, libXext, fontconfig, makeWrapper }:
stdenv.mkDerivation rec {
- name = "${baseName}-${version}";
- baseName = "xconq";
+ pname = "xconq";
version = "7.5.0-0pre.0.20050612";
src = fetchurl {
- url = "mirror://sourceforge/project/${baseName}/${baseName}/${name}/${name}.tar.gz";
+ url = "mirror://sourceforge/project/xconq/xconq/xconq-${version}/xconq-${version}.tar.gz";
sha256 = "1za78yx57mgwcmmi33wx3533yz1x093dnqis8q2qmqivxav51lca";
};
diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix
index 045f80ce9ac2..6d1763a0d0fd 100644
--- a/pkgs/os-specific/linux/kernel/perf.nix
+++ b/pkgs/os-specific/linux/kernel/perf.nix
@@ -12,7 +12,8 @@ with lib;
assert versionAtLeast kernel.version "3.12";
stdenv.mkDerivation {
- name = "perf-linux-${kernel.version}";
+ pname = "perf-linux";
+ version = kernel.version;
inherit (kernel) src;
diff --git a/pkgs/os-specific/linux/kmod-debian-aliases/default.nix b/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
index 23d323f84b8f..15f7251f9961 100644
--- a/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
+++ b/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
- name = "kmod-debian-aliases-${version}.conf";
+ pname = "kmod-debian-aliases.conf";
version = "22-1.1";
src = fetchurl {
diff --git a/pkgs/os-specific/linux/libevdevc/default.nix b/pkgs/os-specific/linux/libevdevc/default.nix
index 2417ef6da9db..4998ee3e6b57 100644
--- a/pkgs/os-specific/linux/libevdevc/default.nix
+++ b/pkgs/os-specific/linux/libevdevc/default.nix
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, coreutils, pkg-config, glib, jsoncpp }:
stdenv.mkDerivation rec {
- name = "libevdevc";
+ pname = "libevdevc";
version = "2.0.1";
src = fetchFromGitHub {
owner = "hugegreenbug";
diff --git a/pkgs/os-specific/linux/libgestures/default.nix b/pkgs/os-specific/linux/libgestures/default.nix
index bface8118be2..1454c0c78a50 100644
--- a/pkgs/os-specific/linux/libgestures/default.nix
+++ b/pkgs/os-specific/linux/libgestures/default.nix
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, glib, jsoncpp }:
stdenv.mkDerivation rec {
- name = "libgestures-${version}";
+ pname = "libgestures";
version = "2.0.1";
src = fetchFromGitHub {
owner = "hugegreenbug";
diff --git a/pkgs/os-specific/linux/net-tools/mptcp.nix b/pkgs/os-specific/linux/net-tools/mptcp.nix
index 577b7c25311a..b4ce59a7c68d 100644
--- a/pkgs/os-specific/linux/net-tools/mptcp.nix
+++ b/pkgs/os-specific/linux/net-tools/mptcp.nix
@@ -1,7 +1,7 @@
{ lib, nettools, fetchFromGitHub }:
nettools.overrideAttrs(oa: rec {
- name = "net-tools-mptcp";
+ pname = "net-tools-mptcp";
version = "0.95";
src = fetchFromGitHub {
diff --git a/pkgs/os-specific/linux/pommed-light/default.nix b/pkgs/os-specific/linux/pommed-light/default.nix
index 0797656f653e..e86658ccb0ac 100644
--- a/pkgs/os-specific/linux/pommed-light/default.nix
+++ b/pkgs/os-specific/linux/pommed-light/default.nix
@@ -10,13 +10,12 @@
}:
stdenv.mkDerivation rec {
- pkgname = "pommed-light";
+ pname = "pommed-light";
version = "1.51lw";
- name = "${pkgname}-${version}";
src = fetchFromGitHub {
owner = "bytbox";
- repo = pkgname;
+ repo = "pommed-light";
rev = "v${version}";
sha256 = "18fvdwwhcl6s4bpf2f2i389s71c8k4g0yb81am9rdddqmzaw27iy";
};
diff --git a/pkgs/os-specific/linux/statifier/default.nix b/pkgs/os-specific/linux/statifier/default.nix
index 5afb399fc162..eefd95d1153a 100644
--- a/pkgs/os-specific/linux/statifier/default.nix
+++ b/pkgs/os-specific/linux/statifier/default.nix
@@ -1,8 +1,8 @@
{ lib, multiStdenv, fetchurl }:
-let version = "1.7.4"; in
-multiStdenv.mkDerivation {
- name = "statifier-${version}";
+multiStdenv.mkDerivation rec {
+ pname = "statifier";
+ version = "1.7.4";
src = fetchurl {
url = "mirror://sourceforge/statifier/statifier-${version}.tar.gz";
diff --git a/pkgs/os-specific/linux/sysvinit/default.nix b/pkgs/os-specific/linux/sysvinit/default.nix
index 5f4f6069bcc6..091584a93cf4 100644
--- a/pkgs/os-specific/linux/sysvinit/default.nix
+++ b/pkgs/os-specific/linux/sysvinit/default.nix
@@ -1,9 +1,8 @@
{ lib, stdenv, fetchurl, withoutInitTools ? false }:
-let version = "3.01"; in
-
-stdenv.mkDerivation {
- name = (if withoutInitTools then "sysvtools" else "sysvinit") + "-" + version;
+stdenv.mkDerivation rec {
+ pname = if withoutInitTools then "sysvtools" else "sysvinit";
+ version = "3.01";
src = fetchurl {
url = "mirror://savannah/sysvinit/sysvinit-${version}.tar.xz";
diff --git a/pkgs/os-specific/linux/tmon/default.nix b/pkgs/os-specific/linux/tmon/default.nix
index 5a14d3d2ee34..3a2697e0a712 100644
--- a/pkgs/os-specific/linux/tmon/default.nix
+++ b/pkgs/os-specific/linux/tmon/default.nix
@@ -1,7 +1,8 @@
{ lib, stdenv, kernel, ncurses }:
stdenv.mkDerivation {
- name = "tmon-${kernel.version}";
+ pname = "tmon";
+ version = kernel.version;
inherit (kernel) src;
diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix
index a0b748be2149..1d4166e4083d 100644
--- a/pkgs/os-specific/linux/uclibc/default.nix
+++ b/pkgs/os-specific/linux/uclibc/default.nix
@@ -54,7 +54,7 @@ let
in
stdenv.mkDerivation {
- name = "uclibc-ng-${version}";
+ pname = "uclibc-ng";
inherit version;
src = fetchurl {
diff --git a/pkgs/os-specific/linux/unstick/default.nix b/pkgs/os-specific/linux/unstick/default.nix
index 7d839f8acdb8..7856456a3c36 100644
--- a/pkgs/os-specific/linux/unstick/default.nix
+++ b/pkgs/os-specific/linux/unstick/default.nix
@@ -1,12 +1,12 @@
{ stdenv, lib, fetchFromGitHub, meson, ninja, pkg-config, libseccomp }:
stdenv.mkDerivation rec {
- name = "unstick";
+ pname = "unstick";
version = "0.1.0";
src = fetchFromGitHub {
owner = "kwohlfahrt";
- repo = name;
+ repo = "unstick";
rev = "effee9aa242ca12dc94cc6e96bc073f4cc9e8657";
sha256 = "08la3jmmzlf4pm48bf9zx4cqj9gbqalpqy0s57bh5vfsdk74nnhv";
};
diff --git a/pkgs/servers/adguardhome/default.nix b/pkgs/servers/adguardhome/default.nix
index 9940decc0bc9..dcf397ed4b24 100644
--- a/pkgs/servers/adguardhome/default.nix
+++ b/pkgs/servers/adguardhome/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, fetchzip }:
+{ lib, stdenv, fetchurl, fetchzip, nixosTests }:
stdenv.mkDerivation rec {
pname = "adguardhome";
@@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
passthru = {
updateScript = ./update.sh;
+ tests.adguardhome = nixosTests.adguardhome;
};
meta = with lib; {
diff --git a/pkgs/servers/misc/oven-media-engine/default.nix b/pkgs/servers/misc/oven-media-engine/default.nix
index 6a63292301b5..831d2047b4e6 100644
--- a/pkgs/servers/misc/oven-media-engine/default.nix
+++ b/pkgs/servers/misc/oven-media-engine/default.nix
@@ -6,53 +6,34 @@
, bc
, pkg-config
, perl
-, openssl
+, openssl_3_0
, zlib
, ffmpeg
, libvpx
, libopus
+, libuuid
, srtp
, jemalloc
, pcre2
}:
-let
- ffmpeg = ffmpeg_3_4.overrideAttrs (super: {
- pname = "${super.pname}-ovenmediaengine";
- src = fetchFromGitHub {
- owner = "Airensoft";
- repo = "FFmpeg";
- rev = "142b4bb64b64e337f80066e6af935a68627fedae"; # on branch ome/3.4
- sha256 = "0fla3940q3z0c0ik2xzkbvdfvrdg06ban7wi6y94y8mcipszpp11";
- };
- });
-in
stdenv.mkDerivation rec {
pname = "oven-media-engine";
- version = "0.10.9-hotfix";
+ version = "0.12.9";
src = fetchFromGitHub {
owner = "AirenSoft";
repo = "OvenMediaEngine";
rev = "v${version}";
- sha256 = "1fhria0vwqsgmsglv5gn858li33vfy2dwy1f1qdd2jwikskb53am";
+ sha256 = "0d3ymw747frl40w5d6r33lf1s72v7fiv742yjr1m6la2phb9h834";
};
- patches = [
- (fetchpatch {
- # Needed to fix compilation under GCC 10.
- url = "https://github.com/AirenSoft/OvenMediaEngine/commit/ad83e1d2226445d649e4b7e0c75106e31af4940d.patch";
- sha256 = "1zk1rgi1wsjl6gdx3hdmgxlgindv6a3lsnkwcgi87ga9abw4vafw";
- stripLen = 1;
- })
- ];
-
sourceRoot = "source/src";
makeFlags = "release CONFIG_LIBRARY_PATHS= CONFIG_PKG_PATHS= GLOBAL_CC=$(CC) GLOBAL_CXX=$(CXX) GLOBAL_LD=$(CXX) SHELL=${stdenv.shell}";
enableParallelBuilding = true;
nativeBuildInputs = [ bc pkg-config perl ];
- buildInputs = [ openssl srt zlib ffmpeg libvpx libopus srtp jemalloc pcre2 ];
+ buildInputs = [ openssl_3_0 srt zlib ffmpeg libvpx libopus srtp jemalloc pcre2 libuuid ];
preBuild = ''
patchShebangs core/colorg++
diff --git a/pkgs/tools/virtualization/cri-tools/default.nix b/pkgs/tools/virtualization/cri-tools/default.nix
index 16a7ecffa043..846e2ee27944 100644
--- a/pkgs/tools/virtualization/cri-tools/default.nix
+++ b/pkgs/tools/virtualization/cri-tools/default.nix
@@ -6,13 +6,13 @@
buildGoModule rec {
pname = "cri-tools";
- version = "1.22.0";
+ version = "1.23.0";
src = fetchFromGitHub {
owner = "kubernetes-sigs";
repo = pname;
rev = "v${version}";
- sha256 = "sha256-+36lGLpNnTQnwwmXoVNPt3RMcnE46AdXOpghvhP0Bq0=";
+ sha256 = "sha256-b65GY08vykVp/PUBmBXKIfykyPEJRgGjgu7zBoXx3K0=";
};
vendorSha256 = null;
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index a579c97a6b35..20752391cf3b 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5843,6 +5843,8 @@ in {
pdfx = callPackage ../development/python-modules/pdfx { };
+ pdm-pep517 = callPackage ../development/python-modules/pdm-pep517 { };
+
pdoc3 = callPackage ../development/python-modules/pdoc3 { };
pebble = callPackage ../development/python-modules/pebble { };
@@ -6102,6 +6104,8 @@ in {
python-tado = callPackage ../development/python-modules/python-tado { };
+ pythonfinder = callPackage ../development/python-modules/pythonfinder { };
+
pyutil = callPackage ../development/python-modules/pyutil { };
pkutils = callPackage ../development/python-modules/pkutils { };
@@ -9933,6 +9937,8 @@ in {
types-decorator = callPackage ../development/python-modules/types-decorator { };
+ types-freezegun = callPackage ../development/python-modules/types-freezegun { };
+
types-futures = callPackage ../development/python-modules/types-futures { };
types-protobuf = callPackage ../development/python-modules/types-protobuf { };
@@ -9943,6 +9949,8 @@ in {
types-setuptools = callPackage ../development/python-modules/types-setuptools { };
+ types-tabulate = callPackage ../development/python-modules/types-tabulate { };
+
types-toml = callPackage ../development/python-modules/types-toml { };
types-typed-ast = callPackage ../development/python-modules/types-typed-ast { };