gobject-introspection: propagate self/targetself to avoid having to add gobject-introspection to buildInputs
i should probably move to use the wrapper when host != build and do the canExecute things inside the wrapper.nix then i could use gobject-introspection-unwrapped in it even when host == build void also adds gobject-introspection to makeDepends when its gir build helper is used
This commit is contained in:
parent
3d1f96e1b4
commit
8f40fcbb4c
2 changed files with 9 additions and 0 deletions
|
@ -138,6 +138,14 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
rm $out/lib/libregress-1.0${stdenv.targetPlatform.extensions.sharedLibrary}
|
||||
'';
|
||||
|
||||
# add self to buildInputs to avoid needing to add gobject-introspection to buildInputs in addition to nativeBuildInputs
|
||||
# builds use target-pkg-config to look for gobject-introspection instead of just looking for binaries in $PATH
|
||||
# wrapper uses depsTargetTargetPropagated so ignore it
|
||||
preFixup = lib.optionalString (!lib.hasSuffix "-wrapped" finalAttrs.pname) ''
|
||||
mkdir -p $dev/nix-support
|
||||
echo "$out" > $dev/nix-support/propagated-target-target-deps
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
passthru = {
|
||||
|
|
|
@ -18,6 +18,7 @@ in
|
|||
|
||||
(gobject-introspection-unwrapped.override args).overrideAttrs (previousAttrs: {
|
||||
pname = "gobject-introspection-wrapped";
|
||||
depsTargetTargetPropagated = [ gobject-introspection-unwrapped ];
|
||||
postFixup = (previousAttrs.postFixup or "") + ''
|
||||
mv $dev/bin/g-ir-compiler $dev/bin/.g-ir-compiler-wrapped
|
||||
mv $dev/bin/g-ir-scanner $dev/bin/.g-ir-scanner-wrapped
|
||||
|
|
Loading…
Reference in a new issue