mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 11:34:13 +00:00
Merge pull request #51183 from matthewbauer/make-derivation-no-assertions
Fix breaking changes to make-derivation
This commit is contained in:
commit
e6834171b9
@ -19,7 +19,7 @@ buildPythonPackage rec {
|
|||||||
patches = [
|
patches = [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./setup.patch;
|
src = ./setup.patch;
|
||||||
version_ = "3${stdenv.lib.versions.minor python.version}";
|
version = "3${stdenv.lib.versions.minor python.version}";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
@@ -39,7 +39,7 @@
|
@@ -39,7 +39,7 @@
|
||||||
if '3' in l[2:]:
|
if '3' in l[2:]:
|
||||||
return l.replace('libboost', 'boost')
|
return l.replace('libboost', 'boost')
|
||||||
|
|
||||||
-libboost = get_libboost_name()
|
-libboost = get_libboost_name()
|
||||||
+libboost = 'boost_python@version_@'
|
+libboost = 'boost_python@version@'
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='py3exiv2',
|
name='py3exiv2',
|
||||||
|
@ -23,7 +23,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
hplipState = substituteAll {
|
hplipState = substituteAll {
|
||||||
version_ = version;
|
inherit version;
|
||||||
src = ./hplip.state;
|
src = ./hplip.state;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
hplipState = substituteAll {
|
hplipState = substituteAll {
|
||||||
version_ = version;
|
inherit version;
|
||||||
src = ./hplip.state;
|
src = ./hplip.state;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
installed=1
|
installed=1
|
||||||
eula=1
|
eula=1
|
||||||
version=@version_@
|
version=@version@
|
||||||
|
@ -81,13 +81,6 @@ rec {
|
|||||||
, ... } @ attrs:
|
, ... } @ attrs:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Check that the name is consistent with pname and version:
|
|
||||||
selfConsistent = (with attrs; attrs ? "name" ->
|
|
||||||
(lib.assertMsg (attrs ? "version" -> lib.strings.hasInfix version name)
|
|
||||||
"version ${version} does not appear in name ${name}" &&
|
|
||||||
lib.assertMsg (attrs ? "pname" -> lib.strings.hasInfix pname name)
|
|
||||||
"pname ${pname} does not appear in name ${name}"));
|
|
||||||
|
|
||||||
computedName = if name != "" then name else "${attrs.pname}-${attrs.version}";
|
computedName = if name != "" then name else "${attrs.pname}-${attrs.version}";
|
||||||
|
|
||||||
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
|
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
|
||||||
@ -95,14 +88,15 @@ rec {
|
|||||||
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
|
|
||||||
outputs' = outputs ++ lib.optional separateDebugInfo "debug";
|
separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux;
|
||||||
|
outputs' = outputs ++ lib.optional separateDebugInfo' "debug";
|
||||||
|
|
||||||
fixedOutputDrv = attrs ? outputHash;
|
fixedOutputDrv = attrs ? outputHash;
|
||||||
noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
|
noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
|
||||||
++ depsHostHost ++ depsHostHostPropagated
|
++ depsHostHost ++ depsHostHostPropagated
|
||||||
++ buildInputs ++ propagatedBuildInputs
|
++ buildInputs ++ propagatedBuildInputs
|
||||||
++ depsTargetTarget ++ depsTargetTargetPropagated) == 0;
|
++ depsTargetTarget ++ depsTargetTargetPropagated) == 0;
|
||||||
runtimeSensativeIfFixedOutput = fixedOutputDrv -> !noNonNativeDeps;
|
dontAddHostSuffix = attrs ? outputHash && !noNonNativeDeps || stdenv.cc == null;
|
||||||
supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ];
|
supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ];
|
||||||
defaultHardeningFlags = if stdenv.targetPlatform.isMusl
|
defaultHardeningFlags = if stdenv.targetPlatform.isMusl
|
||||||
then supportedHardeningFlags
|
then supportedHardeningFlags
|
||||||
@ -130,7 +124,7 @@ rec {
|
|||||||
[
|
[
|
||||||
(map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild)
|
(map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild)
|
||||||
(map (drv: drv.nativeDrv or drv) nativeBuildInputs
|
(map (drv: drv.nativeDrv or drv) nativeBuildInputs
|
||||||
++ lib.optional separateDebugInfo ../../build-support/setup-hooks/separate-debug-info.sh
|
++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh
|
||||||
++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh)
|
++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh)
|
||||||
(map (drv: drv.__spliced.buildTarget or drv) depsBuildTarget)
|
(map (drv: drv.__spliced.buildTarget or drv) depsBuildTarget)
|
||||||
]
|
]
|
||||||
@ -188,12 +182,12 @@ rec {
|
|||||||
// {
|
// {
|
||||||
# A hack to make `nix-env -qa` and `nix search` ignore broken packages.
|
# A hack to make `nix-env -qa` and `nix search` ignore broken packages.
|
||||||
# TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix.
|
# TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix.
|
||||||
name = assert selfConsistent && validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); computedName + lib.optionalString
|
name = assert validity.handled; computedName + lib.optionalString
|
||||||
# Fixed-output derivations like source tarballs shouldn't get a host
|
# Fixed-output derivations like source tarballs shouldn't get a host
|
||||||
# suffix. But we have some weird ones with run-time deps that are
|
# suffix. But we have some weird ones with run-time deps that are
|
||||||
# just used for their side-affects. Those might as well since the
|
# just used for their side-affects. Those might as well since the
|
||||||
# hash can't be the same. See #32986.
|
# hash can't be the same. See #32986.
|
||||||
(stdenv.hostPlatform != stdenv.buildPlatform && runtimeSensativeIfFixedOutput)
|
(stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)
|
||||||
("-" + stdenv.hostPlatform.config);
|
("-" + stdenv.hostPlatform.config);
|
||||||
|
|
||||||
builder = attrs.realBuilder or stdenv.shell;
|
builder = attrs.realBuilder or stdenv.shell;
|
||||||
|
Loading…
Reference in New Issue
Block a user