mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
79d349b087
used the following as references https://github.com/void-linux/void-packages/blob/master/srcpkgs/gobject-introspection and https://git.busybox.net/buildroot/tree/package/gobject-introspection thanks void and buildroot
30 lines
990 B
Nix
30 lines
990 B
Nix
{ lib
|
|
, stdenv
|
|
, buildPackages
|
|
, gobject-introspection-unwrapped
|
|
, targetPackages
|
|
}:
|
|
|
|
# to build, run
|
|
# `nix build ".#pkgsCross.aarch64-multiplatform.buildPackages.gobject-introspection"`
|
|
gobject-introspection-unwrapped.overrideAttrs (_previousAttrs: {
|
|
pname = "gobject-introspection-wrapped";
|
|
postFixup = ''
|
|
mv $dev/bin/g-ir-compiler $dev/bin/.g-ir-compiler-wrapped
|
|
mv $dev/bin/g-ir-scanner $dev/bin/.g-ir-scanner-wrapped
|
|
|
|
(
|
|
export bash="${buildPackages.bash}/bin/bash"
|
|
export emulator=${lib.escapeShellArg (stdenv.targetPlatform.emulator buildPackages)}
|
|
export buildprelink="${buildPackages.prelink}/bin/prelink-rtld"
|
|
|
|
export targetgir="${lib.getDev targetPackages.gobject-introspection-unwrapped}"
|
|
|
|
substituteAll "${./wrappers/g-ir-compiler.sh}" "$dev/bin/g-ir-compiler"
|
|
substituteAll "${./wrappers/g-ir-scanner.sh}" "$dev/bin/g-ir-scanner"
|
|
chmod +x "$dev/bin/g-ir-compiler"
|
|
chmod +x "$dev/bin/g-ir-scanner"
|
|
)
|
|
'';
|
|
})
|