Merge pull request #195610 from wegank/0ad-aarch64

This commit is contained in:
Martin Weinelt 2022-10-13 01:34:24 +02:00 committed by GitHub
commit bbbaaa3e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 12 deletions

View File

@ -2,22 +2,15 @@
stdenv.mkDerivation rec {
pname = "nvidia-texture-tools";
version = "unstable-2019-10-27";
version = "unstable-2020-12-21";
src = fetchFromGitHub {
owner = "castano";
repo = "nvidia-texture-tools";
rev = "a131e4c6b0b7c9c73ccc3c9e6f1c7e165be86bcc";
sha256 = "1qzyr3ib5dpxyq1y33lq02qv4cww075sm9bm4f651d34q5x38sk3";
rev = "aeddd65f81d36d8cb7b169b469ef25156666077e";
sha256 = "sha256-BYNm8CxPQbfmnnzNmOQ2Dc8HSyO8mkqzYsBZ5T80398=";
};
patches = [
(fetchpatch {
url = "https://github.com/castano/nvidia-texture-tools/commit/6474f2593428d89ec152da2502aa136ababe66ca.patch";
sha256 = "0akbkvm55hiv58jx71h9hj173rbnqlb5a430y9azjiix7zga42vd";
})
];
nativeBuildInputs = [ cmake ];
outputs = [ "out" "dev" "lib" ];
@ -26,6 +19,10 @@ stdenv.mkDerivation rec {
# Make a recently added pure virtual function just virtual,
# to keep compatibility.
sed -i 's/virtual void endImage() = 0;/virtual void endImage() {}/' src/nvtt/nvtt.h
'' + lib.optionalString stdenv.isAarch64 ''
# remove x86_64-only libraries
sed -i '/bc1enc/d' src/nvtt/tests/CMakeLists.txt
sed -i '/libsquish/d;/CMP_Core/d' extern/CMakeLists.txt
'';
cmakeFlags = [
@ -42,6 +39,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/castano/nvidia-texture-tools";
license = licenses.mit;
platforms = platforms.unix;
broken = stdenv.isAarch64;
maintainers = with maintainers; [ wegank ];
};
}

View File

@ -48,6 +48,11 @@ stdenv.mkDerivation rec {
"-I${libXcursor.dev}/include/X11"
"-I${SDL2}/include/SDL2"
"-I${fmt.dev}/include"
"-I${nvidia-texture-tools.dev}/include"
];
NIX_CFLAGS_LINK = toString [
"-L${nvidia-texture-tools.lib}/lib/static"
];
patches = [ ./rootdir_env.patch ];

View File

@ -34552,7 +34552,7 @@ with pkgs;
keen4 = callPackage ../games/keen4 { };
zeroadPackages = recurseIntoAttrs (callPackage ../games/0ad {
wxGTK = wxGTK31;
wxGTK = wxGTK32;
});
zeroad = zeroadPackages.zeroad;