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 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - substituteAll, 6 5 cmake, 7 6 python3Packages, 8 7 libsForQt5, ··· 12 11 libunarr, 13 12 }: 14 13 14 + let 15 + gladSrc = fetchFromGitHub { 16 + owner = "Dav1dde"; 17 + repo = "glad"; 18 + rev = "v2.0.5"; 19 + hash = "sha256-Ba7nbd0DxDHfNXXu9DLfnxTQTiJIQYSES9CP5Bfq4K0="; 20 + }; 21 + in 15 22 stdenv.mkDerivation (finalAttrs: { 16 23 pname = "nanoboyadvance"; 17 24 version = "1.8.1"; ··· 23 30 hash = "sha256-du3dPTg3OxNTWXDQo2m9W0rJxtrkn+lQSh/XGiu/eGg="; 24 31 }; 25 32 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 33 nativeBuildInputs = [ 39 34 cmake 40 35 python3Packages.jinja2 ··· 50 45 ]; 51 46 52 47 cmakeFlags = [ 48 + (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_GLAD" "${gladSrc}") 53 49 (lib.cmakeBool "USE_SYSTEM_FMT" true) 54 50 (lib.cmakeBool "USE_SYSTEM_TOML11" true) 55 51 (lib.cmakeBool "USE_SYSTEM_UNARR" true)