From 7c7d864de0485809f9c4233effe3489a4a22178f Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 26 Dec 2023 13:21:16 -0300 Subject: [PATCH 1/5] iir1: refactor - finalAttrs design pattern - meta.changelog --- pkgs/development/libraries/iir1/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/iir1/default.nix b/pkgs/development/libraries/iir1/default.nix index d277e14f567a..94d8a554f98d 100644 --- a/pkgs/development/libraries/iir1/default.nix +++ b/pkgs/development/libraries/iir1/default.nix @@ -4,25 +4,26 @@ , cmake }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "iir1"; version = "1.9.4"; src = fetchFromGitHub { owner = "berndporr"; repo = "iir1"; - rev = version; + rev = finalAttrs.version; hash = "sha256-T8gl51IkZIGq+6D5ge4Kb3wm5aw7Rhphmnf6TTGwHbs="; }; nativeBuildInputs = [ cmake ]; meta = { + homepage = "https://berndporr.github.io/iir1/"; description = "A DSP IIR realtime filter library written in C++"; downloadPage = "https://github.com/berndporr/iir1"; - homepage = "http://berndporr.github.io/iir1/"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.AndersonTorres ]; + changelog = "https://github.com/berndporr/iir1/releases/tag/${finalAttrs.src.rev}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; }; -} +}) From 83cc44ebd923c1f12915a9d3797b7515f6640b8c Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 26 Dec 2023 13:27:37 -0300 Subject: [PATCH 2/5] iir1: migrate to by-name --- .../libraries/iir1/default.nix => by-name/ii/iir1/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/libraries/iir1/default.nix => by-name/ii/iir1/package.nix} (100%) diff --git a/pkgs/development/libraries/iir1/default.nix b/pkgs/by-name/ii/iir1/package.nix similarity index 100% rename from pkgs/development/libraries/iir1/default.nix rename to pkgs/by-name/ii/iir1/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75130bb4d03c..3182c2b9a38d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22188,8 +22188,6 @@ with pkgs; ip2location-c = callPackage ../development/libraries/ip2location-c { }; - iir1 = callPackage ../development/libraries/iir1 { }; - irrlicht = if !stdenv.isDarwin then callPackage ../development/libraries/irrlicht { } else callPackage ../development/libraries/irrlicht/mac.nix { From 2804b0cfd69668854eae6cfbb80dab9b15368273 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 26 Dec 2023 13:52:22 -0300 Subject: [PATCH 3/5] dosbox-staging: split dependencies according to platform - Linux-only: - alsa-lib --- pkgs/by-name/do/dosbox-staging/package.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/do/dosbox-staging/package.nix b/pkgs/by-name/do/dosbox-staging/package.nix index fca2cf421044..8048bfad2ad8 100644 --- a/pkgs/by-name/do/dosbox-staging/package.nix +++ b/pkgs/by-name/do/dosbox-staging/package.nix @@ -69,7 +69,6 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ - alsa-lib fluidsynth glib iir1 @@ -87,6 +86,8 @@ stdenv.mkDerivation (finalAttrs: { SDL2_image SDL2_net speexdsp + ] ++ lib.optionals stdenv.isLinux [ + alsa-lib ]; desktopItems = [ From 54166a1e21aa6907e789e1b95c7f3941f737ccf9 Mon Sep 17 00:00:00 2001 From: Shiroki Satsuki Date: Wed, 27 Dec 2023 05:32:14 +0800 Subject: [PATCH 4/5] dosbox-staging: add Apple SDK framework dependencies --- pkgs/by-name/do/dosbox-staging/package.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/do/dosbox-staging/package.nix b/pkgs/by-name/do/dosbox-staging/package.nix index 8048bfad2ad8..ed2161e455e8 100644 --- a/pkgs/by-name/do/dosbox-staging/package.nix +++ b/pkgs/by-name/do/dosbox-staging/package.nix @@ -7,6 +7,7 @@ , SDL2_net , alsa-lib , copyDesktopItems +, darwin , fluidsynth , glib , gtest @@ -88,7 +89,11 @@ stdenv.mkDerivation (finalAttrs: { speexdsp ] ++ lib.optionals stdenv.isLinux [ alsa-lib - ]; + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + AudioUnit + Carbon + Cocoa + ]); desktopItems = [ (makeDesktopItem { From 4c57072292a8d7e2f9934fedf24687fbc209dc86 Mon Sep 17 00:00:00 2001 From: Shiroki Satsuki Date: Wed, 27 Dec 2023 05:33:29 +0800 Subject: [PATCH 5/5] dosbox-staging: patches to deal with pagesize detection --- pkgs/by-name/do/dosbox-staging/package.nix | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pkgs/by-name/do/dosbox-staging/package.nix b/pkgs/by-name/do/dosbox-staging/package.nix index ed2161e455e8..4fa16600d1d5 100644 --- a/pkgs/by-name/do/dosbox-staging/package.nix +++ b/pkgs/by-name/do/dosbox-staging/package.nix @@ -58,6 +58,39 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-WtTVSWWSlfXrdPVsnlDe4P5K/Fnj4QsOzx3Wo/Kusmg="; includes = [ "src/gui/meson.build" ]; }) + ] + # Pagesize detection via syscall; remove when next stable version arrives + ++ [ + (fetchpatch { + # Added as a parent commit of 7e20f6e + # Fix ppc64le backend and 64K page size support (#2828) + name = "meson-add-ppc64.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/765bcc2b1d87050a4ea366bf22e1db075ad5660b.patch"; + hash = "sha256-RtkidyF7w6RrPmCKK4Bd+3FtAn/+/38xk2cl32+yzxw="; + includes = [ "meson.build" ]; + }) + (fetchpatch { + # Added as a parent commit of 7e20f6e + # Account for debian powerpc prefix (instead of ppc) + name = "meson-powerpc64le.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/d44aa7441cd871ffac08974f22af7a735a839288.patch"; + hash = "sha256-oMZtfmB1CRlDWyXwEWc3XzC+XxKazXDgo+jUiNBoJDw="; + includes = [ "meson.build" ]; + }) + (fetchpatch { + # Added as a parent commit of 7e20f6e + # Restore the PowerPC dynrec core to working order + name = "meson-option-write-or-execute.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/ef86642de390839afc77b2b591a6ea9ac43909b3.patch"; + hash = "sha256-htOKEaXRRy28XNMX/t6uFTBLCkTr7YPtfmI9UyIBiz4="; + includes = [ "meson_options.txt" ]; + }) + (fetchpatch { + # Use a system call to detect the page size + name = "meson-detect-pagesize-by-syscall.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/7e20f6e401956a7a308f1b3462294d7ac9fa5db8.patch"; + hash = "sha256-QW9lpHWCYSlQFgTqX/UxHAAWisz4wfPrdjLqROn/wR0="; + }) ]; nativeBuildInputs = [