Merge master into staging-next

This commit is contained in:
github-actions[bot] 2022-01-18 00:01:41 +00:00 committed by GitHub
commit b456d67c98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 423 additions and 109 deletions

View File

@ -390,6 +390,16 @@
include serif fonts.
</para>
</listitem>
<listitem>
<para>
The interface that allows activation scripts to restart units
has been reworked. Restarting and reloading is now done by a
single file
<literal>/run/nixos/activation-restart-list</literal> that
honors <literal>restartIfChanged</literal> and
<literal>reloadIfChanged</literal> of the units.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-22.05-notable-changes">

View File

@ -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

View File

@ -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

View File

@ -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";

View File

@ -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;

View File

@ -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)
'';
}

View File

@ -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 {};

View File

@ -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 <<EOF >> "$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'")

View File

@ -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 .";

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -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 ];
};
}

View File

@ -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 ];

View File

@ -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";

View File

@ -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 {

View File

@ -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;

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";
};

View File

@ -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";

View File

@ -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 ];

View File

@ -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";
};

View File

@ -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;

View File

@ -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 {

View File

@ -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";

View File

@ -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";

View File

@ -1,7 +1,7 @@
{ lib, nettools, fetchFromGitHub }:
nettools.overrideAttrs(oa: rec {
name = "net-tools-mptcp";
pname = "net-tools-mptcp";
version = "0.95";
src = fetchFromGitHub {

View File

@ -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";
};

View File

@ -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";

View File

@ -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";

View File

@ -1,7 +1,8 @@
{ lib, stdenv, kernel, ncurses }:
stdenv.mkDerivation {
name = "tmon-${kernel.version}";
pname = "tmon";
version = kernel.version;
inherit (kernel) src;

View File

@ -54,7 +54,7 @@ let
in
stdenv.mkDerivation {
name = "uclibc-ng-${version}";
pname = "uclibc-ng";
inherit version;
src = fetchurl {

View File

@ -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";
};

View File

@ -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; {

View File

@ -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++

View File

@ -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;

View File

@ -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 { };