From 76305f698e51999b77552935acc2fcd51369d535 Mon Sep 17 00:00:00 2001 From: Winter Date: Mon, 20 Feb 2023 22:29:21 -0500 Subject: [PATCH 1/2] libjack2: fix source url c733f0bf8ad39186b9d14d4fb4d0bc1394b93940 switched JACK to using overlay-style mkDerivation, but forgot to change a reference to `version` to `finalAttrs.version`. This wasn't caught at eval time because `with lib` was used, making the source derivation try to fetch (at the time of writing) tag "23.05pre-git", which obviously doesn't exist :D Thanks to V for catching this [0]. [0]: https://github.com/NixOS/nixpkgs/pull/216096#issuecomment-1437763295 --- pkgs/misc/jackaudio/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index fce51aabd263..dd7c05d1ad2c 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchFromGitHub { owner = "jackaudio"; repo = "jack2"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "01s8i64qczxqawgrzrw19asaqmcspf5l2h3203xzg56wnnhhzcw7"; }; From ee197b2f3311ba86514e61b2576d70c2ce96eca3 Mon Sep 17 00:00:00 2001 From: Winter Date: Mon, 20 Feb 2023 22:35:23 -0500 Subject: [PATCH 2/2] libjack2: don't use `with lib` at top-level It's bit us once already [0], let's get rid of it before it does it again. [0]: https://github.com/NixOS/nixpkgs/pull/216096#issuecomment-1437763295 --- pkgs/misc/jackaudio/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index dd7c05d1ad2c..536c654f0be7 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -14,7 +14,6 @@ , testers }: -with lib; let inherit (python3Packages) python dbus-python; shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null; @@ -41,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config python makeWrapper wafHook ]; buildInputs = [ libsamplerate libsndfile readline eigen celt optDbus optPythonDBus optLibffado optAlsaLib optLibopus - ] ++ optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ aften AudioUnit CoreAudio Accelerate libobjc ]; @@ -54,9 +53,9 @@ stdenv.mkDerivation (finalAttrs: { wafConfigureFlags = [ "--classic" "--autostart=${if (optDbus != null) then "dbus" else "classic"}" - ] ++ optional (optDbus != null) "--dbus" - ++ optional (optLibffado != null) "--firewire" - ++ optional (optAlsaLib != null) "--alsa"; + ] ++ lib.optional (optDbus != null) "--dbus" + ++ lib.optional (optLibffado != null) "--firewire" + ++ lib.optional (optAlsaLib != null) "--alsa"; postInstall = (if libOnly then '' rm -rf $out/{bin,share} @@ -67,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { + meta = with lib; { description = "JACK audio connection kit, version 2 with jackdbus"; homepage = "https://jackaudio.org"; license = licenses.gpl2Plus;