From 1c1b5f8bad4ead2f4b1b3ec657c8411c87c103ba Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 4 Jan 2025 10:30:40 +0000 Subject: [PATCH 1/2] wiiuse: 0.15.5 -> 0.15.6 Changes: https://github.com/wiiuse/wiiuse/releases/tag/0.15.6 --- pkgs/development/libraries/wiiuse/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/wiiuse/default.nix b/pkgs/development/libraries/wiiuse/default.nix index 2f4222de053e..1c9b78a2b9c7 100644 --- a/pkgs/development/libraries/wiiuse/default.nix +++ b/pkgs/development/libraries/wiiuse/default.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, bluez, libobjc, @@ -11,15 +12,25 @@ stdenv.mkDerivation rec { pname = "WiiUse"; - version = "0.15.5"; + version = "0.15.6"; src = fetchFromGitHub { owner = "wiiuse"; repo = "wiiuse"; rev = version; - sha256 = "05gc3s0wxx7ga4g32yyibyxdh46rm9bbslblrc72ynrjxq98sg13"; + sha256 = "sha256-l2CS//7rx5J3kI32yTSp0BDtP0T5+riLowtnxnfAotc="; }; + patches = [ + # Fix `.pc` files's double prefixes: + # https://github.com/wiiuse/wiiuse/pull/153 + (fetchpatch { + name = "pc-prefix.patch"; + url = "https://github.com/wiiuse/wiiuse/commit/9c774ec0b71fa5119eabed823c35e4c745f3277c.patch"; + hash = "sha256-WEHumCiNzsWfyMl7qu9xrlsNhgNcawdi+EFXf5w8jiE="; + }) + ]; + nativeBuildInputs = [ cmake ]; buildInputs = @@ -32,7 +43,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ bluez ]; - cmakeFlags = [ "-DBUILD_EXAMPLE_SDL=OFF" ]; + cmakeFlags = [ + "-DBUILD_EXAMPLE_SDL=OFF" + ] ++ [ (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) ]; meta = with lib; { description = "Feature complete cross-platform Wii Remote access library"; From 5236acf7913343c46eb27b3afc44a22074bd56de Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 4 Jan 2025 10:46:27 +0000 Subject: [PATCH 2/2] wiiuse: split out dev (and other) outputs to make library output slightly leaner --- pkgs/development/libraries/wiiuse/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/wiiuse/default.nix b/pkgs/development/libraries/wiiuse/default.nix index 1c9b78a2b9c7..606dd201f324 100644 --- a/pkgs/development/libraries/wiiuse/default.nix +++ b/pkgs/development/libraries/wiiuse/default.nix @@ -21,6 +21,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-l2CS//7rx5J3kI32yTSp0BDtP0T5+riLowtnxnfAotc="; }; + outputs = [ + "out" + "dev" + "doc" + "lib" + ]; + patches = [ # Fix `.pc` files's double prefixes: # https://github.com/wiiuse/wiiuse/pull/153