Merge staging-next into staging
This commit is contained in:
commit
9ccd3011bd
20 changed files with 217 additions and 78 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use File::Path qw(make_path);
|
||||
use File::Basename;
|
||||
use File::Slurp;
|
||||
use Net::DBus;
|
||||
|
@ -14,9 +15,17 @@ my $out = "@out@";
|
|||
my $curSystemd = abs_path("/run/current-system/sw/bin");
|
||||
|
||||
# To be robust against interruption, record what units need to be started etc.
|
||||
my $startListFile = "/run/systemd/start-list";
|
||||
my $restartListFile = "/run/systemd/restart-list";
|
||||
my $reloadListFile = "/run/systemd/reload-list";
|
||||
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
|
||||
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 => 0755 });
|
||||
|
||||
my $action = shift @ARGV;
|
||||
|
||||
|
@ -150,7 +159,7 @@ $unitsToRestart{$_} = 1 foreach
|
|||
split('\n', read_file($restartListFile, err_mode => 'quiet') // "");
|
||||
|
||||
$unitsToReload{$_} = 1 foreach
|
||||
split '\n', read_file($reloadListFile, err_mode => 'quiet') // "";
|
||||
split('\n', read_file($reloadListFile, err_mode => 'quiet') // "");
|
||||
|
||||
my $activePrev = getActiveUnits;
|
||||
while (my ($unit, $state) = each %{$activePrev}) {
|
||||
|
@ -366,6 +375,12 @@ 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') // "");
|
||||
|
||||
$unitsToReload{$_} = 1 foreach
|
||||
split('\n', read_file($dryReloadByActivationFile, err_mode => 'quiet') // "");
|
||||
|
||||
print STDERR "would restart systemd\n" if $restartSystemd;
|
||||
print STDERR "would restart the following units: ", join(", ", sort(keys %unitsToRestart)), "\n"
|
||||
if scalar(keys %unitsToRestart) > 0;
|
||||
|
@ -373,6 +388,8 @@ if ($action eq "dry-activate") {
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -395,6 +412,15 @@ my $res = 0;
|
|||
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') // "");
|
||||
|
||||
$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
|
||||
# communicating with the running pid 1.
|
||||
|
@ -434,6 +460,7 @@ 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
|
||||
|
@ -442,6 +469,7 @@ 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.
|
||||
|
|
|
@ -382,6 +382,7 @@ in
|
|||
radicale = handleTest ./radicale.nix {};
|
||||
redis = handleTest ./redis.nix {};
|
||||
redmine = handleTest ./redmine.nix {};
|
||||
restartByActivationScript = handleTest ./restart-by-activation-script.nix {};
|
||||
restic = handleTest ./restic.nix {};
|
||||
robustirc-bridge = handleTest ./robustirc-bridge.nix {};
|
||||
roundcube = handleTest ./roundcube.nix {};
|
||||
|
|
73
nixos/tests/restart-by-activation-script.nix
Normal file
73
nixos/tests/restart-by-activation-script.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "restart-by-activation-script";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ das_j ];
|
||||
};
|
||||
|
||||
machine = { pkgs, ... }: {
|
||||
imports = [ ../modules/profiles/minimal.nix ];
|
||||
|
||||
systemd.services.restart-me = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${pkgs.coreutils}/bin/true";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.reload-me = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = rec {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${pkgs.coreutils}/bin/true";
|
||||
ExecReload = ExecStart;
|
||||
};
|
||||
};
|
||||
|
||||
system.activationScripts.test = {
|
||||
supportsDryActivation = true;
|
||||
text = ''
|
||||
if [ -e /test-the-activation-script ]; then
|
||||
if [ "$NIXOS_ACTION" != dry-activate ]; then
|
||||
touch /activation-was-run
|
||||
echo restart-me.service > /run/nixos/activation-restart-list
|
||||
echo reload-me.service > /run/nixos/activation-reload-list
|
||||
else
|
||||
echo restart-me.service > /run/nixos/dry-activation-restart-list
|
||||
echo reload-me.service > /run/nixos/dry-activation-reload-list
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
testScript = /* python */ ''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
with subtest("nothing happens when the activation script does nothing"):
|
||||
out = machine.succeed("/run/current-system/bin/switch-to-configuration dry-activate 2>&1")
|
||||
assert 'restart' not in out
|
||||
assert 'reload' not in out
|
||||
out = machine.succeed("/run/current-system/bin/switch-to-configuration test")
|
||||
assert 'restart' not in out
|
||||
assert 'reload' not in out
|
||||
|
||||
machine.succeed("touch /test-the-activation-script")
|
||||
|
||||
with subtest("dry activation"):
|
||||
out = machine.succeed("/run/current-system/bin/switch-to-configuration dry-activate 2>&1")
|
||||
assert 'would restart the following units: restart-me.service' in out
|
||||
assert 'would reload the following units: reload-me.service' in out
|
||||
machine.fail("test -f /run/nixos/dry-activation-restart-list")
|
||||
machine.fail("test -f /run/nixos/dry-activation-reload-list")
|
||||
|
||||
with subtest("real activation"):
|
||||
out = machine.succeed("/run/current-system/bin/switch-to-configuration test 2>&1")
|
||||
assert 'restarting the following units: restart-me.service' in out
|
||||
assert 'reloading the following units: reload-me.service' in out
|
||||
machine.fail("test -f /run/nixos/activation-restart-list")
|
||||
machine.fail("test -f /run/nixos/activation-reload-list")
|
||||
'';
|
||||
})
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
trivialBuild {
|
||||
pname = "bqn-mode";
|
||||
version = "0.0.0+unstable=-2021-09-15";
|
||||
version = "0.0.0+unstable=2021-09-26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mlochbaum";
|
||||
repo = "BQN";
|
||||
rev = "fb6ec1d8b083cd2b335828ae22e978b1b13986fa";
|
||||
hash = "sha256-57ryT5gb7hToAJOiGjjgU87rmlswjPK9tV1iQzJ4C0Y=";
|
||||
rev = "97cbdc67fe6a9652c42daefadd658cc41c1e5ae3";
|
||||
sha256 = "09nmsl7gzyi56g0x459a6571c8nsafl0g350m0hk1vy2gpg6yq0p";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
|
|
|
@ -44,9 +44,9 @@
|
|||
}
|
||||
},
|
||||
"ungoogled-chromium": {
|
||||
"version": "94.0.4606.54",
|
||||
"sha256": "0p8kfnyhykbv1cylsx4hj2qdzqr2xdql9rhpva8bfla2w9hr8g83",
|
||||
"sha256bin64": "0lq34l00zrr92g882xzqwq1lf2vf12x1mwidrr2qh6fz7v5418d3",
|
||||
"version": "94.0.4606.61",
|
||||
"sha256": "1gxrxmd2almwf067zycilyxkmc0d62h99ln8wp3n3i02bi9xnik4",
|
||||
"sha256bin64": "116xrf8hcprbdpdx6a4xysac2phyvw88vs3n1bs24ly6pxydsasz",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2021-08-11",
|
||||
|
@ -55,8 +55,8 @@
|
|||
"sha256": "031znmkbm504iim5jvg3gmazj4qnkfc7zg8aymjsij18fhf7piz0"
|
||||
},
|
||||
"ungoogled-patches": {
|
||||
"rev": "94.0.4606.54-1",
|
||||
"sha256": "0phy87fiqdgikgl60yap7n1mvyvsidgznqp06j86287iihml3z2m"
|
||||
"rev": "94.0.4606.61-1",
|
||||
"sha256": "1sb6n3dnp8d1bzhyl9d8yc0x9imyccnwxf1fqzv7vs3fd6dgcprp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,18 +4,32 @@ let
|
|||
getPatches = dir:
|
||||
let files = builtins.attrNames (builtins.readDir dir);
|
||||
in map (f: dir + ("/" + f)) files;
|
||||
version = "2.2.1";
|
||||
version = "2.5.1";
|
||||
channel = "stable";
|
||||
filename = "flutter_linux_${version}-${channel}.tar.xz";
|
||||
in
|
||||
{
|
||||
|
||||
# Decouples flutter derivation from dart derivation,
|
||||
# use specific dart version to not need to bump dart derivation when bumping flutter.
|
||||
dartVersion = "2.14.2";
|
||||
dartSourceBase = "https://storage.googleapis.com/dart-archive/channels";
|
||||
dartForFlutter = dart.override {
|
||||
version = dartVersion;
|
||||
sources = {
|
||||
"${dartVersion}-x86_64-linux" = fetchurl {
|
||||
url = "${dartSourceBase}/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
|
||||
sha256 = "1gr2dr683kz0a0k6rcn4jcbxf9fr2xlzi5fcgn1lzrrxvys2lddx";
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
mkFlutter = mkFlutter;
|
||||
stable = mkFlutter rec {
|
||||
inherit dart version;
|
||||
inherit version;
|
||||
dart = dartForFlutter;
|
||||
pname = "flutter";
|
||||
src = fetchurl {
|
||||
url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
|
||||
sha256 = "009pwk2casz10gibgjpz08102wxmkq9iq3994b3c2q342g6526g0";
|
||||
url = "https://storage.googleapis.com/flutter_infra_release/releases/${channel}/linux/${filename}";
|
||||
sha256 = "12ycz7iasrc9p9c6zr95l6llyji3za43gsx8cmr2kjfiv23bcrv2";
|
||||
};
|
||||
patches = getPatches ./patches;
|
||||
};
|
||||
|
|
|
@ -8,12 +8,10 @@
|
|||
{ bash
|
||||
, buildFHSUserEnv
|
||||
, cacert
|
||||
, coreutils
|
||||
, git
|
||||
, runCommand
|
||||
, stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, alsa-lib
|
||||
, dbus
|
||||
, expat
|
||||
|
@ -33,6 +31,7 @@
|
|||
, nspr
|
||||
, nss
|
||||
, systemd
|
||||
, which
|
||||
}:
|
||||
let
|
||||
drvName = "flutter-${version}";
|
||||
|
@ -74,10 +73,27 @@ let
|
|||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -r . $out
|
||||
mkdir -p $out/bin/cache/
|
||||
ln -sf ${dart} $out/bin/cache/dart-sdk
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckInputs = [ which ];
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
export HOME="$(mktemp -d)"
|
||||
$out/bin/flutter config --android-studio-dir $HOME
|
||||
$out/bin/flutter config --android-sdk $HOME
|
||||
$out/bin/flutter --version | fgrep -q '${version}'
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "julia-bin";
|
||||
version = "1.6.2";
|
||||
version = "1.6.3";
|
||||
|
||||
src = {
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz";
|
||||
sha256 = "0h1jh8gbvxb0pl1an0fbbg4lbd0sa24yj2f4yqwavw8dbdvvbd1y";
|
||||
sha256 = "0jrijj9snfx70692z2301rjassvwjcsjbxdsjyif9hyp9hrrqif7";
|
||||
};
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
|
@ -20,7 +20,6 @@ stdenv.mkDerivation rec {
|
|||
patches = [
|
||||
# Source release Nix patch(es) relevant for binary releases as well.
|
||||
./patches/1.6-bin/0002-nix-Skip-tempname-test-broken-in-sandbox.patch
|
||||
./patches/1.6-bin/0003-nix-Skip-chown-tests-broken-in-sandbox.patch
|
||||
./patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
|
||||
];
|
||||
postPatch = ''
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
From b20357fb1044d2c100172b1d5cbdf6c6d9bd3590 Mon Sep 17 00:00:00 2001
|
||||
From: Pontus Stenetorp <pontus@stenetorp.se>
|
||||
Date: Thu, 8 Apr 2021 05:10:39 +0000
|
||||
Subject: [PATCH 3/6] nix: Skip `chown` tests broken in sandbox
|
||||
|
||||
---
|
||||
test/file.jl | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/file.jl b/test/file.jl
|
||||
index bd4dd78f62..06fd4e49da 100644
|
||||
--- a/test/file.jl
|
||||
+++ b/test/file.jl
|
||||
@@ -503,8 +503,8 @@ if !Sys.iswindows()
|
||||
@test stat(file).gid == 0
|
||||
@test stat(file).uid == 0
|
||||
else
|
||||
- @test_throws Base._UVError("chown($(repr(file)), -2, -1)", Base.UV_EPERM) chown(file, -2, -1) # Non-root user cannot change ownership to another user
|
||||
- @test_throws Base._UVError("chown($(repr(file)), -1, -2)", Base.UV_EPERM) chown(file, -1, -2) # Non-root user cannot change group to a group they are not a member of (eg: nogroup)
|
||||
+ @test_skip @test_throws Base._UVError("chown($(repr(file)), -2, -1)", Base.UV_EPERM) chown(file, -2, -1) # Non-root user cannot change ownership to another user
|
||||
+ @test_skip @test_throws Base._UVError("chown($(repr(file)), -1, -2)", Base.UV_EPERM) chown(file, -1, -2) # Non-root user cannot change group to a group they are not a member of (eg: nogroup)
|
||||
end
|
||||
else
|
||||
# test that chown doesn't cause any errors for Windows
|
||||
--
|
||||
2.29.3
|
||||
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "mauikit-filebrowsing";
|
||||
version = "2.0.1";
|
||||
version = "2.0.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "invent.kde.org";
|
||||
owner = "maui";
|
||||
repo = "mauikit-filebrowsing";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-hiR0RbZTduH0noyzpewsNJAtSdCtiSmTP8SLMBgK3uA=";
|
||||
sha256 = "sha256-mpO61VOYTBlAjtIa1gEYChREV2jjd/WG+rbZcJnbM+Q=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -9,18 +9,19 @@
|
|||
, knotifications
|
||||
, qtbase
|
||||
, qtquickcontrols2
|
||||
, qtx11extras
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "mauikit";
|
||||
version = "2.0.1";
|
||||
version = "2.0.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "invent.kde.org";
|
||||
owner = "maui";
|
||||
repo = "mauikit";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-qz/MePMvyGR8lzR2xB2f9QENx04UHu0Xef7v0xcKovo=";
|
||||
sha256 = "sha256-skukb9M6jhijCTb+tMIz/3vUCAvVJw+4zTFv9Z7HqWk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -34,6 +35,7 @@ mkDerivation rec {
|
|||
ki18n
|
||||
knotifications
|
||||
qtquickcontrols2
|
||||
qtx11extras
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyTelegramBotAPI";
|
||||
version = "4.0.0";
|
||||
version = "4.1.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "6accc4af505ee5b312689eaee1a9bc93cb6ea31a2d905a877c6b47f0888c3dcc";
|
||||
sha256 = "c84218af7e08e859e07cfe5645d9586ceaad51c24f0f4529a9ed0adafd5aa0bf";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ requests ];
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyezviz";
|
||||
version = "0.1.9.3";
|
||||
version = "0.1.9.4";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "baqs";
|
||||
repo = "pyEzviz";
|
||||
rev = version;
|
||||
sha256 = "sha256-TDFkEz8I0/YoAFhWSYkLqL4+R4yiqAu+QncEieAlh2A=";
|
||||
sha256 = "sha256-MS4icrTjjcPx3Pb8fpcKAd/JXWqknqp9wb4lQmRwFls=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytibber";
|
||||
version = "0.19.1";
|
||||
version = "0.20.0";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
|
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
|||
owner = "Danielhiversen";
|
||||
repo = "pyTibber";
|
||||
rev = version;
|
||||
sha256 = "sha256-+CI2TIGUZTztwx/9JqleKfVksybwGUGiHktu2xcNyUg=";
|
||||
sha256 = "sha256-q7DNRCJrt4B/u7QV4MocxmlfEdLmJMP7umv3+PJjIoE=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -43,7 +43,7 @@ buildPythonPackage rec {
|
|||
pythonImportsCheck = [ "tibber" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A python3 library to communicate with Tibber";
|
||||
description = "Python library to communicate with Tibber";
|
||||
homepage = "https://github.com/Danielhiversen/pyTibber";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
|
|
|
@ -7,20 +7,22 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyvolumio";
|
||||
version = "0.1.3";
|
||||
version = "0.1.4";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OnFreund";
|
||||
repo = "PyVolumio";
|
||||
rev = "v${version}";
|
||||
sha256 = "0x2dzmd9lwnak2iy6v54y24qjq37y3nlfhsvx7hddgv8jj1klvap";
|
||||
sha256 = "0c6kcz9x0n9w67h2gncyhq0dw3q17nmzipcgx59pwqnn33jan5nf";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ aiohttp ];
|
||||
|
||||
# Project has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "pyvolumio" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "screenlogicpy";
|
||||
version = "0.4.2";
|
||||
version = "0.4.3";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dieselrabbit";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "158y34d140bh93l143plq53l7n7mcnmqi5mj7hj0j1ljccxpjcnj";
|
||||
sha256 = "0v0nbwz0w2m7kzvcl0fh2v2rk5ldsq22siyxq6d401pkpzwih25c";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
|
|
|
@ -1,17 +1,25 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, fetchpatch }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "packer";
|
||||
version = "1.7.4";
|
||||
version = "1.7.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "packer";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-VNOq9uhtzf1hdEn+bkAOYy4gZxP5ek0WaaS/71uJzrA=";
|
||||
sha256 = "15kw4zy0p7hr6jm0202s0fk5ja3ff0pdir37qdifngm1x7id1vxc";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-WYA/wZJg93+X4IAX9hOMRHVRQRyA4N4aDaScDgkGUIE=";
|
||||
vendorSha256 = "1785yv48sn504zcig9szjw9s4dxb55dg9idh10i2gzfgbda2c3nf";
|
||||
|
||||
patches = [
|
||||
# https://github.com/hashicorp/packer/pull/11282
|
||||
(fetchpatch {
|
||||
url = "https://github.com/hashicorp/packer/commit/dbf13803217e18c6cb567ffefc9476c4e0149e02.patch";
|
||||
sha256 = "1n038x6qnr75c5ci2jp8jcwp6yvlchcf2nydksb2s75ffvidjrsa";
|
||||
})
|
||||
];
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
|
@ -28,6 +36,7 @@ buildGoModule rec {
|
|||
homepage = "https://www.packer.io";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ cstrahan zimbatm ma27 ];
|
||||
changelog = "https://github.com/hashicorp/packer/blob/v${version}/CHANGELOG.md";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -756,6 +756,18 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
kamikillerto.vscode-colorize = buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
name = "vscode-colorize";
|
||||
publisher = "kamikillerto";
|
||||
version = "0.11.1";
|
||||
sha256 = "1h82b1jz86k2qznprng5066afinkrd7j3738a56idqr3vvvqnbsm";
|
||||
};
|
||||
meta = {
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
};
|
||||
|
||||
github = {
|
||||
copilot = buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3, fetchpatch }:
|
||||
{ lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wsdd";
|
||||
version = "0.6.2";
|
||||
version = "0.6.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "christgau";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0444xh1r5wd0zfch1hg1f9s4cw68srrm87hqx16qvlgx6jmz5j0p";
|
||||
sha256 = "0lfvpbk1lkri597ac4gz5x4csfyik8axz4b41i03xsqv9bci2vh6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
@ -16,12 +16,9 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [ python3 ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/christgau/wsdd/issues/72
|
||||
name = "fix_send_messages_using_correct_socket.patch";
|
||||
url = "https://github.com/christgau/wsdd/commit/1ed74fe73a9fe2e2720859e2822116d65e4ffa5b.patch";
|
||||
sha256 = "1n9bqvh20nhnvnc5pxvzf9kk8nky6rmbmfryg65lfmr1hmg676zg";
|
||||
})
|
||||
# Increase timeout to socket urlopen
|
||||
# See https://github.com/christgau/wsdd/issues/80#issuecomment-76848906
|
||||
./increase_timeout.patch
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
|
|
13
pkgs/servers/wsdd/increase_timeout.patch
Normal file
13
pkgs/servers/wsdd/increase_timeout.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/wsdd.py b/src/wsdd.py
|
||||
index 88a7a2a..360e4f7 100755
|
||||
--- a/src/wsdd.py
|
||||
+++ b/src/wsdd.py
|
||||
@@ -699,7 +699,7 @@ class WSDClient(WSDUDPMessageHandler):
|
||||
request.add_header('Host', host)
|
||||
|
||||
try:
|
||||
- with urllib.request.urlopen(request, None, 2.0) as stream:
|
||||
+ with urllib.request.urlopen(request, None, 5.0) as stream:
|
||||
self.handle_metadata(stream.read(), endpoint, xaddr)
|
||||
except urllib.error.URLError as e:
|
||||
logger.warning('could not fetch metadata from: {} {}'.format(url, e))
|
Loading…
Reference in a new issue