From edb66477bd66dd4717900d600b4cad9295eec68b Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 2 Jun 2025 14:27:54 +0200 Subject: [PATCH 1/2] openal-soft: 1.24.2 -> 1.24.3, modernize --- pkgs/by-name/op/openalSoft/package.nix | 42 +++++++++++++++----------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/op/openalSoft/package.nix b/pkgs/by-name/op/openalSoft/package.nix index c51300ebfb79..44fab06084ac 100644 --- a/pkgs/by-name/op/openalSoft/package.nix +++ b/pkgs/by-name/op/openalSoft/package.nix @@ -14,17 +14,18 @@ pulseSupport ? !stdenv.hostPlatform.isDarwin, libpulseaudio, nix-update-script, + testers, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "openal-soft"; - version = "1.24.2"; + version = "1.24.3"; src = fetchFromGitHub { owner = "kcat"; repo = "openal-soft"; - rev = version; - sha256 = "sha256-ECrIkxMACPsWehtJWwTmoYj6hGcsdxwVuTiQywG36Y8="; + tag = finalAttrs.version; + hash = "sha256-VQa3FD9NyvDv/+VbU+5lmV0LteiioJHpRkr1lnCn1g4="; }; strictDeps = true; @@ -45,28 +46,33 @@ stdenv.mkDerivation rec { [ # Automatically links dependencies without having to rely on dlopen, thus # removes the need for NIX_LDFLAGS. - "-DALSOFT_DLOPEN=OFF" - + (lib.cmakeBool "ALSOFT_DLOPEN" false) # allow oal-soft to find its own data files (e.g. HRTF profiles) - "-DALSOFT_SEARCH_INSTALL_DATADIR=1" + (lib.cmakeBool "ALSOFT_SEARCH_INSTALL_DATADIR" true) ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # https://github.com/NixOS/nixpkgs/issues/183774 - "-DALSOFT_BACKEND_OSS=OFF" + (lib.cmakeBool "ALSOFT_BACKEND_OSS" false) ]; - passthru.updateScript = nix-update-script { - extraArgs = [ - "--version-regex" - "^(\\d+\\.\\d+\\.\\d+)$" - ]; + passthru = { + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "^(\\d+\\.\\d+\\.\\d+)$" + ]; + }; }; - meta = with lib; { + meta = { description = "OpenAL alternative"; homepage = "https://openal-soft.org/"; - license = licenses.lgpl2; - maintainers = with maintainers; [ ftrvxmtrx ]; - platforms = platforms.unix; + changelog = "https://github.com/kcat/openal-soft/blob/master/ChangeLog"; + license = lib.licenses.lgpl2; + pkgConfigModules = [ "openal" ]; + maintainers = with lib.maintainers; [ ftrvxmtrx ]; + platforms = lib.platforms.unix; }; -} +}) From 3ab768c729979792e21bfb1fbd4f1134c75d51c4 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 2 Jun 2025 15:04:14 +0200 Subject: [PATCH 2/2] openal-soft: remove cross-compilation workaround The original issue does not re-occur without this option. --- pkgs/by-name/op/openalSoft/package.nix | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/op/openalSoft/package.nix b/pkgs/by-name/op/openalSoft/package.nix index 44fab06084ac..76430b24fede 100644 --- a/pkgs/by-name/op/openalSoft/package.nix +++ b/pkgs/by-name/op/openalSoft/package.nix @@ -42,18 +42,13 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional pipewireSupport pipewire ++ lib.optional pulseSupport libpulseaudio; - cmakeFlags = - [ - # Automatically links dependencies without having to rely on dlopen, thus - # removes the need for NIX_LDFLAGS. - (lib.cmakeBool "ALSOFT_DLOPEN" false) - # allow oal-soft to find its own data files (e.g. HRTF profiles) - (lib.cmakeBool "ALSOFT_SEARCH_INSTALL_DATADIR" true) - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - # https://github.com/NixOS/nixpkgs/issues/183774 - (lib.cmakeBool "ALSOFT_BACKEND_OSS" false) - ]; + cmakeFlags = [ + # Automatically links dependencies without having to rely on dlopen, thus + # removes the need for NIX_LDFLAGS. + (lib.cmakeBool "ALSOFT_DLOPEN" false) + # allow oal-soft to find its own data files (e.g. HRTF profiles) + (lib.cmakeBool "ALSOFT_SEARCH_INSTALL_DATADIR" true) + ]; passthru = { tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;