vgmstream: fix build on darwin
This commit is contained in:
@@ -13,8 +13,14 @@
|
|||||||
libao,
|
libao,
|
||||||
speex,
|
speex,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
|
|
||||||
|
audaciousSupport ? stdenv.hostPlatform.isLinux,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert lib.assertMsg (
|
||||||
|
audaciousSupport -> stdenv.hostPlatform.isLinux
|
||||||
|
) "Only Linux supports building the Audacious plugin.";
|
||||||
|
|
||||||
let
|
let
|
||||||
# https://github.com/vgmstream/vgmstream/blob/1b6a7915bf98ca14a71a0d44bef7a2c6a75c686d/cmake/dependencies/atrac9.cmake
|
# https://github.com/vgmstream/vgmstream/blob/1b6a7915bf98ca14a71a0d44bef7a2c6a75c686d/cmake/dependencies/atrac9.cmake
|
||||||
atrac9-src = fetchFromGitHub {
|
atrac9-src = fetchFromGitHub {
|
||||||
@@ -54,10 +60,7 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [
|
outputs = [ "out" ] ++ lib.optional audaciousSupport "audacious";
|
||||||
"out"
|
|
||||||
"audacious"
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
@@ -71,8 +74,8 @@ stdenv.mkDerivation rec {
|
|||||||
libvorbis
|
libvorbis
|
||||||
libao
|
libao
|
||||||
speex
|
speex
|
||||||
audacious-bare
|
]
|
||||||
];
|
++ lib.optional audaciousSupport audacious-bare;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
substituteInPlace cmake/dependencies/audacious.cmake \
|
substituteInPlace cmake/dependencies/audacious.cmake \
|
||||||
@@ -89,6 +92,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DATRAC9_PATH=${atrac9-src}"
|
"-DATRAC9_PATH=${atrac9-src}"
|
||||||
|
(lib.cmakeBool "BUILD_AUDACIOUS" audaciousSupport)
|
||||||
]
|
]
|
||||||
# Only supported on x86_64-linux
|
# Only supported on x86_64-linux
|
||||||
++ lib.optionals (stdenv.system == "x86_64-linux") [
|
++ lib.optionals (stdenv.system == "x86_64-linux") [
|
||||||
|
|||||||
Reference in New Issue
Block a user