lol

Merge pull request #189215 from Artturin/introfun1

authored by

Artturi and committed by
GitHub
ab783bb4 83215d4f

+13 -2
+12 -2
pkgs/development/libraries/gobject-introspection/default.nix
··· 64 64 }) 65 65 ]; 66 66 67 + strictDeps = true; 68 + 67 69 nativeBuildInputs = [ 68 70 meson 69 71 ninja ··· 76 78 # Build definition checks for the Python modules needed at runtime by importing them. 77 79 (buildPackages.python3.withPackages pythonModules) 78 80 finalAttrs.setupHook # move .gir files 79 - ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ gobject-introspection-unwrapped ]; 81 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ gobject-introspection-unwrapped ]; 80 82 81 83 buildInputs = [ 82 84 (python3.withPackages pythonModules) ··· 95 97 "--datadir=${placeholder "dev"}/share" 96 98 "-Dcairo=disabled" 97 99 "-Dgtk_doc=${lib.boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}" 98 - ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 100 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 99 101 "-Dgi_cross_ldd_wrapper=${substituteAll { 100 102 name = "g-ir-scanner-lddwrapper"; 101 103 isExecutable = true; ··· 134 136 135 137 postCheck = '' 136 138 rm $out/lib/libregress-1.0${stdenv.targetPlatform.extensions.sharedLibrary} 139 + ''; 140 + 141 + # add self to buildInputs to avoid needing to add gobject-introspection to buildInputs in addition to nativeBuildInputs 142 + # builds use target-pkg-config to look for gobject-introspection instead of just looking for binaries in $PATH 143 + # wrapper uses depsTargetTargetPropagated so ignore it 144 + preFixup = lib.optionalString (!lib.hasSuffix "-wrapped" finalAttrs.pname) '' 145 + mkdir -p $dev/nix-support 146 + echo "$out" > $dev/nix-support/propagated-target-target-deps 137 147 ''; 138 148 139 149 setupHook = ./setup-hook.sh;
+1
pkgs/development/libraries/gobject-introspection/wrapper.nix
··· 18 18 19 19 (gobject-introspection-unwrapped.override args).overrideAttrs (previousAttrs: { 20 20 pname = "gobject-introspection-wrapped"; 21 + depsTargetTargetPropagated = [ gobject-introspection-unwrapped ]; 21 22 postFixup = (previousAttrs.postFixup or "") + '' 22 23 mv $dev/bin/g-ir-compiler $dev/bin/.g-ir-compiler-wrapped 23 24 mv $dev/bin/g-ir-scanner $dev/bin/.g-ir-scanner-wrapped