From fd1a86960331433545d23160ba6259110a747c0c Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Mon, 21 Mar 2022 17:50:08 +0100 Subject: [PATCH 01/44] klipper-firmware: init at klipper.version - Add `klipper-genconf` helper to generate firmware configs - Add `klipper-flash` helper to flash firmware to microcontroller By default, klipper-firmware is built with a simulator config. Override `firmwareConfig` with a generated config from `klipper-genconf`. To flash the firmware, override `flashDevice` in `klipper-flash`. --- pkgs/servers/klipper/klipper-firmware.nix | 66 +++++++++++++++++++++++ pkgs/servers/klipper/klipper-flash.nix | 42 +++++++++++++++ pkgs/servers/klipper/klipper-genconf.nix | 22 ++++++++ pkgs/servers/klipper/simulator.cfg | 23 ++++++++ pkgs/top-level/all-packages.nix | 10 ++++ 5 files changed, 163 insertions(+) create mode 100644 pkgs/servers/klipper/klipper-firmware.nix create mode 100644 pkgs/servers/klipper/klipper-flash.nix create mode 100644 pkgs/servers/klipper/klipper-genconf.nix create mode 100644 pkgs/servers/klipper/simulator.cfg diff --git a/pkgs/servers/klipper/klipper-firmware.nix b/pkgs/servers/klipper/klipper-firmware.nix new file mode 100644 index 000000000000..832886c13fe7 --- /dev/null +++ b/pkgs/servers/klipper/klipper-firmware.nix @@ -0,0 +1,66 @@ +{ stdenv +, lib +, pkg-config +, pkgsCross +, bintools-unwrapped +, libffi +, libusb1 +, wxGTK +, python2 +, python3 +, gcc-arm-embedded +, klipper +, avrdude +, stm32flash +, mcu ? "mcu" +, firmwareConfig ? ./simulator.cfg +, flashDevice ? null +}: stdenv.mkDerivation rec { + name = "klipper-firmware-${mcu}-${version}"; + version = klipper.version; + src = klipper.src; + + nativeBuildInputs = [ + python2 + python3 + pkgsCross.avr.stdenv.cc + gcc-arm-embedded + bintools-unwrapped + libffi + libusb1 + avrdude + stm32flash + pkg-config + wxGTK # Required for bossac + ]; + + preBuild = "cp ${firmwareConfig} ./.config"; + + postPatch = '' + patchShebangs . + ''; + + makeFlags = [ + "V=1" + "KCONFIG_CONFIG=${firmwareConfig}" + ]; + + installPhase = '' + mkdir -p $out + cp ./.config $out/config + cp -r out/* $out + + if ${lib.boolToString (!isNull flashDevice)}; then + make FLASH_DEVICE=${toString flashDevice} OUT=$out/ KCONFIG_CONFIG=$out/config flash + fi + ''; + + dontFixup = true; + + meta = { + inherit (klipper.meta) homepage license; + description = "Firmware part of Klipper"; + maintainers = with lib.maintainers; [ vtuan10 ]; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/servers/klipper/klipper-flash.nix b/pkgs/servers/klipper/klipper-flash.nix new file mode 100644 index 000000000000..c81485115cc8 --- /dev/null +++ b/pkgs/servers/klipper/klipper-flash.nix @@ -0,0 +1,42 @@ +{ lib +, writeShellApplication +, gnumake +, pkgsCross +, klipper +, klipper-firmware +, python2 +, avrdude +, stm32flash +, mcu ? "mcu" +, flashDevice ? "/dev/null" +}: +let + firmwareConfig = builtins.readFile "${klipper-firmware}/config"; + isNotSupported = with builtins; isNull (match ''^.*CONFIG_BOARD_DIRECTORY="(avr|stm32|lpc176x)".*$'' firmwareConfig); + isNotStm = with builtins; isNull (match ''^.*CONFIG_BOARD_DIRECTORY="(stm32)".*$'' firmwareConfig); +in +writeShellApplication { + name = "klipper-flash-${mcu}"; + runtimeInputs = [ + python2 + avrdude + stm32flash + pkgsCross.avr.stdenv.cc + ]; + text = '' + NOT_SUPPORTED=${lib.boolToString isNotSupported} + NOT_STM=${lib.boolToString isNotStm} + if $NOT_SUPPORTED; then + printf "Flashing Klipper firmware to your board is not supported yet.\n" + printf "Please use the compiled firmware at ${klipper-firmware} and flash it using the tools provided for your microcontroller." + exit 1 + fi + pushd ${klipper.src} + if $NOT_STM; then + ${gnumake}/bin/make FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" flash + else + ${gnumake}/bin/make FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" serialflash + fi + popd + ''; +} diff --git a/pkgs/servers/klipper/klipper-genconf.nix b/pkgs/servers/klipper/klipper-genconf.nix new file mode 100644 index 000000000000..52c0d1e14216 --- /dev/null +++ b/pkgs/servers/klipper/klipper-genconf.nix @@ -0,0 +1,22 @@ +{ writeShellApplication +, klipper +, python2 +, gnumake +, pkgsCross +}: writeShellApplication { + name = "klipper-genconf"; + runtimeInputs = [ + python2 + pkgsCross.avr.stdenv.cc + ]; + text = '' + CURRENT_DIR=$(pwd) + TMP=$(mktemp -d) + pushd ${klipper.src} + ${gnumake}/bin/make OUT="$TMP" KCONFIG_CONFIG="$CURRENT_DIR/config" menuconfig + popd + rm -rf "$TMP" config.old + printf "\nYour firmware configuration for klipper:\n\n" + cat config + ''; +} diff --git a/pkgs/servers/klipper/simulator.cfg b/pkgs/servers/klipper/simulator.cfg new file mode 100644 index 000000000000..4dc19b1e40ff --- /dev/null +++ b/pkgs/servers/klipper/simulator.cfg @@ -0,0 +1,23 @@ +# CONFIG_LOW_LEVEL_OPTIONS is not set +# CONFIG_MACH_AVR is not set +# CONFIG_MACH_ATSAM is not set +# CONFIG_MACH_ATSAMD is not set +# CONFIG_MACH_LPC176X is not set +# CONFIG_MACH_STM32 is not set +# CONFIG_MACH_RP2040 is not set +# CONFIG_MACH_PRU is not set +# CONFIG_MACH_LINUX is not set +CONFIG_MACH_SIMU=y +CONFIG_BOARD_DIRECTORY="simulator" +CONFIG_CLOCK_FREQ=20000000 +CONFIG_SERIAL=y +CONFIG_SIMULATOR_SELECT=y +CONFIG_SERIAL_BAUD=250000 +CONFIG_USB_VENDOR_ID=0x1d50 +CONFIG_USB_DEVICE_ID=0x614e +CONFIG_USB_SERIAL_NUMBER="12345" +CONFIG_HAVE_GPIO=y +CONFIG_HAVE_GPIO_ADC=y +CONFIG_HAVE_GPIO_SPI=y +CONFIG_HAVE_GPIO_HARD_PWM=y +CONFIG_INLINE_STEPPER_HACK=y diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f1584e5c0d94..4e607e9b6632 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3422,6 +3422,16 @@ with pkgs; klipper = callPackage ../servers/klipper { }; + klipper-firmware = callPackage ../servers/klipper/klipper-firmware.nix { + inherit libusb1; + }; + + klipper-flash = callPackage ../servers/klipper/klipper-flash.nix { + inherit klipper-firmware; + }; + + klipper-genconf = callPackage ../servers/klipper/klipper-genconf.nix { }; + klog = qt5.callPackage ../applications/radio/klog { }; krapslog = callPackage ../tools/misc/krapslog { }; From 72871a3596632c150fb896061661264f29fdada6 Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Mon, 21 Mar 2022 18:23:18 +0100 Subject: [PATCH 02/44] nixos/klipper: Add klipper-firmware options --- nixos/modules/services/misc/klipper.nix | 92 ++++++++++++++++++------- 1 file changed, 68 insertions(+), 24 deletions(-) diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index 7b3780b5cc9f..6a22d34e708f 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -5,9 +5,9 @@ let format = pkgs.formats.ini { # https://github.com/NixOS/nixpkgs/pull/121613#issuecomment-885241996 listToValue = l: - if builtins.length l == 1 then generators.mkValueStringDefault {} (head l) + if builtins.length l == 1 then generators.mkValueStringDefault { } (head l) else lib.concatMapStrings (s: "\n ${generators.mkValueStringDefault {} s}") l; - mkKeyValue = generators.mkKeyValueDefault {} ":"; + mkKeyValue = generators.mkKeyValueDefault { } ":"; }; in { @@ -46,7 +46,6 @@ in default = null; description = '' User account under which Klipper runs. - If null is specified (default), a temporary user will be created by systemd. ''; }; @@ -56,7 +55,6 @@ in default = null; description = '' Group account under which Klipper runs. - If null is specified (default), a temporary user will be created by systemd. ''; }; @@ -69,6 +67,26 @@ in for supported values. ''; }; + + firmware = mkOption { + description = "Firmwares klipper should manage"; + default = { }; + type = with types; attrsOf + (submodule { + options = { + enableFlashing = mkEnableOption '' + automatic flashing of firmware to microcontroller + + WARNING: Be careful with this option. Enabling this will automatically flash your microcontroller on e.g. nixos-rebuild. + This can potentially brick your microcontroller. Alternatively, use `klipper-flash-$mcu` to flash manually. + ''; + firmwareConfig = mkOption { + type = path; + description = "Path to firmware config which is generated using `klipper-genconf`"; + }; + }; + }); + }; }; }; @@ -83,6 +101,10 @@ in assertion = cfg.user != null -> cfg.group != null; message = "Option klipper.group is not set when a user is specified."; } + { + assertion = foldl (a: b: a && b) true (mapAttrsToList (mcu: _: mcu != null -> (hasAttrByPath [ "${mcu}" "serial" ] cfg.settings)) cfg.firmware); + message = "Option klipper.settings.$mcu.serial is not set when klipper.firmware.$mcu is specified"; + } ]; environment.etc."klipper.cfg".source = format.generate "klipper.cfg" cfg.settings; @@ -92,26 +114,48 @@ in group = config.services.octoprint.group; }; - systemd.services.klipper = let - klippyArgs = "--input-tty=${cfg.inputTTY}" - + optionalString (cfg.apiSocket != null) " --api-server=${cfg.apiSocket}"; - in { - description = "Klipper 3D Printer Firmware"; - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; + systemd.services.klipper = + let + klippyArgs = "--input-tty=${cfg.inputTTY}" + + optionalString (cfg.apiSocket != null) " --api-server=${cfg.apiSocket}"; + in + { + description = "Klipper 3D Printer Firmware"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; - serviceConfig = { - ExecStart = "${cfg.package}/lib/klipper/klippy.py ${klippyArgs} /etc/klipper.cfg"; - RuntimeDirectory = "klipper"; - SupplementaryGroups = [ "dialout" ]; - WorkingDirectory = "${cfg.package}/lib"; - } // (if cfg.user != null then { - Group = cfg.group; - User = cfg.user; - } else { - DynamicUser = true; - User = "klipper"; - }); - }; + serviceConfig = { + ExecStart = "${cfg.package}/lib/klipper/klippy.py ${klippyArgs} /etc/klipper.cfg"; + RuntimeDirectory = "klipper"; + SupplementaryGroups = [ "dialout" ]; + WorkingDirectory = "${cfg.package}/lib"; + } // (if cfg.user != null then { + Group = cfg.group; + User = cfg.user; + } else { + DynamicUser = true; + User = "klipper"; + }); + }; + + environment.systemPackages = + with pkgs; + let + firmwares = mapAttrs + (mcu: { enableFlashing, firmwareConfig }: pkgs.klipper-firmware.override { + flashDevice = if enableFlashing then cfg.settings."${mcu}".serial else null; + mcu = lib.strings.sanitizeDerivationName mcu; + inherit firmwareConfig; + }) + cfg.firmware; + firmwareFlasher = mapAttrsToList + (mcu: firmware: pkgs.callPackage pkgs.klipper-flash.override { + mcu = lib.strings.sanitizeDerivationName mcu; + klipper-firmware = firmware; + flashDevice = cfg.settings."${mcu}".serial; + }) + firmwares; + in + [ klipper-genconf ] ++ firmwareFlasher ++ attrValues firmwares; }; } From c49f15e87b09fc26b6150dbf48e26d1381460f74 Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Mon, 21 Mar 2022 21:04:23 +0100 Subject: [PATCH 03/44] klipper-firmware: Fix IFD error and minor refactoring --- nixos/modules/services/misc/klipper.nix | 1 + pkgs/servers/klipper/klipper-firmware.nix | 12 ++++-------- pkgs/servers/klipper/klipper-flash.nix | 13 ++++++------- pkgs/servers/klipper/klipper-genconf.nix | 5 ++--- pkgs/top-level/all-packages.nix | 8 ++------ 5 files changed, 15 insertions(+), 24 deletions(-) diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index 6a22d34e708f..4e7b4e9c8f75 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -153,6 +153,7 @@ in mcu = lib.strings.sanitizeDerivationName mcu; klipper-firmware = firmware; flashDevice = cfg.settings."${mcu}".serial; + firmwareConfig = cfg.firmware."${mcu}".firmwareConfig; }) firmwares; in diff --git a/pkgs/servers/klipper/klipper-firmware.nix b/pkgs/servers/klipper/klipper-firmware.nix index 832886c13fe7..ccff83d9d58a 100644 --- a/pkgs/servers/klipper/klipper-firmware.nix +++ b/pkgs/servers/klipper/klipper-firmware.nix @@ -49,18 +49,14 @@ mkdir -p $out cp ./.config $out/config cp -r out/* $out - - if ${lib.boolToString (!isNull flashDevice)}; then - make FLASH_DEVICE=${toString flashDevice} OUT=$out/ KCONFIG_CONFIG=$out/config flash - fi - ''; + '' + lib.optionalString (flashDevice != null) "make FLASH_DEVICE=${toString flashDevice} OUT=$out/ KCONFIG_CONFIG=$out/config flash"; dontFixup = true; - meta = { + meta = with lib; { inherit (klipper.meta) homepage license; description = "Firmware part of Klipper"; - maintainers = with lib.maintainers; [ vtuan10 ]; - platforms = lib.platforms.linux; + maintainers = with maintainers; [ vtuan10 ]; + platforms = platforms.linux; }; } diff --git a/pkgs/servers/klipper/klipper-flash.nix b/pkgs/servers/klipper/klipper-flash.nix index c81485115cc8..a9c6ecdac406 100644 --- a/pkgs/servers/klipper/klipper-flash.nix +++ b/pkgs/servers/klipper/klipper-flash.nix @@ -9,11 +9,11 @@ , stm32flash , mcu ? "mcu" , flashDevice ? "/dev/null" +, firmwareConfig ? ./simulator.cfg }: let - firmwareConfig = builtins.readFile "${klipper-firmware}/config"; - isNotSupported = with builtins; isNull (match ''^.*CONFIG_BOARD_DIRECTORY="(avr|stm32|lpc176x)".*$'' firmwareConfig); - isNotStm = with builtins; isNull (match ''^.*CONFIG_BOARD_DIRECTORY="(stm32)".*$'' firmwareConfig); + isNotSupported = with builtins; isNull (match ''^.*CONFIG_BOARD_DIRECTORY="(avr|stm32|lpc176x)".*$'' (readFile firmwareConfig)); + isNotStm = with builtins; isNull (match ''^.*CONFIG_BOARD_DIRECTORY="(stm32)".*$'' (readFile firmwareConfig)); in writeShellApplication { name = "klipper-flash-${mcu}"; @@ -22,6 +22,7 @@ writeShellApplication { avrdude stm32flash pkgsCross.avr.stdenv.cc + gnumake ]; text = '' NOT_SUPPORTED=${lib.boolToString isNotSupported} @@ -31,12 +32,10 @@ writeShellApplication { printf "Please use the compiled firmware at ${klipper-firmware} and flash it using the tools provided for your microcontroller." exit 1 fi - pushd ${klipper.src} if $NOT_STM; then - ${gnumake}/bin/make FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" flash + make -C ${klipper.src} FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" flash else - ${gnumake}/bin/make FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" serialflash + make -C ${klipper.src} FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" serialflash fi - popd ''; } diff --git a/pkgs/servers/klipper/klipper-genconf.nix b/pkgs/servers/klipper/klipper-genconf.nix index 52c0d1e14216..42eb519e8c19 100644 --- a/pkgs/servers/klipper/klipper-genconf.nix +++ b/pkgs/servers/klipper/klipper-genconf.nix @@ -8,13 +8,12 @@ runtimeInputs = [ python2 pkgsCross.avr.stdenv.cc + gnumake ]; text = '' CURRENT_DIR=$(pwd) TMP=$(mktemp -d) - pushd ${klipper.src} - ${gnumake}/bin/make OUT="$TMP" KCONFIG_CONFIG="$CURRENT_DIR/config" menuconfig - popd + make -C ${klipper.src} OUT="$TMP" KCONFIG_CONFIG="$CURRENT_DIR/config" menuconfig rm -rf "$TMP" config.old printf "\nYour firmware configuration for klipper:\n\n" cat config diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4e607e9b6632..04fb2e052198 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3422,13 +3422,9 @@ with pkgs; klipper = callPackage ../servers/klipper { }; - klipper-firmware = callPackage ../servers/klipper/klipper-firmware.nix { - inherit libusb1; - }; + klipper-firmware = callPackage ../servers/klipper/klipper-firmware.nix { }; - klipper-flash = callPackage ../servers/klipper/klipper-flash.nix { - inherit klipper-firmware; - }; + klipper-flash = callPackage ../servers/klipper/klipper-flash.nix { }; klipper-genconf = callPackage ../servers/klipper/klipper-genconf.nix { }; From c8b873fcd8f12e33dd399b4d69cd02324cd389b8 Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Mon, 21 Mar 2022 23:47:20 +0100 Subject: [PATCH 04/44] nixos/klipper: Fix working of assertion Co-authored-by: Bernardo Meurer --- nixos/modules/services/misc/klipper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index 4e7b4e9c8f75..e5a88155b67f 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -103,7 +103,7 @@ in } { assertion = foldl (a: b: a && b) true (mapAttrsToList (mcu: _: mcu != null -> (hasAttrByPath [ "${mcu}" "serial" ] cfg.settings)) cfg.firmware); - message = "Option klipper.settings.$mcu.serial is not set when klipper.firmware.$mcu is specified"; + message = "Option klipper.settings.$mcu.serial must be set when klipper.firmware.$mcu is specified"; } ]; From bc96bf2e0681be3f8f4805ce8f682a1b6cbd5163 Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Mon, 21 Mar 2022 23:50:51 +0100 Subject: [PATCH 05/44] nixos/klipper: Rename `firmware` option to `firmwares` --- nixos/modules/services/misc/klipper.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index e5a88155b67f..457a0ccfdde8 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -46,6 +46,7 @@ in default = null; description = '' User account under which Klipper runs. + If null is specified (default), a temporary user will be created by systemd. ''; }; @@ -55,6 +56,7 @@ in default = null; description = '' Group account under which Klipper runs. + If null is specified (default), a temporary user will be created by systemd. ''; }; @@ -68,7 +70,7 @@ in ''; }; - firmware = mkOption { + firmwares = mkOption { description = "Firmwares klipper should manage"; default = { }; type = with types; attrsOf @@ -102,7 +104,7 @@ in message = "Option klipper.group is not set when a user is specified."; } { - assertion = foldl (a: b: a && b) true (mapAttrsToList (mcu: _: mcu != null -> (hasAttrByPath [ "${mcu}" "serial" ] cfg.settings)) cfg.firmware); + assertion = foldl (a: b: a && b) true (mapAttrsToList (mcu: _: mcu != null -> (hasAttrByPath [ "${mcu}" "serial" ] cfg.settings)) cfg.firmwares); message = "Option klipper.settings.$mcu.serial must be set when klipper.firmware.$mcu is specified"; } ]; @@ -147,13 +149,13 @@ in mcu = lib.strings.sanitizeDerivationName mcu; inherit firmwareConfig; }) - cfg.firmware; + cfg.firmwares; firmwareFlasher = mapAttrsToList (mcu: firmware: pkgs.callPackage pkgs.klipper-flash.override { mcu = lib.strings.sanitizeDerivationName mcu; klipper-firmware = firmware; flashDevice = cfg.settings."${mcu}".serial; - firmwareConfig = cfg.firmware."${mcu}".firmwareConfig; + firmwareConfig = cfg.firmwares."${mcu}".firmwareConfig; }) firmwares; in From 7200dc665118e227855a6fc03cc8a93a0628f3bd Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Mon, 21 Mar 2022 23:56:39 +0100 Subject: [PATCH 06/44] nixos/klipper: Rename `flashingEnable` to `flashing.enable` --- nixos/modules/services/misc/klipper.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index 457a0ccfdde8..35ea125753bf 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -76,7 +76,7 @@ in type = with types; attrsOf (submodule { options = { - enableFlashing = mkEnableOption '' + flashing.enable = mkEnableOption '' automatic flashing of firmware to microcontroller WARNING: Be careful with this option. Enabling this will automatically flash your microcontroller on e.g. nixos-rebuild. @@ -144,8 +144,8 @@ in with pkgs; let firmwares = mapAttrs - (mcu: { enableFlashing, firmwareConfig }: pkgs.klipper-firmware.override { - flashDevice = if enableFlashing then cfg.settings."${mcu}".serial else null; + (mcu: { flashing, firmwareConfig }: pkgs.klipper-firmware.override { + flashDevice = if flashing.enable then cfg.settings."${mcu}".serial else null; mcu = lib.strings.sanitizeDerivationName mcu; inherit firmwareConfig; }) From 9271773a7bfd0871a1673c32fd372a0769cb4942 Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Tue, 22 Mar 2022 00:01:16 +0100 Subject: [PATCH 07/44] nixos/klipper: Rename `firmwareConfig` to `configFile` --- nixos/modules/services/misc/klipper.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index 35ea125753bf..cd9cb7de8725 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -82,7 +82,7 @@ in WARNING: Be careful with this option. Enabling this will automatically flash your microcontroller on e.g. nixos-rebuild. This can potentially brick your microcontroller. Alternatively, use `klipper-flash-$mcu` to flash manually. ''; - firmwareConfig = mkOption { + configFile = mkOption { type = path; description = "Path to firmware config which is generated using `klipper-genconf`"; }; @@ -144,10 +144,10 @@ in with pkgs; let firmwares = mapAttrs - (mcu: { flashing, firmwareConfig }: pkgs.klipper-firmware.override { + (mcu: { flashing, configFile }: pkgs.klipper-firmware.override { flashDevice = if flashing.enable then cfg.settings."${mcu}".serial else null; mcu = lib.strings.sanitizeDerivationName mcu; - inherit firmwareConfig; + firmwareConfig = configFile; }) cfg.firmwares; firmwareFlasher = mapAttrsToList @@ -155,7 +155,7 @@ in mcu = lib.strings.sanitizeDerivationName mcu; klipper-firmware = firmware; flashDevice = cfg.settings."${mcu}".serial; - firmwareConfig = cfg.firmwares."${mcu}".firmwareConfig; + firmwareConfig = cfg.firmwares."${mcu}".configFile; }) firmwares; in From 2da038a900f36ee75847f717fa447c02fd4c2df2 Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Tue, 22 Mar 2022 01:48:17 +0100 Subject: [PATCH 08/44] klipper-firmware: Make runtimeInput conditional --- pkgs/servers/klipper/klipper-flash.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/servers/klipper/klipper-flash.nix b/pkgs/servers/klipper/klipper-flash.nix index a9c6ecdac406..fedc477c2761 100644 --- a/pkgs/servers/klipper/klipper-flash.nix +++ b/pkgs/servers/klipper/klipper-flash.nix @@ -12,30 +12,27 @@ , firmwareConfig ? ./simulator.cfg }: let - isNotSupported = with builtins; isNull (match ''^.*CONFIG_BOARD_DIRECTORY="(avr|stm32|lpc176x)".*$'' (readFile firmwareConfig)); - isNotStm = with builtins; isNull (match ''^.*CONFIG_BOARD_DIRECTORY="(stm32)".*$'' (readFile firmwareConfig)); + supportedArches = [ "avr" "stm32" "lpc176x" ]; + matchBoard = with builtins; match ''^.*CONFIG_BOARD_DIRECTORY="([a-zA-Z0-9_]+)".*$'' (readFile firmwareConfig); + boardArch = if matchBoard == null then null else builtins.head matchBoard; in writeShellApplication { name = "klipper-flash-${mcu}"; runtimeInputs = [ python2 - avrdude - stm32flash pkgsCross.avr.stdenv.cc gnumake - ]; + ] ++ lib.optionals (boardArch == "avr") [ avrdude ] ++ lib.optionals (boardArch == "stm32") [ stm32flash ]; text = '' - NOT_SUPPORTED=${lib.boolToString isNotSupported} - NOT_STM=${lib.boolToString isNotStm} - if $NOT_SUPPORTED; then + if ${lib.boolToString (!builtins.elem boardArch supportedArches)}; then printf "Flashing Klipper firmware to your board is not supported yet.\n" printf "Please use the compiled firmware at ${klipper-firmware} and flash it using the tools provided for your microcontroller." exit 1 fi - if $NOT_STM; then - make -C ${klipper.src} FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" flash - else + if ${lib.boolToString (boardArch == "stm32")}; then make -C ${klipper.src} FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" serialflash + else + make -C ${klipper.src} FLASH_DEVICE="${toString flashDevice}" OUT="${klipper-firmware}/" KCONFIG_CONFIG="${klipper-firmware}/config" flash fi ''; } From b391d98a710378a6f930877adb5fa6433ae71928 Mon Sep 17 00:00:00 2001 From: Van Tuan Vo Date: Tue, 22 Mar 2022 11:23:40 +0100 Subject: [PATCH 09/44] nixos/klipper: Remove automatic flashing option `flashing.enable` --- nixos/modules/services/misc/klipper.nix | 19 ++++++++----------- pkgs/servers/klipper/klipper-firmware.nix | 3 +-- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index cd9cb7de8725..fee7779141cd 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -76,11 +76,9 @@ in type = with types; attrsOf (submodule { options = { - flashing.enable = mkEnableOption '' - automatic flashing of firmware to microcontroller - - WARNING: Be careful with this option. Enabling this will automatically flash your microcontroller on e.g. nixos-rebuild. - This can potentially brick your microcontroller. Alternatively, use `klipper-flash-$mcu` to flash manually. + enable = mkEnableOption '' + building of firmware and addition of klipper-flash tools for manual flashing. + This will add `klipper-flash-$mcu` scripts to your environment which can be called to flash the firmware. ''; configFile = mkOption { type = path; @@ -143,15 +141,14 @@ in environment.systemPackages = with pkgs; let - firmwares = mapAttrs - (mcu: { flashing, configFile }: pkgs.klipper-firmware.override { - flashDevice = if flashing.enable then cfg.settings."${mcu}".serial else null; + firmwares = filterAttrs (n: v: v!= null) (mapAttrs + (mcu: { enable, configFile }: if enable then pkgs.klipper-firmware.override { mcu = lib.strings.sanitizeDerivationName mcu; firmwareConfig = configFile; - }) - cfg.firmwares; + } else null) + cfg.firmwares); firmwareFlasher = mapAttrsToList - (mcu: firmware: pkgs.callPackage pkgs.klipper-flash.override { + (mcu: firmware: pkgs.klipper-flash.override { mcu = lib.strings.sanitizeDerivationName mcu; klipper-firmware = firmware; flashDevice = cfg.settings."${mcu}".serial; diff --git a/pkgs/servers/klipper/klipper-firmware.nix b/pkgs/servers/klipper/klipper-firmware.nix index ccff83d9d58a..f80cec0b687e 100644 --- a/pkgs/servers/klipper/klipper-firmware.nix +++ b/pkgs/servers/klipper/klipper-firmware.nix @@ -14,7 +14,6 @@ , stm32flash , mcu ? "mcu" , firmwareConfig ? ./simulator.cfg -, flashDevice ? null }: stdenv.mkDerivation rec { name = "klipper-firmware-${mcu}-${version}"; version = klipper.version; @@ -49,7 +48,7 @@ mkdir -p $out cp ./.config $out/config cp -r out/* $out - '' + lib.optionalString (flashDevice != null) "make FLASH_DEVICE=${toString flashDevice} OUT=$out/ KCONFIG_CONFIG=$out/config flash"; + ''; dontFixup = true; From 61f6ac995ddf8940718ae944a01eaae072f1aa00 Mon Sep 17 00:00:00 2001 From: tilcreator Date: Sun, 3 Jul 2022 13:27:12 +0200 Subject: [PATCH 10/44] qgroundcontrol: Fix gst dependencies --- .../science/robotics/qgroundcontrol/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/pkgs/applications/science/robotics/qgroundcontrol/default.nix index 92f6ebe6ceb9..1defb5132fb1 100644 --- a/pkgs/applications/science/robotics/qgroundcontrol/default.nix +++ b/pkgs/applications/science/robotics/qgroundcontrol/default.nix @@ -14,7 +14,12 @@ mkDerivation rec { ]; gstInputs = with gst_all_1; [ - gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad wayland + gstreamer + gst-plugins-base + (gst-plugins-good.override { qt5Support = true; }) + gst-plugins-bad + gst-libav + wayland ]; buildInputs = [ SDL2 ] ++ gstInputs ++ qtInputs; From 8927d4d9e7dbbd23f8406c12d747089984660cc4 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sun, 3 Jul 2022 17:39:00 -0400 Subject: [PATCH 11/44] qgroundcontrol: 4.2.1 -> 4.2.3 --- pkgs/applications/science/robotics/qgroundcontrol/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/pkgs/applications/science/robotics/qgroundcontrol/default.nix index 92f6ebe6ceb9..c96678be6339 100644 --- a/pkgs/applications/science/robotics/qgroundcontrol/default.nix +++ b/pkgs/applications/science/robotics/qgroundcontrol/default.nix @@ -6,7 +6,7 @@ mkDerivation rec { pname = "qgroundcontrol"; - version = "4.2.1"; + version = "4.2.3"; qtInputs = [ qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2 @@ -64,7 +64,7 @@ mkDerivation rec { owner = "mavlink"; repo = pname; rev = "v${version}"; - sha256 = "sha256-7POrc6RUm3GVx3KuPUBNbKRUvUmA2UkEL7ezQVQt/yo="; + sha256 = "sha256-xa4c0ggQKqt4OfwVehjkhXYXY1TYVEoubuRH3Zsv0Ac="; fetchSubmodules = true; }; From 25a8587508a594078d28580bef1879d578ba5b8a Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 25 Jul 2022 15:21:27 +0200 Subject: [PATCH 12/44] imagemagick: 7.1.0-43 -> 7.1.0-44 --- pkgs/applications/graphics/ImageMagick/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index 3b58aba1e556..f1a9d7ae6724 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -46,13 +46,13 @@ in stdenv.mkDerivation rec { pname = "imagemagick"; - version = "7.1.0-43"; + version = "7.1.0-44"; src = fetchFromGitHub { owner = "ImageMagick"; repo = "ImageMagick"; - rev = builtins.replaceStrings [ "-" ] [ "." ] version; - hash = "sha256-SOy7Ci1rzLB12ofSQBWmX86dfbr/ywsRPunHRswlAt4="; + rev = version; + hash = "sha256-vJGZ47l8nSRnINWHsw562zsQ14fSR5SObr/SO+/40yw="; }; outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big From 387e0073f11c86c7b8ca6471fe2d153670bdd1c1 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Thu, 26 May 2022 01:23:54 +0200 Subject: [PATCH 13/44] fbreader: remove --- pkgs/applications/misc/fbreader/default.nix | 94 ------------------- .../misc/fbreader/typecheck.patch | 11 --- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 - 4 files changed, 1 insertion(+), 109 deletions(-) delete mode 100644 pkgs/applications/misc/fbreader/default.nix delete mode 100644 pkgs/applications/misc/fbreader/typecheck.patch diff --git a/pkgs/applications/misc/fbreader/default.nix b/pkgs/applications/misc/fbreader/default.nix deleted file mode 100644 index c684d273bc75..000000000000 --- a/pkgs/applications/misc/fbreader/default.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, fetchpatch -, pkg-config -, bzip2 -, curl -, expat -, fribidi -, libunibreak -, sqlite -, zlib -, uiTarget ? if !stdenv.isDarwin then "desktop" else "macosx" -, uiType ? if !stdenv.isDarwin then "qt4" else "cocoa" -, qt4 -, gtk2 -, AppKit -, Cocoa -}: - -with lib; - -assert elem uiTarget [ "desktop" "macosx" ]; -assert elem uiType [ "qt4" "gtk" "cocoa" ]; -assert uiTarget == "macosx" -> uiType == "cocoa"; - -# Note: "qt" uiType option mentioned in ${src}/README.build is qt3, -# which is way to old and no longer in nixpkgs. - -stdenv.mkDerivation { - pname = "fbreader-${uiType}"; - version = "0.99.6"; - - src = fetchFromGitHub { - owner = "geometer"; - repo = "FBReader"; - rev = "9e608db14372ae580beae4976eec7241fa069e75"; - sha256 = "0lzafk02mv0cf2l2a61q5y4743zi913byik4bw1ix0gr1drnsa7y"; - }; - - patches = [ - ./typecheck.patch - (fetchpatch { - name = "curl-7_62.diff"; # see https://github.com/geometer/FBReader/pull/311 - url = "https://github.com/geometer/FBReader/commit/b7c78e965d06f780.diff"; - sha256 = "1dgnx9wps7hcf8fkidc7037vcf92fr3ccnjx7bgxm9x02j0hngjg"; - }) - ]; - - postPatch = '' - cat << EOF > makefiles/target.mk - TARGET_ARCH = ${uiTarget} - TARGET_STATUS = release - UI_TYPE = ${uiType} - EOF - - substituteInPlace makefiles/arch/desktop.mk \ - --replace ccache "" \ - --replace moc-qt4 moc - - # libunibreak supersedes liblinebreak - substituteInPlace zlibrary/text/Makefile \ - --replace -llinebreak -lunibreak - ''; - - nativeBuildInputs = [ pkg-config ]; - - buildInputs = [ - bzip2 - curl - expat - fribidi - libunibreak - sqlite - zlib - ] - ++ optional (uiType == "qt4") qt4 - ++ optional (uiType == "gtk") gtk2 - ++ optionals (uiType == "cocoa") [ AppKit Cocoa ]; - - makeFlags = [ "INSTALLDIR=$(out)" ]; - - NIX_CFLAGS_COMPILE = "-Wno-error=narrowing"; - - meta = with lib; { - description = "An e-book reader for Linux"; - homepage = "http://www.fbreader.org/"; - license = licenses.gpl3; - broken = stdenv.isDarwin # untested, might work - || uiType == "gtk"; # builds, but the result is unusable, hangs a lot - platforms = platforms.unix; - maintainers = [ maintainers.coroa ]; - }; -} diff --git a/pkgs/applications/misc/fbreader/typecheck.patch b/pkgs/applications/misc/fbreader/typecheck.patch deleted file mode 100644 index cbac290e69c2..000000000000 --- a/pkgs/applications/misc/fbreader/typecheck.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/fbreader/src/database/booksdb/BooksDB.cpp b/fbreader/src/database/booksdb/BooksDB.cpp -index e33a22e76..1b6092800 100644 ---- a/fbreader/src/database/booksdb/BooksDB.cpp -+++ b/fbreader/src/database/booksdb/BooksDB.cpp -@@ -146,5 +146,5 @@ shared_ptr BooksDB::loadBook(const std::string &fileName) { - myFindFileId->setFileName(fileName); - if (!myFindFileId->run()) { -- return false; -+ return 0; - } - ((DBIntValue&)*myLoadBook->parameter("@file_id").value()) = myFindFileId->fileId(); diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 90cd965a4b1d..aa6ce1394a63 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -408,6 +408,7 @@ mapAliases ({ facette = throw "facette has been removed"; # Added 2020-01-06 fast-neural-doodle = throw "fast-neural-doodle has been removed, as the upstream project has been abandoned"; # Added 2020-03-28 fastnlo = fastnlo_toolkit; # Added 2021-04-24 + fbreader = throw "fbreader has been removed, as the upstream project has been archived"; # Added 2022-05-26 fedora-coreos-config-transpiler = throw "fedora-coreos-config-transpiler has been renamed to 'butane'"; # Added 2021-04-13 feedreader = throw "feedreader is no longer activily maintained since 2019. The developer is working on a spiritual successor called NewsFlash."; # Added 2022-05-03 fetchFromGithub = throw "You meant fetchFromGitHub, with a capital H"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8eb00942be8..5920df1e2fcb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26809,10 +26809,6 @@ with pkgs; fbpanel = callPackage ../applications/window-managers/fbpanel { }; - fbreader = callPackage ../applications/misc/fbreader { - inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; - }; - fdr = libsForQt5.callPackage ../applications/science/programming/fdr { }; feedbackd = callPackage ../applications/misc/feedbackd { }; From 9249634151a3e6510d2a6dd9e65c9271b8bba463 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 29 Jul 2022 15:19:10 +0200 Subject: [PATCH 14/44] =?UTF-8?q?fwupd:=201.8.1=20=E2=86=92=201.8.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/fwupd/fwupd/releases/tag/1.8.2 https://github.com/fwupd/fwupd/releases/tag/1.8.3 https://blogs.gnome.org/hughsie/2022/07/29/emulated-host-profiles-in-fwupd/ --- ...d-option-for-installation-sysconfdir.patch | 100 +++++++++--------- .../linux/firmware/fwupd/default.nix | 33 +++--- .../fwupd/install-fwupdplugin-to-out.patch | 16 +-- 3 files changed, 79 insertions(+), 70 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch index 8f3a2381dc01..c136f935e03e 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch +++ b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch @@ -1,33 +1,33 @@ diff --git a/data/meson.build b/data/meson.build -index 9176aa34..1a0298a9 100644 +index d8494020d..7c896fa0d 100644 --- a/data/meson.build +++ b/data/meson.build @@ -26,7 +26,7 @@ endif if build_standalone install_data(['daemon.conf'], -- install_dir : join_paths(sysconfdir, 'fwupd') -+ install_dir : join_paths(sysconfdir_install, 'fwupd') +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') ) - install_data(['power.quirk', 'cfi.quirk'], - install_dir: join_paths(datadir, 'fwupd', 'quirks.d')) + plugin_quirks += join_paths(meson.current_source_dir(), 'power.quirk') + plugin_quirks += join_paths(meson.current_source_dir(), 'cfi.quirk') diff --git a/data/pki/meson.build b/data/pki/meson.build -index 499b7201..1be13607 100644 +index 3649fecea..c3462744b 100644 --- a/data/pki/meson.build +++ b/data/pki/meson.build @@ -12,13 +12,13 @@ install_data([ 'GPG-KEY-Linux-Foundation-Firmware', 'GPG-KEY-Linux-Vendor-Firmware-Service', ], -- install_dir : join_paths(sysconfdir, 'pki', 'fwupd') -+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd') +- install_dir: join_paths(sysconfdir, 'pki', 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd') ) install_data([ 'GPG-KEY-Linux-Foundation-Metadata', 'GPG-KEY-Linux-Vendor-Firmware-Service', ], -- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') -+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') +- install_dir: join_paths(sysconfdir, 'pki', 'fwupd-metadata') ++ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') ) endif @@ -35,32 +35,32 @@ index 499b7201..1be13607 100644 install_data([ 'LVFS-CA.pem', ], -- install_dir : join_paths(sysconfdir, 'pki', 'fwupd') -+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd') +- install_dir: join_paths(sysconfdir, 'pki', 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd') ) install_data([ 'LVFS-CA.pem', ], -- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') -+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') +- install_dir: join_paths(sysconfdir, 'pki', 'fwupd-metadata') ++ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') ) endif diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build -index 87e794b1..ebeeeca7 100644 +index 1d1698a7e..5469d00a6 100644 --- a/data/remotes.d/meson.build +++ b/data/remotes.d/meson.build @@ -2,7 +2,7 @@ if build_standalone and get_option('lvfs') != 'false' install_data([ 'lvfs-testing.conf', ], -- install_dir : join_paths(sysconfdir, 'fwupd', 'remotes.d') -+ install_dir : join_paths(sysconfdir_install, 'fwupd', 'remotes.d') +- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d') ++ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d') ) con3 = configuration_data() if get_option('lvfs') == 'disabled' @@ -15,7 +15,7 @@ if build_standalone and get_option('lvfs') != 'false' - output : 'lvfs.conf', - configuration : con3, + output: 'lvfs.conf', + configuration: con3, install: true, - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), @@ -68,22 +68,22 @@ index 87e794b1..ebeeeca7 100644 i18n.merge_file( input: 'lvfs.metainfo.xml', @@ -49,12 +49,12 @@ configure_file( - output : 'vendor.conf', - configuration : con2, + output: 'vendor.conf', + configuration: con2, install: true, - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) configure_file( - input : 'vendor-directory.conf', - output : 'vendor-directory.conf', - configuration : con2, + input: 'vendor-directory.conf', + output: 'vendor-directory.conf', + configuration: con2, install: true, - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) diff --git a/meson.build b/meson.build -index b91dd037..a8de7810 100644 +index e6b717078..f8a7a7455 100644 --- a/meson.build +++ b/meson.build @@ -195,6 +195,12 @@ endif @@ -97,10 +97,10 @@ index b91dd037..a8de7810 100644 +endif + diffcmd = find_program('diff') - gio = dependency('gio-2.0', version : '>= 2.45.8') - giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false) + gio = dependency('gio-2.0', version: '>= 2.45.8') + giounix = dependency('gio-unix-2.0', version: '>= 2.45.8', required: false) diff --git a/meson_options.txt b/meson_options.txt -index d00038db..c84652ca 100644 +index 06d242371..d9e517fc0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ @@ -109,75 +109,75 @@ index d00038db..c84652ca 100644 option('consolekit', type : 'feature', description : 'ConsoleKit support', deprecated: {'true': 'enabled', 'false': 'disabled'}) option('static_analysis', type : 'boolean', value : false, description : 'enable GCC static analysis support') diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build -index 00b7ecda..789f34ca 100644 +index 67bd3b9d9..ad04a91b6 100644 --- a/plugins/dell-esrt/meson.build +++ b/plugins/dell-esrt/meson.build @@ -38,6 +38,6 @@ configure_file( - output : 'dell-esrt.conf', - configuration : con2, + output: 'dell-esrt.conf', + configuration: con2, install: true, - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) endif diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build -index 1a278375..f57ae530 100644 +index 13f03ccd4..9235ebe33 100644 --- a/plugins/msr/meson.build +++ b/plugins/msr/meson.build -@@ -12,7 +12,7 @@ install_data(['fwupd-msr.conf'], +@@ -10,7 +10,7 @@ install_data(['fwupd-msr.conf'], endif install_data(['msr.conf'], -- install_dir: join_paths(sysconfdir, 'fwupd') -+ install_dir: join_paths(sysconfdir_install, 'fwupd') +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') ) shared_module('fu_plugin_msr', fu_hash, diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build -index 8717d50f..9a703723 100644 +index 95606e478..e5355e520 100644 --- a/plugins/redfish/meson.build +++ b/plugins/redfish/meson.build -@@ -51,7 +51,7 @@ shared_module('fu_plugin_redfish', +@@ -43,7 +43,7 @@ shared_module('fu_plugin_redfish', ) install_data(['redfish.conf'], -- install_dir: join_paths(sysconfdir, 'fwupd'), -+ install_dir: join_paths(sysconfdir_install, 'fwupd'), +- install_dir: join_paths(sysconfdir, 'fwupd'), ++ install_dir: join_paths(sysconfdir_install, 'fwupd'), ) if get_option('tests') diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build -index aa6c8ce1..61734c4d 100644 +index 5f8ffbf90..9ba323e75 100644 --- a/plugins/thunderbolt/meson.build +++ b/plugins/thunderbolt/meson.build -@@ -35,7 +35,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', +@@ -32,7 +32,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', ) install_data(['thunderbolt.conf'], -- install_dir: join_paths(sysconfdir, 'fwupd') -+ install_dir: join_paths(sysconfdir_install, 'fwupd') +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') ) # we use functions from 2.52 in the tests if get_option('tests') and run_sanitize_unsafe_tests and umockdev.found() and gio.version().version_compare('>= 2.52') diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build -index 2d9ba819..0feb5f6b 100644 +index ef38dc03e..78ff65e1d 100644 --- a/plugins/uefi-capsule/meson.build +++ b/plugins/uefi-capsule/meson.build -@@ -21,7 +21,7 @@ if host_machine.system() == 'linux' - output : '35_fwupd', - configuration : con2, +@@ -20,7 +20,7 @@ if host_machine.system() == 'linux' + output: '35_fwupd', + configuration: con2, install: true, - install_dir: join_paths(sysconfdir, 'grub.d') + install_dir: join_paths(sysconfdir_install, 'grub.d') ) elif host_machine.system() == 'freebsd' backend_srcs += 'fu-uefi-backend-freebsd.c' -@@ -112,7 +112,7 @@ if get_option('compat_cli') and get_option('man') +@@ -110,7 +110,7 @@ if get_option('compat_cli') and get_option('man') endif install_data(['uefi_capsule.conf'], -- install_dir: join_paths(sysconfdir, 'fwupd') -+ install_dir: join_paths(sysconfdir_install, 'fwupd') +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') ) # add all the .po files as inputs to watch diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index 94a5c2ac0366..ce6dc1a1b27c 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -4,7 +4,7 @@ , lib , fetchurl , fetchFromGitHub -, gtk-doc +, gi-docgen , pkg-config , gobject-introspection , gettext @@ -17,7 +17,6 @@ , libarchive , curl , libjcat -, libxslt , elfutils , libsmbios , efivar @@ -25,8 +24,6 @@ , meson , libuuid , colord -, docbook_xml_dtd_43 -, docbook-xsl-nons , ninja , gcab , gnutls @@ -117,7 +114,7 @@ let self = stdenv.mkDerivation rec { pname = "fwupd"; - version = "1.8.1"; + version = "1.8.3"; # libfwupd goes to lib # daemon, plug-ins and libfwupdplugin go to out @@ -126,7 +123,7 @@ let src = fetchurl { url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; - sha256 = "sha256-V1ZGZELrkTT7QM3IpG+eAQAyR8jqyC+l2LFvZCA3W3k="; + sha256 = "sha256-ciIpd86KhmJRH/o8CIFWb2xFjsjWHSUNlGYRfWEiOOw="; }; patches = [ @@ -152,7 +149,7 @@ let nativeBuildInputs = [ meson ninja - gtk-doc + gi-docgen pkg-config gobject-introspection gettext @@ -160,9 +157,6 @@ let valgrind gcab gnutls - docbook_xml_dtd_43 - docbook-xsl-nons - libxslt protobufc # for protoc python wrapGAppsHook @@ -201,7 +195,7 @@ let ]; mesonFlags = [ - "-Ddocs=gtkdoc" + "-Ddocs=enabled" "-Dplugin_dummy=true" # We are building the official releases. "-Dsupported_build=enabled" @@ -216,6 +210,8 @@ let "-Dsysconfdir_install=${placeholder "out"}/etc" "-Defi_os_dir=nixos" "-Dplugin_modem_manager=enabled" + # Requires Meson 0.63 + "-Dgresource_quirks=disabled" # We do not want to place the daemon into lib (cyclic reference) "--libexecdir=${placeholder "out"}/libexec" @@ -261,10 +257,20 @@ let meson_post_install.sh \ po/test-deps + # This checks a version of a dependency of gi-docgen but gi-docgen is self-contained in Nixpkgs. + echo "Clearing docs/test-deps.py" + test -f docs/test-deps.py + echo > docs/test-deps.py + substituteInPlace data/installed-tests/fwupdmgr-p2p.sh \ --replace "gdbus" ${glib.bin}/bin/gdbus ''; + preBuild = '' + # jcat-tool at buildtime requires a home directory + export HOME="$(mktemp -d)" + ''; + preCheck = '' addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share" ''; @@ -298,8 +304,8 @@ let ) ''; - # Since we had to disable wrapGAppsHook, we need to wrap the executables manually. postFixup = '' + # Since we had to disable wrapGAppsHook, we need to wrap the executables manually. find -L "$out/bin" "$out/libexec" -type f -executable -print0 \ | while IFS= read -r -d ''' file; do if [[ "$file" != *.efi ]]; then @@ -307,6 +313,9 @@ let wrapGApp "$file" fi done + + # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. + moveToOutput "share/doc" "$devdoc" ''; separateDebugInfo = true; diff --git a/pkgs/os-specific/linux/firmware/fwupd/install-fwupdplugin-to-out.patch b/pkgs/os-specific/linux/firmware/fwupd/install-fwupdplugin-to-out.patch index c67665f21207..f3369b6e1333 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/install-fwupdplugin-to-out.patch +++ b/pkgs/os-specific/linux/firmware/fwupd/install-fwupdplugin-to-out.patch @@ -4,11 +4,11 @@ index 1afa28e1..3da81d30 100644 +++ b/libfwupdplugin/meson.build @@ -220,7 +220,8 @@ fwupdplugin = library( ], - link_args : cc.get_supported_link_arguments([vflag]), - link_depends : fwupdplugin_mapfile, -- install : true -+ install : true, -+ install_dir : bindir / '..' / 'lib', + link_args: cc.get_supported_link_arguments([vflag]), + link_depends: fwupdplugin_mapfile, +- install: true ++ install: true, ++ install_dir: bindir / '..' / 'lib', ) fwupdplugin_pkgg = import('pkgconfig') @@ -16,9 +16,9 @@ index 1afa28e1..3da81d30 100644 girtargets, fwupd_gir[0], ], -- install : true -+ install : true, -+ install_dir_typelib : bindir / '..' / 'lib' / 'girepository-1.0', +- install: true ++ install: true, ++ install_dir_typelib: bindir / '..' / 'lib' / 'girepository-1.0', ) # Verify the map file is correct -- note we can't actually use the generated From af21bb4f2fe894d157bf5d181a37475a1850d27c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 31 Jul 2022 05:46:13 +0000 Subject: [PATCH 15/44] wander: 0.5.1 -> 0.7.0 --- pkgs/tools/admin/wander/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/admin/wander/default.nix b/pkgs/tools/admin/wander/default.nix index 628377d7f644..f215deacac99 100644 --- a/pkgs/tools/admin/wander/default.nix +++ b/pkgs/tools/admin/wander/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "wander"; - version = "0.5.1"; + version = "0.7.0"; src = fetchFromGitHub { owner = "robinovitch61"; repo = pname; rev = "v${version}"; - sha256 = "sha256-B+mMC5XGUTNTcxwKhvSSc7QbsLkg8qu7/jJf5U/q6s8="; + sha256 = "sha256-aQqJDUDYHoUZ6ixnY3lmFOx29QpRRke5XHFIpsA+Bnw="; }; - vendorSha256 = "sha256-gWQ8GbtghhCRq6tOU6qmWBuponmfUkUDAk3+dPtmMiE="; + vendorSha256 = "sha256-T+URnRLumXFz48go9TN0Wha99T03OWGfDK7cQ+zKeRI="; meta = with lib; { description = "Terminal app/TUI for HashiCorp Nomad"; From 017cfa4a631bd808a6c85c28b29a07190775b1aa Mon Sep 17 00:00:00 2001 From: 2gn <101851090+2gn@users.noreply.github.com> Date: Sat, 30 Jul 2022 00:25:36 +0900 Subject: [PATCH 16/44] argparse: init at v2.6 argparse: Added whitespace within brackets argparse: removed whitespace Update pkgs/development/libraries/argparse/default.nix Co-authored-by: Sandro --- .../libraries/argparse/default.nix | 25 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/development/libraries/argparse/default.nix diff --git a/pkgs/development/libraries/argparse/default.nix b/pkgs/development/libraries/argparse/default.nix new file mode 100644 index 000000000000..ac195e909c67 --- /dev/null +++ b/pkgs/development/libraries/argparse/default.nix @@ -0,0 +1,25 @@ +{ lib, stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + pname = "argparse"; + version = "2.6"; + + src = fetchFromGitHub { + owner = "p-ranav"; + repo = "argparse"; + rev = "v${version}"; + sha256 = "sha256-imLDuVbzkiE5hcQVarZGeNzNZE0/8LHMQqAiUYzPVks="; + }; + + nativeBuildInputs = [ + cmake + ]; + + meta = with lib; { + description = "Argument Parser for Modern C++"; + homepage = "https://github.com/p-ranav/argparse"; + maintainers = with maintainers; [ _2gn ]; + platforms = platforms.unix; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 86c31194f849..5ff2c08bd9d8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17044,6 +17044,8 @@ with pkgs; arb = callPackage ../development/libraries/arb {}; + argparse = callPackage ../development/libraries/argparse { }; + argp-standalone = callPackage ../development/libraries/argp-standalone {}; aribb25 = callPackage ../development/libraries/aribb25 { From bcfdde613d86e5295ae7b95fe9ebcd5edaa1b018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Tue, 5 Jul 2022 16:02:13 +0200 Subject: [PATCH 17/44] python3Packages.trectools: init at 0.0.49 Co-authored-by: Sandro --- .../python-modules/trectools/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/trectools/default.nix diff --git a/pkgs/development/python-modules/trectools/default.nix b/pkgs/development/python-modules/trectools/default.nix new file mode 100644 index 000000000000..1c3b2a542bc3 --- /dev/null +++ b/pkgs/development/python-modules/trectools/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, beautifulsoup4 +, pythonOlder +, pandas +, python +, numpy +, scikit-learn +, scipy +, lxml +, matplotlib +, sarge +}: + +buildPythonPackage rec { + pname = "trectools"; + version = "0.0.49"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "joaopalotti"; + repo = pname; + # https://github.com/joaopalotti/trectools/issues/41 + rev = "5c1d56e9cf955f45b5a1780ee6a82744d31e7a79"; + sha256 = "sha256-Lh6sK2rxEdCsOUKHn1jgm+rsn8FK1f2po0UuZfZajBA="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "bs4 >= 0.0.0.1" "beautifulsoup4 >= 4.11.1" + ''; + + propagatedBuildInputs = [ + pandas + numpy + scikit-learn + scipy + lxml + beautifulsoup4 + matplotlib + sarge + ]; + + checkPhase = '' + cd unittests + ${python.interpreter} -m unittest runner + ''; + + pythonImportsCheck = [ "trectools" ]; + + meta = with lib; { + homepage = "https://github.com/joaopalotti/trectools"; + description = "Library for assisting Information Retrieval (IR) practitioners with TREC-like campaigns"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ MoritzBoehme ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2a95daf3a550..9baa9a4b6877 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10420,6 +10420,8 @@ in { transmissionrpc = callPackage ../development/python-modules/transmissionrpc { }; + trectools = callPackage ../development/python-modules/trectools { }; + treelog = callPackage ../development/python-modules/treelog { }; treeo = callPackage ../development/python-modules/treeo { }; From 6a84883df0b6a4a08567de2f813d0a878de672f6 Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Sun, 31 Jul 2022 17:25:06 +0200 Subject: [PATCH 18/44] volumeicon: use github as source Currently http://softwarebakery.com/maato is down. The alternative is also based on http, not https. It seems nicer to use github. In order to use GitHub as the source, autogen.sh needs to be executed. --- pkgs/tools/audio/volumeicon/default.nix | 34 +++++++++++++++++-------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/audio/volumeicon/default.nix b/pkgs/tools/audio/volumeicon/default.nix index 4d726cbd2a9e..00690d016329 100644 --- a/pkgs/tools/audio/volumeicon/default.nix +++ b/pkgs/tools/audio/volumeicon/default.nix @@ -1,24 +1,36 @@ -{ pkgs, fetchurl, lib, stdenv, gtk3, pkg-config, intltool, alsa-lib }: +{ fetchFromGitHub, lib, stdenv +, autoreconfHook, intltool, pkg-config +, gtk3, alsa-lib +}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "volumeicon"; version = "0.5.1"; - src = fetchurl { - url = "http://softwarebakery.com/maato/files/volumeicon/volumeicon-0.5.1.tar.gz"; - sha256 = "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"; + src = fetchFromGitHub { + owner = "Maato"; + repo = "volumeicon"; + rev = version; + hash = "sha256-zYKC7rOoLf08rV4B43TrGNBcXfSBFxWZCe9bQD9JzaA"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gtk3 intltool alsa-lib ]; + nativeBuildInputs = [ + autoreconfHook + intltool + pkg-config + ]; + + buildInputs = [ + gtk3 + alsa-lib + ]; meta = with lib; { description = "A lightweight volume control that sits in your systray"; - homepage = "http://softwarebakery.com/maato/volumeicon.html"; - platforms = pkgs.lib.platforms.linux; + homepage = "http://nullwise.com/volumeicon.html"; + platforms = platforms.linux; maintainers = with maintainers; [ bobvanderlinden ]; - license = pkgs.lib.licenses.gpl3; + license = licenses.gpl3; }; - } From e52a714ed9c5bf8f42ecde3735a6ccce67947512 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 31 Jul 2022 19:07:19 +0000 Subject: [PATCH 19/44] linode-cli: 5.21.0 -> 5.22.0 --- pkgs/tools/virtualization/linode-cli/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/virtualization/linode-cli/default.nix b/pkgs/tools/virtualization/linode-cli/default.nix index 506249454331..76913951b621 100644 --- a/pkgs/tools/virtualization/linode-cli/default.nix +++ b/pkgs/tools/virtualization/linode-cli/default.nix @@ -11,7 +11,7 @@ }: let - sha256 = "1yglnmwspdncqmy5x0zc0g43bfm4597zfmwfvs7qkalv1pprf0s3"; + sha256 = "1fv53wikx745kci86xrsq9kfsgv0a65srhywdw32cab1wywwpn2z"; # specVersion taken from: https://www.linode.com/docs/api/openapi.yaml at `info.version`. specVersion = "4.132.0"; specSha256 = "0r0l23bvaj406xam7hglfx637cxja3g2vqdqx3x0ag7jfhg0s3k5"; @@ -24,7 +24,7 @@ in buildPythonApplication rec { pname = "linode-cli"; - version = "5.21.0"; + version = "5.22.0"; src = fetchFromGitHub { owner = "linode"; From 860ecbc98a512765571f1de0fbb927618fce1821 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 31 Jul 2022 20:18:07 +0000 Subject: [PATCH 20/44] live555: 2022.06.16 -> 2022.07.14 --- pkgs/development/libraries/live555/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/live555/default.nix b/pkgs/development/libraries/live555/default.nix index f212adb03beb..6b5f6410d54f 100644 --- a/pkgs/development/libraries/live555/default.nix +++ b/pkgs/development/libraries/live555/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "live555"; - version = "2022.06.16"; + version = "2022.07.14"; src = fetchurl { urls = [ @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { "https://download.videolan.org/contrib/live555/live.${version}.tar.gz" "mirror://sourceforge/slackbuildsdirectlinks/live.${version}.tar.gz" ]; - sha256 = "sha256-84OUQw++RNqH3sAY4S6yXRJXZY+5T0VdTIUqELuVdV0="; + sha256 = "sha256-VrWkBmLdP0MYfiFit3Mtkv7Ti8dWPmrndrbKo+BpRCA="; }; nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools; From 1da6ebcac6eb9e8330cea4ca620989634a7b77e9 Mon Sep 17 00:00:00 2001 From: Craftman7 Date: Sun, 31 Jul 2022 10:23:03 -0700 Subject: [PATCH 21/44] exodus: Fix "Failed to load GLES library" --- pkgs/applications/blockchains/exodus/default.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/blockchains/exodus/default.nix b/pkgs/applications/blockchains/exodus/default.nix index 064b8a2d489e..00fe747193a5 100644 --- a/pkgs/applications/blockchains/exodus/default.nix +++ b/pkgs/applications/blockchains/exodus/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, unzip, glib, systemd, nss, nspr, gtk3-x11, pango, +{ stdenv, lib, fetchzip, glib, systemd, nss, nspr, gtk3-x11, pango, atk, cairo, gdk-pixbuf, xorg, xorg_sys_opengl, util-linux, alsa-lib, dbus, at-spi2-atk, cups, vivaldi-ffmpeg-codecs, libpulseaudio, at-spi2-core, libxkbcommon, mesa }: @@ -6,19 +6,13 @@ stdenv.mkDerivation rec { pname = "exodus"; version = "22.7.15"; - src = fetchurl { + src = fetchzip { url = "https://downloads.exodus.io/releases/${pname}-linux-x64-${version}.zip"; - sha256 = "sha256-tQwxzhy+d2hA7VvZB9qSF7uaYIffAyX9ovZYQ8HDEB8="; + sha256 = "sha256-KAv+H6uJBDGzjg5Qmy54EtiVvV1OGJ6r3XnAQO7qjIg="; }; - sourceRoot = "."; - unpackCmd = '' - ${unzip}/bin/unzip "$src" -x "Exodus*/lib*so" - ''; - installPhase = '' mkdir -p $out/bin $out/share/applications - cd Exodus-linux-x64 cp -r . $out ln -s $out/Exodus $out/bin/Exodus ln -s $out/bin/Exodus $out/bin/exodus From 25985fa375cee23877df043785fdda74b9e3e185 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 01:19:44 +0000 Subject: [PATCH 22/44] net-snmp: 5.9.1 -> 5.9.3 --- pkgs/servers/monitoring/net-snmp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/net-snmp/default.nix b/pkgs/servers/monitoring/net-snmp/default.nix index 5e7aa35d6228..e4447d7a844c 100644 --- a/pkgs/servers/monitoring/net-snmp/default.nix +++ b/pkgs/servers/monitoring/net-snmp/default.nix @@ -10,11 +10,11 @@ in stdenv.mkDerivation rec { pname = "net-snmp"; - version = "5.9.1"; + version = "5.9.3"; src = fetchurl { url = "mirror://sourceforge/net-snmp/${pname}-${version}.tar.gz"; - sha256 = "sha256-63/UpE3mzdv/2akqha0TCeXBBU+51afdkweciVP0jD8="; + sha256 = "sha256-IJfym34b8/EwC0uuUvojCNC7jV05mNvgL5RipBOi7wo="; }; patches = From bbb82aebc75091449d96e65fae9ad25cb15e5921 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 07:14:00 +0000 Subject: [PATCH 23/44] python310Packages.aioaladdinconnect: 0.1.25 -> 0.1.34 --- pkgs/development/python-modules/aioaladdinconnect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aioaladdinconnect/default.nix b/pkgs/development/python-modules/aioaladdinconnect/default.nix index 52680d09639a..34ec003193a9 100644 --- a/pkgs/development/python-modules/aioaladdinconnect/default.nix +++ b/pkgs/development/python-modules/aioaladdinconnect/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "aioaladdinconnect"; - version = "0.1.25"; + version = "0.1.34"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "AIOAladdinConnect"; inherit version; - hash = "sha256-ruuiRhPPqsZxJgaKVtwQK8Zf7gG9r2NYnrBCosTtL/M="; + hash = "sha256-p5O4tm+m0ThJS/VTqhMNs2bwA2S6kJ2reQ2BoTHmLz8="; }; propagatedBuildInputs = [ From 4ae8eeb550cad608696d0d9a64113bfb05f633f4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 07:19:20 +0000 Subject: [PATCH 24/44] python310Packages.geoalchemy2: 0.12.1 -> 0.12.3 --- pkgs/development/python-modules/geoalchemy2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/geoalchemy2/default.nix b/pkgs/development/python-modules/geoalchemy2/default.nix index dc2b3dbd4de1..db1996a90871 100644 --- a/pkgs/development/python-modules/geoalchemy2/default.nix +++ b/pkgs/development/python-modules/geoalchemy2/default.nix @@ -12,12 +12,12 @@ buildPythonPackage rec { pname = "GeoAlchemy2"; - version = "0.12.1"; + version = "0.12.3"; format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-7566ebZ/9LxyCw4ZkUEIZvx9sBODewVaGyy2UYuZTYA="; + sha256 = "sha256-MSgMZF3EoPkMHSmdL1x9WrZ8eENTW0ULTCq4ifAB4EI="; }; nativeBuildInputs = [ From 16a1f72c6a94623c55660616c57e11e055374755 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 08:03:38 +0000 Subject: [PATCH 25/44] python39Packages.drf-yasg: 1.21.0 -> 1.21.3 --- pkgs/development/python-modules/drf-yasg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/drf-yasg/default.nix b/pkgs/development/python-modules/drf-yasg/default.nix index 28520e814cb6..9606bbcf0726 100644 --- a/pkgs/development/python-modules/drf-yasg/default.nix +++ b/pkgs/development/python-modules/drf-yasg/default.nix @@ -14,11 +14,11 @@ buildPythonPackage rec { pname = "drf-yasg"; - version = "1.21.0"; + version = "1.21.3"; src = fetchPypi { inherit pname version; - sha256 = "sha256-Lyh3plukEn1+7t+pp3oJbbLjdDvRIddFACmXtBfA2Go="; + sha256 = "sha256-su67Q4+mQVA6CNrHkb4kGD6ibbz+NxqYJOqR9uOpiKo="; }; postPatch = '' From 2700bd3c44f0c90813b7b2d97c6d4cf48655feee Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 08:15:46 +0000 Subject: [PATCH 26/44] python310Packages.peaqevcore: 4.0.0 -> 4.0.1 --- pkgs/development/python-modules/peaqevcore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/peaqevcore/default.nix b/pkgs/development/python-modules/peaqevcore/default.nix index 970c1adf5b4f..a2473ead5c30 100644 --- a/pkgs/development/python-modules/peaqevcore/default.nix +++ b/pkgs/development/python-modules/peaqevcore/default.nix @@ -6,14 +6,14 @@ buildPythonPackage rec { pname = "peaqevcore"; - version = "4.0.0"; + version = "4.0.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-q1qxjrdDLTOprgunsq70oPFgSxSZ1jOfUY6qPud/d9o="; + hash = "sha256-iCHXiGKg3ENqw4cX1iNpVZAA944siKbFGKooo+KswsY="; }; postPatch = '' From aad5d9d129885763e75a66eeb9435dfe0547eef9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 08:28:44 +0000 Subject: [PATCH 27/44] python310Packages.logilab-constraint: 0.6.0 -> 0.6.2 --- pkgs/development/python-modules/logilab/constraint.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/logilab/constraint.nix b/pkgs/development/python-modules/logilab/constraint.nix index bbc65a51c3c3..ca9e5b17be85 100644 --- a/pkgs/development/python-modules/logilab/constraint.nix +++ b/pkgs/development/python-modules/logilab/constraint.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "logilab-constraint"; - version = "0.6.0"; + version = "0.6.2"; src = fetchPypi { inherit pname version; - sha256 = "1n0xim4ij1n4yvyqqvyc0wllhjs22szglsd5av0j8k2qmck4njcg"; + sha256 = "sha256-Jk6wvvcDEeHfy7dUcjbnzFIeGBYm5tXzCI26yy+t2qs="; }; propagatedBuildInputs = [ From 131e098b7d21405d184442a61446c3b6204a1b6a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 08:36:56 +0000 Subject: [PATCH 28/44] python310Packages.mailsuite: 1.9.2 -> 1.9.4 --- pkgs/development/python-modules/mailsuite/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mailsuite/default.nix b/pkgs/development/python-modules/mailsuite/default.nix index adc6ec35051d..2cb6555109cd 100644 --- a/pkgs/development/python-modules/mailsuite/default.nix +++ b/pkgs/development/python-modules/mailsuite/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "mailsuite"; - version = "1.9.2"; + version = "1.9.4"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-UV9cdWdUnUt4j1Puf1H0UxXsCHi3t4uNiKHwYNfTfa4="; + hash = "sha256-wgutyXxo1z3GxO3xikRlA4Og+oz+7+PrY2Hs6gicO/o="; }; nativeBuildInputs = [ From 057f09bd385e7303749ac9724ede2d292b7d5c9d Mon Sep 17 00:00:00 2001 From: Christoph Honal Date: Wed, 22 Jun 2022 16:46:40 +0200 Subject: [PATCH 29/44] pythonPackages.adafruit-nrfutil: init at 0.5.3.post17 --- .../adafruit-nrfutil/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/adafruit-nrfutil/default.nix diff --git a/pkgs/development/python-modules/adafruit-nrfutil/default.nix b/pkgs/development/python-modules/adafruit-nrfutil/default.nix new file mode 100644 index 000000000000..532fd301a1a4 --- /dev/null +++ b/pkgs/development/python-modules/adafruit-nrfutil/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, pythonOlder +, pyserial +, click +, ecdsa +, behave +, nose +}: + +buildPythonPackage rec { + pname = "adafruit-nrfutil"; + version = "0.5.3.post17"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "adafruit"; + repo = "Adafruit_nRF52_nrfutil"; + rev = version; + sha256 = "sha256-mHHKOQE9AGBX8RAyaPOy+JS3fTs98+AFdq9qsVy7go4="; + }; + + patches = [ + # Pull a patch which fixes the tests, but is not yet released in a new version: + # https://github.com/adafruit/Adafruit_nRF52_nrfutil/pull/38 + (fetchpatch { + name = "fix-tests.patch"; + url = "https://github.com/adafruit/Adafruit_nRF52_nrfutil/commit/e5fbcc8ee5958041db38c04139ba686bf7d1b845.patch"; + sha256 = "sha256-0tbJldGtYcDdUzA3wZRv0lenXVn6dqV016U9nMpQ6/w="; + }) + ]; + + propagatedBuildInputs = [ + pyserial + click + ecdsa + ]; + + checkInputs = [ + behave + nose + ]; + + preCheck = '' + mkdir test-reports + ''; + + pythonImportsCheck = [ + "nordicsemi" + ]; + + meta = with lib; { + homepage = "https://github.com/adafruit/Adafruit_nRF52_nrfutil"; + description = "Modified version of Nordic's nrfutil 0.5.x for use with the Adafruit Feather nRF52"; + license = licenses.bsd3; + maintainers = with maintainers; [ stargate01 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 59cdb70f68dd..92dd57cea09f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -171,6 +171,8 @@ in { adafruit-io = callPackage ../development/python-modules/adafruit-io { }; + adafruit-nrfutil = callPackage ../development/python-modules/adafruit-nrfutil { }; + adafruit-platformdetect = callPackage ../development/python-modules/adafruit-platformdetect { }; adafruit-pureio = callPackage ../development/python-modules/adafruit-pureio { }; From 752c0627366d703c9f1a938990cc1ac4d0b5e668 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:42:48 +0200 Subject: [PATCH 30/44] vte: fix build on darwin --- pkgs/development/libraries/vte/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix index 8734308af930..342bb32e5609 100644 --- a/pkgs/development/libraries/vte/default.nix +++ b/pkgs/development/libraries/vte/default.nix @@ -78,6 +78,9 @@ stdenv.mkDerivation rec { mesonFlags = lib.optionals (!systemdSupport) [ "-D_systemd=false" + ] ++ lib.optionals stdenv.isDarwin [ + # -Bsymbolic-functions is not supported on darwin + "-D_b_symbolic_functions=false" ]; postPatch = '' @@ -98,7 +101,6 @@ stdenv.mkDerivation rec { }; meta = with lib; { - broken = stdenv.isDarwin; homepage = "https://www.gnome.org/"; description = "A library implementing a terminal emulator widget for GTK"; longDescription = '' From e76a011eea0583f89625ac8d1832b1da11b12fb6 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:48:13 +0200 Subject: [PATCH 31/44] gnome-console: add darwin support --- .../gnome-console/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/terminal-emulators/gnome-console/default.nix b/pkgs/applications/terminal-emulators/gnome-console/default.nix index 691a2d10c67c..790aa1725923 100644 --- a/pkgs/applications/terminal-emulators/gnome-console/default.nix +++ b/pkgs/applications/terminal-emulators/gnome-console/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , gettext , gnome , libgtop @@ -29,14 +30,23 @@ stdenv.mkDerivation rec { sha256 = "fSbmwYdExXWnhykyY/YM7/YwEHCY6eWKd2WwCsdDcEk="; }; + patches = [ + (fetchpatch { + name = "fix-clang-build-issues.patch"; + url = "https://gitlab.gnome.org/GNOME/console/-/commit/0e29a417d52e27da62f5cac461400be6a764dc65.patch"; + sha256 = "sha256-5ORNZOxjC5dMk9VKaBcJu5OV1SEZo9SNUbN4Ob5hVJs="; + }) + ]; + buildInputs = [ gettext libgtop - gnome.nautilus gtk3 libhandy pcre2 vte + ] ++ lib.optionals stdenv.isLinux [ + gnome.nautilus ]; nativeBuildInputs = [ @@ -51,6 +61,10 @@ stdenv.mkDerivation rec { wrapGAppsHook ]; + mesonFlags = lib.optionals (!stdenv.isLinux) [ + "-Dnautilus=disabled" + ]; + passthru = { updateScript = gnome.updateScript { packageName = pname; @@ -64,6 +78,6 @@ stdenv.mkDerivation rec { homepage = "https://gitlab.gnome.org/GNOME/console"; license = licenses.gpl3Plus; maintainers = teams.gnome.members ++ (with maintainers; [ zhaofengli ]); - platforms = platforms.linux; + platforms = platforms.unix; }; } From 1c0b7702ba4d90d1fae389bef6b836d00739065d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 12:57:43 +0000 Subject: [PATCH 32/44] python310Packages.avro: 1.11.0 -> 1.11.1 --- pkgs/development/python-modules/avro/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/avro/default.nix b/pkgs/development/python-modules/avro/default.nix index d69f009aaf4c..fd24227e03cd 100644 --- a/pkgs/development/python-modules/avro/default.nix +++ b/pkgs/development/python-modules/avro/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "avro"; - version = "1.11.0"; + version = "1.11.1"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "1206365cc30ad561493f735329857dd078533459cee4e928aec2505f341ce445"; + sha256 = "sha256-8SNiPsxkjQ4gzhT47YUWIUDBPMSxCIZdGyUp+/oGwAg="; }; propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ From a9787960ea0110c1e0acce0109c1b8d178041e90 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Sat, 9 Jul 2022 19:04:11 +0800 Subject: [PATCH 33/44] copilot-cli: init at 1.19.0 https://github.com/aws/copilot-cli/releases/tag/v1.19.0 --- pkgs/tools/admin/copilot-cli/default.nix | 47 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/tools/admin/copilot-cli/default.nix diff --git a/pkgs/tools/admin/copilot-cli/default.nix b/pkgs/tools/admin/copilot-cli/default.nix new file mode 100644 index 000000000000..3e12116d6e2a --- /dev/null +++ b/pkgs/tools/admin/copilot-cli/default.nix @@ -0,0 +1,47 @@ +{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, copilot-cli }: + +buildGoModule rec { + pname = "copilot-cli"; + version = "1.19.0"; + + src = fetchFromGitHub { + owner = "aws"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-2zF/cBc6TjAcFAI3zJ0yBQrVWDK5nkxYYkb04bjSjgY="; + }; + + vendorSha256 = "sha256-1UFahXol1Lceccr/f24Mbhtk8bWyh4+Mb5VYZvF6VWs="; + + nativeBuildInputs = [ installShellFiles ]; + + # follow LINKER_FLAGS in Makefile + ldflags = [ + "-s" + "-w" + "-X github.com/aws/copilot-cli/internal/pkg/version.Version=${version}" + "-X github.com/aws/copilot-cli/internal/pkg/cli.binaryS3BucketPath=https://ecs-cli-v2-release.s3.amazonaws.com" + ]; + + subPackages = [ "./cmd/copilot" ]; + + postInstall = '' + installShellCompletion --cmd copilot \ + --bash <($out/bin/copilot completion bash) \ + --fish <($out/bin/copilot completion fish) \ + --zsh <($out/bin/copilot completion zsh) + ''; + + passthru.tests.version = testers.testVersion { + package = copilot-cli; + command = "copilot version"; + }; + + meta = with lib; { + description = "Build, Release and Operate Containerized Applications on AWS."; + homepage = "https://github.com/aws/copilot-cli"; + changelog = "https://github.com/aws/copilot-cli/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ jiegec ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ce94bb7392ea..aad139299879 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -386,6 +386,8 @@ with pkgs; coordgenlibs = callPackage ../development/libraries/coordgenlibs { }; + copilot-cli = callPackage ../tools/admin/copilot-cli { }; + cp437 = callPackage ../tools/misc/cp437 { }; cpm = callPackage ../development/tools/cpm { }; From 025941124579548cbe74ecdf85ce2d3f0fb49392 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 14:54:53 +0000 Subject: [PATCH 34/44] httpx: 1.2.3 -> 1.2.4 --- pkgs/tools/security/httpx/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/httpx/default.nix b/pkgs/tools/security/httpx/default.nix index 2519e714b70b..de7060e69f19 100644 --- a/pkgs/tools/security/httpx/default.nix +++ b/pkgs/tools/security/httpx/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "httpx"; - version = "1.2.3"; + version = "1.2.4"; src = fetchFromGitHub { owner = "projectdiscovery"; repo = "httpx"; rev = "v${version}"; - sha256 = "sha256-gBt1xllfzw8M+n+vgUmOQ3vgDxDuDaQ7YXfWdLWnpVk="; + sha256 = "sha256-w4VELxmahqjfiMGXflSnhp5NKPi3HUucjxEUegljbVY="; }; - vendorSha256 = "sha256-9ZwRbeZ1iSuJiIJDBauU1U9PpGn8QQPTd3MfrnSmF+w="; + vendorSha256 = "sha256-9zLZyXrLvxwwkTwtpKxdGftzCZISZ/al98VnPiaMqGA="; meta = with lib; { description = "Fast and multi-purpose HTTP toolkit"; From 743d53f29fe937e3e735db694baa8d82bf6307f3 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Mon, 1 Aug 2022 18:43:50 +0300 Subject: [PATCH 35/44] endlessh-go: 20220710 -> 20220731 --- pkgs/servers/endlessh-go/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/endlessh-go/default.nix b/pkgs/servers/endlessh-go/default.nix index 320d5c4137c0..ffd8c355b841 100644 --- a/pkgs/servers/endlessh-go/default.nix +++ b/pkgs/servers/endlessh-go/default.nix @@ -5,18 +5,16 @@ buildGoModule rec { pname = "endlessh-go"; - version = "20220710"; + version = "20220731"; src = fetchFromGitHub { owner = "shizunge"; repo = "endlessh-go"; rev = version; - sha256 = "sha256-T8DLzHfITMLeHJtKuK4AjEzGGCIDJUPlqF2Lj56xPxY="; + sha256 = "sha256-xV9VCbpd6JC/m3RXJt0v8WCCGs8UpZLvAv3bzPRrae4="; }; - vendorSha256 = "sha256-hMCjYAqsI6h9B8iGVYQcNbKU5icalOHavvPKwOmvf/w="; - - proxyVendor = true; + vendorSha256 = "sha256-YGVLntDnOX55IoIHIn0z1K7V/PhRLruEASfAGQsTUkk="; ldflags = [ "-s" "-w" ]; From 8736aa01e9e3fb823df88b8e7632d546525e40d2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 1 Aug 2022 18:36:50 +0000 Subject: [PATCH 36/44] nickel: 0.1.0 -> 0.2.0 --- pkgs/development/interpreters/nickel/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/nickel/default.nix b/pkgs/development/interpreters/nickel/default.nix index 7a097391ba5d..ccf34377de42 100644 --- a/pkgs/development/interpreters/nickel/default.nix +++ b/pkgs/development/interpreters/nickel/default.nix @@ -5,16 +5,16 @@ rustPlatform.buildRustPackage rec { pname = "nickel"; - version = "0.1.0"; + version = "0.2.0"; src = fetchFromGitHub { owner = "tweag"; repo = pname; rev = "refs/tags/${version}"; # because pure ${version} doesn't work - hash = "sha256-St8oK9vP2cAhsNindkebtAMeRPwYggP9E4CciSZc7oA="; + hash = "sha256-Bh83qn+ECZnlCH/A34G5G5MdcAHPow24RMCVQXR5Awg="; }; - cargoSha256 = "sha256-VsyK/api8acIpADpXQ8RdbRLiZwHFSDH0vwQrZQ8zp4="; + cargoSha256 = "sha256-vI+SaVyRJjLNqenUsYtaSTyOZRT0zZJ1OZHekcb5LjY="; meta = with lib; { homepage = "https://nickel-lang.org/"; From a87cd27054e6ebc73c4b390d313e70191a825929 Mon Sep 17 00:00:00 2001 From: Sylvain Fankhauser Date: Mon, 1 Aug 2022 21:04:10 +0200 Subject: [PATCH 37/44] securefs: compile with clang securefs always exits with an "invalid password" error when compiled with the latest GCC version. Upstream confirmed the fix is to build with clang: https://github.com/netheril96/securefs/issues/124#issuecomment-962618957 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5d5e966accc3..d8233470befd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10528,7 +10528,9 @@ with pkgs; secp256k1 = callPackage ../tools/security/secp256k1 { }; - securefs = callPackage ../tools/filesystems/securefs { }; + securefs = callPackage ../tools/filesystems/securefs { + stdenv = clangStdenv; + }; seehecht = callPackage ../tools/text/seehecht { }; From 65769b2d5a7b0880ddaf7f316217d298787894a0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 31 Jul 2022 19:41:01 +0000 Subject: [PATCH 38/44] link-grammar: 5.10.4 -> 5.10.5 --- pkgs/tools/text/link-grammar/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/link-grammar/default.nix b/pkgs/tools/text/link-grammar/default.nix index 876e9971fd29..28cd894393ee 100644 --- a/pkgs/tools/text/link-grammar/default.nix +++ b/pkgs/tools/text/link-grammar/default.nix @@ -14,13 +14,13 @@ let link-grammar = stdenv.mkDerivation rec { pname = "link-grammar"; - version = "5.10.4"; + version = "5.10.5"; outputs = [ "bin" "out" "dev" "man" ]; src = fetchurl { url = "http://www.abisource.com/downloads/${pname}/${version}/${pname}-${version}.tar.gz"; - sha256 = "sha256-Pd4tEsre7aGTlEoereSElisCGXXhwgZDTMt4UEZIf4E="; + sha256 = "sha256-MkcQzYEyl1/5zLU1CXMvdVhHOxwZ8XiSAAo97bhhiu0="; }; nativeBuildInputs = [ From becc6b2bc0ab14b37646758ca3a176273e398c72 Mon Sep 17 00:00:00 2001 From: alyaeanyx Date: Mon, 1 Aug 2022 03:01:24 +0200 Subject: [PATCH 39/44] freetube: 0.16.0 -> 0.17.0 --- pkgs/applications/video/freetube/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/freetube/default.nix b/pkgs/applications/video/freetube/default.nix index c93be6b63834..3ceda283d3d8 100644 --- a/pkgs/applications/video/freetube/default.nix +++ b/pkgs/applications/video/freetube/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "freetube"; - version = "0.16.0"; + version = "0.17.0"; src = fetchurl { url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${version}-beta/freetube_${version}_amd64.AppImage"; - sha256 = "sha256-G4lZ1lbNN8X9ocWhcuuNZGTZm9AUzuWKVm23YgsJwig="; + sha256 = "sha256-OlWNln62VouUJzzk0CtED+OdSM+aBc4NOu1TSaKVWnk="; }; appimageContents = appimageTools.extractType2 { From 699ac8cf81d14603d11e14a62222417b4af53e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 29 Jul 2022 23:20:10 +0200 Subject: [PATCH 40/44] weston: remove with lib over entire file --- .../window-managers/weston/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix index 10f67558cfcb..799c58283d93 100644 --- a/pkgs/applications/window-managers/weston/default.nix +++ b/pkgs/applications/window-managers/weston/default.nix @@ -7,7 +7,6 @@ # beware of null defaults, as the parameters *are* supplied by callPackage by default }: -with lib; stdenv.mkDerivation rec { pname = "weston"; version = "10.0.1"; @@ -34,25 +33,25 @@ stdenv.mkDerivation rec { ]; mesonFlags= [ - "-Dbackend-drm-screencast-vaapi=${boolToString (vaapi != null)}" - "-Dbackend-rdp=${boolToString (freerdp != null)}" - "-Dxwayland=${boolToString (xwayland != null)}" # Default is true! + "-Dbackend-drm-screencast-vaapi=${lib.boolToString (vaapi != null)}" + "-Dbackend-rdp=${lib.boolToString (freerdp != null)}" + "-Dxwayland=${lib.boolToString (xwayland != null)}" # Default is true! "-Dremoting=false" # TODO - "-Dpipewire=${boolToString (pipewire != null)}" - "-Dimage-webp=${boolToString (libwebp != null)}" + "-Dpipewire=${lib.boolToString (pipewire != null)}" + "-Dimage-webp=${lib.boolToString (libwebp != null)}" "-Ddemo-clients=false" "-Dsimple-clients=" "-Dtest-junit-xml=false" # TODO: #"--enable-clients" #"--disable-setuid-install" # prevent install target to chown root weston-launch, which fails - ] ++ optionals (xwayland != null) [ + ] ++ lib.optionals (xwayland != null) [ "-Dxwayland-path=${xwayland.out}/bin/Xwayland" ]; passthru.providedSessions = [ "weston" ]; - meta = { + meta = with lib; { description = "A lightweight and functional Wayland compositor"; longDescription = '' Weston is the reference implementation of a Wayland compositor, as well From 8fb01fab4f38dbcf6e5e55a786aef0d77fe28865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 1 Aug 2022 20:41:20 +0200 Subject: [PATCH 41/44] go_1_17: 1.17.12 -> 1.17.13 --- pkgs/development/compilers/go/1.17.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/go/1.17.nix b/pkgs/development/compilers/go/1.17.nix index db2133d0110e..e2db700494e9 100644 --- a/pkgs/development/compilers/go/1.17.nix +++ b/pkgs/development/compilers/go/1.17.nix @@ -60,11 +60,11 @@ in stdenv.mkDerivation rec { pname = "go"; - version = "1.17.12"; + version = "1.17.13"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; - sha256 = "sha256-DVG1s/KAwPAfU0WYwCGdtYePM32mE3qe5ph3dBNgcgk="; + sha256 = "sha256-oaSLI6+yBvlee7qpuJjZZfkIJvbx0fwMHXhK2gzTAP0="; }; strictDeps = true; From 0d5c464ad611c9d7b8ba20717591ad435404ebcf Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 29 Jul 2022 00:46:48 +0200 Subject: [PATCH 42/44] buildGoModule: add vendorHash the _unset hack is kind of ugly, but it needs to default to something and it can't be null, because that already has special meaning --- doc/languages-frameworks/go.section.md | 6 +-- .../go-modules/generic/default.nix | 40 ++++++++++++++----- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/doc/languages-frameworks/go.section.md b/doc/languages-frameworks/go.section.md index 9c67a514335e..8616d64e7c4e 100644 --- a/doc/languages-frameworks/go.section.md +++ b/doc/languages-frameworks/go.section.md @@ -11,8 +11,8 @@ The function `buildGoModule` builds Go programs managed with Go modules. It buil In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function: -- `vendorSha256`: is the hash of the output of the intermediate fetcher derivation. `vendorSha256` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorSha256 = null;` -- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform dependant `vendorSha256` checksums. +- `vendorHash`: is the hash of the output of the intermediate fetcher derivation. `vendorHash` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorHash = null;` +- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform dependant `vendorHash` checksums. ```nix pet = buildGoModule rec { @@ -26,7 +26,7 @@ pet = buildGoModule rec { sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s"; }; - vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; + vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA="; meta = with lib; { description = "Simple command-line snippet manager, written in Go"; diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index b6af52d0efb8..0ca16f80b413 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -19,17 +19,20 @@ # path to go.mod and go.sum directory , modRoot ? "./" -# vendorSha256 is the sha256 of the vendored dependencies +# vendorHash is the SRI hash of the vendored dependencies # -# if vendorSha256 is null, then we won't fetch any dependencies and +# if vendorHash is null, then we won't fetch any dependencies and # rely on the vendor folder within the source. -, vendorSha256 +, vendorHash ? "_unset" +# same as vendorHash, but outputHashAlgo is hardcoded to sha256 +# so regular base32 sha256 hashes work +, vendorSha256 ? "_unset" # Whether to delete the vendor folder supplied with the source. , deleteVendor ? false # Whether to fetch (go mod download) and proxy the vendor directory. # This is useful if your code depends on c code and go mod tidy does not # include the needed sources to build or if any dependency has case-insensitive -# conflicts which will produce platform dependant `vendorSha256` checksums. +# conflicts which will produce platform dependant `vendorHash` checksums. , proxyVendor ? false # We want parallel builds by default @@ -55,11 +58,23 @@ with builtins; assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`"; +assert (vendorSha256 == "_unset" && vendorHash == "_unset") -> throw "either `vendorHash` or `vendorSha256` is required"; +assert (vendorSha256 != "_unset" && vendorHash != "_unset") -> throw "both `vendorHash` and `vendorSha256` set. only one can be set."; let - args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" ]; + hasAnyVendorHash = (vendorSha256 != null && vendorSha256 != "_unset") || (vendorHash != null && vendorHash != "_unset"); + vendorHashType = + if hasAnyVendorHash then + if vendorSha256 != null && vendorSha256 != "_unset" then + "sha256" + else + "sri" + else + null; - go-modules = if vendorSha256 != null then stdenv.mkDerivation (let modArgs = { + args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ]; + + go-modules = if hasAnyVendorHash then stdenv.mkDerivation (let modArgs = { name = "${name}-go-modules"; @@ -98,7 +113,7 @@ let fi '' + '' if [ -d vendor ]; then - echo "vendor folder exists, please set 'vendorSha256 = null;' in your expression" + echo "vendor folder exists, please set 'vendorHash = null;' or 'vendorSha256 = null;' in your expression" exit 10 fi @@ -134,9 +149,14 @@ let }; in modArgs // ( { outputHashMode = "recursive"; + } // (if (vendorHashType == "sha256") then { outputHashAlgo = "sha256"; outputHash = vendorSha256; - } + } else { + outputHash = vendorHash; + }) // (lib.optionalAttrs (vendorHashType == "sri" && vendorHash == "") { + outputHashAlgo = "sha256"; + }) ) // overrideModAttrs modArgs) else ""; package = stdenv.mkDerivation (args // { @@ -156,7 +176,7 @@ let export GOPROXY=off export GOSUMDB=off cd "$modRoot" - '' + lib.optionalString (vendorSha256 != null) '' + '' + lib.optionalString hasAnyVendorHash '' ${if proxyVendor then '' export GOPROXY=file://${go-modules} '' else '' @@ -274,7 +294,7 @@ let disallowedReferences = lib.optional (!allowGoReference) go; - passthru = passthru // { inherit go go-modules vendorSha256 ; }; + passthru = passthru // { inherit go go-modules vendorSha256 vendorHash; }; enableParallelBuilding = enableParallelBuilding; From c5550273e353a197f7cb961a1ddb82540b44dd89 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 29 Jul 2022 01:02:32 +0200 Subject: [PATCH 43/44] jellycli|noisetorch: convert two random packages to vendorHash --- pkgs/applications/audio/jellycli/default.nix | 2 +- pkgs/applications/audio/noisetorch/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/jellycli/default.nix b/pkgs/applications/audio/jellycli/default.nix index ec60998ec8ff..3654eacfbd6c 100644 --- a/pkgs/applications/audio/jellycli/default.nix +++ b/pkgs/applications/audio/jellycli/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1awzcxnf175a794rhzbmqxxjss77mfa1yrr0wgdxaivrlkibxjys"; }; - vendorSha256 = "02fwsnrhj09m0aa199plpqlsjrwpmrk4c80fszzm07s5vmjqvnfy"; + vendorHash = "sha256-3tmNZd1FH1D/1w4gRmaul2epKb70phSUAjUBCbPV3Ak="; patches = [ # Fixes log file path for tests. diff --git a/pkgs/applications/audio/noisetorch/default.nix b/pkgs/applications/audio/noisetorch/default.nix index 9fcd35a9de32..f422ad7fe136 100644 --- a/pkgs/applications/audio/noisetorch/default.nix +++ b/pkgs/applications/audio/noisetorch/default.nix @@ -12,7 +12,7 @@ buildGoModule rec { fetchSubmodules = true; }; - vendorSha256 = null; + vendorHash = null; doCheck = false; From 34a04025cf342d0336e626dd6c613ae40e560b29 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Wed, 27 Jul 2022 03:33:28 +0300 Subject: [PATCH 44/44] xow: remove Upstream project has been deprecated in favour of the 'xone' kernel mode driver. --- .../from_md/release-notes/rl-2211.section.xml | 8 ++++ .../manual/release-notes/rl-2211.section.md | 2 + nixos/modules/module-list.nix | 1 - nixos/modules/rename.nix | 4 ++ nixos/modules/services/hardware/xow.nix | 20 --------- pkgs/misc/drivers/xow/default.nix | 45 ------------------- pkgs/top-level/aliases.nix | 4 ++ pkgs/top-level/all-packages.nix | 2 - 8 files changed, 18 insertions(+), 68 deletions(-) delete mode 100644 nixos/modules/services/hardware/xow.nix delete mode 100644 pkgs/misc/drivers/xow/default.nix diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index be3adc4d3bed..e4154af4c9bd 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -257,6 +257,14 @@ maintainer to update the package. + + + xow package removed along with the + hardware.xow module, due to the project + being deprecated in favor of xone, which is + available via the hardware.xone module. + + The services.graphite.api and diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 3f9afe13f1d9..2bb52113512b 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -99,6 +99,8 @@ In addition to numerous new and upgraded packages, this release has the followin - riak package removed along with `services.riak` module, due to lack of maintainer to update the package. +- xow package removed along with the `hardware.xow` module, due to the project being deprecated in favor of `xone`, which is available via the `hardware.xone` module. + - The `services.graphite.api` and `services.graphite.beacon` NixOS options, and the `python3.pkgs.graphite_api`, `python3.pkgs.graphite_beacon` and `python3.pkgs.influxgraph` packages, have been removed due to lack of upstream diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 3010a213705b..86b880c3b0d1 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -474,7 +474,6 @@ ./services/hardware/thermald.nix ./services/hardware/undervolt.nix ./services/hardware/vdr.nix - ./services/hardware/xow.nix ./services/home-automation/home-assistant.nix ./services/home-automation/zigbee2mqtt.nix ./services/logging/SystemdJournal2Gelf.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 22fcb72e9ff4..f86aa2fa5c1b 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -30,6 +30,10 @@ with lib; udev rules from libu2f-host to the system. Udev gained native support to handle FIDO security tokens, so this isn't necessary anymore. '') + (mkRemovedOptionModule [ "hardware" "xow" ] '' + The xow package was removed from nixpkgs. Upstream has deprecated + the project and users are urged to switch to xone. + '') (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.") (mkRemovedOptionModule [ "networking" "wicd" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "programs" "tilp2" ] "The corresponding package was removed from nixpkgs.") diff --git a/nixos/modules/services/hardware/xow.nix b/nixos/modules/services/hardware/xow.nix deleted file mode 100644 index 311181176bd8..000000000000 --- a/nixos/modules/services/hardware/xow.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - cfg = config.services.hardware.xow; -in { - options.services.hardware.xow = { - enable = lib.mkEnableOption "xow as a systemd service"; - }; - - config = lib.mkIf cfg.enable { - hardware.uinput.enable = true; - - boot.extraModprobeConfig = lib.readFile "${pkgs.xow}/lib/modprobe.d/xow-blacklist.conf"; - - systemd.packages = [ pkgs.xow ]; - systemd.services.xow.wantedBy = [ "multi-user.target" ]; - - services.udev.packages = [ pkgs.xow ]; - }; -} diff --git a/pkgs/misc/drivers/xow/default.nix b/pkgs/misc/drivers/xow/default.nix deleted file mode 100644 index c084b45d151c..000000000000 --- a/pkgs/misc/drivers/xow/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ lib, stdenv, cabextract, fetchurl, fetchFromGitHub, libusb1 }: - -stdenv.mkDerivation rec { - pname = "xow"; - version = "unstable-2022-04-24"; - - src = fetchFromGitHub { - owner = "medusalix"; - repo = "xow"; - rev = "d335d6024f8380f52767a7de67727d9b2f867871"; - sha256 = "0q5nr21p4dlx2a99hiivwz6qj9anrqqsdhiz6xi375yqkxis4251"; - }; - - firmware = fetchurl { - url = "http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab"; - sha256 = "013g1zngxffavqrk5jy934q3bdhsv6z05ilfixdn8dj0zy26lwv5"; - }; - - makeFlags = [ - "BUILD=RELEASE" - "VERSION=${version}-${src.rev}" - "BINDIR=${placeholder "out"}/bin" - "UDEVDIR=${placeholder "out"}/lib/udev/rules.d" - "MODLDIR=${placeholder "out"}/lib/modules-load.d" - "MODPDIR=${placeholder "out"}/lib/modprobe.d" - "SYSDDIR=${placeholder "out"}/lib/systemd/system" - ]; - - postUnpack = '' - cabextract -F FW_ACC_00U.bin ${firmware} - mv FW_ACC_00U.bin source/firmware.bin - ''; - - enableParallelBuilding = true; - nativeBuildInputs = [ cabextract ]; - buildInputs = [ libusb1 ]; - - meta = with lib; { - homepage = "https://github.com/medusalix/xow"; - description = "Linux driver for the Xbox One wireless dongle"; - license = licenses.gpl2Plus; - maintainers = [ maintainers.jansol ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 90cd965a4b1d..a0f95d5c741d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1519,6 +1519,10 @@ mapAliases ({ ''; xf86_input_multitouch = throw "xf86_input_multitouch has been removed from nixpkgs"; # Added 2020-01-20 xlibs = throw "'xlibs' has been renamed to/replaced by 'xorg'"; # Converted to throw 2022-02-22 + xow = throw ( + "Upstream has ended support for 'xow' and the package has been removed" + + "from nixpkgs. Users are urged to switch to 'xone'." + ); # Added 2022-08-02 xpraGtk3 = throw "'xpraGtk3' has been renamed to/replaced by 'xpra'"; # Converted to throw 2022-02-22 xv = xxv; # Added 2020-02-22 xvfb_run = xvfb-run; # Added 2021-05-07 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f1865c8ea9e8..8d6d98996adb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35743,8 +35743,6 @@ with pkgs; xorex = callPackage ../tools/security/xorex { }; - xow = callPackage ../misc/drivers/xow { }; - xbps = callPackage ../tools/package-management/xbps { }; xcftools = callPackage ../tools/graphics/xcftools { };