Skip to content

Commit

Permalink
nanoboyadvance: use cmake flag instead of patch for glad source
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaSajt committed Sep 21, 2024
1 parent 223f611 commit 963b72c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
14 changes: 0 additions & 14 deletions pkgs/by-name/na/nanoboyadvance/dont-fetch-glad.patch

This file was deleted.

22 changes: 9 additions & 13 deletions pkgs/by-name/na/nanoboyadvance/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
substituteAll,
cmake,
python3Packages,
libsForQt5,
Expand All @@ -12,6 +11,14 @@
libunarr,
}:

let
gladSrc = fetchFromGitHub {
owner = "Dav1dde";
repo = "glad";
rev = "v2.0.5";
hash = "sha256-Ba7nbd0DxDHfNXXu9DLfnxTQTiJIQYSES9CP5Bfq4K0=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "nanoboyadvance";
version = "1.8.1";
Expand All @@ -23,18 +30,6 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-du3dPTg3OxNTWXDQo2m9W0rJxtrkn+lQSh/XGiu/eGg=";
};

patches = [
(substituteAll {
src = ./dont-fetch-glad.patch;
gladSrc = fetchFromGitHub {
owner = "Dav1dde";
repo = "glad";
rev = "v2.0.5";
hash = "sha256-Ba7nbd0DxDHfNXXu9DLfnxTQTiJIQYSES9CP5Bfq4K0=";
};
})
];

nativeBuildInputs = [
cmake
python3Packages.jinja2
Expand All @@ -50,6 +45,7 @@ stdenv.mkDerivation (finalAttrs: {
];

cmakeFlags = [
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_GLAD" "${gladSrc}")
(lib.cmakeBool "USE_SYSTEM_FMT" true)
(lib.cmakeBool "USE_SYSTEM_TOML11" true)
(lib.cmakeBool "USE_SYSTEM_UNARR" true)
Expand Down

0 comments on commit 963b72c

Please sign in to comment.