mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-11 15:08:52 +03:00
vkquake: fix on darwin
This commit is contained in:
parent
e6c09b2d57
commit
5a3c85275f
@ -14,6 +14,7 @@
|
|||||||
gzip,
|
gzip,
|
||||||
libvorbis,
|
libvorbis,
|
||||||
libmad,
|
libmad,
|
||||||
|
vulkan-headers,
|
||||||
vulkan-loader,
|
vulkan-loader,
|
||||||
moltenvk,
|
moltenvk,
|
||||||
}:
|
}:
|
||||||
@ -46,12 +47,18 @@ stdenv.mkDerivation rec {
|
|||||||
libvorbis
|
libvorbis
|
||||||
opusfile
|
opusfile
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
] ++ lib.optional stdenv.isDarwin moltenvk;
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
moltenvk
|
||||||
|
vulkan-headers
|
||||||
|
];
|
||||||
|
|
||||||
buildFlags = [ "DO_USERDIRS=1" ];
|
buildFlags = [ "DO_USERDIRS=1" ];
|
||||||
|
|
||||||
env = lib.optionalAttrs stdenv.isDarwin {
|
env = lib.optionalAttrs stdenv.isDarwin {
|
||||||
NIX_CFLAGS_COMPILE = "-Wno-error=unused-but-set-variable";
|
NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [
|
||||||
|
"-Wno-error=unused-but-set-variable"
|
||||||
|
"-Wno-error=implicit-const-int-float-conversion"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@ -59,7 +66,7 @@ stdenv.mkDerivation rec {
|
|||||||
cp vkquake "$out/bin"
|
cp vkquake "$out/bin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = lib.optionalString (!stdenv.isDarwin) ''
|
||||||
patchelf $out/bin/vkquake \
|
patchelf $out/bin/vkquake \
|
||||||
--add-rpath ${lib.makeLibraryPath [ vulkan-loader ]}
|
--add-rpath ${lib.makeLibraryPath [ vulkan-loader ]}
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user