mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-16 06:47:09 +03:00
Merge pull request #180302 from Artturin/depmesonstring
This commit is contained in:
commit
958f924c0f
@ -27,7 +27,7 @@ stdenv.mkDerivation {
|
|||||||
nativeBuildInputs = [ pkg-config meson ninja ];
|
nativeBuildInputs = [ pkg-config meson ninja ];
|
||||||
buildInputs = [ lv2 rnnoise-nu ];
|
buildInputs = [ lv2 rnnoise-nu ];
|
||||||
|
|
||||||
mesonFlags = ("--prefix=${placeholder "out"}/lib/lv2");
|
mesonFlags = [ "--prefix=${placeholder "out"}/lib/lv2" ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace meson.build \
|
substituteInPlace meson.build \
|
||||||
|
@ -361,19 +361,19 @@ else let
|
|||||||
in
|
in
|
||||||
explicitFlags ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) crossFlags;
|
explicitFlags ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) crossFlags;
|
||||||
|
|
||||||
inherit patches;
|
mesonFlags =
|
||||||
|
let
|
||||||
|
explicitFlags =
|
||||||
|
if lib.isString mesonFlags then lib.warn
|
||||||
|
"String 'mesonFlags' is deprecated and will be removed in release 23.05. Please use a list of strings. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}"
|
||||||
|
[mesonFlags]
|
||||||
|
else if mesonFlags == null then
|
||||||
|
lib.warn
|
||||||
|
"Null 'mesonFlags' is deprecated and will be removed in release 23.05. Please use a empty list instead '[]'. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}"
|
||||||
|
[]
|
||||||
|
else
|
||||||
|
mesonFlags;
|
||||||
|
|
||||||
inherit doCheck doInstallCheck;
|
|
||||||
|
|
||||||
inherit outputs;
|
|
||||||
} // lib.optionalAttrs (__contentAddressed) {
|
|
||||||
inherit __contentAddressed;
|
|
||||||
# Provide default values for outputHashMode and outputHashAlgo because
|
|
||||||
# most people won't care about these anyways
|
|
||||||
outputHashAlgo = attrs.outputHashAlgo or "sha256";
|
|
||||||
outputHashMode = attrs.outputHashMode or "recursive";
|
|
||||||
} // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
|
|
||||||
mesonFlags = if mesonFlags == null then null else let
|
|
||||||
# See https://mesonbuild.com/Reference-tables.html#cpu-families
|
# See https://mesonbuild.com/Reference-tables.html#cpu-families
|
||||||
cpuFamily = platform: with platform;
|
cpuFamily = platform: with platform;
|
||||||
/**/ if isAarch32 then "arm"
|
/**/ if isAarch32 then "arm"
|
||||||
@ -381,6 +381,7 @@ else let
|
|||||||
else if isx86_32 then "x86"
|
else if isx86_32 then "x86"
|
||||||
else if isx86_64 then "x86_64"
|
else if isx86_64 then "x86_64"
|
||||||
else platform.parsed.cpu.family + builtins.toString platform.parsed.cpu.bits;
|
else platform.parsed.cpu.family + builtins.toString platform.parsed.cpu.bits;
|
||||||
|
|
||||||
crossFile = builtins.toFile "cross-file.conf" ''
|
crossFile = builtins.toFile "cross-file.conf" ''
|
||||||
[properties]
|
[properties]
|
||||||
needs_exe_wrapper = true
|
needs_exe_wrapper = true
|
||||||
@ -394,7 +395,20 @@ else let
|
|||||||
[binaries]
|
[binaries]
|
||||||
llvm-config = 'llvm-config-native'
|
llvm-config = 'llvm-config-native'
|
||||||
'';
|
'';
|
||||||
in [ "--cross-file=${crossFile}" ] ++ mesonFlags;
|
crossFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-file=${crossFile}" ];
|
||||||
|
in crossFlags ++ explicitFlags;
|
||||||
|
|
||||||
|
inherit patches;
|
||||||
|
|
||||||
|
inherit doCheck doInstallCheck;
|
||||||
|
|
||||||
|
inherit outputs;
|
||||||
|
} // lib.optionalAttrs (__contentAddressed) {
|
||||||
|
inherit __contentAddressed;
|
||||||
|
# Provide default values for outputHashMode and outputHashAlgo because
|
||||||
|
# most people won't care about these anyways
|
||||||
|
outputHashAlgo = attrs.outputHashAlgo or "sha256";
|
||||||
|
outputHashMode = attrs.outputHashMode or "recursive";
|
||||||
} // lib.optionalAttrs (enableParallelBuilding) {
|
} // lib.optionalAttrs (enableParallelBuilding) {
|
||||||
enableParallelChecking = attrs.enableParallelChecking or true;
|
enableParallelChecking = attrs.enableParallelChecking or true;
|
||||||
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) {
|
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) {
|
||||||
|
Loading…
Reference in New Issue
Block a user