diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-11-30 05:50:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 05:50:55 +0100 |
commit | 46ef79290bb5ba01c68b0e1dd31a9feb159d8681 (patch) | |
tree | a8932a73775df53d3ea76587d56c33071b894a96 /pkgs | |
parent | bd9c59e7dc2189c85958ac2900d61d459ce49e44 (diff) | |
parent | b6b0c8862ab9cfc717767a9a9606c399e4dc1d58 (diff) |
Merge pull request #271052 from NixOS/backport-270905-to-release-23.11
[Backport release-23.11] teeworlds: fix build on Darwin
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/games/teeworlds/default.nix | 18 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/pkgs/games/teeworlds/default.nix b/pkgs/games/teeworlds/default.nix index a915832fdbe90..eed9853ece9d8 100644 --- a/pkgs/games/teeworlds/default.nix +++ b/pkgs/games/teeworlds/default.nix @@ -1,7 +1,6 @@ { fetchFromGitHub, lib, stdenv, cmake, pkg-config, python3, alsa-lib , libX11, libGLU, SDL2, lua5_3, zlib, freetype, wavpack, icoutils , nixosTests -, Carbon , Cocoa , buildClient ? true }: @@ -34,6 +33,14 @@ stdenv.mkDerivation rec { substituteInPlace 'other/bundle/client/Info.plist.in' \ --replace ${"'"}''${TARGET_CLIENT}' 'teeworlds' \ --replace ${"'"}''${PROJECT_VERSION}' '${version}' + + # Make sure some bundled dependencies are actually unbundled. + # This will fail compilation if one of these dependencies could not + # be found, instead of falling back to the bundled version. + rm -rf 'src/engine/external/wavpack/' + rm -rf 'src/engine/external/zlib/' + # md5, pnglite and json-parser (https://github.com/udp/json-parser) + # don't seem to be packaged in Nixpkgs, so don't unbundle them. ''; nativeBuildInputs = [ @@ -45,17 +52,16 @@ stdenv.mkDerivation rec { buildInputs = [ python3 lua5_3 zlib + wavpack + ] ++ lib.optionals stdenv.isDarwin [ + Cocoa ] ++ lib.optionals buildClient ([ - libGLU SDL2 freetype - wavpack ] ++ lib.optionals stdenv.isLinux [ + libGLU alsa-lib libX11 - ] ++ lib.optionals stdenv.isDarwin [ - Carbon - Cocoa ]); cmakeFlags = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5cbde426b15e1..4531eca7722bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38474,7 +38474,7 @@ with pkgs; teetertorture = callPackage ../games/teetertorture { }; teeworlds = callPackage ../games/teeworlds { - inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; + inherit (darwin.apple_sdk.frameworks) Cocoa; }; teeworlds-server = teeworlds.override { buildClient = false; }; |