Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2021-11-28 00:08:47 +00:00 committed by GitHub
commit 7012b918c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 801 additions and 818 deletions

2
.gitignore vendored
View File

@ -3,8 +3,10 @@
.*.swp
.*.swo
.idea/
outputs/
result
result-*
source/
/doc/NEWS.html
/doc/NEWS.txt
/doc/manual.html

View File

@ -1860,15 +1860,6 @@ Superuser created successfully.
encapsulation.
</para>
</listitem>
<listitem>
<para>
Changing systemd <literal>.socket</literal> units now restarts
them and stops the service that is activated by them.
Additionally, services with
<literal>stopOnChange = false</literal> dont break anymore
when they are socket-activated.
</para>
</listitem>
<listitem>
<para>
The <literal>virtualisation.libvirtd</literal> module has been

View File

@ -520,8 +520,6 @@ In addition to numerous new and upgraded packages, this release has the followin
- `networking.sits` now supports Foo-over-UDP encapsulation.
- Changing systemd `.socket` units now restarts them and stops the service that is activated by them. Additionally, services with `stopOnChange = false` don't break anymore when they are socket-activated.
- The `virtualisation.libvirtd` module has been refactored and updated with new options:
- `virtualisation.libvirtd.qemu*` options (e.g.: `virtualisation.libvirtd.qemuRunAsRoot`) were moved to [`virtualisation.libvirtd.qemu`](options.html#opt-virtualisation.libvirtd.qemu) submodule,
- software TPM1/TPM2 support (e.g.: Windows 11 guests) ([`virtualisation.libvirtd.qemu.swtpm`](options.html#opt-virtualisation.libvirtd.qemu.swtpm)),

View File

@ -401,6 +401,9 @@ let
};
# The resulting /etc/pam.d/* file contents are verified in
# nixos/tests/pam/pam-file-contents.nix. Please update tests there when
# changing the derivation.
config = {
name = mkDefault name;
setLoginUid = mkDefault cfg.startSession;

View File

@ -11,6 +11,7 @@ use Cwd 'abs_path';
my $out = "@out@";
# FIXME: maybe we should use /proc/1/exe to get the current systemd.
my $curSystemd = abs_path("/run/current-system/sw/bin");
# To be robust against interruption, record what units need to be started etc.
@ -18,16 +19,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.
# 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`.
# This also works for socket-activated units.
# Parse restart/reload requests by the activation script
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) });
make_path("/run/nixos", { mode => 0755 });
my $action = shift @ARGV;
@ -149,92 +147,6 @@ sub fingerprintUnit {
return abs_path($s) . (-f "${s}.d/overrides.conf" ? " " . abs_path "${s}.d/overrides.conf" : "");
}
sub handleModifiedUnit {
my ($unit, $baseName, $newUnitFile, $activePrev, $unitsToStop, $unitsToStart, $unitsToReload, $unitsToRestart, $unitsToSkip) = @_;
if ($unit eq "sysinit.target" || $unit eq "basic.target" || $unit eq "multi-user.target" || $unit eq "graphical.target" || $unit =~ /\.slice$/ || $unit =~ /\.path$/) {
# Do nothing. These cannot be restarted directly.
# Slices and Paths don't have to be restarted since
# properties (resource limits and inotify watches)
# seem to get applied on daemon-reload.
} elsif ($unit =~ /\.mount$/) {
# Reload the changed mount unit to force a remount.
$unitsToReload->{$unit} = 1;
recordUnit($reloadListFile, $unit);
} else {
my $unitInfo = parseUnit($newUnitFile);
if (boolIsTrue($unitInfo->{'X-ReloadIfChanged'} // "no")) {
$unitsToReload->{$unit} = 1;
recordUnit($reloadListFile, $unit);
}
elsif (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "yes") || boolIsTrue($unitInfo->{'RefuseManualStop'} // "no") || boolIsTrue($unitInfo->{'X-OnlyManualStart'} // "no")) {
$unitsToSkip->{$unit} = 1;
} else {
# If this unit is socket-activated, then stop it instead
# of restarting it to make sure the new version of it is
# socket-activated.
my $socketActivated = 0;
if ($unit =~ /\.service$/) {
my @sockets = split / /, ($unitInfo->{Sockets} // "");
if (scalar @sockets == 0) {
@sockets = ("$baseName.socket");
}
foreach my $socket (@sockets) {
if (-e "$out/etc/systemd/system/$socket") {
$socketActivated = 1;
$unitsToStop->{$unit} = 1;
# If the socket was not running previously,
# start it now.
if (not defined $activePrev->{$socket}) {
$unitsToStart->{$socket} = 1;
}
}
}
}
# Don't do the rest of this for socket-activated units
# because we handled these above where we stop the unit.
# Since only services can be socket-activated, the
# following condition always evaluates to `true` for
# non-service units.
if ($socketActivated) {
return;
}
# If we are restarting a socket, also stop the corresponding
# service. This is required because restarting a socket
# when the service is already activated fails.
if ($unit =~ /\.socket$/) {
my $service = $unitInfo->{Service} // "";
if ($service eq "") {
$service = "$baseName.service";
}
if (defined $activePrev->{$service}) {
$unitsToStop->{$service} = 1;
}
$unitsToRestart->{$unit} = 1;
recordUnit($restartListFile, $unit);
} else {
# Always restart non-services instead of stopping and starting them
# because it doesn't make sense to stop them with a config from
# the old evaluation.
if (!boolIsTrue($unitInfo->{'X-StopIfChanged'} // "yes") || $unit !~ /\.service$/) {
# This unit should be restarted instead of
# stopped and started.
$unitsToRestart->{$unit} = 1;
recordUnit($restartListFile, $unit);
} else {
# We write to a file to ensure that the
# service gets restarted if we're interrupted.
$unitsToStart->{$unit} = 1;
recordUnit($startListFile, $unit);
$unitsToStop->{$unit} = 1;
}
}
}
}
}
# Figure out what units need to be stopped, started, restarted or reloaded.
my (%unitsToStop, %unitsToSkip, %unitsToStart, %unitsToRestart, %unitsToReload);
@ -307,7 +219,65 @@ while (my ($unit, $state) = each %{$activePrev}) {
}
elsif (fingerprintUnit($prevUnitFile) ne fingerprintUnit($newUnitFile)) {
handleModifiedUnit($unit, $baseName, $newUnitFile, $activePrev, \%unitsToStop, \%unitsToStart, \%unitsToReload, \%unitsToRestart, %unitsToSkip);
if ($unit eq "sysinit.target" || $unit eq "basic.target" || $unit eq "multi-user.target" || $unit eq "graphical.target") {
# Do nothing. These cannot be restarted directly.
} elsif ($unit =~ /\.mount$/) {
# Reload the changed mount unit to force a remount.
$unitsToReload{$unit} = 1;
recordUnit($reloadListFile, $unit);
} elsif ($unit =~ /\.socket$/ || $unit =~ /\.path$/ || $unit =~ /\.slice$/) {
# FIXME: do something?
} else {
my $unitInfo = parseUnit($newUnitFile);
if (boolIsTrue($unitInfo->{'X-ReloadIfChanged'} // "no")) {
$unitsToReload{$unit} = 1;
recordUnit($reloadListFile, $unit);
}
elsif (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "yes") || boolIsTrue($unitInfo->{'RefuseManualStop'} // "no") || boolIsTrue($unitInfo->{'X-OnlyManualStart'} // "no")) {
$unitsToSkip{$unit} = 1;
} else {
if (!boolIsTrue($unitInfo->{'X-StopIfChanged'} // "yes")) {
# This unit should be restarted instead of
# stopped and started.
$unitsToRestart{$unit} = 1;
recordUnit($restartListFile, $unit);
} else {
# If this unit is socket-activated, then stop the
# socket unit(s) as well, and restart the
# socket(s) instead of the service.
my $socketActivated = 0;
if ($unit =~ /\.service$/) {
my @sockets = split / /, ($unitInfo->{Sockets} // "");
if (scalar @sockets == 0) {
@sockets = ("$baseName.socket");
}
foreach my $socket (@sockets) {
if (defined $activePrev->{$socket}) {
$unitsToStop{$socket} = 1;
# Only restart sockets that actually
# exist in new configuration:
if (-e "$out/etc/systemd/system/$socket") {
$unitsToStart{$socket} = 1;
recordUnit($startListFile, $socket);
$socketActivated = 1;
}
}
}
}
# If the unit is not socket-activated, record
# that this unit needs to be started below.
# We write this to a file to ensure that the
# service gets restarted if we're interrupted.
if (!$socketActivated) {
$unitsToStart{$unit} = 1;
recordUnit($startListFile, $unit);
}
$unitsToStop{$unit} = 1;
}
}
}
}
}
}
@ -392,6 +362,8 @@ sub filterUnits {
}
my @unitsToStopFiltered = filterUnits(\%unitsToStop);
my @unitsToStartFiltered = filterUnits(\%unitsToStart);
# Show dry-run actions.
if ($action eq "dry-activate") {
@ -403,44 +375,21 @@ if ($action eq "dry-activate") {
print STDERR "would activate the configuration...\n";
system("$out/dry-activate", "$out");
# Handle the activation script requesting the restart or reload of a unit.
my %unitsToAlsoStop;
my %unitsToAlsoSkip;
foreach (split('\n', read_file($dryRestartByActivationFile, err_mode => 'quiet') // "")) {
my $unit = $_;
my $baseUnit = $unit;
my $newUnitFile = "$out/etc/systemd/system/$baseUnit";
$unitsToRestart{$_} = 1 foreach
split('\n', read_file($dryRestartByActivationFile, 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]*$//;
handleModifiedUnit($unit, $baseName, $newUnitFile, $activePrev, \%unitsToAlsoStop, \%unitsToStart, \%unitsToReload, \%unitsToRestart, %unitsToAlsoSkip);
}
unlink($dryRestartByActivationFile);
my @unitsToAlsoStopFiltered = filterUnits(\%unitsToAlsoStop);
if (scalar(keys %unitsToAlsoStop) > 0) {
print STDERR "would stop the following units as well: ", join(", ", @unitsToAlsoStopFiltered), "\n"
if scalar @unitsToAlsoStopFiltered;
}
print STDERR "would NOT restart the following changed units as well: ", join(", ", sort(keys %unitsToAlsoSkip)), "\n"
if scalar(keys %unitsToAlsoSkip) > 0;
$unitsToReload{$_} = 1 foreach
split('\n', read_file($dryReloadByActivationFile, err_mode => 'quiet') // "");
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;
print STDERR "would reload the following units: ", join(", ", sort(keys %unitsToReload)), "\n"
if scalar(keys %unitsToReload) > 0;
unlink($dryRestartByActivationFile);
unlink($dryReloadByActivationFile);
exit 0;
}
@ -451,7 +400,7 @@ if (scalar (keys %unitsToStop) > 0) {
print STDERR "stopping the following units: ", join(", ", @unitsToStopFiltered), "\n"
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)); # FIXME: ignore errors?
}
print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n"
@ -465,38 +414,12 @@ 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. We do however
# make an exception for services that are socket-activated and that have to be stopped
# instead of being restarted.
my %unitsToAlsoStop;
my %unitsToAlsoSkip;
foreach (split('\n', read_file($restartByActivationFile, err_mode => 'quiet') // "")) {
my $unit = $_;
my $baseUnit = $unit;
my $newUnitFile = "$out/etc/systemd/system/$baseUnit";
# stopped are already stopped before the activation script is run.
$unitsToRestart{$_} = 1 foreach
split('\n', read_file($restartByActivationFile, 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]*$//;
handleModifiedUnit($unit, $baseName, $newUnitFile, $activePrev, \%unitsToAlsoStop, \%unitsToStart, \%unitsToReload, \%unitsToRestart, %unitsToAlsoSkip);
}
unlink($restartByActivationFile);
my @unitsToAlsoStopFiltered = filterUnits(\%unitsToAlsoStop);
if (scalar(keys %unitsToAlsoStop) > 0) {
print STDERR "stopping the following units as well: ", join(", ", @unitsToAlsoStopFiltered), "\n"
if scalar @unitsToAlsoStopFiltered;
system("$curSystemd/systemctl", "stop", "--", sort(keys %unitsToAlsoStop));
}
print STDERR "NOT restarting the following changed units as well: ", join(", ", sort(keys %unitsToAlsoSkip)), "\n"
if scalar(keys %unitsToAlsoSkip) > 0;
$unitsToReload{$_} = 1 foreach
split('\n', read_file($reloadByActivationFile, err_mode => 'quiet') // "");
# Restart systemd if necessary. Note that this is done using the
# current version of systemd, just in case the new one has trouble
@ -537,40 +460,14 @@ 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
# than stopped and started).
if (scalar(keys %unitsToRestart) > 0) {
print STDERR "restarting the following units: ", join(", ", sort(keys %unitsToRestart)), "\n";
# We split the units to be restarted into sockets and non-sockets.
# This is because restarting sockets may fail which is not bad by
# itself but which will prevent changes on the sockets. We usually
# restart the socket and stop the service before that. Restarting
# the socket will fail however when the service was re-activated
# in the meantime. There is no proper way to prevent that from happening.
my @unitsWithErrorHandling = grep { $_ !~ /\.socket$/ } sort(keys %unitsToRestart);
my @unitsWithoutErrorHandling = grep { $_ =~ /\.socket$/ } sort(keys %unitsToRestart);
if (scalar(@unitsWithErrorHandling) > 0) {
system("@systemd@/bin/systemctl", "restart", "--", @unitsWithErrorHandling) == 0 or $res = 4;
}
if (scalar(@unitsWithoutErrorHandling) > 0) {
# Don't print warnings from systemctl
no warnings 'once';
open(OLDERR, ">&", \*STDERR);
close(STDERR);
my $ret = system("@systemd@/bin/systemctl", "restart", "--", @unitsWithoutErrorHandling);
# Print stderr again
open(STDERR, ">&OLDERR");
if ($ret ne 0) {
print STDERR "warning: some sockets failed to restart. Please check your journal (journalctl -eb) and act accordingly.\n";
}
}
system("@systemd@/bin/systemctl", "restart", "--", sort(keys %unitsToRestart)) == 0 or $res = 4;
unlink($restartListFile);
unlink($restartByActivationFile);
}
@ -581,7 +478,6 @@ 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;
@ -589,7 +485,7 @@ unlink($startListFile);
# Print failed and new units.
my (@failed, @new);
my (@failed, @new, @restarting);
my $activeNew = getActiveUnits;
while (my ($unit, $state) = each %{$activeNew}) {
if ($state->{state} eq "failed") {
@ -605,9 +501,7 @@ while (my ($unit, $state) = each %{$activeNew}) {
push @failed, $unit;
}
}
# Ignore scopes since they are not managed by this script but rather
# created and managed by third-party services via the systemd dbus API.
elsif ($state->{state} ne "failed" && !defined $activePrev->{$unit} && $unit !~ /\.scope$/) {
elsif ($state->{state} ne "failed" && !defined $activePrev->{$unit}) {
push @new, $unit;
}
}

View File

@ -84,13 +84,6 @@ let
export localeArchive="${config.i18n.glibcLocales}/lib/locale/locale-archive"
substituteAll ${./switch-to-configuration.pl} $out/bin/switch-to-configuration
chmod +x $out/bin/switch-to-configuration
${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
if ! output=$($perl/bin/perl -c $out/bin/switch-to-configuration 2>&1); then
echo "switch-to-configuration syntax is not valid:"
echo "$output"
exit 1
fi
''}
echo -n "${toString config.system.extraDependencies}" > $out/extra-dependencies

View File

@ -343,8 +343,9 @@ in
osrm-backend = handleTest ./osrm-backend.nix {};
overlayfs = handleTest ./overlayfs.nix {};
packagekit = handleTest ./packagekit.nix {};
pam-oath-login = handleTest ./pam-oath-login.nix {};
pam-u2f = handleTest ./pam-u2f.nix {};
pam-file-contents = handleTest ./pam/pam-file-contents.nix {};
pam-oath-login = handleTest ./pam/pam-oath-login.nix {};
pam-u2f = handleTest ./pam/pam-u2f.nix {};
pantalaimon = handleTest ./matrix/pantalaimon.nix {};
pantheon = handleTest ./pantheon.nix {};
paperless-ng = handleTest ./paperless-ng.nix {};

View File

@ -0,0 +1,25 @@
let
name = "pam";
in
import ../make-test-python.nix ({ pkgs, ... }: {
nodes.machine = { ... }: {
imports = [ ../../modules/profiles/minimal.nix ];
krb5.enable = true;
users = {
mutableUsers = false;
users = {
user = {
isNormalUser = true;
};
};
};
};
testScript = builtins.replaceStrings
[ "@@pam_ccreds@@" "@@pam_krb5@@" ]
[ pkgs.pam_ccreds.outPath pkgs.pam_krb5.outPath ]
(builtins.readFile ./test_chfn.py);
})

View File

@ -1,4 +1,4 @@
import ./make-test-python.nix ({ ... }:
import ../make-test-python.nix ({ ... }:
let
oathSnakeoilSecret = "cdd4083ef8ff1fa9178c6d46bfb1a3";

View File

@ -1,4 +1,4 @@
import ./make-test-python.nix ({ ... }:
import ../make-test-python.nix ({ ... }:
{
name = "pam-u2f";

View File

@ -0,0 +1,27 @@
expected_lines = {
"account required pam_unix.so",
"account sufficient @@pam_krb5@@/lib/security/pam_krb5.so",
"auth [default=die success=done] @@pam_ccreds@@/lib/security/pam_ccreds.so action=validate use_first_pass",
"auth [default=ignore success=1 service_err=reset] @@pam_krb5@@/lib/security/pam_krb5.so use_first_pass",
"auth required pam_deny.so",
"auth sufficient @@pam_ccreds@@/lib/security/pam_ccreds.so action=store use_first_pass",
"auth sufficient pam_rootok.so",
"auth sufficient pam_unix.so likeauth try_first_pass",
"password sufficient @@pam_krb5@@/lib/security/pam_krb5.so use_first_pass",
"password sufficient pam_unix.so nullok sha512",
"session optional @@pam_krb5@@/lib/security/pam_krb5.so",
"session required pam_env.so conffile=/etc/pam/environment readenv=0",
"session required pam_unix.so",
}
actual_lines = set(machine.succeed("cat /etc/pam.d/chfn").splitlines())
missing_lines = expected_lines - actual_lines
extra_lines = actual_lines - expected_lines
non_functional_lines = set([line for line in extra_lines if (line == "" or line.startswith("#"))])
unexpected_functional_lines = extra_lines - non_functional_lines
with subtest("All expected lines are in the file"):
assert not missing_lines, f"Missing lines: {missing_lines}"
with subtest("All remaining lines are empty or comments"):
assert not unexpected_functional_lines, f"Unexpected lines: {unexpected_functional_lines}"

View File

@ -7,224 +7,15 @@ import ./make-test-python.nix ({ pkgs, ...} : {
};
nodes = {
machine = { config, pkgs, lib, ... }: {
environment.systemPackages = [ pkgs.socat ]; # for the socket activation stuff
machine = { ... }: {
users.mutableUsers = false;
specialisation = {
# A system with a simple socket-activated unit
simple-socket.configuration = {
systemd.services.socket-activated.serviceConfig = {
ExecStart = pkgs.writeScript "socket-test.py" /* python */ ''
#!${pkgs.python3}/bin/python3
from socketserver import TCPServer, StreamRequestHandler
import socket
class Handler(StreamRequestHandler):
def handle(self):
self.wfile.write("hello".encode("utf-8"))
class Server(TCPServer):
def __init__(self, server_address, handler_cls):
# Invoke base but omit bind/listen steps (performed by systemd activation!)
TCPServer.__init__(
self, server_address, handler_cls, bind_and_activate=False)
# Override socket
self.socket = socket.fromfd(3, self.address_family, self.socket_type)
if __name__ == "__main__":
server = Server(("localhost", 1234), Handler)
server.serve_forever()
'';
};
systemd.sockets.socket-activated = {
wantedBy = [ "sockets.target" ];
listenStreams = [ "/run/test.sock" ];
socketConfig.SocketMode = lib.mkDefault "0777";
};
};
# The same system but the socket is modified
modified-socket.configuration = {
imports = [ config.specialisation.simple-socket.configuration ];
systemd.sockets.socket-activated.socketConfig.SocketMode = "0666";
};
# The same system but the service is modified
modified-service.configuration = {
imports = [ config.specialisation.simple-socket.configuration ];
systemd.services.socket-activated.serviceConfig.X-Test = "test";
};
# The same system but both service and socket are modified
modified-service-and-socket.configuration = {
imports = [ config.specialisation.simple-socket.configuration ];
systemd.services.socket-activated.serviceConfig.X-Test = "some_value";
systemd.sockets.socket-activated.socketConfig.SocketMode = "0444";
};
# A system with a socket-activated service and some simple services
service-and-socket.configuration = {
imports = [ config.specialisation.simple-socket.configuration ];
systemd.services.simple-service = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.coreutils}/bin/true";
};
};
systemd.services.simple-restart-service = {
stopIfChanged = false;
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.coreutils}/bin/true";
};
};
systemd.services.simple-reload-service = {
reloadIfChanged = true;
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.coreutils}/bin/true";
ExecReload = "${pkgs.coreutils}/bin/true";
};
};
systemd.services.no-restart-service = {
restartIfChanged = false;
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.coreutils}/bin/true";
};
};
};
# The same system but with an activation script that restarts all services
restart-and-reload-by-activation-script.configuration = {
imports = [ config.specialisation.service-and-socket.configuration ];
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
socket-activated.service
EOF
'';
};
};
# A system with a timer
with-timer.configuration = {
systemd.timers.test-timer = {
wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = "@1395716396"; # chosen by fair dice roll
};
systemd.services.test-timer = {
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.coreutils}/bin/true";
};
};
};
# The same system but with another time
with-timer-modified.configuration = {
imports = [ config.specialisation.with-timer.configuration ];
systemd.timers.test-timer.timerConfig.OnCalendar = lib.mkForce "Fri 2012-11-23 16:00:00";
};
# A system with a systemd mount
with-mount.configuration = {
systemd.mounts = [
{
description = "Testmount";
what = "tmpfs";
type = "tmpfs";
where = "/testmount";
options = "size=1M";
wantedBy = [ "local-fs.target" ];
}
];
};
# The same system but with another time
with-mount-modified.configuration = {
systemd.mounts = [
{
description = "Testmount";
what = "tmpfs";
type = "tmpfs";
where = "/testmount";
options = "size=10M";
wantedBy = [ "local-fs.target" ];
}
];
};
# A system with a path unit
with-path.configuration = {
systemd.paths.test-watch = {
wantedBy = [ "paths.target" ];
pathConfig.PathExists = "/testpath";
};
systemd.services.test-watch = {
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.coreutils}/bin/touch /testpath-modified";
};
};
};
# The same system but watching another file
with-path-modified.configuration = {
imports = [ config.specialisation.with-path.configuration ];
systemd.paths.test-watch.pathConfig.PathExists = lib.mkForce "/testpath2";
};
# A system with a slice
with-slice.configuration = {
systemd.slices.testslice.sliceConfig.MemoryMax = "1"; # don't allow memory allocation
systemd.services.testservice = {
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.coreutils}/bin/true";
Slice = "testslice.slice";
};
};
};
# The same system but the slice allows to allocate memory
with-slice-non-crashing.configuration = {
imports = [ config.specialisation.with-slice.configuration ];
systemd.slices.testslice.sliceConfig.MemoryMax = lib.mkForce null;
};
};
};
other = { ... }: {
users.mutableUsers = true;
};
};
testScript = { nodes, ... }: let
testScript = {nodes, ...}: let
originalSystem = nodes.machine.config.system.build.toplevel;
otherSystem = nodes.other.config.system.build.toplevel;
@ -236,183 +27,12 @@ import ./make-test-python.nix ({ pkgs, ...} : {
set -o pipefail
exec env -i "$@" | tee /dev/stderr
'';
in /* python */ ''
def switch_to_specialisation(name, action="test"):
out = machine.succeed(f"${originalSystem}/specialisation/{name}/bin/switch-to-configuration {action} 2>&1")
assert_lacks(out, "switch-to-configuration line") # Perl warnings
return out
def assert_contains(haystack, needle):
if needle not in haystack:
print("The haystack that will cause the following exception is:")
print("---")
print(haystack)
print("---")
raise Exception(f"Expected string '{needle}' was not found")
def assert_lacks(haystack, needle):
if needle in haystack:
print("The haystack that will cause the following exception is:")
print("---")
print(haystack, end="")
print("---")
raise Exception(f"Unexpected string '{needle}' was found")
in ''
machine.succeed(
"${stderrRunner} ${originalSystem}/bin/switch-to-configuration test"
)
machine.succeed(
"${stderrRunner} ${otherSystem}/bin/switch-to-configuration test"
)
with subtest("systemd sockets"):
machine.succeed("${originalSystem}/bin/switch-to-configuration test")
# Simple socket is created
out = switch_to_specialisation("simple-socket")
assert_lacks(out, "stopping the following units:")
# not checking for reload because dbus gets reloaded
assert_lacks(out, "restarting the following units:")
assert_lacks(out, "\nstarting the following units:")
assert_contains(out, "the following new units were started: socket-activated.socket\n")
assert_lacks(out, "as well:")
machine.succeed("[ $(stat -c%a /run/test.sock) = 777 ]")
# Changing the socket restarts it
out = switch_to_specialisation("modified-socket")
assert_lacks(out, "stopping the following units:")
#assert_lacks(out, "reloading the following units:")
assert_contains(out, "restarting the following units: socket-activated.socket\n")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
assert_lacks(out, "as well:")
machine.succeed("[ $(stat -c%a /run/test.sock) = 666 ]") # change was applied
# The unit is properly activated when the socket is accessed
if machine.succeed("socat - UNIX-CONNECT:/run/test.sock") != "hello":
raise Exception("Socket was not properly activated")
# Changing the socket restarts it and ignores the active service
out = switch_to_specialisation("simple-socket")
assert_contains(out, "stopping the following units: socket-activated.service\n")
assert_lacks(out, "reloading the following units:")
assert_contains(out, "restarting the following units: socket-activated.socket\n")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
assert_lacks(out, "as well:")
machine.succeed("[ $(stat -c%a /run/test.sock) = 777 ]") # change was applied
# Changing the service does nothing when the service is not active
out = switch_to_specialisation("modified-service")
assert_lacks(out, "stopping the following units:")
assert_lacks(out, "reloading the following units:")
assert_lacks(out, "restarting the following units:")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
assert_lacks(out, "as well:")
# Activating the service and modifying it stops it but leaves the socket untouched
machine.succeed("socat - UNIX-CONNECT:/run/test.sock")
out = switch_to_specialisation("simple-socket")
assert_contains(out, "stopping the following units: socket-activated.service\n")
assert_lacks(out, "reloading the following units:")
assert_lacks(out, "restarting the following units:")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
assert_lacks(out, "as well:")
# Activating the service and both the service and the socket stops the service and restarts the socket
machine.succeed("socat - UNIX-CONNECT:/run/test.sock")
out = switch_to_specialisation("modified-service-and-socket")
assert_contains(out, "stopping the following units: socket-activated.service\n")
assert_lacks(out, "reloading the following units:")
assert_contains(out, "restarting the following units: socket-activated.socket\n")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
assert_lacks(out, "as well:")
with subtest("restart and reload by activation file"):
out = switch_to_specialisation("service-and-socket")
# Switch to a system where the example services get restarted
# by the activation script
out = switch_to_specialisation("restart-and-reload-by-activation-script")
assert_lacks(out, "stopping the following units:")
assert_contains(out, "stopping the following units as well: simple-service.service, socket-activated.service\n")
assert_contains(out, "reloading the following units: simple-reload-service.service\n")
assert_contains(out, "restarting the following units: simple-restart-service.service\n")
assert_contains(out, "\nstarting the following units: simple-service.service")
# The same, but in dry mode
switch_to_specialisation("service-and-socket")
out = switch_to_specialisation("restart-and-reload-by-activation-script", action="dry-activate")
assert_lacks(out, "would stop the following units:")
assert_contains(out, "would stop the following units as well: simple-service.service, socket-activated.service\n")
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\n")
assert_contains(out, "\nwould start the following units: simple-service.service")
with subtest("mounts"):
switch_to_specialisation("with-mount")
out = machine.succeed("mount | grep 'on /testmount'")
assert_contains(out, "size=1024k")
out = switch_to_specialisation("with-mount-modified")
assert_lacks(out, "stopping the following units:")
assert_contains(out, "reloading the following units: testmount.mount\n")
assert_lacks(out, "restarting the following units:")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
assert_lacks(out, "as well:")
# It changed
out = machine.succeed("mount | grep 'on /testmount'")
assert_contains(out, "size=10240k")
with subtest("timers"):
switch_to_specialisation("with-timer")
out = machine.succeed("systemctl show test-timer.timer")
assert_contains(out, "OnCalendar=2014-03-25 02:59:56 UTC")
out = switch_to_specialisation("with-timer-modified")
assert_lacks(out, "stopping the following units:")
assert_lacks(out, "reloading the following units:")
assert_contains(out, "restarting the following units: test-timer.timer\n")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
assert_lacks(out, "as well:")
# It changed
out = machine.succeed("systemctl show test-timer.timer")
assert_contains(out, "OnCalendar=Fri 2012-11-23 16:00:00")
with subtest("paths"):
switch_to_specialisation("with-path")
machine.fail("test -f /testpath-modified")
# touch the file, unit should be triggered
machine.succeed("touch /testpath")
machine.wait_until_succeeds("test -f /testpath-modified")
machine.succeed("rm /testpath")
machine.succeed("rm /testpath-modified")
switch_to_specialisation("with-path-modified")
machine.succeed("touch /testpath")
machine.fail("test -f /testpath-modified")
machine.succeed("touch /testpath2")
machine.wait_until_succeeds("test -f /testpath-modified")
# This test ensures that changes to slice configuration get applied.
# We test this by having a slice that allows no memory allocation at
# all and starting a service within it. If the service crashes, the slice
# is applied and if we modify the slice to allow memory allocation, the
# service should successfully start.
with subtest("slices"):
machine.succeed("echo 0 > /proc/sys/vm/panic_on_oom") # allow OOMing
out = switch_to_specialisation("with-slice")
machine.fail("systemctl start testservice.service")
out = switch_to_specialisation("with-slice-non-crashing")
machine.succeed("systemctl start testservice.service")
machine.succeed("echo 1 > /proc/sys/vm/panic_on_oom") # disallow OOMing
'';
})

View File

@ -52,7 +52,7 @@
, vamp-plugin-sdk
, wafHook
, xjadeo
, videoSupport ? false
, videoSupport ? true
}:
stdenv.mkDerivation rec {
pname = "ardour";

View File

@ -8,7 +8,7 @@
let
pname = "trezor-suite";
version = "21.10.2";
version = "21.11.2";
name = "${pname}-${version}";
suffix = {
@ -19,8 +19,8 @@ let
src = fetchurl {
url = "https://github.com/trezor/${pname}/releases/download/v${version}/Trezor-Suite-${version}-${suffix}.AppImage";
sha512 = { # curl -Lfs https://github.com/trezor/trezor-suite/releases/latest/download/latest-linux{-arm64,}.yml | grep ^sha512 | sed 's/: /-/'
aarch64-linux = "sha512-+qXN9cQk1u18ZzeMecPNfhkTTsw61iM/IJYksPJl9+zx2AKldv9tAFUnnmKZ65LabiaIXI+emN185SRRcaOndw==";
x86_64-linux = "sha512-WpiG8VOEODqsQ1/jERiEEGwVqR0zbMqERGjOysEVYorA0p3xZyl7OSpWOSWaUjPBZpQtJIBdqhSXeoSRcvfJgg==";
aarch64-linux = "sha512-QX5Ak2F1aD846BuGNcP1K/2c77Ut3LK3UiXsUPqiSBGZ9YRgdzROqdGjCVnTBBhxeCfGYQDhWmpuOpNbLr4eYg==";
x86_64-linux = "sha512-ckMlZoLEq3aLzyhoWf2rRE3XxNQhqo6rUHF2NKoV08sXz+Zth2Lk+P3te1vwFQl+Efryl84RTwVGWKmloZ8k9A==";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};

View File

@ -67,8 +67,6 @@ in buildFHSUserEnv {
# Redream // "redream is not available for the x86_64 architecture"
# ResidualVM
flac
# rpcs3 // TODO: "error while loading shared libraries: libz.so.1..."
llvm
@ -76,6 +74,9 @@ in buildFHSUserEnv {
# ScummVM
nasm sndio
# ResidualVM is now merged with ScummVM and therefore does not exist anymore
flac
# Snes9x
libepoxy minizip

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "tut";
version = "0.0.36";
version = "0.0.41";
src = fetchFromGitHub {
owner = "RasmusLindroth";
repo = pname;
rev = version;
sha256 = "sha256-Ew/nrsJivq/3/vlZnR1gwhqzQQ9YmrW2LPD7qjmPH4A=";
sha256 = "sha256-13d3EE/rswcHRALUfL46qpKYJUDwGiou5kUz+nCC8VQ=";
};
vendorSha256 = "sha256-Q1H/Y2mDTr24JQMoTf8DL3cj5oF9lH0uaJD2g/0Yxko=";
vendorSha256 = "sha256-RtvzQvZIFdLo24U9IWcoL9qnf4/q/+1UCrb7dcRKEIE=";
meta = with lib; {
description = "A TUI for Mastodon with vim inspired keys";

View File

@ -1,25 +1,34 @@
{ fetchurl, stdenv, lib, makeWrapper,
erlang,
python2, python2Packages,
perlPackages,
gnuplot }:
{ lib
, stdenv
, fetchurl
, makeWrapper
, erlang
, python3
, python3Packages
, perlPackages
, gnuplot
}:
stdenv.mkDerivation rec {
pname = "tsung";
version = "1.7.0";
src = fetchurl {
url = "http://tsung.erlang-projects.org/dist/tsung-${version}.tar.gz";
sha256 = "6394445860ef34faedf8c46da95a3cb206bc17301145bc920151107ffa2ce52a";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
makeWrapper
];
propagatedBuildInputs = [
erlang
gnuplot
perlPackages.perl
perlPackages.TemplateToolkit
python2
python2Packages.matplotlib
python3
python3Packages.matplotlib
];
@ -43,8 +52,8 @@ stdenv.mkDerivation rec {
can currently be used to stress HTTP, WebDAV, SOAP, PostgreSQL, MySQL,
AMQP, MQTT, LDAP and Jabber/XMPP servers.
'';
license = licenses.gpl2;
maintainers = [ maintainers.uskudnik ];
license = licenses.gpl2Plus;
maintainers = with maintainers; [ uskudnik ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,11 @@
diff -Naur teapot-2.3.0-old/scanner.c teapot-2.3.0-new/scanner.c
--- teapot-2.3.0-old/scanner.c 1969-12-31 21:00:01.000000000 -0300
+++ teapot-2.3.0-new/scanner.c 2021-11-25 17:46:49.936673391 -0300
@@ -25,6 +25,7 @@
#include "main.h"
#include "misc.h"
#include "scanner.h"
+#include "utf8.h"
/*}}}*/
/* identcode -- return number of identifier */ /*{{{*/

View File

@ -0,0 +1,49 @@
diff -Naur teapot-2.3.0-old/CMakeLists.txt teapot-2.3.0-new/CMakeLists.txt
--- teapot-2.3.0-old/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300
+++ teapot-2.3.0-new/CMakeLists.txt 2021-11-25 18:16:06.594423660 -0300
@@ -64,46 +64,6 @@
install(TARGETS fteapot DESTINATION bin)
endif ()
-if (ENABLE_HELP)
- add_custom_command(
- OUTPUT teapot.tex teapot.lyx
- MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/doc/teapot.lyx
- VERBATIM
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/teapot.lyx teapot.lyx
- COMMAND lyx -e pdflatex -f main teapot.lyx
- )
- add_custom_command(
- OUTPUT teapot.pdf teapot.aux.old teapot.log teapot.toc
- MAIN_DEPENDENCY teapot.tex
- VERBATIM
- COMMAND pdflatex teapot.tex; diff -q teapot.aux.old teapot.aux && cp teapot.aux teapot.aux.old
- COMMAND pdflatex teapot.tex; diff -q teapot.aux.old teapot.aux && cp teapot.aux teapot.aux.old
- )
- add_custom_command(OUTPUT teapot.pdf teapot.out MAIN_DEPENDENCY teapot.tex teapot.aux.old VERBATIM COMMAND pdflatex teapot.tex; diff -q teapot.aux.old teapot.aux && cp teapot.aux teapot.aux.old)
- add_custom_command(
- OUTPUT html/ html/index.html .latex2html-init
- MAIN_DEPENDENCY teapot.tex
- DEPENDS teapot.tex teapot.pdf ${CMAKE_CURRENT_SOURCE_DIR}/doc/.latex2html-init
- VERBATIM
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/.latex2html-init .latex2html-init
- COMMAND ${CMAKE_COMMAND} -E make_directory html
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/contents.png html/
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/next.png html/
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/next_g.png html/
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/prev.png html/
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/prev_g.png html/
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/up.png html/
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/up_g.png html/
- COMMAND latex2html teapot.tex
- )
- add_custom_target(pdf DEPENDS teapot.pdf)
- add_custom_target(html DEPENDS html/index.html)
- add_custom_target(doc ALL DEPENDS teapot.pdf html/index.html)
- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/teapot FILES_MATCHING PATTERN *.html PATTERN *.png)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/teapot.pdf DESTINATION share/doc/teapot)
- set(HELPFILE "${CMAKE_INSTALL_PREFIX}/share/doc/teapot/index.html")
-endif ()
-
install(FILES COPYING README DESTINATION share/doc/teapot)
install(FILES teapot.1 DESTINATION share/man/man1)

View File

@ -0,0 +1,73 @@
{ lib
, stdenv
, fetchzip
, cmake
, libtirpc
, ncurses
}:
stdenv.mkDerivation rec {
pname = "teapot";
version = "2.3.0";
src = fetchzip {
name = "${pname}-${version}";
url = "https://www.syntax-k.de/projekte/teapot/${pname}-${version}.tar.gz";
sha256 = "sha256-wzAwZwOMeTsuR5LhfjspGdejT6X1V8YJ8B7v9pcbxaY=";
};
patches = [
# include a local file in order to make cc happy
./001-fix-warning.patch
# remove the ENABLE_HELP target entirely - lyx and latex are huge!
./002-remove-help.patch
];
nativeBuildInputs = [
cmake
];
buildInputs = [
libtirpc
ncurses
];
# By no known reason libtirpc is not detected
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
NIX_LDFLAGS = [ "-ltirpc" ];
cmakeConfigureFlags = [
"-DENABLE_HELP=OFF"
];
meta = with lib; {
homepage = "https://www.syntax-k.de/projekte/teapot/";
description = "Table Editor And Planner, Or: Teapot!";
longDescription = ''
Teapot is a compact spreadsheet software originally written by Michael
Haardt. It features a (n)curses-based text terminal interface, and
recently also a FLTK-based GUI.
These days, it may seem pointless having yet another spreadsheet program
(and one that doesn't even know how to load Microsoft Excel files). Its
compact size (130k for the ncurses executable, 140k for the GUI
executable, 300k for the self-contained Windows EXE) and the fact that it
can run across serial lines and SSH sessions make it an interesting choice
for embedded applications and as system administration utility, even more
so since it has a batch processing mode and comes with example code for
creating graphs from data sets.
Another interesting feature is its modern approach to spread sheet theory:
It sports true three-dimensional tables and iterative expressions. And
since it breaks compatibility with the usual notions of big spreadsheet
packages, it can also throw old syntactic cruft over board which many
spreadsheets still inherit from the days of VisiCalc on ancient CP/M
systems.
'';
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}
# TODO: patch/fix FLTK building
# TODO: add documentation from

View File

@ -11,13 +11,13 @@ assert (!blas.isILP64) && (!lapack.isILP64);
stdenv.mkDerivation rec {
pname = "octopus";
version = "11.2";
version = "11.3";
src = fetchFromGitLab {
owner = "octopus-code";
repo = "octopus";
rev = version;
sha256 = "sha256-leEcUSjpiP13l65K9WKN2GXTtTa8vvK/MFxR2zH6Xno=";
sha256 = "0n04yvnc0rg3lvnkkdpbwkfl6zg544260p3s65vwkc5dflrhk34r";
};
nativeBuildInputs = [

View File

@ -2,13 +2,13 @@
gccStdenv.mkDerivation rec {
pname = "programmer-calculator";
version = "2.1";
version = "2.2";
src = fetchFromGitHub {
owner = "alt-romes";
repo = pname;
rev = "v${version}";
sha256 = "1vvpbj24ijl9ma0h669n9x0z1im3vqdf8zf2li0xf5h97b14gmv0";
sha256 = "sha256-JQcYCYKdjdy8U2XMFzqTH9kAQ7CFv0r+sC1YfuAm7p8=";
};
buildInputs = [ ncurses ];

View File

@ -8,16 +8,16 @@
buildGoModule rec {
pname = "lima";
version = "0.7.3";
version = "0.7.4";
src = fetchFromGitHub {
owner = "lima-vm";
repo = pname;
rev = "v${version}";
sha256 = "sha256-HVWZ0XF1oBUHhkOQHELlZ/pxXUsUo2cVo6EhZl6S0W4=";
sha256 = "sha256-pn8GtFAZMQyFjOpn6blNBoDgQL7X1gaYjGsQHwvMzaQ=";
};
vendorSha256 = "sha256-LhmZRa7vDylA4DRTfKFRs3lQMnwNfzF1H6ki1/zdpUg=";
vendorSha256 = "sha256-egZFJSGnFYfOcBMNNEsPV6ngf3ddoYCSntnuloYfpxo=";
nativeBuildInputs = [ makeWrapper installShellFiles ];

View File

@ -1,13 +1,13 @@
{ lib, fetchzip }:
let
version = "2108.26";
version = "2110.31";
in
fetchzip {
name = "cascadia-code-${version}";
url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaCode-${version}.zip";
sha256 = "1dvwn5rs4ss4rwd64namy8ccz8dagkk84qjg13sxxqizyd5y08h1";
sha256 = "sha256-SyPQtmudfogBwASTApl1hSpOPf2PLTSOzhJAJzrQ3Mg=";
postFetch = ''
mkdir -p $out/share/fonts/
@ -18,6 +18,7 @@ fetchzip {
meta = with lib; {
description = "Monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal";
homepage = "https://github.com/microsoft/cascadia-code";
changelog = "https://github.com/microsoft/cascadia-code/raw/v${version}/FONTLOG.txt";
license = licenses.ofl;
maintainers = [ maintainers.marsam ];
platforms = platforms.all;

View File

@ -48,13 +48,13 @@
stdenv.mkDerivation rec {
pname = "arcan" + lib.optionalString useStaticOpenAL "-static-openal";
version = "0.6.1pre1+unstable=2021-10-16";
version = "0.6.1";
src = fetchFromGitHub {
owner = "letoram";
repo = "arcan";
rev = "e0182b944152fbcb49f5c16932d38c05a9fb2680";
hash = "sha256-4FodFuO51ehvyjH4YaF/xBY9dwA6cP/e6/BvEsH4w7U=";
rev = version;
hash = "sha256-2do4+6KB0AAcJk22mN0IA/e/bPaeGipLjI4RSTPqLBg=";
};
nativeBuildInputs = [

View File

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "durden";
version = "0.6.1+unstable=2021-10-15";
version = "0.6.1+date=2021-10-17";
src = fetchFromGitHub {
owner = "letoram";
repo = pname;
rev = "ab6cdaf19e87b74895a9ab5e1d005a07ea9396a6";
hash = "sha256-FxqY1TUgbD/PjQjTZZerb7ngn5nkcqmVwqPvbRAYaqo=";
rev = "5fb8b0f9bc2952ed9cf7dc20a1c5c0cc44c02ff1";
hash = "sha256-+EIsrCkMe9MrUQOCh0R+rsDg/Rqs3iQWO0GZCgZQ+No=";
};
installPhase = ''

View File

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "pipeworld";
version = "0.pre+unstable=2021-08-01";
version = "0.pre+date=2021-11-26";
src = fetchFromGitHub {
owner = "letoram";
repo = pname;
rev = "311cc91946be63faab3b1578bc1d40668dd30f8c";
hash = "sha256-iqcdVzEp4ST/f93+9fGSwvJMj7BznNtoEx4F3oMPCYk=";
rev = "9f816db154ca5c54af952ad11c2186ccac5bdd2d";
hash = "sha256-uwnrRsMP0RLEGr2mEVQ6kEtV/c6t5qSCHY0ynywPzkw=";
};
installPhase = ''

View File

@ -29,5 +29,6 @@ stdenv.mkDerivation rec {
license = licenses.bsdOriginal;
maintainers = [ maintainers.ebzzry ];
platforms = platforms.unix;
badPlatforms = [ "aarch64-darwin" ];
};
}

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "libfyaml";
version = "0.7.2";
version = "0.7.3";
src = fetchFromGitHub {
owner = "pantoniou";
repo = pname;
rev = "v${version}";
sha256 = "0wq7ah9a83w0c5qppdpwqqjffwi85q7slz4im0kmkhxdp23v9m1i";
sha256 = "sha256-RxaeDtsdPtcTYJ7qMVmBCm1TsMI7YsXCz2w/Bq2RmaA=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];

View File

@ -1,23 +1,30 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "zydis";
version = "3.2.0";
version = "3.2.1";
src = fetchFromGitHub {
owner = "zyantific";
repo = "zydis";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-1XGELwMuFlIt6Z3+kfD6VAgDZOwhhCSG42dkYh7WLf8=";
sha256 = "sha256-FB7hGQ9vI3ZE376iROEpdtZm91IiccBhtAFa94JgnUY=";
};
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
];
meta = with lib; {
homepage = "https://zydis.re/";
description = "Fast and lightweight x86/x86-64 disassembler library";
license = licenses.mit;
maintainers = [ maintainers.jbcrail ];
maintainers = with maintainers; [ jbcrail AndersonTorres ];
platforms = platforms.all;
};
}

View File

@ -2,15 +2,19 @@
, buildPythonPackage
, fetchPypi
, async-timeout
, pythonOlder
}:
buildPythonPackage rec {
pname = "aiopulse";
version = "0.4.2";
version = "0.4.3";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "0fnscm27l77c8cd7jhbn35axyalq61kksy3fcqzv21fz55lklsm0";
sha256 = "sha256-Wp8NUjRlO+6ASqIt3C0YJRh0EKcEukXVMp4I+TCTElo=";
};
propagatedBuildInputs = [
@ -20,7 +24,9 @@ buildPythonPackage rec {
# tests are not present
doCheck = false;
pythonImportsCheck = [ "aiopulse" ];
pythonImportsCheck = [
"aiopulse"
];
meta = with lib; {
description = "Python Rollease Acmeda Automate Pulse hub protocol implementation";

View File

@ -10,14 +10,16 @@
buildPythonPackage rec {
pname = "boschshcpy";
version = "0.2.23";
version = "0.2.24";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "tschamm";
repo = pname;
rev = version;
sha256 = "sha256-1mqxtL/9OFg3r+5/dkZlH4qRvRHsHMqHvYPEfCjSrr4=";
sha256 = "sha256-hvanimPWTKzOHRwJhynzO/4Z1jGlLopk4ogU3KHTEyc=";
};
propagatedBuildInputs = [
@ -30,7 +32,9 @@ buildPythonPackage rec {
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "boschshcpy" ];
pythonImportsCheck = [
"boschshcpy"
];
meta = with lib; {
description = "Python module to work with the Bosch Smart Home Controller API";

View File

@ -1,6 +1,12 @@
{ lib, fetchPypi, buildPythonPackage
{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, flake8
, mock, pep8, pytest }:
, mock
, pep8
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "flake8-polyfill";
@ -11,12 +17,6 @@ buildPythonPackage rec {
sha256 = "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4";
};
postPatch = ''
# Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
substituteInPlace setup.cfg \
--replace pytest 'tool:pytest'
'';
propagatedBuildInputs = [
flake8
];
@ -24,13 +24,28 @@ buildPythonPackage rec {
checkInputs = [
mock
pep8
pytest
pytestCheckHook
];
checkPhase = ''
pytest tests
patches = [
# Skip unnecessary tests on Flake8, https://github.com/PyCQA/pep8-naming/pull/181
(fetchpatch {
name = "skip-tests.patch";
url = "https://github.com/PyCQA/flake8-polyfill/commit/3cf414350e82ceb835ca2edbd5d5967d33e9ff35.patch";
sha256 = "mElZafodq8dF3wLO/LOqwFb7eLMsPLlEjNSu5AWqets=";
})
];
postPatch = ''
# Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
substituteInPlace setup.cfg \
--replace pytest 'tool:pytest'
'';
pythonImportsCheck = [
"flake8_polyfill"
];
meta = with lib; {
homepage = "https://gitlab.com/pycqa/flake8-polyfill";
description = "Polyfill package for Flake8 plugins";

View File

@ -9,14 +9,16 @@
buildPythonPackage rec {
pname = "fpyutils";
version = "2.0.1";
version = "2.1.0";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "frnmst";
repo = pname;
rev = version;
sha256 = "1dksx5ykm7f1bi16wg8kqqqlnc874k3vg9kfjbbbalv8w0g2g2am";
sha256 = "sha256-QO7g0wjlaboZwvA+JYL1ax7M8zzCc0hizBdaN2b1TCs=";
};
propagatedBuildInputs = [
@ -28,14 +30,18 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = [ "fpyutils/tests/*.py" ];
pytestFlagsArray = [
"fpyutils/tests/*.py"
];
disabledTests = [
# Don't run test which requires bash
"test_execute_command_live_output"
];
pythonImportsCheck = [ "fpyutils" ];
pythonImportsCheck = [
"fpyutils"
];
meta = with lib; {
description = "Collection of useful non-standard Python functions";

View File

@ -0,0 +1,51 @@
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, google-auth
, google-auth-oauthlib
, google-cloud-pubsub
, pythonOlder
, requests_oauthlib
, pytest-aiohttp
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "google-nest-sdm";
version = "0.4.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "allenporter";
repo = "python-google-nest-sdm";
rev = version;
sha256 = "sha256-mm1FhR10asxJI8MQfQipqmQbHQfO3z49jpnnrz38Clo=";
};
propagatedBuildInputs = [
aiohttp
google-auth
google-auth-oauthlib
google-cloud-pubsub
requests_oauthlib
];
checkInputs = [
pytest-aiohttp
pytestCheckHook
];
pythonImportsCheck = [
"google_nest_sdm"
];
meta = with lib; {
description = "Python module for Google Nest Device Access using the Smart Device Management API";
homepage = "https://github.com/allenporter/python-google-nest-sdm";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -1,31 +1,42 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest-runner
, python-dateutil
, babelfish
, rebulk
, pythonOlder
, importlib-resources
, pytestCheckHook
, pytest-mock
, pytest-benchmark
, pyyaml
}:
buildPythonPackage rec {
pname = "guessit";
version = "3.3.1";
version = "3.4.3";
src = fetchPypi {
inherit pname version;
sha256 = "8305e0086129614a8820a508303f98f56c584811489499bcc54a7ea6f1b0391e";
sha256 = "731e96e6a1f3b065d05accc8c19f35d4485d880b77ab8dc4b262cc353df294f7";
};
# Tests require more packages.
doCheck = false;
buildInputs = [ pytest-runner ];
propagatedBuildInputs = [
python-dateutil babelfish rebulk
];
rebulk
babelfish
python-dateutil
] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
checkInputs = [ pytestCheckHook pytest-mock pytest-benchmark pyyaml ];
pytestFlagsArray = [ "--benchmark-disable" ];
pythonImportsCheck = [ "guessit" ];
meta = {
homepage = "https://pypi.python.org/pypi/guessit";
license = lib.licenses.lgpl3;
description = "A library for guessing information from video files";
homepage = "https://doc.guessit.io/";
description = "A Python library that extracts as much information as possible from a video filename";
changelog = "https://github.com/guessit-io/guessit/raw/v${version}/CHANGELOG.md";
license = lib.licenses.lgpl3Only;
};
}

View File

@ -9,6 +9,8 @@
buildPythonPackage rec {
pname = "md-toc";
version = "8.0.1";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
@ -26,9 +28,18 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = [ "md_toc/tests/*.py" ];
postPatch = ''
substituteInPlace setup.py \
--replace "fpyutils>=2.0,<2.1" "fpyutils>=2.0,<3"
'';
pythonImportsCheck = [ "md_toc" ];
pytestFlagsArray = [
"md_toc/tests/*.py"
];
pythonImportsCheck = [
"md_toc"
];
meta = with lib; {
description = "Table of contents generator for Markdown";

View File

@ -1,5 +1,6 @@
{ lib
, fetchPypi
, fetchpatch
, buildPythonPackage
, flake8
, flake8-polyfill
@ -20,6 +21,15 @@ buildPythonPackage rec {
flake8-polyfill
];
patches = [
# Add missing option to get passing tests, https://github.com/PyCQA/pep8-naming/pull/181
(fetchpatch {
name = "add-missing-option.patch";
url = "https://github.com/PyCQA/pep8-naming/commit/03b8f36f6a8bb8bc79dfa5a71ad9be2a0bf8bbf5.patch";
sha256 = "1YTh84Yoj0MqFZoifM362563r1GuzaF+mMmdT/ckC7I=";
})
];
checkPhase = ''
runHook preCheck
${python.interpreter} run_tests.py

View File

@ -16,6 +16,7 @@ buildPythonPackage rec {
pname = "py17track";
version = "3.3.0";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
@ -44,13 +45,18 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace pyproject.toml \
--replace ">=19.3,<21.0" ">=19.3,<22.0"
--replace 'attrs = ">=19.3,<21.0"' 'attrs = ">=19.3,<22.0"' \
--replace 'async-timeout = "^3.0.1"' 'async-timeout = ">=3.0.1,<5.0.0"'
'';
# Ignore the examples directory as the files are prefixed with test_
disabledTestPaths = [ "examples/" ];
disabledTestPaths = [
# Ignore the examples directory as the files are prefixed with test_
"examples/"
];
pythonImportsCheck = [ "py17track" ];
pythonImportsCheck = [
"py17track"
];
meta = with lib; {
description = "Python library to track package info from 17track.com";

View File

@ -1,16 +1,12 @@
{ buildPythonPackage
{ lib
, buildPythonPackage
, coverage
, django
, factory_boy
, fetchFromGitHub
, isPy3k
, lib
# pythonPackages
, django
, pylint-plugin-utils
# pythonPackages for checkInputs
, coverage
, factory_boy
, pytest
, pytestCheckHook
}:
buildPythonPackage rec {
@ -30,17 +26,26 @@ buildPythonPackage rec {
pylint-plugin-utils
];
checkInputs = [ coverage factory_boy pytest ];
checkInputs = [
coverage
factory_boy
pytestCheckHook
];
# Check command taken from scripts/test.sh
# Skip test external_django_tables2_noerror_meta_class:
# requires an unpackaged django_tables2
checkPhase = ''
python pylint_django/tests/test_func.py -v -k "not tables2"
'';
disabledTests = [
# Skip outdated tests and the one with a missing dependency (django_tables2)
"external_django_tables2_noerror_meta_class"
"external_factory_boy_noerror"
"func_noerror_foreign_key_attributes"
"func_noerror_foreign_key_key_cls_unbound"
];
pythonImportsCheck = [
"pylint_django"
];
meta = with lib; {
description = "A Pylint plugin to analyze Django applications";
description = "Pylint plugin to analyze Django applications";
homepage = "https://github.com/PyCQA/pylint-django";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ kamadorueda ];

View File

@ -0,0 +1,37 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, requests_oauthlib
}:
buildPythonPackage rec {
pname = "python-google-nest";
version = "5.1.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "y3BOhorVkJ3rFPifNOopLMqk6y1fHX5vxHGiqWvWHhE=";
};
propagatedBuildInputs = [
requests_oauthlib
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [
"nest"
];
meta = with lib; {
description = "Python API and command line tool for talking to Nest thermostats";
homepage = "https://github.com/axlan/python-nest/";
license = licenses.cc-by-nc-sa-30;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,49 @@
{ lib
, buildPythonPackage
, fetchFromGitLab
, fetchpatch
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "tololib";
version = "0.1.0b3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitLab {
owner = "MatthiasLohr";
repo = pname;
rev = "v${version}";
sha256 = "qkdMy6/ZuBksbBTbDhPyCPWMjubQODjdMsqHTJ7QvQI=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
checkInputs = [
pytestCheckHook
];
disabledTests = [
# Test requires network access
"test_discovery"
];
pythonImportsCheck = [
"tololib"
];
meta = with lib; {
description = "Python Library for Controlling TOLO Sauna/Steam Bath Devices";
homepage = "https://gitlab.com/MatthiasLohr/tololib";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,16 @@
diff --git a/setup.py b/setup.py
index aef5c4e..030ea14 100755
--- a/setup.py
+++ b/setup.py
@@ -73,7 +73,7 @@ setup(name='cpplint',
long_description=open('README.rst').read(),
license='BSD-3-Clause',
setup_requires=[
- "pytest-runner==5.2"
+ "pytest-runner"
],
tests_require=test_required,
# extras_require allow pip install .[dev]
--
2.31.1

View File

@ -2,16 +2,18 @@
python3Packages.buildPythonApplication rec {
pname = "cpplint";
version = "1.5.1";
version = "1.5.5";
# Fetch from github instead of pypi, since the test cases are not in the pypi archive
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "0k927mycj1k4l3fbxrk597bhcjl2nrpaas1imbjgk64cyq8dv7lh";
sha256 = "sha256-JXz2Ufo7JSceZVqYwCRkuAsOR08znZlIUk8GCLAyiI4=";
};
patches = [ ./0001-Remove-pytest-runner-version-pin.patch ];
postPatch = ''
patchShebangs cpplint_unittest.py
'';

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "cloud-nuke";
version = "0.5.1";
version = "0.7.1";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = pname;
rev = "v${version}";
sha256 = "sha256-f93zpTA3FWfqmPVnhnvGBJSqQ2OEHMxnI6MUN74LmAk=";
sha256 = "sha256-gW7uunW7gE/5umBQNjx+k2FIAryKka7yLMqnd6ewv6I=";
};
vendorSha256 = "sha256-C9UGpm8JBLQpSFQkvib5Bmn3J88LxUNt4ELJXL4ZQ80=";
vendorSha256 = "sha256-GDXkrrE0KgFJHXCDZH83/nQAexKhmGed/QGZ1aSXnpg=";
ldflags = [ "-s" "-w" "-X main.VERSION=${version}" ];

View File

@ -145,13 +145,13 @@ rec {
headers = "0r1qxgkpcn03fd28zbz86ilhsqg0gzp9clbghr5w6gy5ak8y68hz";
};
electron_16 = mkElectron "16.0.1" {
armv7l-linux = "9fe58dcc8838fc641e9fc6f2723ece6f12c29169340da3ab754e1afc57634314";
aarch64-linux = "991369b7dee6cf9c146c48566153baf898b5ed73efaada2688d1699d69ba366c";
x86_64-linux = "4063b6d05c9320fc53535a7d932e03f94ad0aae95432437bbf2f2f222b67c5a5";
i686-linux = "68a817a999dcc996497c53e54f06199af0c2de278ff910c28845405d1b1828f0";
x86_64-darwin = "7e28327d3efb013f19295e2491208491c66b117a167e9e56d141d0516d6d5587";
aarch64-darwin = "f05684ca31d3d98746bca9ec05d425998d60af640958eeb55f464747ceb97bdf";
headers = "0sk6h0jqfw2q9h05xdzivwfa6040r4racf82s8i5xkw5s13vsl6d";
electron_16 = mkElectron "16.0.2" {
armv7l-linux = "bba43eb1e2718f04f6d91096cf22d4c49cbab0915f48b3b22b8f94f205eda2f0";
aarch64-linux = "3a2ad9c508bfb8e1b2635a3af0a7495e1121bc7aea64a9b771322a60bb82e265";
x86_64-linux = "2f96a5b773b790d968a6b2c1142f8d231587b775be113e7ee90d9a89bec8cd70";
i686-linux = "4fd01951b3f57b69731f85d6eae6962257c3a70c37d74751a098bc00ea43085a";
x86_64-darwin = "a3b9fd83dea4cfa959ddd72be4cbcb8d0503f4ab2741705561b62de8b5218895";
aarch64-darwin = "3894d141b060d37f1248556525e96a9fc1d4afc237b740f5093bdcd5731972d1";
headers = "0h1gzrd6rdd217q0im0g1hr3b037dmi4v6wk30kzb12597ww59n1";
};
}

View File

@ -1,29 +0,0 @@
{ lib, stdenv, fetchurl, SDL, zlib, libmpeg2, libmad, libogg, libvorbis, flac, alsa-lib
, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
, openglSupport ? libGLSupported, libGLU, libGL ? null
}:
assert openglSupport -> libGL != null && libGLU != null;
stdenv.mkDerivation rec {
version = "0.1.1";
pname = "residualvm";
src = fetchurl {
url = "mirror://sourceforge/residualvm/residualvm-${version}-sources.tar.bz2";
sha256 = "99c419b13885a49bdfc10a50a3a6000fd1ba9504f6aae04c74b840ec6f57a963";
};
buildInputs = [ stdenv SDL zlib libmpeg2 libmad libogg libvorbis flac alsa-lib ]
++ lib.optionals openglSupport [ libGL libGLU ];
configureFlags = [ "--enable-all-engines" ];
meta = with lib; {
description = "Interpreter for LucasArts' Lua-based 3D adventure games";
homepage = "http://residualvm.org/";
repositories.git = "https://github.com/residualvm/residualvm.git";
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View File

@ -560,7 +560,7 @@
"neato" = ps: with ps; [ aiohttp-cors pybotvac ];
"nederlandse_spoorwegen" = ps: with ps; [ nsapi ];
"ness_alarm" = ps: with ps; [ nessclient ];
"nest" = ps: with ps; [ aiohttp-cors ha-ffmpeg python-nest ]; # missing inputs: google-nest-sdm
"nest" = ps: with ps; [ aiohttp-cors google-nest-sdm ha-ffmpeg python-nest ];
"netatmo" = ps: with ps; [ pyturbojpeg aiohttp-cors hass-nabucasa pyatmo ];
"netdata" = ps: with ps; [ netdata ];
"netgear" = ps: with ps; [ ]; # missing inputs: pynetgear

View File

@ -179,10 +179,13 @@ in with py.pkgs; buildPythonApplication rec {
postPatch = ''
substituteInPlace setup.py \
--replace "async_timeout==3.0.1" "async_timeout" \
--replace "awesomeversion==21.10.1" "awesomeversion" \
--replace "aiohttp==3.7.4.post0" "aiohttp" \
--replace "bcrypt==3.1.7" "bcrypt" \
--replace "pip>=8.0.3,<20.3" "pip" \
--replace "pyyaml==6.0" "pyyaml" \
--replace "yarl==1.6.3" "yarl==1.7.0"
--replace "yarl==1.6.3" "yarl"
substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"'
'';
@ -537,6 +540,7 @@ in with py.pkgs; buildPythonApplication rec {
"namecheapdns"
"neato"
"ness_alarm"
"nest"
"netatmo"
"nexia"
"nightscout"

View File

@ -26,9 +26,9 @@ stdenv.mkDerivation rec {
buildInputs = [ boringssl' libevent zlib ];
cmakeFlags = [
"-DBORINGSSL_DIR=${boringssl'}"
"-DBORINGSSL_LIB_crypto=${boringssl'}/lib/libcrypto.a"
"-DBORINGSSL_LIB_ssl=${boringssl'}/lib/libssl.a"
"-DBORINGSSL_DIR=${lib.getDev boringssl'}"
"-DBORINGSSL_LIB_crypto=${lib.getLib boringssl'}/lib/libcrypto.a"
"-DBORINGSSL_LIB_ssl=${lib.getLib boringssl'}/lib/libssl.a"
"-DZLIB_LIB=${zlib}/lib/libz.so"
];
@ -39,8 +39,8 @@ stdenv.mkDerivation rec {
mkdir combinedlib
cd combinedlib
ar -x ${boringssl'}/lib/libssl.a
ar -x ${boringssl'}/lib/libcrypto.a
ar -x ${lib.getLib boringssl'}/lib/libssl.a
ar -x ${lib.getLib boringssl'}/lib/libcrypto.a
ar -x ../src/liblsquic/liblsquic.a
ar rc liblsquic.a *.o
ranlib liblsquic.a

View File

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
configureFlags = [
"--enable-boringssl=${boringssl}"
"--enable-boringssl=${lib.getDev boringssl}"
"--enable-libsrtp2"
"--enable-turn-rest-api"
"--enable-json-logger"
@ -42,6 +42,10 @@ stdenv.mkDerivation rec {
"--enable-post-processing"
];
makeFlagsArray = [
"BORINGSSL_LIBS=-L${lib.getLib boringssl}/lib"
];
outputs = [ "out" "dev" "doc" "man" ];
postInstall = ''

View File

@ -2,17 +2,17 @@
buildGoModule rec {
pname = "node_exporter";
version = "1.2.2";
version = "1.3.0";
rev = "v${version}";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "node_exporter";
sha256 = "11xjbkws3vv5r4p6w6qfmm9wrmlhzwmvlx3vcgz99ylz34r19xvc";
sha256 = "sha256-gfRnlKq8F4gfea0JOzRqQDDFVJpNSfUX/cvFE/rUU1Q=";
};
vendorSha256 = "0wwji220pidrmsjzd9c3n40v237680av750jf6hdvp0aqi63p9nr";
vendorSha256 = "sha256-nAvODyy+PfkGFAaq+3hBhQaPji5GUMU7N8xcgbGQMeI=";
# FIXME: tests fail due to read-only nix store
doCheck = false;

View File

@ -8,14 +8,14 @@
python3Packages.buildPythonApplication rec {
pname = "xonsh";
version = "0.10.1";
version = "0.11.0";
# fetch from github because the pypi package ships incomplete tests
src = fetchFromGitHub {
owner = "xonsh";
repo = "xonsh";
rev = version;
sha256 = "03ahay2rl98a9k4pqkxksmj6mcg554jnbhw9jh8cyvjrygrpcpch";
sha256 = "sha256-jfxQMEVABTOhx679V0iGVX9RisuY42lSdztYXMLwdcw=";
};
LC_ALL = "en_US.UTF-8";
@ -68,7 +68,8 @@ python3Packages.buildPythonApplication rec {
HOME=$TMPDIR
'';
checkInputs = [ glibcLocales git ] ++ (with python3Packages; [ pytestCheckHook pytest-subprocess ]);
checkInputs = [ glibcLocales git ] ++
(with python3Packages; [ pyte pytestCheckHook pytest-mock pytest-subprocess ]);
propagatedBuildInputs = with python3Packages; [ ply prompt-toolkit pygments ];

View File

@ -0,0 +1,50 @@
{ lib
, stdenv
, fetchFromGitHub
, jasper
, libpng
, libjpeg
, zlib
}:
stdenv.mkDerivation rec {
pname = "aaphoto";
version = "0.43.1";
src = fetchFromGitHub {
owner = "log69";
repo = pname;
rev = "v${version}";
hash = "sha256-qngWWqV2vLm1gO0KJ0uHOCf2IoEAs1oiygpJtDvt3s8=";
};
buildInputs = [
jasper
libpng
libjpeg
zlib
];
postInstall = ''
install -Dm644 NEWS README REMARKS TODO -t $out/share/doc/${pname}
'';
meta = with lib; {
homepage = "http://log69.com/aaphoto_en.html";
description = "Free and open source automatic photo adjusting software";
longDescription = ''
Auto Adjust Photo tries to give a solution for the automatic color
correction of photos. This means setting the contrast, color balance,
saturation and gamma levels of the image by analization.
This can be a solution for those kind of users who are not able to manage
and correct images with complicated graphical softwares, or just simply
don't intend to spend a lot of time with manually correcting the images
one-by-one.
'';
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
broken = stdenv.isDarwin; # aaphoto.c:237:10: fatal error: 'omp.h' file not found
};
}

View File

@ -1,24 +1,42 @@
{lib, stdenv, fetchFromGitHub, zlib, libpng, libxml2, libjpeg }:
{ lib
, stdenv
, fetchFromGitHub
, libjpeg
, libpng
, libxml2
, zlib
}:
stdenv.mkDerivation rec {
pname = "flam3";
version = "3.1.1-${lib.strings.substring 0 7 rev}";
rev = "e0801543538451234d7a8a240ba3b417cbda5b21";
version = "3.1.1+date=2018-04-12";
src = fetchFromGitHub {
inherit rev;
owner = "scottdraves";
repo = pname;
sha256 = "18iyj16k0sn3fs52fj23lj31xi4avlddhbib6kk309576nlxp17w";
rev = "7fb50c82e90e051f00efcc3123d0e06de26594b2";
hash = "sha256-cKRfmTcyWY2LyxqojTzxD2wnxu5eh3emHi51bhS3gYg=";
};
buildInputs = [ zlib libpng libxml2 libjpeg ];
buildInputs = [
libjpeg
libpng
libxml2
zlib
];
meta = with lib; {
description = "Cosmic recursive fractal flames";
homepage = "https://flam3.com/";
maintainers = with maintainers; [ ];
platforms = platforms.linux;
description = "Cosmic recursive fractal flames";
longDescription = ''
Flames are algorithmically generated images and animations. The software
was originally written in 1992 and released as open source, aka free
software. Over the years it has been greatly expanded, and is now widely
used to create art and special effects. The shape and color of each image
is specified by a long string of numbers - a genetic code of sorts.
'';
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.linux;
};
}

View File

@ -14,16 +14,16 @@
rustPlatform.buildRustPackage rec {
pname = "czkawka";
version = "3.3.0";
version = "3.3.1";
src = fetchFromGitHub {
owner = "qarmin";
repo = "czkawka";
rev = version;
sha256 = "0mikgnsqxj8dgapr2k7i9i8mmsza15kp4nasyd6l1vp2cqy8aki6";
sha256 = "0p1j5f5jk0cci6bg4jfnnn80gyi9039ni4ma8zwindk7fyn9gpc8";
};
cargoSha256 = "009zfy4lk8y51h1wi71mrjp6kc7xnk3r8jlbxvhyqslhqd9w10fv";
cargoSha256 = "1q35c5szavpsnzflw33radg6blzql3sz3jyzyqqz97ac69zns920";
nativeBuildInputs = [
pkg-config

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, flex, bison, systemd }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, flex, bison, systemd }:
stdenv.mkDerivation rec {
pname = "fluent-bit";
@ -12,7 +12,21 @@ stdenv.mkDerivation rec {
};
patches = lib.optionals stdenv.isDarwin [
./fix-cmetrics-darwin.patch
# Fix compilations errors on darwin
(fetchpatch {
url = "https://github.com/calyptia/cmetrics/commit/4f0f7ae2eeec148a69156f9fcc05d64bf249d11e.patch";
sha256 = "sha256-M1+28mHxpMvcFkOoKxkMMo1VCQsG33ncFZkFalOq2FQ=";
stripLen = 1;
extraPrefix = "lib/cmetrics/";
})
(fetchpatch {
url = "https://github.com/calyptia/cmetrics/commit/a97999cb6d7299ef230d216b7a1c584b43c64de9.patch";
sha256 = "sha256-RuyPEeILc86n/klPIb334XpX0F71nskQ8s/ya0rE2zI=";
stripLen = 1;
extraPrefix = "lib/cmetrics/";
})
# Fix bundled luajit compilation args
./fix-luajit-darwin.patch
];

View File

@ -1,23 +0,0 @@
diff --git i/lib/cmetrics/src/cmt_time.c w/lib/cmetrics/src/cmt_time.c
--- i/lib/cmetrics/src/cmt_time.c
+++ w/lib/cmetrics/src/cmt_time.c
@@ -20,7 +20,7 @@
#include <cmetrics/cmt_info.h>
/* MacOS */
-#ifdef FLB_HAVE_CLOCK_GET_TIME
+#ifdef CMT_HAVE_CLOCK_GET_TIME
#include <mach/clock.h>
#include <mach/mach.h>
#endif
@@ -41,8 +41,8 @@
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
clock_get_time(cclock, &mts);
- tm->tv_sec = mts.tv_sec;
- tm->tv_nsec = mts.tv_nsec;
+ tm.tv_sec = mts.tv_sec;
+ tm.tv_nsec = mts.tv_nsec;
mach_port_deallocate(mach_task_self(), cclock);
#else /* __STDC_VERSION__ */
clock_gettime(CLOCK_REALTIME, &tm);

View File

@ -24,12 +24,12 @@ let
in stdenv.mkDerivation rec {
pname = "ghidra";
version = "10.0";
versiondate = "20210621";
version = "10.0.4";
versiondate = "20210928";
src = fetchzip {
url = "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_${version}_build/ghidra_${version}_PUBLIC_${versiondate}.zip";
sha256 = "0m1ksng2fkmcg7m22lqil10qn95s06gxnxdz7ih9qpbx67pmmq9x";
hash = "sha256-nc+5Aqid3hGzbcKMCCaQ9E9AGOB3JyNkJn+3Yz8ewhM=";
};
nativeBuildInputs = [

View File

@ -1,4 +1,4 @@
# frozen_string_literal: true
source "https://rubygems.org"
gem "metasploit-framework", git: "https://github.com/rapid7/metasploit-framework", ref: "refs/tags/6.1.15"
gem "metasploit-framework", git: "https://github.com/rapid7/metasploit-framework", ref: "refs/tags/6.1.16"

View File

@ -1,9 +1,9 @@
GIT
remote: https://github.com/rapid7/metasploit-framework
revision: 1dd828ca9f705d3f05d273b535ff666b5941ddd6
ref: refs/tags/6.1.15
revision: a517e78b4ff21ff15b7f3ac748476ec8de4d9517
ref: refs/tags/6.1.16
specs:
metasploit-framework (6.1.15)
metasploit-framework (6.1.16)
actionpack (~> 6.0)
activerecord (~> 6.0)
activesupport (~> 6.0)
@ -128,13 +128,13 @@ GEM
arel-helpers (2.12.1)
activerecord (>= 3.1.0, < 7)
aws-eventstream (1.2.0)
aws-partitions (1.533.0)
aws-sdk-core (3.122.1)
aws-partitions (1.534.0)
aws-sdk-core (3.123.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-ec2 (1.281.0)
aws-sdk-ec2 (1.283.0)
aws-sdk-core (~> 3, >= 3.122.0)
aws-sigv4 (~> 1.1)
aws-sdk-iam (1.63.0)
@ -143,7 +143,7 @@ GEM
aws-sdk-kms (1.51.0)
aws-sdk-core (~> 3, >= 3.122.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.106.0)
aws-sdk-s3 (1.107.0)
aws-sdk-core (~> 3, >= 3.122.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)

View File

@ -15,13 +15,13 @@ let
};
in stdenv.mkDerivation rec {
pname = "metasploit-framework";
version = "6.1.15";
version = "6.1.16";
src = fetchFromGitHub {
owner = "rapid7";
repo = "metasploit-framework";
rev = version;
sha256 = "sha256-Wz5FeM7AvRS4mV3BJcWOdp1GgAzTOqRnjBAQp4/Oj5E=";
sha256 = "sha256-ppt41H803tYHfPXNLJCfdDzLANLFZHajzVC1UMg7MGQ=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -104,30 +104,30 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "052y91z5xqysfmnclcp0k9cy7dgjk28xv6dskwww42ljdgjxcmxi";
sha256 = "1mggk7w7529fxcwvsnmm08ms600nx7nzh51d4kq2d167wf4qqfan";
type = "gem";
};
version = "1.533.0";
version = "1.534.0";
};
aws-sdk-core = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "07cdd2jiydn663xgqv5fykd9zfiv96ma3j4k2khwf06czy40cvwq";
sha256 = "1390d003vnajh3i2k0al4yzw7xchdk17v92vpdwla6yds68x9kh8";
type = "gem";
};
version = "3.122.1";
version = "3.123.0";
};
aws-sdk-ec2 = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "01ywgc5mh1h19ac10l1ck911qgkxqavwbanp4i6h9ddlcd9jmhm1";
sha256 = "1i3qvsif62kwdhny226fmnzi4la27qh8hnl0df09w9hiqh6ya0ls";
type = "gem";
};
version = "1.281.0";
version = "1.283.0";
};
aws-sdk-iam = {
groups = ["default"];
@ -154,10 +154,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "06ix8lw1r0mw77hnc7ns0fqrsl616g35xw8qcsihzwzgvwb2z0mb";
sha256 = "0n00hkfy8c44yq23wv0y9aj007mfx1va7jxiaa74g3agf317vrak";
type = "gem";
};
version = "1.106.0";
version = "1.107.0";
};
aws-sigv4 = {
groups = ["default"];
@ -664,12 +664,12 @@
platforms = [];
source = {
fetchSubmodules = false;
rev = "1dd828ca9f705d3f05d273b535ff666b5941ddd6";
sha256 = "14cgrs7sf40hiiks8fnk1j04d7bniv2jbhaxk6w19gf0rrw4agjv";
rev = "a517e78b4ff21ff15b7f3ac748476ec8de4d9517";
sha256 = "0r1h7g451dahrnipcr65s80cng3lky82rkgmgh3xdpilgza7i6x6";
type = "git";
url = "https://github.com/rapid7/metasploit-framework";
};
version = "6.1.15";
version = "6.1.16";
};
metasploit-model = {
groups = ["default"];

View File

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "btop";
version = "1.1.0";
version = "1.1.2";
src = fetchFromGitHub {
owner = "aristocratos";
repo = pname;
rev = "v${version}";
sha256 = "sha256-VA5n2gIFRUUsp4jBG1j5dqH5/tP5VAChm5kqexdD24k=";
sha256 = "sha256-+z6bWX2mgvH6nW7SamDzAexeCn/i3+RaPF8RfoikR2k=";
};
installFlags = [ "PREFIX=$(out)" ];

View File

@ -7,13 +7,13 @@
buildGoModule rec {
pname = "gdu";
version = "5.10.1";
version = "5.11.0";
src = fetchFromGitHub {
owner = "dundee";
repo = pname;
rev = "v${version}";
sha256 = "sha256-vBsjCSbgVo2kQJLB/ZyAG2F+80mVA3UF2RN+O0YQbhs=";
sha256 = "sha256-GOZms7kYAWQ0VBr8p3RjsQvKXN+lkP9ytHta/Fgln0c=";
};
vendorSha256 = "0ls0pw1m6hy203cdkmp9847h2fmvc4hjkv5x2v6r7516cqbs25ac";

View File

@ -784,6 +784,7 @@ mapAliases ({
# due to it being inside the linuxPackagesFor function.
rtlwifi_new-firmware = rtw88-firmware; # added 2021-03-14
recordmydesktop = throw "recordmydesktop has been removed from nixpkgs, as it's unmaintained and uses deprecated libraries"; # added 2019-12-10
residualvm = throw "residualvm was merged to scummvm code in 2018-06-15; consider using scummvm"; # added 2021-11-27
retroshare06 = retroshare;
gtk-recordmydesktop = throw "gtk-recordmydesktop has been removed from nixpkgs, as it's unmaintained and uses deprecated libraries"; # added 2019-12-10
qt-recordmydesktop = throw "qt-recordmydesktop has been removed from nixpkgs, as it's abandoned and uses deprecated libraries"; # added 2019-12-10

View File

@ -8829,6 +8829,8 @@ with pkgs;
pyspread = libsForQt5.callPackage ../applications/office/pyspread { };
teapot = callPackage ../applications/office/teapot { };
pythonIRClib = pythonPackages.pythonIRClib;
pyditz = callPackage ../applications/misc/pyditz {
@ -30525,8 +30527,6 @@ with pkgs;
redeclipse = callPackage ../games/redeclipse { };
residualvm = callPackage ../games/residualvm { };
rftg = callPackage ../games/rftg { };
rigsofrods = callPackage ../games/rigsofrods {
@ -32235,6 +32235,8 @@ with pkgs;
electricsheep = callPackage ../misc/screensavers/electricsheep { };
aaphoto = callPackage ../tools/graphics/aaphoto {};
flam3 = callPackage ../tools/graphics/flam3 { };
glee = callPackage ../tools/graphics/glee { };

View File

@ -3278,6 +3278,8 @@ in {
google-i18n-address = callPackage ../development/python-modules/google-i18n-address { };
google-nest-sdm = callPackage ../development/python-modules/google-nest-sdm { };
googlemaps = callPackage ../development/python-modules/googlemaps { };
google-pasta = callPackage ../development/python-modules/google-pasta { };
@ -5843,6 +5845,8 @@ in {
python-glanceclient = callPackage ../development/python-modules/python-glanceclient { };
python-google-nest = callPackage ../development/python-modules/python-google-nest { };
python-heatclient = callPackage ../development/python-modules/python-heatclient { };
python-ipmi = callPackage ../development/python-modules/python-ipmi { };
@ -9414,6 +9418,8 @@ in {
tokenlib = callPackage ../development/python-modules/tokenlib { };
tololib = callPackage ../development/python-modules/tololib { };
toml = callPackage ../development/python-modules/toml { };
tomli = callPackage ../development/python-modules/tomli { };