From f11d1d91cb734a51e1138c6a8f71a0158dd1fa59 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 5 Sep 2021 14:50:20 +0100 Subject: [PATCH 1/8] SDl2_mixer: fix MIDI playback by adding timidity paths Noticed on fheroes2 package: before the change fheroes2 was not able to play MIDI samples and complained as: PlayMusic: music parameter was NULL It happens because default search paths for 'timidity.cfg' did not include any of nixos's paths in 'timidity/options.h': getenv("TIMIDITY_CFG") "." #define DEFAULT_PATH "/etc/timidity" #define DEFAULT_PATH1 "/usr/share/timidity" #define DEFAULT_PATH2 "/usr/local/share/timidity" #define DEFAULT_PATH3 "/usr/local/lib/timidity" As a result even with globally installed timidity MIDI can't be played. abuse package also has the same problem and works it around by changing directory to local copy of 'timidity.cfg': # The timidity bundled into SDL_mixer looks in . and in several global places # like /etc for its configuration file. cd @out@/etc exec @out@/bin/.abuse-bin "$@" The change fixes SDL2_mixer by changing "/usr/share/timidity" path to nix's timidity store path. Tested on fheroes2 with MIDI files. --- pkgs/development/libraries/SDL2_mixer/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/libraries/SDL2_mixer/default.nix b/pkgs/development/libraries/SDL2_mixer/default.nix index 7e1d097ba5cb..2d1ef9853819 100644 --- a/pkgs/development/libraries/SDL2_mixer/default.nix +++ b/pkgs/development/libraries/SDL2_mixer/default.nix @@ -13,6 +13,7 @@ , mpg123 , opusfile , smpeg2 +, timidity }: stdenv.mkDerivation rec { @@ -42,8 +43,16 @@ stdenv.mkDerivation rec { mpg123 opusfile smpeg2 + # MIDI patterns + timidity ]; + # fix default path to timidity.cfg so MIDI files could be played + postPatch = '' + substituteInPlace timidity/options.h \ + --replace "/usr/share/timidity" "${timidity}/share/timidity" + ''; + configureFlags = [ "--disable-music-ogg-shared" "--disable-music-flac-shared" From ac38b7b21537034cac43228f4e1b61045789e116 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Wed, 13 Oct 2021 18:38:10 +0200 Subject: [PATCH 2/8] uboot: add Cubieboard2 build --- pkgs/misc/uboot/default.nix | 6 ++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 7 insertions(+) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index 71f3e13fc906..66f48b30e15d 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -166,6 +166,12 @@ in { filesToInstall = ["u-boot-spl.kwb"]; }; + ubootCubieboard2 = buildUBoot { + defconfig = "Cubieboard2_defconfig"; + extraMeta.platforms = ["armv7l-linux"]; + filesToInstall = ["u-boot-sunxi-with-spl.bin"]; + }; + ubootGuruplug = buildUBoot { defconfig = "guruplug_defconfig"; extraMeta.platforms = ["armv5tel-linux"]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d31c80ac4104..cb5497ee3e44 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22156,6 +22156,7 @@ with pkgs; ubootBananaPim64 ubootAmx335xEVM ubootClearfog + ubootCubieboard2 ubootGuruplug ubootJetsonTK1 ubootNanoPCT4 From 016b0a423aea9a789d1327dff3fd10b908bd1e91 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 19 Oct 2021 16:48:11 +0100 Subject: [PATCH 3/8] python3Packages.afdko: update tests for ufonormalizer-0.6.1 Upstream confirmed test failure is benign and needs to update test output by removing files. Let's unbreak staging-next my removing files. Closes: https://github.com/NixOS/nixpkgs/issues/141423 --- pkgs/development/python-modules/afdko/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/afdko/default.nix b/pkgs/development/python-modules/afdko/default.nix index 9a4dbbab3745..802da2c68562 100644 --- a/pkgs/development/python-modules/afdko/default.nix +++ b/pkgs/development/python-modules/afdko/default.nix @@ -58,7 +58,13 @@ buildPythonPackage rec { # https://github.com/adobe-type-tools/afdko/issues/1216 doCheck = stdenv.isx86_64; checkInputs = [ pytestCheckHook ]; - preCheck = "export PATH=$PATH:$out/bin"; + preCheck = '' + export PATH=$PATH:$out/bin + + # Update tests to match ufinormalizer-0.6.1 expectations: + # https://github.com/adobe-type-tools/afdko/issues/1418 + find tests -name layerinfo.plist -delete + ''; disabledTests = [ # Disable slow tests, reduces test time ~25 % "test_report" From 836e6d3e021b56c84de76ff32f751ca4ea994079 Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 19 Oct 2021 19:59:28 -0400 Subject: [PATCH 4/8] buildRustPackage: remove unused arguments, minor styling changes --- pkgs/build-support/rust/default.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 2eb45bcafa13..840abb2d918a 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -1,17 +1,15 @@ -{ stdenv -, lib -, buildPackages +{ lib +, importCargoLock +, fetchCargoTarball +, rust +, stdenv +, callPackage , cacert +, git , cargoBuildHook , cargoCheckHook , cargoInstallHook , cargoSetupHook -, fetchCargoTarball -, importCargoLock -, rustPlatform -, callPackage -, git -, rust , rustc , libiconv , windows @@ -88,7 +86,7 @@ let (lib.removeSuffix ".json" (builtins.baseNameOf "${target}")) else target; - sysroot = (callPackage ./sysroot {}) { + sysroot = callPackage ./sysroot { } { inherit target shortTarget; RUSTFLAGS = args.RUSTFLAGS or ""; originalCargoToml = src + /Cargo.toml; # profile info is later extracted From e09fb63ffc96b5f600c400366ffbb5db562da5c7 Mon Sep 17 00:00:00 2001 From: Hugo Lageneste Date: Mon, 8 Mar 2021 21:17:42 +0100 Subject: [PATCH 5/8] nixos/luksroot: sync the crypt-storage Add a sync command just after writing to the /crypt-storage file in order to reduce the possibilities of corruption errors. --- nixos/modules/system/boot/luksroot.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index fb5269e43d08..f0d3170dc5ac 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -332,6 +332,7 @@ let if [ $? == 0 ]; then echo -ne "$new_salt\n$new_iterations" > /crypt-storage${dev.yubikey.storage.path} + sync /crypt-storage${dev.yubikey.storage.path} else echo "Warning: Could not update LUKS key, current challenge persists!" fi From f441e6b7f4574c85eb190b52390bbe61f355b514 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 18 Oct 2021 19:21:43 -0400 Subject: [PATCH 6/8] buildRustPackage,fetchCargoTarball: accept empty hashes --- pkgs/build-support/rust/default.nix | 16 ++++++---------- pkgs/build-support/rust/fetchCargoTarball.nix | 6 ++---- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 840abb2d918a..3d7057dd7d97 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -17,12 +17,6 @@ { name ? "${args.pname}-${args.version}" - # SRI hash -, cargoHash ? "" - - # Legacy hash -, cargoSha256 ? "" - # Name for the vendored dependencies tarball , cargoDepsName ? name @@ -54,7 +48,7 @@ , buildAndTestSubdir ? null , ... } @ args: -assert cargoVendorDir == null && cargoLock == null -> cargoSha256 == "" && cargoHash == "" +assert cargoVendorDir == null && cargoLock == null -> !(args ? cargoSha256) && !(args ? cargoHash) -> throw "cargoSha256, cargoHash, cargoVendorDir, or cargoLock must be set"; assert buildType == "release" || buildType == "debug"; @@ -66,15 +60,17 @@ let else fetchCargoTarball ({ inherit src srcs sourceRoot unpackPhase cargoUpdateHook; name = cargoDepsName; - hash = cargoHash; patches = cargoPatches; - sha256 = cargoSha256; + } // lib.optionalAttrs (args ? cargoHash) { + hash = args.cargoHash; + } // lib.optionalAttrs (args ? cargoSha256) { + sha256 = args.cargoSha256; } // depsExtraArgs) else null; # If we have a cargoSha256 fixed-output derivation, validate it at build time # against the src fixed-output derivation to check consistency. - validateCargoDeps = !(cargoHash == "" && cargoSha256 == ""); + validateCargoDeps = args ? cargoHash || args ? cargoSha256; target = rust.toRustTargetSpec stdenv.hostPlatform; targetIsJSON = lib.hasSuffix ".json" target; diff --git a/pkgs/build-support/rust/fetchCargoTarball.nix b/pkgs/build-support/rust/fetchCargoTarball.nix index 2e8830b47574..c2be9aac82df 100644 --- a/pkgs/build-support/rust/fetchCargoTarball.nix +++ b/pkgs/build-support/rust/fetchCargoTarball.nix @@ -22,15 +22,13 @@ in , srcs ? [] , patches ? [] , sourceRoot ? "" -, hash ? "" -, sha256 ? "" , cargoUpdateHook ? "" , ... } @ args: let hash_ = - if hash != "" then { outputHashAlgo = null; outputHash = hash; } - else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; } + if args ? hash then { outputHashAlgo = null; outputHash = args.hash; } + else if args ? sha256 then { outputHashAlgo = "sha256"; outputHash = args.sha256; } else throw "fetchCargoTarball requires a hash for ${name}"; in stdenv.mkDerivation ({ name = "${name}-vendor.tar.gz"; From f69bf15afa80cc4f2fcb765d7a561c89f20888a2 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Tue, 19 Oct 2021 18:57:42 -0700 Subject: [PATCH 7/8] hqplayerd: 4.25.2-66 -> 4.26.0-67 --- pkgs/servers/hqplayerd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/hqplayerd/default.nix b/pkgs/servers/hqplayerd/default.nix index 92ce3294f1c3..d2b46097ac10 100644 --- a/pkgs/servers/hqplayerd/default.nix +++ b/pkgs/servers/hqplayerd/default.nix @@ -17,11 +17,11 @@ stdenv.mkDerivation rec { pname = "hqplayerd"; - version = "4.25.2-66"; + version = "4.26.0-67"; src = fetchurl { url = "https://www.signalyst.eu/bins/${pname}/fc34/${pname}-${version}.fc34.x86_64.rpm"; - sha256 = "sha256-BZGtv/Bumkltk6fJw3+RG1LZc3pGpd8e4DvgLxOTvcQ="; + sha256 = "sha256-Wbtt1yO/CE2cewOE5RynwEm+fCdOV1cxzR/XiCwj0NU="; }; unpackPhase = '' From 330e6a9b469db15e7551d7824d2e3929720f0a9b Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 19 Oct 2021 21:46:13 -0500 Subject: [PATCH 8/8] ncspot: 0.8.2 -> 0.9.0 https://github.com/hrkfdn/ncspot/releases/tag/v0.9.0 --- pkgs/applications/audio/ncspot/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/audio/ncspot/default.nix b/pkgs/applications/audio/ncspot/default.nix index 012315a7d723..d37cec15ffcb 100644 --- a/pkgs/applications/audio/ncspot/default.nix +++ b/pkgs/applications/audio/ncspot/default.nix @@ -14,16 +14,16 @@ let in rustPlatform.buildRustPackage rec { pname = "ncspot"; - version = "0.8.2"; + version = "0.9.0"; src = fetchFromGitHub { owner = "hrkfdn"; repo = "ncspot"; rev = "v${version}"; - sha256 = "1rs1jy7zzfgqzr64ld8whn0wlw8n7rk1svxx0xfxm3ynmgc7sd68"; + sha256 = "07qqs5q64zaxl3b2091vjihqb35fm0136cm4zibrgpx21akmbvr2"; }; - cargoSha256 = "10g7gdi1iz751wa60vr4fs0cvfsgs3pfcp8pnywicl0vsdp25fmc"; + cargoSha256 = "0sdbba32f56z2q7kha5fxw2f00hikbz9sf4zl4wfl2i9b13j7mj0"; cargoBuildFlags = [ "--no-default-features" "--features" "${lib.concatStringsSep "," features}" ];