Merge pull request #239233 from Artturin/finishremovals1
This commit is contained in:
commit
e360d8541a
@ -46,12 +46,6 @@ rec {
|
|||||||
//
|
//
|
||||||
(drv.passthru or {})
|
(drv.passthru or {})
|
||||||
//
|
//
|
||||||
# TODO(@Artturin): remove before release 23.05 and only have __spliced.
|
|
||||||
(lib.optionalAttrs (drv ? crossDrv && drv ? nativeDrv) {
|
|
||||||
crossDrv = overrideDerivation drv.crossDrv f;
|
|
||||||
nativeDrv = overrideDerivation drv.nativeDrv f;
|
|
||||||
})
|
|
||||||
//
|
|
||||||
lib.optionalAttrs (drv ? __spliced) {
|
lib.optionalAttrs (drv ? __spliced) {
|
||||||
__spliced = {} // (lib.mapAttrs (_: sDrv: overrideDerivation sDrv f) drv.__spliced);
|
__spliced = {} // (lib.mapAttrs (_: sDrv: overrideDerivation sDrv f) drv.__spliced);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -359,57 +359,31 @@ else let
|
|||||||
|
|
||||||
# This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
|
# This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
|
||||||
configureFlags = let inherit (lib) optional elem; in
|
configureFlags = let inherit (lib) optional elem; in
|
||||||
(/**/ if lib.isString configureFlags then lib.warn "String 'configureFlags' 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"}" [configureFlags]
|
configureFlags
|
||||||
else if configureFlags == null then lib.warn "Null 'configureFlags' 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 configureFlags)
|
|
||||||
++ optional (elem "build" configurePlatforms) "--build=${stdenv.buildPlatform.config}"
|
++ optional (elem "build" configurePlatforms) "--build=${stdenv.buildPlatform.config}"
|
||||||
++ optional (elem "host" configurePlatforms) "--host=${stdenv.hostPlatform.config}"
|
++ optional (elem "host" configurePlatforms) "--host=${stdenv.hostPlatform.config}"
|
||||||
++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}";
|
++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}";
|
||||||
|
|
||||||
cmakeFlags =
|
cmakeFlags =
|
||||||
let
|
cmakeFlags
|
||||||
explicitFlags =
|
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) ([
|
||||||
if lib.isString cmakeFlags then lib.warn
|
"-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" (lib.optional (!stdenv.hostPlatform.isRedox) stdenv.hostPlatform.uname.system)}"
|
||||||
"String 'cmakeFlags' 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"}"
|
] ++ lib.optionals (stdenv.hostPlatform.uname.processor != null) [
|
||||||
[cmakeFlags]
|
"-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}"
|
||||||
else if cmakeFlags == null then
|
] ++ lib.optionals (stdenv.hostPlatform.uname.release != null) [
|
||||||
lib.warn
|
"-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.uname.release}"
|
||||||
"Null 'cmakeFlags' 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"}"
|
] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||||
[]
|
"-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
|
||||||
else
|
] ++ lib.optionals (stdenv.buildPlatform.uname.system != null) [
|
||||||
cmakeFlags;
|
"-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}"
|
||||||
|
] ++ lib.optionals (stdenv.buildPlatform.uname.processor != null) [
|
||||||
crossFlags = [
|
"-DCMAKE_HOST_SYSTEM_PROCESSOR=${stdenv.buildPlatform.uname.processor}"
|
||||||
"-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" (lib.optional (!stdenv.hostPlatform.isRedox) stdenv.hostPlatform.uname.system)}"
|
] ++ lib.optionals (stdenv.buildPlatform.uname.release != null) [
|
||||||
] ++ lib.optionals (stdenv.hostPlatform.uname.processor != null) [
|
"-DCMAKE_HOST_SYSTEM_VERSION=${stdenv.buildPlatform.uname.release}"
|
||||||
"-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}"
|
]);
|
||||||
] ++ lib.optionals (stdenv.hostPlatform.uname.release != null) [
|
|
||||||
"-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.uname.release}"
|
|
||||||
] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
|
|
||||||
"-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
|
|
||||||
] ++ lib.optionals (stdenv.buildPlatform.uname.system != null) [
|
|
||||||
"-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}"
|
|
||||||
] ++ lib.optionals (stdenv.buildPlatform.uname.processor != null) [
|
|
||||||
"-DCMAKE_HOST_SYSTEM_PROCESSOR=${stdenv.buildPlatform.uname.processor}"
|
|
||||||
] ++ lib.optionals (stdenv.buildPlatform.uname.release != null) [
|
|
||||||
"-DCMAKE_HOST_SYSTEM_VERSION=${stdenv.buildPlatform.uname.release}"
|
|
||||||
];
|
|
||||||
in
|
|
||||||
explicitFlags ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) crossFlags;
|
|
||||||
|
|
||||||
mesonFlags =
|
mesonFlags =
|
||||||
let
|
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;
|
|
||||||
|
|
||||||
# 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"
|
||||||
@ -430,7 +404,7 @@ else let
|
|||||||
llvm-config = 'llvm-config-native'
|
llvm-config = 'llvm-config-native'
|
||||||
'';
|
'';
|
||||||
crossFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-file=${crossFile}" ];
|
crossFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-file=${crossFile}" ];
|
||||||
in crossFlags ++ explicitFlags;
|
in crossFlags ++ mesonFlags;
|
||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
|
|||||||
@ -45,9 +45,6 @@ let
|
|||||||
valueHostTarget = pkgsHostTarget.${name} or { };
|
valueHostTarget = pkgsHostTarget.${name} or { };
|
||||||
valueTargetTarget = pkgsTargetTarget.${name} or { };
|
valueTargetTarget = pkgsTargetTarget.${name} or { };
|
||||||
augmentedValue = defaultValue
|
augmentedValue = defaultValue
|
||||||
# TODO(@Artturin): remove before release 23.05 and only have __spliced.
|
|
||||||
// (lib.optionalAttrs (pkgsBuildHost ? ${name}) { nativeDrv = lib.warn "use ${name}.__spliced.buildHost instead of ${name}.nativeDrv" valueBuildHost; })
|
|
||||||
// (lib.optionalAttrs (pkgsHostTarget ? ${name}) { crossDrv = lib.warn "use ${name}.__spliced.hostTarget instead of ${name}.crossDrv" valueHostTarget; })
|
|
||||||
// {
|
// {
|
||||||
__spliced =
|
__spliced =
|
||||||
(lib.optionalAttrs (pkgsBuildBuild ? ${name}) { buildBuild = valueBuildBuild; })
|
(lib.optionalAttrs (pkgsBuildBuild ? ${name}) { buildBuild = valueBuildBuild; })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user