nanoboyadvance: use cmake flag instead of patch for glad source (#343588)

authored by

Colin and committed by
GitHub
768c6ed0 d63375c7

+9 -27
-14
pkgs/by-name/na/nanoboyadvance/dont-fetch-glad.patch
··· 1 - diff --git a/src/platform/core/CMakeLists.txt b/src/platform/core/CMakeLists.txt 2 - index 2bc6d8c..3175c14 100644 3 - --- a/src/platform/core/CMakeLists.txt 4 - +++ b/src/platform/core/CMakeLists.txt 5 - @@ -18,8 +18,7 @@ find_package(OpenGL REQUIRED) 6 - 7 - include(FetchContent) 8 - FetchContent_Declare(glad 9 - - GIT_REPOSITORY https://github.com/Dav1dde/glad.git 10 - - GIT_TAG adc3d7a1d704e099581ca25bc5bbdf728c2db67b # v2.0.5-2-gadc3d7a 11 - + SOURCE_DIR @gladSrc@ 12 - SOURCE_SUBDIR cmake 13 - ) 14 - FetchContent_MakeAvailable(glad)
···
+9 -13
pkgs/by-name/na/nanoboyadvance/package.nix
··· 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 - substituteAll, 6 cmake, 7 python3Packages, 8 libsForQt5, ··· 12 libunarr, 13 }: 14 15 stdenv.mkDerivation (finalAttrs: { 16 pname = "nanoboyadvance"; 17 version = "1.8.1"; ··· 23 hash = "sha256-du3dPTg3OxNTWXDQo2m9W0rJxtrkn+lQSh/XGiu/eGg="; 24 }; 25 26 - patches = [ 27 - (substituteAll { 28 - src = ./dont-fetch-glad.patch; 29 - gladSrc = fetchFromGitHub { 30 - owner = "Dav1dde"; 31 - repo = "glad"; 32 - rev = "v2.0.5"; 33 - hash = "sha256-Ba7nbd0DxDHfNXXu9DLfnxTQTiJIQYSES9CP5Bfq4K0="; 34 - }; 35 - }) 36 - ]; 37 - 38 nativeBuildInputs = [ 39 cmake 40 python3Packages.jinja2 ··· 50 ]; 51 52 cmakeFlags = [ 53 (lib.cmakeBool "USE_SYSTEM_FMT" true) 54 (lib.cmakeBool "USE_SYSTEM_TOML11" true) 55 (lib.cmakeBool "USE_SYSTEM_UNARR" true)
··· 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 python3Packages, 7 libsForQt5, ··· 11 libunarr, 12 }: 13 14 + let 15 + gladSrc = fetchFromGitHub { 16 + owner = "Dav1dde"; 17 + repo = "glad"; 18 + rev = "v2.0.5"; 19 + hash = "sha256-Ba7nbd0DxDHfNXXu9DLfnxTQTiJIQYSES9CP5Bfq4K0="; 20 + }; 21 + in 22 stdenv.mkDerivation (finalAttrs: { 23 pname = "nanoboyadvance"; 24 version = "1.8.1"; ··· 30 hash = "sha256-du3dPTg3OxNTWXDQo2m9W0rJxtrkn+lQSh/XGiu/eGg="; 31 }; 32 33 nativeBuildInputs = [ 34 cmake 35 python3Packages.jinja2 ··· 45 ]; 46 47 cmakeFlags = [ 48 + (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_GLAD" "${gladSrc}") 49 (lib.cmakeBool "USE_SYSTEM_FMT" true) 50 (lib.cmakeBool "USE_SYSTEM_TOML11" true) 51 (lib.cmakeBool "USE_SYSTEM_UNARR" true)