From 55c3e3b030b7628ce1b9cb7593f50bbe0cc78292 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 23 Apr 2022 04:20:00 +0000 Subject: [PATCH 01/38] lapce: fix build on darwin --- pkgs/applications/editors/lapce/default.nix | 22 +++++++++++++++++++-- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/lapce/default.nix b/pkgs/applications/editors/lapce/default.nix index 2da2a1f46773..d13b4c05302d 100644 --- a/pkgs/applications/editors/lapce/default.nix +++ b/pkgs/applications/editors/lapce/default.nix @@ -17,6 +17,13 @@ , vulkan-loader , copyDesktopItems , makeDesktopItem +, openssl +, libobjc +, Security +, CoreServices +, ApplicationServices +, Carbon +, AppKit }: rustPlatform.buildRustPackage rec { @@ -40,7 +47,12 @@ rustPlatform.buildRustPackage rec { copyDesktopItems ]; + # Get openssl-sys to use pkg-config + OPENSSL_NO_VENDOR = 1; + buildInputs = [ + openssl + ] ++ lib.optionals stdenv.isLinux [ freetype fontconfig libxkbcommon @@ -50,10 +62,17 @@ rustPlatform.buildRustPackage rec { libXrandr libXi vulkan-loader + ] ++ lib.optionals stdenv.isDarwin [ + libobjc + Security + CoreServices + ApplicationServices + Carbon + AppKit ]; # Add missing vulkan dependency to rpath - preFixup = '' + preFixup = lib.optionalString stdenv.isLinux '' patchelf --add-needed ${vulkan-loader}/lib/libvulkan.so.1 $out/bin/lapce ''; @@ -76,6 +95,5 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/lapce/lapce"; license = with licenses; [ asl20 ]; maintainers = with maintainers; [ elliot ]; - broken = stdenv.isDarwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fa47a38e3918..609a42d05837 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3739,7 +3739,10 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; - lapce = callPackage ../applications/editors/lapce { }; + lapce = callPackage ../applications/editors/lapce { + inherit (darwin) libobjc; + inherit (darwin.apple_sdk.frameworks) Security CoreServices ApplicationServices Carbon AppKit; + }; lcdproc = callPackage ../servers/monitoring/lcdproc { }; From b48f2c7ed39820484bb59273b37207596c326023 Mon Sep 17 00:00:00 2001 From: roblabla Date: Thu, 21 Apr 2022 11:03:39 +0200 Subject: [PATCH 02/38] chntpw: Fix build on macos This fixes the macos build by patching the makefile to remove the explicit calls to gcc, letting it use whatever CC is the default. It further removes the static builds entirely. This is technically a breaking change, but I doubt it'll have a practical impact to any users. --- .../00-chntpw-build-arch-autodetect.patch | 33 ++++++++++--------- .../chntpw/01-chntpw-install-target.patch | 20 ++++------- pkgs/tools/security/chntpw/default.nix | 3 +- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/pkgs/tools/security/chntpw/00-chntpw-build-arch-autodetect.patch b/pkgs/tools/security/chntpw/00-chntpw-build-arch-autodetect.patch index 9c379adb7dfb..cd130affa6c4 100644 --- a/pkgs/tools/security/chntpw/00-chntpw-build-arch-autodetect.patch +++ b/pkgs/tools/security/chntpw/00-chntpw-build-arch-autodetect.patch @@ -1,10 +1,15 @@ -diff -urN chntpw-140201.orig/Makefile chntpw-140201/Makefile ---- chntpw-140201.orig/Makefile 2014-02-01 20:54:37.000000000 +0400 -+++ chntpw-140201/Makefile 2014-08-03 20:26:56.497161881 +0400 -@@ -12,14 +12,13 @@ - - CC=gcc +--- chntpw-140201.orig/Makefile 2014-02-01 17:54:37.000000000 +0100 ++++ chntpw-140201/Makefile 2022-04-21 00:14:45.000000000 +0200 +@@ -6,24 +6,7 @@ + # See INSTALL for more info. + # +-#SSLPATH=/usr/local/ssl +-OSSLPATH=/usr +-OSSLINC=$(OSSLPATH)/include +- +-CC=gcc +- -# Force 32 bit -CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32 -OSSLLIB=$(OSSLPATH)/lib @@ -13,13 +18,11 @@ diff -urN chntpw-140201.orig/Makefile chntpw-140201/Makefile -#CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -#OSSLLIB=$(OSSLPATH)/lib64 - -+ifeq '$(shell gcc -dumpmachine)' 'x86_64-unknown-linux-gnu' -+ CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -+ OSSLLIB=$(OSSLPATH)/lib64 -+else ifeq '$(shell gcc -dumpmachine)' 'i686-unknown-linux-gnu' -+ CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32 -+ OSSLLIB=$(OSSLPATH)/lib -+endif +- +-# This is to link with whatever we have, SSL crypto lib we put in static +-#LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a +-LIBS=-L$(OSSLLIB) ++CFLAGS= -DUSEOPENSSL -g -I. -Wall - # This is to link with whatever we have, SSL crypto lib we put in static - #LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a + + all: chntpw chntpw.static cpnt reged reged.static samusrgrp samusrgrp.static sampasswd sampasswd.static diff --git a/pkgs/tools/security/chntpw/01-chntpw-install-target.patch b/pkgs/tools/security/chntpw/01-chntpw-install-target.patch index d3163a026f91..67c62273aeb6 100644 --- a/pkgs/tools/security/chntpw/01-chntpw-install-target.patch +++ b/pkgs/tools/security/chntpw/01-chntpw-install-target.patch @@ -1,20 +1,14 @@ -diff -urN chntpw-140201.orig/Makefile chntpw-140201/Makefile ---- chntpw-140201.orig/Makefile 2014-08-03 20:26:56.497161881 +0400 -+++ chntpw-140201/Makefile 2014-08-04 12:57:16.563818342 +0400 -@@ -10,6 +10,8 @@ - OSSLPATH=/usr - OSSLINC=$(OSSLPATH)/include +--- chntpw-140201/Makefile 2022-04-21 00:14:45.000000000 +0200 ++++ chntpw-140201.new/Makefile 2022-04-21 09:15:42.000000000 +0200 +@@ -6,10 +6,16 @@ + # See INSTALL for more info. + # +PREFIX ?= /usr + - CC=gcc + CFLAGS= -DUSEOPENSSL -g -I. -Wall - ifeq '$(shell gcc -dumpmachine)' 'x86_64-unknown-linux-gnu' -@@ -24,8 +26,12 @@ - #LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a - LIBS=-L$(OSSLLIB) - -+BINARIES := chntpw chntpw.static cpnt reged reged.static samusrgrp samusrgrp.static sampasswd sampasswd.static ++BINARIES := chntpw cpnt reged samusrgrp sampasswd -all: chntpw chntpw.static cpnt reged reged.static samusrgrp samusrgrp.static sampasswd sampasswd.static +all: $(BINARIES) diff --git a/pkgs/tools/security/chntpw/default.nix b/pkgs/tools/security/chntpw/default.nix index 5bda55c418aa..50ece95108e3 100644 --- a/pkgs/tools/security/chntpw/default.nix +++ b/pkgs/tools/security/chntpw/default.nix @@ -11,7 +11,6 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ unzip ]; - buildInputs = lib.optionals stdenv.isLinux [ stdenv.glibc.out stdenv.glibc.static ]; patches = [ ./00-chntpw-build-arch-autodetect.patch @@ -27,6 +26,6 @@ stdenv.mkDerivation rec { description = "An utility to reset the password of any user that has a valid local account on a Windows system"; maintainers = with lib.maintainers; [ deepfire ]; license = licenses.gpl2; - platforms = with lib.platforms; linux; + platforms = lib.platforms.unix; }; } From 160fb93fdc4155d7e6304f366384ad8afb00db1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sat, 16 Apr 2022 20:46:32 +0100 Subject: [PATCH 03/38] nixos/filesystems: Make most simple filesystems compatible with systemd This includes disabling some features in the initrd by default, this is only done when the new initrd is used. Namely, ext and bcache are disabled by default. bcache gets an own enable option while ext is detected like any other filesystem. --- .../cd-dvd/system-tarball-sheevaplug.nix | 6 ++--- nixos/modules/tasks/bcache.nix | 22 ++++++++++++++----- nixos/modules/tasks/filesystems/btrfs.nix | 4 ++-- nixos/modules/tasks/filesystems/cifs.nix | 2 +- nixos/modules/tasks/filesystems/ext.nix | 14 ++++++++---- nixos/modules/tasks/filesystems/f2fs.nix | 2 +- nixos/modules/tasks/filesystems/jfs.nix | 2 +- nixos/modules/tasks/filesystems/reiserfs.nix | 2 +- .../tasks/filesystems/unionfs-fuse.nix | 15 +++++++++++-- nixos/modules/tasks/filesystems/vfat.nix | 2 +- nixos/modules/tasks/filesystems/xfs.nix | 4 ++-- 11 files changed, 51 insertions(+), 24 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix b/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix index 458e313a3f75..329bd329dc15 100644 --- a/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix +++ b/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix @@ -87,19 +87,19 @@ in boot.initrd.availableKernelModules = [ "mvsdio" "reiserfs" "ext3" "ums-cypress" "rtc_mv" "ext4" ]; - boot.postBootCommands = + boot.postBootCommands = lib.mkIf (!boot.initrd.systemd.enable) '' mkdir -p /mnt cp ${dummyConfiguration} /etc/nixos/configuration.nix ''; - boot.initrd.extraUtilsCommands = + boot.initrd.extraUtilsCommands = lib.mkIf (!boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.util-linux}/sbin/hwclock ''; - boot.initrd.postDeviceCommands = + boot.initrd.postDeviceCommands = lib.mkIf (!boot.initrd.systemd.enable) '' hwclock -s ''; diff --git a/nixos/modules/tasks/bcache.nix b/nixos/modules/tasks/bcache.nix index 41fb7664f3d1..0a13522de11f 100644 --- a/nixos/modules/tasks/bcache.nix +++ b/nixos/modules/tasks/bcache.nix @@ -1,13 +1,23 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: { + options.boot.initrd.services.bcache.enable = (lib.mkEnableOption "bcache support in the initrd") // { + visible = false; # only works with systemd stage 1 + }; - environment.systemPackages = [ pkgs.bcache-tools ]; + config = { - services.udev.packages = [ pkgs.bcache-tools ]; + environment.systemPackages = [ pkgs.bcache-tools ]; - boot.initrd.extraUdevRulesCommands = '' - cp -v ${pkgs.bcache-tools}/lib/udev/rules.d/*.rules $out/ - ''; + services.udev.packages = [ pkgs.bcache-tools ]; + boot.initrd.extraUdevRulesCommands = lib.mkIf (!config.boot.initrd.systemd.enable) '' + cp -v ${pkgs.bcache-tools}/lib/udev/rules.d/*.rules $out/ + ''; + + boot.initrd.services.udev = lib.mkIf config.boot.initrd.services.bcache.enable { + packages = [ pkgs.bcache-tools ]; + binPackages = [ pkgs.bcache-tools ]; + }; + }; } diff --git a/nixos/modules/tasks/filesystems/btrfs.nix b/nixos/modules/tasks/filesystems/btrfs.nix index ae1dab5b8d8d..33736e2043ac 100644 --- a/nixos/modules/tasks/filesystems/btrfs.nix +++ b/nixos/modules/tasks/filesystems/btrfs.nix @@ -66,14 +66,14 @@ in ] ); - boot.initrd.extraUtilsCommands = mkIf inInitrd + boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.btrfs-progs}/bin/btrfs ln -sv btrfs $out/bin/btrfsck ln -sv btrfsck $out/bin/fsck.btrfs ''; - boot.initrd.extraUtilsCommandsTest = mkIf inInitrd + boot.initrd.extraUtilsCommandsTest = mkIf (inInitrd && !config.boot.initrd.systemd.enable) '' $out/bin/btrfs --version ''; diff --git a/nixos/modules/tasks/filesystems/cifs.nix b/nixos/modules/tasks/filesystems/cifs.nix index 47ba0c03c563..0de292a69208 100644 --- a/nixos/modules/tasks/filesystems/cifs.nix +++ b/nixos/modules/tasks/filesystems/cifs.nix @@ -16,7 +16,7 @@ in boot.initrd.availableKernelModules = mkIf inInitrd [ "cifs" "nls_utf8" "hmac" "md4" "ecb" "des_generic" "sha256" ]; - boot.initrd.extraUtilsCommands = mkIf inInitrd + boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.cifs-utils}/sbin/mount.cifs ''; diff --git a/nixos/modules/tasks/filesystems/ext.nix b/nixos/modules/tasks/filesystems/ext.nix index a14a3ac38549..9b61f21643ab 100644 --- a/nixos/modules/tasks/filesystems/ext.nix +++ b/nixos/modules/tasks/filesystems/ext.nix @@ -1,14 +1,20 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: + +let + + inInitrd = lib.any (fs: fs == "ext2" || fs == "ext3" || fs == "ext4") config.boot.initrd.supportedFilesystems; + +in { config = { - system.fsPackages = [ pkgs.e2fsprogs ]; + system.fsPackages = lib.mkIf (config.boot.initrd.systemd.enable -> inInitrd) [ pkgs.e2fsprogs ]; # As of kernel 4.3, there is no separate ext3 driver (they're also handled by ext4.ko) - boot.initrd.availableKernelModules = [ "ext2" "ext4" ]; + boot.initrd.availableKernelModules = lib.mkIf (config.boot.initrd.systemd.enable -> inInitrd) [ "ext2" "ext4" ]; - boot.initrd.extraUtilsCommands = + boot.initrd.extraUtilsCommands = lib.mkIf (!config.boot.initrd.systemd.enable) '' # Copy e2fsck and friends. copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/e2fsck diff --git a/nixos/modules/tasks/filesystems/f2fs.nix b/nixos/modules/tasks/filesystems/f2fs.nix index a305235979a2..1d52861aa39d 100644 --- a/nixos/modules/tasks/filesystems/f2fs.nix +++ b/nixos/modules/tasks/filesystems/f2fs.nix @@ -13,7 +13,7 @@ in boot.initrd.availableKernelModules = mkIf inInitrd [ "f2fs" "crc32" ]; - boot.initrd.extraUtilsCommands = mkIf inInitrd '' + boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.f2fs-tools}/sbin/fsck.f2fs ${optionalString (any (fs: fs.autoResize) fileSystems) '' # We need f2fs-tools' tools to resize filesystems diff --git a/nixos/modules/tasks/filesystems/jfs.nix b/nixos/modules/tasks/filesystems/jfs.nix index fc3905c7dc20..700f05af2bec 100644 --- a/nixos/modules/tasks/filesystems/jfs.nix +++ b/nixos/modules/tasks/filesystems/jfs.nix @@ -12,7 +12,7 @@ in boot.initrd.kernelModules = mkIf inInitrd [ "jfs" ]; - boot.initrd.extraUtilsCommands = mkIf inInitrd '' + boot.initrd.extraUtilsCommands = mkIf (inInitrd && !boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.jfsutils}/sbin/fsck.jfs ''; }; diff --git a/nixos/modules/tasks/filesystems/reiserfs.nix b/nixos/modules/tasks/filesystems/reiserfs.nix index ab4c43e2ab82..7b017a83db84 100644 --- a/nixos/modules/tasks/filesystems/reiserfs.nix +++ b/nixos/modules/tasks/filesystems/reiserfs.nix @@ -15,7 +15,7 @@ in boot.initrd.kernelModules = mkIf inInitrd [ "reiserfs" ]; - boot.initrd.extraUtilsCommands = mkIf inInitrd + boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.reiserfsprogs}/sbin/reiserfsck ln -s reiserfsck $out/bin/fsck.reiserfs diff --git a/nixos/modules/tasks/filesystems/unionfs-fuse.nix b/nixos/modules/tasks/filesystems/unionfs-fuse.nix index f54f3559c341..f9954b5182f9 100644 --- a/nixos/modules/tasks/filesystems/unionfs-fuse.nix +++ b/nixos/modules/tasks/filesystems/unionfs-fuse.nix @@ -6,7 +6,7 @@ (lib.mkIf (lib.any (fs: fs == "unionfs-fuse") config.boot.initrd.supportedFilesystems) { boot.initrd.kernelModules = [ "fuse" ]; - boot.initrd.extraUtilsCommands = '' + boot.initrd.extraUtilsCommands = lib.mkIf (!config.boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.fuse}/sbin/mount.fuse copy_bin_and_libs ${pkgs.unionfs-fuse}/bin/unionfs substitute ${pkgs.unionfs-fuse}/sbin/mount.unionfs-fuse $out/bin/mount.unionfs-fuse \ @@ -16,12 +16,23 @@ chmod +x $out/bin/mount.unionfs-fuse ''; - boot.initrd.postDeviceCommands = '' + boot.initrd.postDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable) '' # Hacky!!! fuse hard-codes the path to mount mkdir -p /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.util-linux.name}-bin/bin ln -s $(which mount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.util-linux.name}-bin/bin ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.util-linux.name}-bin/bin ''; + + boot.initrd.systemd.extraBin = { + "mount.fuse" = "${pkgs.fuse}/bin/mount.fuse"; + "unionfs" = "${pkgs.unionfs-fuse}/bin/unionfs"; + "mount.unionfs-fuse" = pkgs.runCommand "mount.unionfs-fuse" {} '' + substitute ${pkgs.unionfs-fuse}/sbin/mount.unionfs-fuse $out \ + --replace '${pkgs.bash}/bin/bash' /bin/sh \ + --replace '${pkgs.fuse}/sbin' /bin \ + --replace '${pkgs.unionfs-fuse}/bin' /bin + ''; + }; }) (lib.mkIf (lib.any (fs: fs == "unionfs-fuse") config.boot.supportedFilesystems) { diff --git a/nixos/modules/tasks/filesystems/vfat.nix b/nixos/modules/tasks/filesystems/vfat.nix index 958e27ae8a32..5baab1c802cf 100644 --- a/nixos/modules/tasks/filesystems/vfat.nix +++ b/nixos/modules/tasks/filesystems/vfat.nix @@ -15,7 +15,7 @@ in boot.initrd.kernelModules = mkIf inInitrd [ "vfat" "nls_cp437" "nls_iso8859-1" ]; - boot.initrd.extraUtilsCommands = mkIf inInitrd + boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.dosfstools}/sbin/dosfsck ln -sv dosfsck $out/bin/fsck.vfat diff --git a/nixos/modules/tasks/filesystems/xfs.nix b/nixos/modules/tasks/filesystems/xfs.nix index 98038701ca58..80e46efcc780 100644 --- a/nixos/modules/tasks/filesystems/xfs.nix +++ b/nixos/modules/tasks/filesystems/xfs.nix @@ -15,14 +15,14 @@ in boot.initrd.availableKernelModules = mkIf inInitrd [ "xfs" "crc32c" ]; - boot.initrd.extraUtilsCommands = mkIf inInitrd + boot.initrd.extraUtilsCommands = mkIf (inInitrd && !boot.initrd.systemd.enable) '' copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/fsck.xfs copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/xfs_repair ''; # Trick just to set 'sh' after the extraUtils nuke-refs. - boot.initrd.extraUtilsCommandsTest = mkIf inInitrd + boot.initrd.extraUtilsCommandsTest = mkIf (inInitrd && !boot.initrd.systemd.enable) '' sed -i -e 's,^#!.*,#!'$out/bin/sh, $out/bin/fsck.xfs ''; From acca69992cda719eb71f29f5c8eedf7892127e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sun, 17 Apr 2022 13:55:48 +0100 Subject: [PATCH 04/38] nixos/btrfs: Add systemd stage 1 support --- nixos/modules/tasks/filesystems/btrfs.nix | 2 +- nixos/tests/all-tests.nix | 1 + nixos/tests/systemd-initrd-btrfs-raid.nix | 45 +++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 nixos/tests/systemd-initrd-btrfs-raid.nix diff --git a/nixos/modules/tasks/filesystems/btrfs.nix b/nixos/modules/tasks/filesystems/btrfs.nix index 33736e2043ac..b7ebc37dd5cf 100644 --- a/nixos/modules/tasks/filesystems/btrfs.nix +++ b/nixos/modules/tasks/filesystems/btrfs.nix @@ -78,7 +78,7 @@ in $out/bin/btrfs --version ''; - boot.initrd.postDeviceCommands = mkIf inInitrd + boot.initrd.postDeviceCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable) '' btrfs device scan ''; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 5158bc681e08..ad426fcf4e0a 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -524,6 +524,7 @@ in systemd-confinement = handleTest ./systemd-confinement.nix {}; systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {}; systemd-escaping = handleTest ./systemd-escaping.nix {}; + systemd-initrd-btrfs-raid = handleTest ./systemd-initrd-btrfs-raid.nix {}; systemd-initrd-luks-keyfile = handleTest ./systemd-initrd-luks-keyfile.nix {}; systemd-initrd-luks-password = handleTest ./systemd-initrd-luks-password.nix {}; systemd-initrd-shutdown = handleTest ./systemd-shutdown.nix { systemdStage1 = true; }; diff --git a/nixos/tests/systemd-initrd-btrfs-raid.nix b/nixos/tests/systemd-initrd-btrfs-raid.nix new file mode 100644 index 000000000000..40fd2d4dc611 --- /dev/null +++ b/nixos/tests/systemd-initrd-btrfs-raid.nix @@ -0,0 +1,45 @@ +import ./make-test-python.nix ({ lib, pkgs, ... }: { + name = "systemd-initrd-btrfs-raid"; + + nodes.machine = { pkgs, ... }: { + # Use systemd-boot + virtualisation = { + emptyDiskImages = [ 512 512 ]; + useBootLoader = true; + useEFIBoot = true; + }; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + environment.systemPackages = with pkgs; [ btrfs-progs ]; + boot.initrd.systemd = { + enable = true; + emergencyAccess = true; + }; + + specialisation.boot-btrfs-raid.configuration = { + fileSystems = lib.mkVMOverride { + "/".fsType = lib.mkForce "btrfs"; + }; + virtualisation.bootDevice = "/dev/vdc"; + }; + }; + + testScript = '' + # Create RAID + machine.succeed("mkfs.btrfs -d raid0 /dev/vdc /dev/vdd") + machine.succeed("mkdir -p /mnt && mount /dev/vdc /mnt && echo hello > /mnt/test && umount /mnt") + + # Boot from the RAID + machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-btrfs-raid.conf") + machine.succeed("sync") + machine.crash() + machine.wait_for_unit("multi-user.target") + + # Ensure we have successfully booted from the RAID + assert "(initrd)" in machine.succeed("systemd-analyze") # booted with systemd in stage 1 + assert "/dev/vdc on / type btrfs" in machine.succeed("mount") + assert "hello" in machine.succeed("cat /test") + assert "Total devices 2" in machine.succeed("btrfs filesystem show") + ''; +}) From dc4b2812e4c1b24f08349d4fdf23a8d85e0575a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sun, 24 Apr 2022 21:46:58 +0100 Subject: [PATCH 05/38] nixos/stage-1-systemd: Also accept packages as store paths --- nixos/modules/system/boot/systemd/initrd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 6c1b42da1c41..5e4a50aa404a 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -193,7 +193,7 @@ in { description = '' Store paths to copy into the initrd as well. ''; - type = types.listOf types.singleLineStr; + type = with types; listOf (oneOf [ singleLineStr package ]); default = []; }; From 45494fab688f1e56e951d5046327677676626802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sun, 24 Apr 2022 15:49:05 +0100 Subject: [PATCH 06/38] nixos/systemd-stage-1: Get rid of random-seed This is not used at all since the unit has ConditionPathExists=!/etc/initrd-release --- nixos/modules/system/boot/systemd/initrd.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 6c1b42da1c41..273c37a1c3f5 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -65,7 +65,6 @@ let "systemd-kexec.service" "systemd-modules-load.service" "systemd-poweroff.service" - "systemd-random-seed.service" "systemd-reboot.service" "systemd-sysctl.service" "systemd-tmpfiles-setup-dev.service" @@ -396,7 +395,6 @@ in { "${cfg.package}/lib/systemd/systemd-journald" "${cfg.package}/lib/systemd/systemd-makefs" "${cfg.package}/lib/systemd/systemd-modules-load" - "${cfg.package}/lib/systemd/systemd-random-seed" "${cfg.package}/lib/systemd/systemd-remount-fs" "${cfg.package}/lib/systemd/systemd-shutdown" "${cfg.package}/lib/systemd/systemd-sulogin-shell" @@ -507,6 +505,5 @@ in { }; boot.kernelParams = lib.mkIf (config.boot.resumeDevice != "") [ "resume=${config.boot.resumeDevice}" ]; - }; } From 2bc5c67f1c8c92d940b4e2238bfee7eaf5388935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 25 Apr 2022 02:06:05 +0200 Subject: [PATCH 07/38] python310Packages.scikit-learn-extra: disable failing test --- pkgs/development/python-modules/scikit-learn-extra/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/scikit-learn-extra/default.nix b/pkgs/development/python-modules/scikit-learn-extra/default.nix index a91f4ed74f17..f198b49c7ad2 100644 --- a/pkgs/development/python-modules/scikit-learn-extra/default.nix +++ b/pkgs/development/python-modules/scikit-learn-extra/default.nix @@ -38,6 +38,7 @@ buildPythonPackage rec { ]; disabledTests = [ "build" # needs network connection + "test_all_estimators" # sklearn.exceptions.NotFittedError: Estimator fails to pass `check_is_fitted` even though it has been fit. ]; # Check packages with cythonized modules From cc17b8413c6d9dd0039540edf73808a975404f13 Mon Sep 17 00:00:00 2001 From: zendo Date: Mon, 25 Apr 2022 08:51:09 +0800 Subject: [PATCH 08/38] shortwave: 2.0.1 -> 3.0.0 --- pkgs/applications/audio/shortwave/default.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/audio/shortwave/default.nix b/pkgs/applications/audio/shortwave/default.nix index 49492d05d15f..4642565e678e 100644 --- a/pkgs/applications/audio/shortwave/default.nix +++ b/pkgs/applications/audio/shortwave/default.nix @@ -14,28 +14,29 @@ , ninja , openssl , pkg-config -, python3 , rustPlatform , sqlite -, wrapGAppsHook +, wrapGAppsHook4 +, cmake +, libshumate }: stdenv.mkDerivation rec { pname = "shortwave"; - version = "2.0.1"; + version = "3.0.0"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; repo = "Shortwave"; rev = version; - sha256 = "sha256-25qPb7qlqCwYJzl4qZxAZYx5asxSlXBlc/0dGyBdk1o="; + sha256 = "sha256-qwk63o9pfqpAm6l9ioj3RccacemQU8R6LF6El4yHkjQ"; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-00dQXcSNmdZb2nSLG3q7jm4sugF9XR4LbH0OmcuHVxA="; + hash = "sha256-YrB322nv9CgZqt5//VMvVwjWA51ePlX2PI6raRJGBxA="; }; nativeBuildInputs = [ @@ -46,11 +47,11 @@ stdenv.mkDerivation rec { meson ninja pkg-config - python3 rustPlatform.rust.cargo rustPlatform.cargoSetupHook rustPlatform.rust.rustc - wrapGAppsHook + wrapGAppsHook4 + cmake ]; buildInputs = [ @@ -61,6 +62,7 @@ stdenv.mkDerivation rec { libadwaita openssl sqlite + libshumate ] ++ (with gst_all_1; [ gstreamer gst-plugins-base @@ -68,10 +70,6 @@ stdenv.mkDerivation rec { gst-plugins-bad ]); - postPatch = '' - patchShebangs build-aux/meson/postinstall.py - ''; - meta = with lib; { homepage = "https://gitlab.gnome.org/World/Shortwave"; description = "Find and listen to internet radio stations"; @@ -80,7 +78,6 @@ stdenv.mkDerivation rec { desktop. It is the successor to the older Gradio application. ''; maintainers = with maintainers; [ lasandell ]; - broken = true; # incompatible with latest libadwaita license = licenses.gpl3Plus; platforms = platforms.linux; }; From 16dc611f05fe455e6451e45b5d42e19682031a07 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 25 Apr 2022 02:16:04 +0000 Subject: [PATCH 09/38] bazel-remote: 2.3.6 -> 2.3.7 --- .../tools/build-managers/bazel/bazel-remote/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix b/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix index a133526514f7..f519ce5233ef 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "bazel-remote"; - version = "2.3.6"; + version = "2.3.7"; src = fetchFromGitHub { owner = "buchgr"; repo = pname; rev = "v${version}"; - sha256 = "sha256-geb7uHCBvhmqyaDr8wK9sQUcHT3xVgSclovFDpHhIiw="; + sha256 = "sha256-5VxPCfartTRYCmjwNrH7SM0o7IQ4+Tq8Q2IM8hFWyVc="; }; vendorSha256 = "sha256-wXgW7HigMIeUZAcZpm5TH9thfCHmpz+M42toWHgwIYo="; From d1402a59b0477e4f40def3b2d49e6f2c1384de62 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 25 Apr 2022 06:18:04 +0000 Subject: [PATCH 10/38] docker-slim: 1.37.5 -> 1.37.6 --- pkgs/applications/virtualization/docker-slim/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/docker-slim/default.nix b/pkgs/applications/virtualization/docker-slim/default.nix index a7261dac6d1f..dbf4bb734d84 100644 --- a/pkgs/applications/virtualization/docker-slim/default.nix +++ b/pkgs/applications/virtualization/docker-slim/default.nix @@ -6,7 +6,7 @@ buildGoPackage rec { pname = "docker-slim"; - version = "1.37.5"; + version = "1.37.6"; goPackagePath = "github.com/docker-slim/docker-slim"; @@ -14,7 +14,7 @@ buildGoPackage rec { owner = "docker-slim"; repo = "docker-slim"; rev = version; - sha256 = "sha256-MBs0ybBXsanNFt6R7+ZYvtCh7iHE3FtWXE9uy9tbrE4="; + sha256 = "sha256-Jzi6JC6DRklZhNqmFx6eHx6qR8/fb/JuSpgwtPThcc4="; }; subPackages = [ "cmd/docker-slim" "cmd/docker-slim-sensor" ]; From 5af0d861aaee215ee998d71803d64b61cb506696 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 25 Apr 2022 08:40:26 +0200 Subject: [PATCH 11/38] awslogs: relax jmespath constraint - add pythonImportsCheck --- pkgs/tools/admin/awslogs/default.nix | 39 +++++++++++++++++++++------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/admin/awslogs/default.nix b/pkgs/tools/admin/awslogs/default.nix index 5b61e4828ef6..2f60e414d74a 100644 --- a/pkgs/tools/admin/awslogs/default.nix +++ b/pkgs/tools/admin/awslogs/default.nix @@ -1,30 +1,51 @@ -{ lib, fetchFromGitHub, python3Packages }: +{ lib +, fetchFromGitHub +, python3 +}: -python3Packages.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "awslogs"; version = "0.14.0"; + format = "setuptools"; src = fetchFromGitHub { owner = "jorgebastida"; - repo = "awslogs"; + repo = pname; rev = version; - sha256 = "1gyry8b64psvmjcb2lb3yilpa7b17yllga06svls4hi69arvrd8f"; + sha256 = "sha256-DrW8s0omQqLp1gaoR6k/YR11afRjUbGYrFtfYhby2b8="; }; - propagatedBuildInputs = with python3Packages; [ - boto3 termcolor python-dateutil docutils setuptools jmespath + propagatedBuildInputs = with python3.pkgs; [ + boto3 + termcolor + python-dateutil + docutils + setuptools + jmespath ]; - checkInputs = [ python3Packages.pytestCheckHook ]; + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "jmespath>=0.7.1,<1.0.0" "jmespath>=0.7.1" + ''; + disabledTests = [ "test_main_get_query" "test_main_get_with_color" ]; + pythonImportsCheck = [ + "awslogs" + ]; + meta = with lib; { - homepage = "https://github.com/jorgebastida/awslogs"; description = "AWS CloudWatch logs for Humans"; - maintainers = with maintainers; [ dbrock ]; + homepage = "https://github.com/jorgebastida/awslogs"; license = licenses.bsd3; + maintainers = with maintainers; [ dbrock ]; }; } From 6ef74142ebc6451320c3af2e3ae77b871a07a274 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 25 Apr 2022 08:52:10 +0200 Subject: [PATCH 12/38] archivy: 1.7.1 -> 1.7.2 --- pkgs/applications/misc/archivy/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/archivy/default.nix b/pkgs/applications/misc/archivy/default.nix index 2f07b6dbf959..e7146052702b 100644 --- a/pkgs/applications/misc/archivy/default.nix +++ b/pkgs/applications/misc/archivy/default.nix @@ -1,4 +1,8 @@ -{ lib, stdenv, python3, fetchPypi }: +{ lib +, stdenv +, python3 +, fetchPypi +}: let defaultOverrides = [ @@ -37,11 +41,12 @@ with py.pkgs; buildPythonApplication rec { pname = "archivy"; - version = "1.7.1"; + version = "1.7.2"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-UNGl5Dl/E3+uQ4HIxzHYliHF4lqD3GYdeoL+DtqUwCo="; + hash = "sha256-o5dVJDbdKgo6hMMU9mKzoouSgVWl7xSAp+Aq61VcfeU="; }; # Relax some dependencies @@ -54,6 +59,7 @@ buildPythonApplication rec { --replace 'python_frontmatter == 0.5.0' 'python_frontmatter' \ --replace 'requests ==' 'requests >=' \ --replace 'validators ==' 'validators >=' \ + --replace 'flask-login == ' 'flask-login >= ' \ --replace 'tinydb ==' 'tinydb >=' \ --replace 'Flask_WTF == 0.14.3' 'Flask_WTF' \ --replace 'Flask ==' 'Flask >=' From 1f4037d13c637d6d807d15f15a4cf62331c90be1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 25 Apr 2022 08:17:46 +0000 Subject: [PATCH 13/38] flow: 0.176.2 -> 0.176.3 --- pkgs/development/tools/analysis/flow/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix index 7d3cdaab0d33..2325ab03c96b 100644 --- a/pkgs/development/tools/analysis/flow/default.nix +++ b/pkgs/development/tools/analysis/flow/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "flow"; - version = "0.176.2"; + version = "0.176.3"; src = fetchFromGitHub { owner = "facebook"; repo = "flow"; rev = "v${version}"; - sha256 = "sha256-/4wEafdmrXj4ALUVYx8DM9XyRP/wvbwAl0St1S/+9Ws="; + sha256 = "sha256-ZjWIaZ4XT7v66ozjQu+ld0Tz2gVjQFUD6JoL1nW/DmE="; }; makeFlags = [ "FLOW_RELEASE=1" ]; From ef0d40db01c1f1a1295fb50dfde42ac2bf10f11b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 25 Apr 2022 12:50:00 +0200 Subject: [PATCH 14/38] python3Packages.vivisect: unbreak on python3 Relaxes the cxxfilt constraint to fix the build. Implements extras handling for the GUI and create a toplevel attribute that enables it. Fixes: #138272 --- .../python-modules/vivisect/default.nix | 30 +++++++++++++++++-- pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 4 ++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/vivisect/default.nix b/pkgs/development/python-modules/vivisect/default.nix index ddf6ce54b25e..8eddde2b65b7 100644 --- a/pkgs/development/python-modules/vivisect/default.nix +++ b/pkgs/development/python-modules/vivisect/default.nix @@ -2,32 +2,56 @@ , buildPythonPackage , isPy3k , fetchPypi +, wrapQtAppsHook + +# propagates , pyasn1 , pyasn1-modules , cxxfilt , msgpack , pycparser + +# extras: gui +, pyqt5 +, pyqtwebengine + +# knobs +, withGui ? false }: + buildPythonPackage rec { pname = "vivisect"; version = "1.0.7"; - disabled = isPy3k; src = fetchPypi { inherit pname version; sha256 = "727a27ac1eb95d5a41f4430f6912e79940525551314fe68a2811fc9d51eaf2e9"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace 'cxxfilt>=0.2.1,<0.3.0' 'cxxfilt' + ''; + + nativeBuildInputs = [ + wrapQtAppsHook + ]; + propagatedBuildInputs = [ pyasn1 pyasn1-modules cxxfilt msgpack pycparser + ] ++ lib.optionals (withGui) passthru.extras-require.gui; + + passthru.extras-require.gui = [ + pyqt5 + pyqtwebengine ]; - preBuild = '' - sed "s@==.*'@'@" -i setup.py + postFixup = '' + wrapQtApp $out/bin/vivbin ''; # requires another repo for test files diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f83e19e12c84..9ba7dbc4417c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34664,6 +34664,8 @@ with pkgs; vivid = callPackage ../tools/misc/vivid { }; + vivisect = with python3Packages; toPythonApplication (vivisect.override { withGui = true; }); + vokoscreen = libsForQt5.callPackage ../applications/video/vokoscreen { }; vokoscreen-ng = libsForQt5.callPackage ../applications/video/vokoscreen-ng { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a07866054b74..04c8f3cbe317 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10669,7 +10669,9 @@ in { vispy = callPackage ../development/python-modules/vispy { }; - vivisect = callPackage ../development/python-modules/vivisect { }; + vivisect = callPackage ../development/python-modules/vivisect { + inherit (pkgs.libsForQt5) wrapQtAppsHook; + }; viv-utils = callPackage ../development/python-modules/viv-utils { }; From 4deb5189a879593b4871479746d7b9acb4cb0eed Mon Sep 17 00:00:00 2001 From: linsui Date: Mon, 25 Apr 2022 20:49:50 +0800 Subject: [PATCH 15/38] dotter: 0.12.9 -> 0.12.10 --- pkgs/tools/misc/dotter/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/dotter/default.nix b/pkgs/tools/misc/dotter/default.nix index fdfabf8f778a..5ca26be420ea 100644 --- a/pkgs/tools/misc/dotter/default.nix +++ b/pkgs/tools/misc/dotter/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "dotter"; - version = "0.12.9"; + version = "0.12.10"; src = fetchFromGitHub { owner = "SuperCuber"; repo = "dotter"; - rev = version; - sha256 = "0rxinrm110i5cbkl7c7vgk7dl0x79cg6g23bdjixsg7h0572c2gi"; + rev = "v${version}"; + hash = "sha256-uSM7M//3LHzdLSOruTyu46sp1a6LeodT2cCEFsuoPW4="; }; - cargoSha256 = "0fr2dvzbpwqvf98wwrxv76nwbrv4m9ppx7br4x78gm8dhf2nj4zx"; + cargoHash = "sha256-JpMEC2HjAQLQiXHSE6L0HBDc0vLhd465wDK2+35aBXA="; checkInputs = [ which ]; From 2b071e05f02d0ef4011ca77b50e93fd146be09ba Mon Sep 17 00:00:00 2001 From: Michael Adler Date: Mon, 25 Apr 2022 15:00:43 +0200 Subject: [PATCH 16/38] go-license-detector: 3.1.0 -> 4.3.0 --- .../tools/misc/go-license-detector/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/misc/go-license-detector/default.nix b/pkgs/development/tools/misc/go-license-detector/default.nix index fc69d8cdd129..11e7547afc4c 100644 --- a/pkgs/development/tools/misc/go-license-detector/default.nix +++ b/pkgs/development/tools/misc/go-license-detector/default.nix @@ -1,23 +1,23 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, git }: buildGoModule rec { pname = "go-license-detector"; - version = "3.1.0"; + version = "4.3.0"; src = fetchFromGitHub { - owner = "src-d"; + owner = "go-enry"; repo = pname; rev = "v${version}"; - sha256 = "0ln1z3y9q5igf9djkxw05ql2hb1ijcvvz0mrbwz11cdv9xrsa4z4"; + sha256 = "sha256-MubQpxpUCPDBVsEz4NmY8MFEoECXQtzAaZJ89vv5bDc="; }; - vendorSha256 = "0gan5l7vsq0hixxcymhhs8p07v92w60r0lhgvrr9a99nic12vmia"; + vendorSha256 = "sha256-a9yCnGg+4f+UoHbGG8a47z2duBD3qXcAzPKnE4PQsvM="; - doCheck = false; + checkInputs = [ git ]; meta = with lib; { description = "Reliable project licenses detector"; - homepage = "https://github.com/src-d/go-license-detector"; + homepage = "https://github.com/go-enry/go-license-detector"; license = licenses.asl20; maintainers = with maintainers; [ dtzWill ]; mainProgram = "license-detector"; From aa2afa75230a74a5406ab4027a4b1a72ebfd6dc7 Mon Sep 17 00:00:00 2001 From: mdarocha Date: Mon, 25 Apr 2022 15:48:22 +0200 Subject: [PATCH 17/38] nix-direnv: 2.0.0 -> 2.0.1 --- pkgs/tools/misc/nix-direnv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/nix-direnv/default.nix b/pkgs/tools/misc/nix-direnv/default.nix index 7323a5fdf17d..ae091c8d386f 100644 --- a/pkgs/tools/misc/nix-direnv/default.nix +++ b/pkgs/tools/misc/nix-direnv/default.nix @@ -7,13 +7,13 @@ }: stdenv.mkDerivation rec { pname = "nix-direnv"; - version = "2.0.0"; + version = "2.0.1"; src = fetchFromGitHub { owner = "nix-community"; repo = "nix-direnv"; rev = version; - sha256 = "sha256-0gBb/U7tNNSjazJE/Z2qAxHPX53wRSPMJ8rHc7HtCNg="; + sha256 = "sha256-edRdnMNYB5N9v9QlfSFNqJl93X0rSCllmzSZO9+sCOg="; }; # Substitute instead of wrapping because the resulting file is From 4679e06cfb21c4cc4f89444b52fdb83d8352b8d0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 25 Apr 2022 14:28:11 +0000 Subject: [PATCH 18/38] python310Packages.deezer-python: 5.3.0 -> 5.3.1 --- pkgs/development/python-modules/deezer-python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/deezer-python/default.nix b/pkgs/development/python-modules/deezer-python/default.nix index a694bd2882d0..b8ad686120ac 100644 --- a/pkgs/development/python-modules/deezer-python/default.nix +++ b/pkgs/development/python-modules/deezer-python/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "deezer-python"; - version = "5.3.0"; + version = "5.3.1"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "browniebroke"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-Y3nn7q6wGBqWN2JxfpGYd/KDxW5yeuwkos0w1AENkJA="; + sha256 = "sha256-x1iZP+dGHeWwIr/AwQr1rYSFECtM6iDXEq9DrGH5J+s="; }; nativeBuildInputs = [ From e0516f24a9a8db7cd6e0c7dcfc8180b8c113b52e Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 25 Apr 2022 18:46:30 +0200 Subject: [PATCH 19/38] python3Packages.dropbox: Clean up package and enable more tests --- .../python-modules/dropbox/default.nix | 46 +++++++++++++++---- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/dropbox/default.nix b/pkgs/development/python-modules/dropbox/default.nix index 77abbc938eb4..59b9b8fe0af7 100644 --- a/pkgs/development/python-modules/dropbox/default.nix +++ b/pkgs/development/python-modules/dropbox/default.nix @@ -1,12 +1,13 @@ { lib , buildPythonPackage +, pythonOlder , fetchFromGitHub , requests -, urllib3 -, mock -, setuptools +, six , stone -, pythonOlder +, mock +, pytest-mock +, pytestCheckHook }: buildPythonPackage rec { @@ -20,29 +21,54 @@ buildPythonPackage rec { owner = "dropbox"; repo = "dropbox-sdk-python"; rev = "v${version}"; - sha256 = "sha256-pq/LkyOCS0PnujfN9aIx42aeZ8tw4XvRQ4Vid/nXgWE="; + hash = "sha256-pq/LkyOCS0PnujfN9aIx42aeZ8tw4XvRQ4Vid/nXgWE="; }; propagatedBuildInputs = [ requests - urllib3 - mock - setuptools + six stone ]; + checkInputs = [ + mock + pytest-mock + pytestCheckHook + ]; + postPatch = '' substituteInPlace setup.py \ --replace "'pytest-runner == 5.2.0'," "" ''; - # Set DROPBOX_TOKEN environment variable to a valid token. - doCheck = false; + doCheck = true; pythonImportsCheck = [ "dropbox" ]; + # Set SCOPED_USER_DROPBOX_TOKEN environment variable to a valid value. + disabledTests = [ + "test_default_oauth2_urls" + "test_bad_auth" + "test_multi_auth" + "test_refresh" + "test_app_auth" + "test_downscope" + "test_rpc" + "test_upload_download" + "test_bad_upload_types" + "test_clone_when_user_linked" + "test_with_path_root_constructor" + "test_path_root" + "test_path_root_err" + "test_versioned_route" + "test_team" + "test_as_user" + "test_as_admin" + "test_clone_when_team_linked" + ]; + meta = with lib; { description = "Python library for Dropbox's HTTP-based Core and Datastore APIs"; homepage = "https://github.com/dropbox/dropbox-sdk-python"; From d8051a6a4c20424393bf5c994e70a9c2bbf9ead1 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Wed, 13 Apr 2022 14:12:54 -0400 Subject: [PATCH 20/38] kubernetes-helm: 3.8.1 -> 3.8.2 --- .../networking/cluster/helm/default.nix | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/cluster/helm/default.nix b/pkgs/applications/networking/cluster/helm/default.nix index 408f1bd3ed8a..b6f9028d52ab 100644 --- a/pkgs/applications/networking/cluster/helm/default.nix +++ b/pkgs/applications/networking/cluster/helm/default.nix @@ -1,19 +1,17 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: +{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { - pname = "helm"; - version = "3.8.1"; - gitCommit = "5cb9af4b1b271d11d7a97a71df3ac337dd94ad37"; + pname = "kubernetes-helm"; + version = "3.8.2"; + gitCommit = "6e3701edea09e5d55a8ca2aae03a68917630e91b"; src = fetchFromGitHub { owner = "helm"; repo = "helm"; rev = "v${version}"; - sha256 = "sha256-AjNrn46l9gVC7MtGF59QWv+l6qYn+jzopsZtM/2faXY="; + sha256 = "sha256-lFAzp7ZxyMZAEO1cNFkEPLgTLEGa6azv36xiTIz4FZY="; }; - vendorSha256 = "sha256-ffbp7J8XDxo/s79pjoiDVbft0pr/lJpuJuKiMpQwkT0="; - - doCheck = false; + vendorSha256 = "sha256-FLEydmR+UEZ80VYLxBU1ZdwpdLgTjUpqiMItnt9UuLY="; subPackages = [ "cmd/helm" ]; ldflags = [ @@ -23,6 +21,19 @@ buildGoModule rec { "-X helm.sh/helm/v3/internal/version.gitCommit=${gitCommit}" ]; + preCheck = '' + # skipping version tests because they require dot git directory + substituteInPlace cmd/helm/version_test.go \ + --replace "TestVersion" "SkipVersion" + '' + lib.optionalString stdenv.isLinux '' + # skipping plugin tests on linux + substituteInPlace cmd/helm/plugin_test.go \ + --replace "TestPluginDynamicCompletion" "SkipPluginDynamicCompletion" \ + --replace "TestLoadPlugins" "SkipLoadPlugins" + substituteInPlace cmd/helm/helm_test.go \ + --replace "TestPluginExitCode" "SkipPluginExitCode" + ''; + nativeBuildInputs = [ installShellFiles ]; postInstall = '' $out/bin/helm completion bash > helm.bash @@ -33,7 +44,8 @@ buildGoModule rec { meta = with lib; { homepage = "https://github.com/kubernetes/helm"; description = "A package manager for kubernetes"; + mainProgram = "helm"; license = licenses.asl20; - maintainers = with maintainers; [ rlupton20 edude03 saschagrunert Frostman Chili-Man ]; + maintainers = with maintainers; [ rlupton20 edude03 saschagrunert Frostman Chili-Man techknowlogick ]; }; } From 3ace2795b393de60f05b62b177bfa730fd46b4c8 Mon Sep 17 00:00:00 2001 From: roblabla Date: Sat, 23 Apr 2022 15:09:16 +0200 Subject: [PATCH 21/38] chntpw: Import debian bugfix patches --- pkgs/tools/security/chntpw/default.nix | 39 +++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/chntpw/default.nix b/pkgs/tools/security/chntpw/default.nix index 50ece95108e3..c4463d16d348 100644 --- a/pkgs/tools/security/chntpw/default.nix +++ b/pkgs/tools/security/chntpw/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, unzip }: +{ lib, stdenv, fetchurl, unzip, fetchpatch }: stdenv.mkDerivation rec { pname = "chntpw"; @@ -15,6 +15,43 @@ stdenv.mkDerivation rec { patches = [ ./00-chntpw-build-arch-autodetect.patch ./01-chntpw-install-target.patch + # Import various bug fixes from debian + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/04_get_abs_path"; + sha256 = "17h0gaczqd5b792481synr1ny72frwslb779lm417pyrz6kh9q8n"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/06_correct_test_open_syscall"; + sha256 = "00lg83bimbki988n71w54mmhjp9529r0ngm40d7fdmnc2dlpj3hd"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/07_detect_failure_to_write_key"; + sha256 = "0pk6xnprh2pqyx4n4lw3836z6fqsw3mclkzppl5rhjaahriwxw4l"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/08_no_deref_null"; + sha256 = "1g7pfmjaj0c2sm64s3api2kglj7jbgddjjd3r4drw6phwdkah0zs"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/09_improve_robustness"; + sha256 = "1nszkdy01ixnain7cwdmfbhjngphw1300ifagc1wgl9wvghzviaa"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/11_improve_documentation"; + sha256 = "0yql6hj72q7cq69rrspsjkpiipdhcwb0b9w5j8nhq40cnx9mgqgg"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/12_readonly_filesystem"; + sha256 = "1kxcy7f2pl6fqgmjg8bnl3pl5wgiw5xnbyx12arinmqkkggp4fa4"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/13_write_to_hive"; + sha256 = "1638lcyxjkrkmbr3n28byixny0qrxvkciw1xd97x48mj6bnwqrkv"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/14_improve_description"; + sha256 = "11y5kc4dh4zv24nkb0jw2zwlifx6nzsd4jbizn63l6dbpqgb25rs"; + }) ]; installPhase = '' From f33c02c4311d755fd2efb36e1ba0f87b98bb0eb9 Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Sun, 27 Feb 2022 16:39:55 +0100 Subject: [PATCH 22/38] ChowPhaser: init at 1.1.1 --- .../applications/audio/ChowPhaser/default.nix | 76 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 78 insertions(+) create mode 100644 pkgs/applications/audio/ChowPhaser/default.nix diff --git a/pkgs/applications/audio/ChowPhaser/default.nix b/pkgs/applications/audio/ChowPhaser/default.nix new file mode 100644 index 000000000000..a828a1e1d041 --- /dev/null +++ b/pkgs/applications/audio/ChowPhaser/default.nix @@ -0,0 +1,76 @@ +{ alsa-lib, at-spi2-core, cmake, curl, dbus, libepoxy, fetchFromGitHub, freeglut +, freetype, gcc-unwrapped, gtk3, lib, libGL, libXcursor, libXdmcp, libXext +, libXinerama, libXrandr, libXtst, libdatrie, libjack2, libpsl, libselinux +, libsepol, libsysprof-capture, libthai, libxkbcommon, pcre, pkg-config +, python3, sqlite, stdenv }: + +stdenv.mkDerivation rec { + pname = "ChowPhaser"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "jatinchowdhury18"; + repo = "ChowPhaser"; + rev = "v${version}"; + fetchSubmodules = true; + sha256 = "sha256-9wo7ZFMruG3QNvlpILSvrFh/Sx6J1qnlWc8+aQyS4tQ="; + }; + + nativeBuildInputs = [ pkg-config cmake ]; + + buildInputs = [ + alsa-lib + at-spi2-core + curl + dbus + libepoxy + freeglut + freetype + gtk3 + libGL + libXcursor + libXdmcp + libXext + libXinerama + libXrandr + libXtst + libdatrie + libjack2 + libpsl + libselinux + libsepol + libsysprof-capture + libthai + libxkbcommon + pcre + python3 + sqlite + gcc-unwrapped + ]; + + cmakeFlags = [ + "-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar" + "-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib" + "-DCMAKE_NM=${gcc-unwrapped}/bin/gcc-nm" + ]; + + installPhase = '' + mkdir -p $out/lib/lv2 $out/lib/vst3 $out/bin $out/share/doc/ChowPhaser/ + cd ChowPhaserMono_artefacts/Release + cp libChowPhaserMono_SharedCode.a $out/lib + cp -r VST3/ChowPhaserMono.vst3 $out/lib/vst3 + cp Standalone/ChowPhaserMono $out/bin + cd ../../ChowPhaserStereo_artefacts/Release + cp libChowPhaserStereo_SharedCode.a $out/lib + cp -r VST3/ChowPhaserStereo.vst3 $out/lib/vst3 + cp Standalone/ChowPhaserStereo $out/bin + ''; + + meta = with lib; { + homepage = "https://github.com/jatinchowdhury18/ChowPhaser"; + description = "Phaser effect based loosely on the Schulte Compact Phasing 'A'"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ magnetophon ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1102d18a20ea..7cffcb56a5bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24861,6 +24861,8 @@ with pkgs; ChowKick = callPackage ../applications/audio/ChowKick { }; + ChowPhaser = callPackage ../applications/audio/ChowPhaser { }; + CHOWTapeModel = callPackage ../applications/audio/CHOWTapeModel { }; chromium = callPackage ../applications/networking/browsers/chromium (config.chromium or {}); From 1bb9bb532397cd44d227f1c3e8eb3dac9fce20da Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Mon, 25 Apr 2022 17:23:14 -0300 Subject: [PATCH 23/38] protoc-gen-doc: 1.5.0 -> 1.5.1 --- pkgs/development/tools/protoc-gen-doc/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/protoc-gen-doc/default.nix b/pkgs/development/tools/protoc-gen-doc/default.nix index 4774d1a11d5c..50badf258b08 100644 --- a/pkgs/development/tools/protoc-gen-doc/default.nix +++ b/pkgs/development/tools/protoc-gen-doc/default.nix @@ -1,19 +1,17 @@ { buildGoModule, fetchFromGitHub, lib }: buildGoModule rec { - pname = "protoc-gen-doc-unstable"; - version = "1.5.0"; + pname = "protoc-gen-doc"; + version = "1.5.1"; src = fetchFromGitHub { owner = "pseudomuto"; repo = "protoc-gen-doc"; rev = "v${version}"; - sha256 = "1bpb5wv76p0sjffh5d1frbygp3q1p07sdh5c8pznl5bdh5pd7zxq"; + sha256 = "sha256-19CN62AwqQGq5Gb5kQqVYhs+LKsJ9K2L0VAakwzPD5Y="; }; - vendorSha256 = "08pk9nxsl28dw3qmrlb7vsm8xbdzmx98qwkxgg93ykrhzx235k1b"; - - doCheck = false; + vendorSha256 = "sha256-K0rZBERSKob5ubZW28QpbcPhgFKOOASkd9UyC9f8gyQ="; meta = with lib; { description = "Documentation generator plugin for Google Protocol Buffers"; From 7db7864871845b83af9cc8564a6f1180d2b52542 Mon Sep 17 00:00:00 2001 From: Pavel Borzenkov Date: Mon, 25 Apr 2022 22:25:37 +0200 Subject: [PATCH 24/38] calibre-web: relax Flask, Flask-Login and lxml requirements --- pkgs/servers/calibre-web/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/calibre-web/default.nix b/pkgs/servers/calibre-web/default.nix index 308654039983..e170d761115b 100644 --- a/pkgs/servers/calibre-web/default.nix +++ b/pkgs/servers/calibre-web/default.nix @@ -53,8 +53,10 @@ python3.pkgs.buildPythonApplication rec { substituteInPlace setup.cfg \ --replace "cps = calibreweb:main" "calibre-web = calibreweb:main" \ + --replace "Flask>=1.0.2,<2.1.0" "Flask>=1.0.2" \ + --replace "Flask-Login>=0.3.2,<0.5.1" "Flask-Login>=0.3.2" \ --replace "flask-wtf>=0.14.2,<0.16.0" "flask-wtf>=0.14.2" \ - --replace "lxml>=3.8.0,<4.7.0" "lxml>=3.8.0" \ + --replace "lxml>=3.8.0,<4.8.0" "lxml>=3.8.0" \ --replace "PyPDF3>=1.0.0,<1.0.4" "PyPDF3>=1.0.0" \ --replace "requests>=2.11.1,<2.25.0" "requests" \ --replace "unidecode>=0.04.19,<1.3.0" "unidecode>=0.04.19" From 370c03a02ebc62224345472b1eee152072f7fc59 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 25 Apr 2022 22:53:22 +0200 Subject: [PATCH 25/38] python3Packages.rjpl: init at 0.3.6 --- .../python-modules/rjpl/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/rjpl/default.nix diff --git a/pkgs/development/python-modules/rjpl/default.nix b/pkgs/development/python-modules/rjpl/default.nix new file mode 100644 index 000000000000..8d5cfbc92aae --- /dev/null +++ b/pkgs/development/python-modules/rjpl/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, requests +, fetchPypi +, pythonOlder +}: + +buildPythonPackage rec { + pname = "rjpl"; + version = "0.3.6"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-GLNIpZuM3yuCnPyjBa8KjdaL5cFK8InluuY+LTCrimc="; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "rjpl" + ]; + + meta = with lib; { + description = "Library for interacting with the Rejseplanen API"; + homepage = "https://github.com/tomatpasser/python-rejseplanen"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a07866054b74..a7431973b437 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8951,6 +8951,8 @@ in { python3 = python; }); + rjpl = callPackage ../development/python-modules/rjpl { }; + rjsmin = callPackage ../development/python-modules/rjsmin { }; rki-covid-parser = callPackage ../development/python-modules/rki-covid-parser { }; From 6e1e5eaccd3a0984f26b2b678581b49ac5217597 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 25 Apr 2022 22:54:17 +0200 Subject: [PATCH 26/38] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 6d51b0a1dbc4..f9dbe1e031f7 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2143,7 +2143,8 @@ praw ]; "rejseplanen" = ps: with ps; [ - ]; # missing inputs: rjpl + rjpl + ]; "remember_the_milk" = ps: with ps; [ httplib2 ]; # missing inputs: RtmAPI From 7e66d64ed57d3446d5fc33983e86cfa13c717ae9 Mon Sep 17 00:00:00 2001 From: Jeff Hutchison Date: Mon, 25 Apr 2022 16:52:06 -0400 Subject: [PATCH 27/38] nut: fix compile error Compile was failing with: ISO C++17 does not allow dynamic exception specifications Installed and tested on x86_64-linux. --- pkgs/applications/misc/nut/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix index 41f46ff1c003..e0e196ac1432 100644 --- a/pkgs/applications/misc/nut/default.nix +++ b/pkgs/applications/misc/nut/default.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + postInstall = '' wrapProgram $out/bin/nut-scanner --prefix LD_LIBRARY_PATH : \ "$out/lib:${neon}/lib:${libusb-compat-0_1.out}/lib:${avahi}/lib:${freeipmi}/lib" From fece5997c0cd1a18fa8cd1466fa3a49503cef2d4 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Mon, 25 Apr 2022 17:56:49 -0300 Subject: [PATCH 28/38] mockgen: fix tests --- pkgs/development/tools/mockgen/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/mockgen/default.nix b/pkgs/development/tools/mockgen/default.nix index af3e21afc914..56615d9b7004 100644 --- a/pkgs/development/tools/mockgen/default.nix +++ b/pkgs/development/tools/mockgen/default.nix @@ -1,19 +1,24 @@ -{ buildGoModule, lib, fetchFromGitHub }: +{ buildGoModule, fetchFromGitHub, lib }: + buildGoModule rec { pname = "mockgen"; version = "1.6.0"; + src = fetchFromGitHub { owner = "golang"; repo = "mock"; rev = "v${version}"; sha256 = "sha256-5Kp7oTmd8kqUN+rzm9cLqp9nb3jZdQyltGGQDiRSWcE="; }; + vendorSha256 = "sha256-5gkrn+OxbNN8J1lbgbxM8jACtKA7t07sbfJ7gVJWpJM="; - doCheck = false; - subPackages = [ "mockgen" ]; + preCheck = '' + export GOROOT="$(go env GOROOT)" + ''; + meta = with lib; { description = "GoMock is a mocking framework for the Go programming language"; homepage = "https://github.com/golang/mock"; From 163c21d9bb157ef015f36680d9f9c1d8af8c430f Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:37:11 +0200 Subject: [PATCH 29/38] routinator: 0.11.1 -> 0.11.2 --- pkgs/servers/routinator/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/routinator/default.nix b/pkgs/servers/routinator/default.nix index e11fb3272f9b..ed57e21b6205 100644 --- a/pkgs/servers/routinator/default.nix +++ b/pkgs/servers/routinator/default.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "routinator"; - version = "0.11.1"; + version = "0.11.2"; src = fetchFromGitHub { owner = "NLnetLabs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-8rILHWxUrQQx/ZpZQECa3JBCGD+a5Po8jdqb/rTx6WA="; + sha256 = "sha256-C6BY+Ba5KQgi+jMUKRi7osZNEDMLMDOhA4TQlbqb9jY="; }; - cargoSha256 = "sha256-TYVpi4ZyM0Nl2RWRMEwLM+TeAEzk1IUCQTXZLG92vt4="; + cargoSha256 = "sha256-5ZBE7jbhO4j4FwGSXLIbYjmtmNxFpiME9JqXBqwHSUA="; buildInputs = lib.optionals stdenv.isDarwin [ Security ]; From 2f39155ad40b7826fcd7d4d82a3170d4d2d59fe6 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 25 Apr 2022 22:57:37 +0200 Subject: [PATCH 30/38] python3Packages.dropbox: Update hash for re-release of 11.30.0 The version of the package was not set properly and defaulted to 0.0.0 . The package was re-released by upstream (with the same version number) after it was reported. This package will now have a correct version number in the dist-info when built, fixing packages that require it to be within certain version bounds. --- pkgs/development/python-modules/dropbox/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/dropbox/default.nix b/pkgs/development/python-modules/dropbox/default.nix index 59b9b8fe0af7..d98b37f49c84 100644 --- a/pkgs/development/python-modules/dropbox/default.nix +++ b/pkgs/development/python-modules/dropbox/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "dropbox"; repo = "dropbox-sdk-python"; rev = "v${version}"; - hash = "sha256-pq/LkyOCS0PnujfN9aIx42aeZ8tw4XvRQ4Vid/nXgWE="; + hash = "sha256-w07r95MBAClf0F3SICiZsHLdslzf+JuxC+BVdTACCog="; }; propagatedBuildInputs = [ From 505020191dcda961d428212e623c52b337faba8a Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Mon, 25 Apr 2022 23:18:43 +0200 Subject: [PATCH 31/38] czkawka: 4.0.0 -> 4.1.0 --- pkgs/tools/misc/czkawka/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/czkawka/default.nix b/pkgs/tools/misc/czkawka/default.nix index 6385eade7aa4..1bbcaf1f34bc 100644 --- a/pkgs/tools/misc/czkawka/default.nix +++ b/pkgs/tools/misc/czkawka/default.nix @@ -14,16 +14,16 @@ rustPlatform.buildRustPackage rec { pname = "czkawka"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "qarmin"; repo = "czkawka"; rev = version; - sha256 = "sha256-UIgyKWMVSKAgUNqfxFYSfP+l9x52XAzrXr1nnfKub9I="; + sha256 = "sha256-N7fCYcjhYlFVkvWdFpR5cu98Vy+jStlBkR/vz/k1lLY="; }; - cargoSha256 = "sha256-jPrkNKFmdVk3LEa20jtXSx+7S98fSrX7Rt/lexC0Gwo="; + cargoSha256 = "sha256-4L7OjJ26Qpl5YuHil7JEYU8xWH65jiyFz0a/ufr7wYQ="; nativeBuildInputs = [ pkg-config From 30e155c55264c66610db2ac249edf0238673f790 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:20:41 -0300 Subject: [PATCH 32/38] dapr-cli: 1.1.0 -> 1.7.0 * renamed package to match top-level * tests fixed * autocomplete added * minor cleanup/refactoring --- pkgs/development/tools/dapr/cli/default.nix | 23 ++++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/dapr/cli/default.nix b/pkgs/development/tools/dapr/cli/default.nix index 59e04455c2a4..96b86719e6c8 100644 --- a/pkgs/development/tools/dapr/cli/default.nix +++ b/pkgs/development/tools/dapr/cli/default.nix @@ -1,23 +1,30 @@ -{ buildGoModule, fetchFromGitHub, lib }: +{ buildGoModule, fetchFromGitHub, installShellFiles, lib }: buildGoModule rec { - pname = "dapr"; - version = "1.1.0"; - - vendorSha256 = "0fng5a1pvpbwil79xapdalzgkgc9dwsdxs6bznjfwnkyd1vvw6fm"; + pname = "dapr-cli"; + version = "1.7.0"; src = fetchFromGitHub { - sha256 = "0x2mvlzlmcik6ys6xp722px9l4lj9ssyxb06bzxd7yj7m1wwcwp9"; - owner = "dapr"; repo = "cli"; rev = "v${version}"; + sha256 = "sha256-+P1oXG+uvnFDGis5pz9VUQ4n1C7mjuetXz1OtN7IIrg="; }; - doCheck = false; + vendorSha256 = "sha256-EvOyOy7DFQtFavOC9eBUZRJsj3pNdx7jumVmZ/THdaM="; + + nativeBuildInputs = [ installShellFiles ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; postInstall = '' mv $out/bin/cli $out/bin/dapr + + installShellCompletion --cmd dapr \ + --bash <($out/bin/dapr completion bash) \ + --zsh <($out/bin/dapr completion zsh) ''; meta = with lib; { From 092dad1b2a238e6dfd86bffc54bc3a0e1e2b81ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 25 Apr 2022 21:20:08 +0000 Subject: [PATCH 33/38] python3Packages.pyrogram: 1.4.16 -> 2.0.13 https://docs.pyrogram.org/releases/v2.0 --- .../python-modules/pyrogram/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pyrogram/default.nix b/pkgs/development/python-modules/pyrogram/default.nix index d4d49fd26268..c8f7dccc4f0f 100644 --- a/pkgs/development/python-modules/pyrogram/default.nix +++ b/pkgs/development/python-modules/pyrogram/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , pythonOlder -, fetchPypi +, fetchFromGitHub , pyaes , pysocks , async-lru @@ -12,14 +12,15 @@ buildPythonPackage rec { pname = "pyrogram"; - version = "1.4.16"; + version = "2.0.13"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; - src = fetchPypi { - pname = "Pyrogram"; - inherit version; - hash = "sha256-ZYAPaAa92z3KtciVHOexdZf9bwZjKQ9WKg6+We0dW+Q="; + src = fetchFromGitHub { + owner = "pyrogram"; + repo = "pyrogram"; + rev = "v${version}"; + hash = "sha256-8mnGfW8/2RbU4gFS8e72KAxMGGkb8XrhsyK01wD97rI="; }; propagatedBuildInputs = [ From 44318a9e10c42aed4b0aa5468892f29ce20a5bbe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 25 Apr 2022 23:37:02 +0200 Subject: [PATCH 34/38] python3Packages.pytest-isort: switch to GitHub as source --- .../python-modules/pytest-isort/default.nix | 58 +++++++++++++++---- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pytest-isort/default.nix b/pkgs/development/python-modules/pytest-isort/default.nix index c06959b96c41..234742f2e6d7 100644 --- a/pkgs/development/python-modules/pytest-isort/default.nix +++ b/pkgs/development/python-modules/pytest-isort/default.nix @@ -1,26 +1,64 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27, mock, pytest, isort }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, importlib-metadata +, isort +, poetry-core +, pytest +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "pytest-isort"; version = "3.0.0"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-T+Sybq0q93ZzDsI/WHDXQh81qs4ipBxOk4WG702Hh8s="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "stephrdev"; + repo = pname; + rev = version; + hash = "sha256-gbEO3HBDeZ+nUACzpeV6iVuCdNHS5956wFzIYkbam+M="; }; - propagatedBuildInputs = [ isort ]; + nativeBuildInputs = [ + poetry-core + ]; - checkInputs = [ pytest ] - ++ lib.optionals isPy27 [ mock ]; + buildInputs = [ + pytest + ]; - checkPhase = '' - py.test -vs --cache-clear - ''; + propagatedBuildInputs = [ + isort + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; + + checkInputs = [ + pytestCheckHook + ]; + + patches = [ + # Can be removed with the next release, https://github.com/stephrdev/pytest-isort/pull/44 + (fetchpatch { + name = "switch-to-poetry-core.patch"; + url = "https://github.com/stephrdev/pytest-isort/commit/f17ed2d294ae90e415d051e1c720982e3dd01bff.patch"; + sha256 = "sha256-PiOs0c61BNx/tZN11DYblOd7tNzGthNnlkmYMTI9v18="; + }) + ]; + + pythonImportsCheck = [ + "pytest_isort" + ]; meta = with lib; { description = "Pytest plugin to perform isort checks (import ordering)"; homepage = "https://github.com/moccu/pytest-isort/"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } From 23089a1c18b14bffaa793ed59740eefb2a94dbda Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:53:08 -0300 Subject: [PATCH 35/38] go-protobuf: enable tests --- pkgs/development/tools/go-protobuf/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/tools/go-protobuf/default.nix b/pkgs/development/tools/go-protobuf/default.nix index 72dabc3b9380..00e62c87cb32 100644 --- a/pkgs/development/tools/go-protobuf/default.nix +++ b/pkgs/development/tools/go-protobuf/default.nix @@ -13,8 +13,6 @@ buildGoModule rec { vendorSha256 = "sha256-CcJjFMslSUiZMM0LLMM3BR53YMxyWk8m7hxjMI9tduE="; - doCheck = false; - meta = with lib; { homepage = "https://github.com/golang/protobuf"; description = " Go bindings for protocol buffer"; From 7f4a8f37d4621b27fc0c4eeb3880ecf1cb055371 Mon Sep 17 00:00:00 2001 From: Yuka Date: Mon, 25 Apr 2022 23:53:42 +0200 Subject: [PATCH 36/38] jitsi-meet-electron: respect NIXOS_OZONE_WL (#170304) --- .../instant-messengers/jitsi-meet-electron/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix b/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix index 2395a196f605..7dce1fd069d1 100644 --- a/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix +++ b/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix @@ -46,7 +46,8 @@ stdenv.mkDerivation rec { postFixup = '' makeWrapper ${electron}/bin/electron $out/bin/${pname} \ --add-flags $out/share/${pname}/resources/app.asar \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc xorg.libXtst pipewire ]}" + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc xorg.libXtst pipewire ]}" \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}" ''; meta = with lib; { From 8a5f8a4d8747e446165ee439e07850c68f2ead3f Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Mon, 25 Apr 2022 19:37:59 -0300 Subject: [PATCH 37/38] gortr: enable tests --- pkgs/servers/gortr/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/servers/gortr/default.nix b/pkgs/servers/gortr/default.nix index 721570c5c0ae..44057033bd59 100644 --- a/pkgs/servers/gortr/default.nix +++ b/pkgs/servers/gortr/default.nix @@ -10,9 +10,8 @@ buildGoModule rec { rev = "v${version}"; sha256 = "10dq42d3hb6a3ln3x1rag1lqzhwqb66xn4q8k4igjkn5my81nr6q"; }; - vendorSha256 = "1nwrzbpqycr4ixk8a90pgaxcwakv5nlfnql6hmcc518qrva198wp"; - doCheck = false; + vendorSha256 = "1nwrzbpqycr4ixk8a90pgaxcwakv5nlfnql6hmcc518qrva198wp"; meta = with lib; { description = "The RPKI-to-Router server used at Cloudflare"; From e05409c5ce2058f7e1d8c89e2928cbef645085dc Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 25 Apr 2022 16:29:27 -0700 Subject: [PATCH 38/38] python310Packages.flake8-bugbear: 22.3.23 -> 22.4.25 (#170281) Co-authored-by: Fabian Affolter --- .../python-modules/flake8-bugbear/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/flake8-bugbear/default.nix b/pkgs/development/python-modules/flake8-bugbear/default.nix index ef014011bdff..a2fb820c1e5f 100644 --- a/pkgs/development/python-modules/flake8-bugbear/default.nix +++ b/pkgs/development/python-modules/flake8-bugbear/default.nix @@ -4,19 +4,23 @@ , attrs , flake8 , pytestCheckHook +, pythonOlder , hypothesis , hypothesmith }: buildPythonPackage rec { pname = "flake8-bugbear"; - version = "22.3.23"; + version = "22.4.25"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "PyCQA"; repo = pname; - rev = version; - sha256 = "sha256-s1EnPM2He+R+vafu14XI1Xuft8Rg6W3vPH2Atc6N7I0="; + rev = "refs/tags/${version}"; + hash = "sha256-y/hpBlIQ3aJj3Y1snpArOCIv2w1ncQNMSYJ+G0CeM84="; }; propagatedBuildInputs = [ @@ -32,9 +36,10 @@ buildPythonPackage rec { ]; meta = with lib; { + description = "Plugin for Flake8 to find bugs and design problems"; homepage = "https://github.com/PyCQA/flake8-bugbear"; changelog = "https://github.com/PyCQA/flake8-bugbear/blob/${version}/README.rst#change-log"; - description = '' + longDescription = '' A plugin for flake8 finding likely bugs and design problems in your program. '';