lol

Merge pull request #177538 from Artturin/fixcross3

authored by

Artturi and committed by
GitHub
4427b7df b2fe1ecd

+282 -147
+2 -2
doc/stdenv/cross-compilation.chapter.md
··· 155 156 #### Package using Meson needs to run binaries for the host platform during build. {#cross-meson-runs-host-code} 157 158 - Add `mesonEmulatorHook` cross conditionally to `nativeBuildInputs`. 159 160 e.g. 161 162 ``` 163 nativeBuildInputs = [ 164 meson 165 - ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 166 mesonEmulatorHook 167 ]; 168 ```
··· 155 156 #### Package using Meson needs to run binaries for the host platform during build. {#cross-meson-runs-host-code} 157 158 + Add `mesonEmulatorHook` to `nativeBuildInputs` conditionally on if the target binaries can be executed. 159 160 e.g. 161 162 ``` 163 nativeBuildInputs = [ 164 meson 165 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 166 mesonEmulatorHook 167 ]; 168 ```
+2 -4
pkgs/development/libraries/atk/default.nix
··· 39 fixDarwinDylibNames 40 ]; 41 42 propagatedBuildInputs = [ 43 # Required by atk.pc 44 glib 45 - ]; 46 - 47 - mesonFlags = [ 48 - "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" 49 ]; 50 51 doCheck = true;
··· 39 fixDarwinDylibNames 40 ]; 41 42 + buildInputs = [ gobject-introspection ]; 43 + 44 propagatedBuildInputs = [ 45 # Required by atk.pc 46 glib 47 ]; 48 49 doCheck = true;
+16 -17
pkgs/development/libraries/gdk-pixbuf/default.nix
··· 16 , libjpeg 17 , libpng 18 , gnome 19 , doCheck ? false 20 , makeWrapper 21 , lib 22 - , withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform) 23 - , gobject-introspection 24 }: 25 26 - let 27 - withGtkDoc = stdenv.buildPlatform == stdenv.hostPlatform; 28 - in 29 stdenv.mkDerivation rec { 30 pname = "gdk-pixbuf"; 31 version = "2.42.8"; 32 33 - outputs = [ "out" "dev" "man" ] 34 - ++ lib.optional withGtkDoc "devdoc" 35 ++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests"; 36 37 src = fetchurl { ··· 60 makeWrapper 61 glib 62 gi-docgen 63 64 # for man pages 65 libxslt ··· 67 docbook_xml_dtd_43 68 ] ++ lib.optionals stdenv.isDarwin [ 69 fixDarwinDylibNames 70 - ] ++ lib.optionals withIntrospection [ 71 - gobject-introspection 72 ]; 73 74 propagatedBuildInputs = [ 75 glib 76 libtiff ··· 79 ]; 80 81 mesonFlags = [ 82 - "-Dgtk_doc=${lib.boolToString withGtkDoc}" 83 - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" 84 "-Dgio_sniffing=false" 85 ]; 86 87 postPatch = '' ··· 89 patchShebangs build-aux 90 91 substituteInPlace tests/meson.build --subst-var-by installedtestsprefix "$installedTests" 92 - ''; 93 94 - preInstall = '' 95 - PATH=$PATH:$out/bin # for install script 96 ''; 97 98 postInstall = ··· 108 install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f 109 mv $f ''${f%.dylib}.so 110 done 111 - '' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' 112 # We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/ 113 - $dev/bin/gdk-pixbuf-query-loaders --update-cache 114 ''; 115 116 # The fixDarwinDylibNames hook doesn't patch binaries. ··· 120 done 121 ''; 122 123 - postFixup = lib.optionalString withGtkDoc '' 124 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. 125 moveToOutput "share/doc" "$devdoc" 126 '';
··· 16 , libjpeg 17 , libpng 18 , gnome 19 + , gobject-introspection 20 + , buildPackages 21 , doCheck ? false 22 , makeWrapper 23 , lib 24 }: 25 26 stdenv.mkDerivation rec { 27 pname = "gdk-pixbuf"; 28 version = "2.42.8"; 29 30 + outputs = [ "out" "dev" "man" "devdoc" ] 31 ++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests"; 32 33 src = fetchurl { ··· 56 makeWrapper 57 glib 58 gi-docgen 59 + gobject-introspection 60 61 # for man pages 62 libxslt ··· 64 docbook_xml_dtd_43 65 ] ++ lib.optionals stdenv.isDarwin [ 66 fixDarwinDylibNames 67 ]; 68 69 + buildInputs = [ gobject-introspection ]; 70 + 71 propagatedBuildInputs = [ 72 glib 73 libtiff ··· 76 ]; 77 78 mesonFlags = [ 79 "-Dgio_sniffing=false" 80 + "-Dgtk_doc=true" 81 ]; 82 83 postPatch = '' ··· 85 patchShebangs build-aux 86 87 substituteInPlace tests/meson.build --subst-var-by installedtestsprefix "$installedTests" 88 89 + # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) 90 + # it should be a build-time dep for build 91 + # TODO: send upstream 92 + substituteInPlace docs/meson.build \ 93 + --replace "dependency('gi-docgen'," "dependency('gi-docgen', native:true," \ 94 + --replace "'gi-docgen', req" "'gi-docgen', native:true, req" 95 ''; 96 97 postInstall = ··· 107 install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f 108 mv $f ''${f%.dylib}.so 109 done 110 + '' + '' 111 # We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/ 112 + ${stdenv.hostPlatform.emulator buildPackages} $dev/bin/gdk-pixbuf-query-loaders --update-cache 113 ''; 114 115 # The fixDarwinDylibNames hook doesn't patch binaries. ··· 119 done 120 ''; 121 122 + postFixup = '' 123 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. 124 moveToOutput "share/doc" "$devdoc" 125 '';
+4
pkgs/development/libraries/geoclue/default.nix
··· 4 , fetchpatch 5 , intltool 6 , meson 7 , ninja 8 , pkg-config 9 , gtk-doc ··· 74 gtk-doc 75 docbook-xsl-nons 76 docbook_xml_dtd_412 77 ]; 78 79 buildInputs = [ ··· 81 json-glib 82 libsoup 83 avahi 84 ] ++ lib.optionals withDemoAgent [ 85 libnotify gdk-pixbuf 86 ] ++ lib.optionals (!stdenv.isDarwin) [
··· 4 , fetchpatch 5 , intltool 6 , meson 7 + , mesonEmulatorHook 8 , ninja 9 , pkg-config 10 , gtk-doc ··· 75 gtk-doc 76 docbook-xsl-nons 77 docbook_xml_dtd_412 78 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 79 + mesonEmulatorHook 80 ]; 81 82 buildInputs = [ ··· 84 json-glib 85 libsoup 86 avahi 87 + gobject-introspection 88 ] ++ lib.optionals withDemoAgent [ 89 libnotify gdk-pixbuf 90 ] ++ lib.optionals (!stdenv.isDarwin) [
+19 -5
pkgs/development/libraries/gobject-introspection/default.nix
··· 27 # it may be worth thinking about using multiple derivation outputs 28 # In that case its about 6MB which could be separated 29 30 - stdenv.mkDerivation rec { 31 pname = "gobject-introspection"; 32 version = "1.72.0"; 33 ··· 37 outputBin = "dev"; 38 39 src = fetchurl { 40 - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 41 sha256 = "Av6OWQhh2I+DBg3TnNpcyqYLLaHSHQ+VSZMBsYa+qrw="; 42 }; 43 ··· 68 docbook-xsl-nons 69 docbook_xml_dtd_45 70 python3 71 - setupHook # move .gir files 72 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ gobject-introspection-unwrapped ]; 73 74 buildInputs = [ ··· 105 106 postInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 107 cp -r ${buildPackages.gobject-introspection-unwrapped.devdoc} $devdoc 108 ''; 109 110 preCheck = '' ··· 120 rm $out/lib/libregress-1.0${stdenv.targetPlatform.extensions.sharedLibrary} 121 ''; 122 123 setupHook = ./setup-hook.sh; 124 125 passthru = { 126 updateScript = gnome.updateScript { 127 - packageName = pname; 128 versionPolicy = "odd-unstable"; 129 }; 130 }; ··· 144 automatically provide bindings to call into the C library. 145 ''; 146 }; 147 - }
··· 27 # it may be worth thinking about using multiple derivation outputs 28 # In that case its about 6MB which could be separated 29 30 + stdenv.mkDerivation (finalAttrs: { 31 pname = "gobject-introspection"; 32 version = "1.72.0"; 33 ··· 37 outputBin = "dev"; 38 39 src = fetchurl { 40 + url = "mirror://gnome/sources/gobject-introspection/${lib.versions.majorMinor finalAttrs.version}/gobject-introspection-${finalAttrs.version}.tar.xz"; 41 sha256 = "Av6OWQhh2I+DBg3TnNpcyqYLLaHSHQ+VSZMBsYa+qrw="; 42 }; 43 ··· 68 docbook-xsl-nons 69 docbook_xml_dtd_45 70 python3 71 + finalAttrs.setupHook # move .gir files 72 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ gobject-introspection-unwrapped ]; 73 74 buildInputs = [ ··· 105 106 postInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 107 cp -r ${buildPackages.gobject-introspection-unwrapped.devdoc} $devdoc 108 + # these are uncompiled c and header files which aren't installed when cross-compiling because 109 + # code that installs them is in tests/meson.build which is only run when not cross-compiling 110 + # pygobject3 needs them 111 + cp -r ${buildPackages.gobject-introspection-unwrapped.dev}/share/gobject-introspection-1.0/tests $dev/share/gobject-introspection-1.0/tests 112 ''; 113 114 preCheck = '' ··· 124 rm $out/lib/libregress-1.0${stdenv.targetPlatform.extensions.sharedLibrary} 125 ''; 126 127 + # when cross-compiling and using the wrapper then when a package looks up the g_ir_X 128 + # variable with pkg-config they'll get the host version which can't be run 129 + # switch the variables to use g_ir_X from path instead of an absolute path 130 + postFixup = lib.optionalString (!lib.hasSuffix "wrapped" finalAttrs.pname) '' 131 + find "''${!outputDev}/lib/pkgconfig" -name '*.pc' | while read pc; do 132 + substituteInPlace "$pc" \ 133 + --replace '=''${bindir}/g-ir' '=g-ir' 134 + done 135 + ''; 136 + 137 setupHook = ./setup-hook.sh; 138 139 passthru = { 140 updateScript = gnome.updateScript { 141 + packageName = "gobject-introspection"; 142 versionPolicy = "odd-unstable"; 143 }; 144 }; ··· 158 automatically provide bindings to call into the C library. 159 ''; 160 }; 161 + })
+32
pkgs/development/libraries/gobject-introspection/giscanner-ignore-error-return-codes-from-ldd-wrapper.patch
···
··· 1 + From e0fc4a2a5161a36483ddc518be9bb14390f11b19 Mon Sep 17 00:00:00 2001 2 + From: Alexander Kanavin <alex.kanavin@gmail.com> 3 + Date: Wed, 5 Sep 2018 16:46:52 +0200 4 + Subject: [PATCH] giscanner: ignore error return codes from ldd-wrapper 5 + 6 + prelink-rtld, which we use instead of ldd returns 127 when it can't find a library. 7 + It is not an error per se, but it breaks subprocess.check_output(). 8 + 9 + Upstream-Status: Inappropriate [oe-core specific] 10 + Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 11 + Signed-off-by: Adam Duskett <aduskett@gmail.com> 12 + --- 13 + giscanner/shlibs.py | 2 +- 14 + 1 file changed, 1 insertion(+), 1 deletion(-) 15 + 16 + diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py 17 + index 9f8ab5df..7a1a72fe 100644 18 + --- a/giscanner/shlibs.py 19 + +++ b/giscanner/shlibs.py 20 + @@ -103,7 +103,7 @@ def _resolve_non_libtool(options, binary, libraries): 21 + args.extend(['otool', '-L', binary.args[0]]) 22 + else: 23 + args.extend(['ldd', binary.args[0]]) 24 + - output = subprocess.check_output(args) 25 + + output = subprocess.run(args, check=False, stdout=subprocess.PIPE).stdout 26 + if isinstance(output, bytes): 27 + output = output.decode("utf-8", "replace") 28 + 29 + -- 30 + 2.25.1 31 + 32 +
+1 -1
pkgs/development/libraries/gobject-introspection/setup-hook.sh
··· 10 fi 11 } 12 13 - addEnvHooks "$hostOffset" make_gobject_introspection_find_gir_files 14 15 giDiscoverSelf() { 16 if [ -d "$prefix/lib/girepository-1.0" ]; then
··· 10 fi 11 } 12 13 + addEnvHooks "$targetOffset" make_gobject_introspection_find_gir_files 14 15 giDiscoverSelf() { 16 if [ -d "$prefix/lib/girepository-1.0" ]; then
+5 -2
pkgs/development/libraries/gobject-introspection/wrapper.nix
··· 7 8 # to build, run 9 # `nix build ".#pkgsCross.aarch64-multiplatform.buildPackages.gobject-introspection"` 10 - gobject-introspection-unwrapped.overrideAttrs (_previousAttrs: { 11 pname = "gobject-introspection-wrapped"; 12 - postFixup = '' 13 mv $dev/bin/g-ir-compiler $dev/bin/.g-ir-compiler-wrapped 14 mv $dev/bin/g-ir-scanner $dev/bin/.g-ir-scanner-wrapped 15
··· 7 8 # to build, run 9 # `nix build ".#pkgsCross.aarch64-multiplatform.buildPackages.gobject-introspection"` 10 + gobject-introspection-unwrapped.overrideAttrs (previousAttrs: { 11 pname = "gobject-introspection-wrapped"; 12 + # failure in e.g. pkgsCross.aarch64-multiplatform.polkit 13 + # subprocess.CalledProcessError: Command '['/nix/store/...-prelink-unstable-2019-06-24/bin/prelink-rtld', '/build/source/build/tmp-introspectzp2ldkyk/PolkitAgent-1.0']' returned non-zero exit status 127. 14 + patches = previousAttrs.patches ++ [ ./giscanner-ignore-error-return-codes-from-ldd-wrapper.patch ]; 15 + postFixup = (previousAttrs.postFixup or "") + '' 16 mv $dev/bin/g-ir-compiler $dev/bin/.g-ir-compiler-wrapped 17 mv $dev/bin/g-ir-scanner $dev/bin/.g-ir-scanner-wrapped 18
+1 -5
pkgs/development/libraries/gstreamer/bad/default.nix
··· 121 ]; 122 123 buildInputs = [ 124 gst-plugins-base 125 orc 126 - # gobject-introspection has to be in both nativeBuildInputs and 127 - # buildInputs. The build tries to link against libgirepository-1.0.so 128 - gobject-introspection 129 json-glib 130 ldacbt 131 libass ··· 294 # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`, 295 # but its meson build system does not declare the dependency. 296 "-Dapplemedia=disabled" 297 - ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 298 - "-Dintrospection=disabled" 299 ] ++ (if enableGplPlugins then [ 300 "-Dgpl=enabled" 301 ] else [
··· 121 ]; 122 123 buildInputs = [ 124 + gobject-introspection 125 gst-plugins-base 126 orc 127 json-glib 128 ldacbt 129 libass ··· 292 # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`, 293 # but its meson build system does not declare the dependency. 294 "-Dapplemedia=disabled" 295 ] ++ (if enableGplPlugins then [ 296 "-Dgpl=enabled" 297 ] else [
+5 -6
pkgs/development/libraries/gstreamer/base/default.nix
··· 18 , libvisual 19 , tremor # provides 'virbisidec' 20 , libGL 21 , enableX11 ? stdenv.isLinux 22 , libXv 23 , libXext ··· 36 , enableCdparanoia ? (!stdenv.isDarwin) 37 , cdparanoia 38 , glib 39 - , withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform 40 - , gobject-introspection 41 }: 42 43 stdenv.mkDerivation rec { ··· 52 }; 53 54 strictDeps = true; 55 nativeBuildInputs = [ 56 meson 57 ninja ··· 63 gstreamer 64 # docs 65 # TODO add hotdoc here 66 - ] ++ lib.optionals withIntrospection [ 67 gobject-introspection 68 ] ++ lib.optional enableWayland wayland; 69 70 buildInputs = [ 71 orc 72 libtheora 73 libintl ··· 91 ] ++ lib.optionals enableWayland [ 92 wayland 93 wayland-protocols 94 - ] ++ lib.optionals withIntrospection [ 95 - gobject-introspection 96 ] ++ lib.optional enableCocoa Cocoa 97 ++ lib.optional enableCdparanoia cdparanoia; 98 ··· 106 "-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing 107 # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices 108 "-Dgl_winsys=${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}" 109 - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" 110 ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 111 "-Dtests=disabled" 112 ]
··· 18 , libvisual 19 , tremor # provides 'virbisidec' 20 , libGL 21 + , gobject-introspection 22 , enableX11 ? stdenv.isLinux 23 , libXv 24 , libXext ··· 37 , enableCdparanoia ? (!stdenv.isDarwin) 38 , cdparanoia 39 , glib 40 }: 41 42 stdenv.mkDerivation rec { ··· 51 }; 52 53 strictDeps = true; 54 + depsBuildBuild = [ 55 + pkg-config 56 + ]; 57 nativeBuildInputs = [ 58 meson 59 ninja ··· 65 gstreamer 66 # docs 67 # TODO add hotdoc here 68 gobject-introspection 69 ] ++ lib.optional enableWayland wayland; 70 71 buildInputs = [ 72 + gobject-introspection 73 orc 74 libtheora 75 libintl ··· 93 ] ++ lib.optionals enableWayland [ 94 wayland 95 wayland-protocols 96 ] ++ lib.optional enableCocoa Cocoa 97 ++ lib.optional enableCdparanoia cdparanoia; 98 ··· 106 "-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing 107 # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices 108 "-Dgl_winsys=${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}" 109 ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 110 "-Dtests=disabled" 111 ]
+6 -6
pkgs/development/libraries/gstreamer/core/default.nix
··· 16 , bash-completion 17 , lib 18 , CoreServices 19 - , withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform 20 , gobject-introspection 21 }: 22 ··· 38 sha256 = "0cghi6n4nhdbajz3wqcgbh5xm94myvnqgsi9g2bz9n1s9904l2fy"; 39 }; 40 41 strictDeps = true; 42 nativeBuildInputs = [ 43 meson ··· 50 makeWrapper 51 glib 52 bash-completion 53 54 # documentation 55 # TODO add hotdoc here 56 ] ++ lib.optionals stdenv.isLinux [ 57 libcap # for setcap binary 58 - ] ++ lib.optionals withIntrospection [ 59 - gobject-introspection 60 ]; 61 62 buildInputs = [ 63 bash-completion 64 ] ++ lib.optionals stdenv.isLinux [ 65 libcap 66 libunwind 67 elfutils 68 - ] ++ lib.optionals withIntrospection [ 69 - gobject-introspection 70 ] ++ lib.optionals stdenv.isDarwin [ 71 CoreServices 72 ]; ··· 79 "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those 80 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users 81 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing 82 - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" 83 ] ++ lib.optionals stdenv.isDarwin [ 84 # darwin.libunwind doesn't have pkg-config definitions so meson doesn't detect it. 85 "-Dlibunwind=disabled"
··· 16 , bash-completion 17 , lib 18 , CoreServices 19 , gobject-introspection 20 }: 21 ··· 37 sha256 = "0cghi6n4nhdbajz3wqcgbh5xm94myvnqgsi9g2bz9n1s9904l2fy"; 38 }; 39 40 + depsBuildBuild = [ 41 + pkg-config 42 + ]; 43 + 44 strictDeps = true; 45 nativeBuildInputs = [ 46 meson ··· 53 makeWrapper 54 glib 55 bash-completion 56 + gobject-introspection 57 58 # documentation 59 # TODO add hotdoc here 60 ] ++ lib.optionals stdenv.isLinux [ 61 libcap # for setcap binary 62 ]; 63 64 buildInputs = [ 65 bash-completion 66 + gobject-introspection 67 ] ++ lib.optionals stdenv.isLinux [ 68 libcap 69 libunwind 70 elfutils 71 ] ++ lib.optionals stdenv.isDarwin [ 72 CoreServices 73 ]; ··· 80 "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those 81 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users 82 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing 83 ] ++ lib.optionals stdenv.isDarwin [ 84 # darwin.libunwind doesn't have pkg-config definitions so meson doesn't detect it. 85 "-Dlibunwind=disabled"
+5 -2
pkgs/development/libraries/gstreamer/devtools/default.nix
··· 26 # "devdoc" # disabled until `hotdoc` is packaged in nixpkgs 27 ]; 28 29 nativeBuildInputs = [ 30 meson 31 ninja ··· 40 cairo 41 python3 42 json-glib 43 ]; 44 45 propagatedBuildInputs = [ ··· 49 50 mesonFlags = [ 51 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing 52 - ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 53 - "-Dintrospection=disabled" 54 ]; 55 56 meta = with lib; {
··· 26 # "devdoc" # disabled until `hotdoc` is packaged in nixpkgs 27 ]; 28 29 + depsBuildBuild = [ 30 + pkg-config 31 + ]; 32 + 33 nativeBuildInputs = [ 34 meson 35 ninja ··· 44 cairo 45 python3 46 json-glib 47 + gobject-introspection 48 ]; 49 50 propagatedBuildInputs = [ ··· 54 55 mesonFlags = [ 56 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing 57 ]; 58 59 meta = with lib; {
+1 -2
pkgs/development/libraries/gstreamer/ges/default.nix
··· 46 buildInputs = [ 47 bash-completion 48 libxml2 49 ]; 50 51 propagatedBuildInputs = [ ··· 55 56 mesonFlags = [ 57 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing 58 - ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 59 - "-Dintrospection=disabled" 60 ]; 61 62 postPatch = ''
··· 46 buildInputs = [ 47 bash-completion 48 libxml2 49 + gobject-introspection 50 ]; 51 52 propagatedBuildInputs = [ ··· 56 57 mesonFlags = [ 58 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing 59 ]; 60 61 postPatch = ''
+1 -2
pkgs/development/libraries/gstreamer/rtsp-server/default.nix
··· 41 buildInputs = [ 42 gst-plugins-base 43 gst-plugins-bad 44 ]; 45 46 mesonFlags = [ 47 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users 48 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing 49 - ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 50 - "-Dintrospection=disabled" 51 ]; 52 53 postPatch = ''
··· 41 buildInputs = [ 42 gst-plugins-base 43 gst-plugins-bad 44 + gobject-introspection 45 ]; 46 47 mesonFlags = [ 48 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users 49 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing 50 ]; 51 52 postPatch = ''
+1 -1
pkgs/development/libraries/gtk/3.x.nix
··· 110 ]; 111 112 buildInputs = [ 113 libxkbcommon 114 (libepoxy.override { inherit x11Support; }) 115 isocodes ··· 158 "-Dbroadway_backend=${lib.boolToString broadwaySupport}" 159 "-Dx11_backend=${lib.boolToString x11Support}" 160 "-Dquartz_backend=${lib.boolToString (stdenv.isDarwin && !x11Support)}" 161 - "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" 162 ]; 163 164 doCheck = false; # needs X11
··· 110 ]; 111 112 buildInputs = [ 113 + gobject-introspection 114 libxkbcommon 115 (libepoxy.override { inherit x11Support; }) 116 isocodes ··· 159 "-Dbroadway_backend=${lib.boolToString broadwaySupport}" 160 "-Dx11_backend=${lib.boolToString x11Support}" 161 "-Dquartz_backend=${lib.boolToString (stdenv.isDarwin && !x11Support)}" 162 ]; 163 164 doCheck = false; # needs X11
+6 -5
pkgs/development/libraries/harfbuzz/default.nix
··· 34 inherit (lib) optional optionals optionalString; 35 mesonFeatureFlag = opt: b: 36 "-D${opt}=${if b then "enabled" else "disabled"}"; 37 - isNativeCompilation = stdenv.buildPlatform == stdenv.hostPlatform; 38 in 39 40 stdenv.mkDerivation { ··· 70 (mesonFeatureFlag "coretext" withCoreText) 71 (mesonFeatureFlag "graphite" withGraphite2) 72 (mesonFeatureFlag "icu" withIcu) 73 - (mesonFeatureFlag "introspection" isNativeCompilation) 74 ]; 75 76 nativeBuildInputs = [ ··· 85 docbook_xml_dtd_43 86 ]; 87 88 - buildInputs = [ glib freetype ] 89 - ++ lib.optionals withCoreText [ ApplicationServices CoreText ] 90 - ++ lib.optionals isNativeCompilation [ gobject-introspection ]; 91 92 propagatedBuildInputs = optional withGraphite2 graphite2 93 ++ optionals withIcu [ icu harfbuzz ];
··· 34 inherit (lib) optional optionals optionalString; 35 mesonFeatureFlag = opt: b: 36 "-D${opt}=${if b then "enabled" else "disabled"}"; 37 in 38 39 stdenv.mkDerivation { ··· 69 (mesonFeatureFlag "coretext" withCoreText) 70 (mesonFeatureFlag "graphite" withGraphite2) 71 (mesonFeatureFlag "icu" withIcu) 72 + ]; 73 + 74 + depsBuildBuild = [ 75 + pkg-config 76 ]; 77 78 nativeBuildInputs = [ ··· 87 docbook_xml_dtd_43 88 ]; 89 90 + buildInputs = [ glib freetype gobject-introspection ] 91 + ++ lib.optionals withCoreText [ ApplicationServices CoreText ]; 92 93 propagatedBuildInputs = optional withGraphite2 graphite2 94 ++ optionals withIcu [ icu harfbuzz ];
+17 -12
pkgs/development/libraries/json-glib/default.nix
··· 6 , ninja 7 , pkg-config 8 , gettext 9 - , withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform 10 , gobject-introspection 11 - , fixDarwinDylibNames 12 , gi-docgen 13 , gnome 14 }: 15 ··· 17 pname = "json-glib"; 18 version = "1.6.6"; 19 20 - outputs = [ "out" "dev" ] 21 - ++ lib.optional withIntrospection "devdoc"; 22 23 src = fetchurl { 24 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; ··· 37 pkg-config 38 gettext 39 glib 40 ] ++ lib.optional stdenv.hostPlatform.isDarwin [ 41 fixDarwinDylibNames 42 - ] ++ lib.optionals withIntrospection [ 43 - gobject-introspection 44 - gi-docgen 45 ]; 46 47 propagatedBuildInputs = [ 48 glib 49 ]; 50 51 - mesonFlags = lib.optionals (!withIntrospection) [ 52 - "-Dintrospection=disabled" 53 - # gi-docgen relies on introspection data 54 - "-Dgtk_doc=disabled" 55 - ]; 56 57 doCheck = true; 58
··· 6 , ninja 7 , pkg-config 8 , gettext 9 , gobject-introspection 10 , gi-docgen 11 + , libxslt 12 + , fixDarwinDylibNames 13 , gnome 14 }: 15 ··· 17 pname = "json-glib"; 18 version = "1.6.6"; 19 20 + outputs = [ "out" "dev" "devdoc" ]; 21 22 src = fetchurl { 23 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; ··· 36 pkg-config 37 gettext 38 glib 39 + libxslt 40 + gobject-introspection 41 + gi-docgen 42 ] ++ lib.optional stdenv.hostPlatform.isDarwin [ 43 fixDarwinDylibNames 44 ]; 45 + 46 + buildInputs = [ gobject-introspection ]; 47 48 propagatedBuildInputs = [ 49 glib 50 ]; 51 52 + 53 + # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) 54 + # it should be a build-time dep for build 55 + # TODO: send upstream 56 + postPatch = '' 57 + substituteInPlace doc/meson.build \ 58 + --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver" \ 59 + --replace "'gi-docgen', req" "'gi-docgen', native:true, req" 60 + ''; 61 62 doCheck = true; 63
+21 -5
pkgs/development/libraries/libgudev/default.nix
··· 7 , glib 8 , gnome 9 , vala 10 - , withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform) 11 , gobject-introspection 12 }: 13 14 stdenv.mkDerivation rec { ··· 22 sha256 = "1al6nr492nzbm8ql02xhzwci2kwb1advnkaky3j9636jf08v41hd"; 23 }; 24 25 strictDeps = true; 26 27 depsBuildBuild = [ pkg-config ]; ··· 32 ninja 33 vala 34 glib # for glib-mkenums needed during the build 35 - ] ++ lib.optionals withIntrospection [ 36 gobject-introspection 37 ]; 38 39 buildInputs = [ 40 udev 41 glib 42 ]; ··· 44 mesonFlags = [ 45 # There's a dependency cycle with umockdev and the tests fail to LD_PRELOAD anyway 46 "-Dtests=disabled" 47 - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" 48 - ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 49 - "-Dvapi=disabled" 50 ]; 51 52 passthru = {
··· 7 , glib 8 , gnome 9 , vala 10 , gobject-introspection 11 + , fetchpatch 12 }: 13 14 stdenv.mkDerivation rec { ··· 22 sha256 = "1al6nr492nzbm8ql02xhzwci2kwb1advnkaky3j9636jf08v41hd"; 23 }; 24 25 + patches = [ 26 + # https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/27 27 + (fetchpatch { 28 + name = "gir-dep"; 29 + url = "https://gitlab.gnome.org/GNOME/libgudev/-/commit/6bdde16a0cfde462502fce1d9a7eb6ec33f388bb.diff"; 30 + sha256 = "sha256-bDtLUxOLEgyJURshqEQC4YCBTUVzQQP4qoWL786b3Z8="; 31 + }) 32 + (fetchpatch { 33 + name = "vapi-dep"; 34 + url = "https://gitlab.gnome.org/GNOME/libgudev/-/commit/d1f6457910842ba869c9871e7a2131fbe0d6b6be.diff"; 35 + sha256 = "sha256-/PY8ziZST/vQvksJm69a3O6/YesknIxCDvj0z40piik="; 36 + }) 37 + (fetchpatch { 38 + name = "gtk-doc-dep"; 39 + url = "https://gitlab.gnome.org/GNOME/libgudev/-/commit/34336cbadbcaac8b9b029f730eed0bdf4c633617.diff"; 40 + sha256 = "sha256-Bk05xe69LGqWH1uhLMZhwbVMSsCTyBrrOvqWic2TTd4="; 41 + }) 42 + ]; 43 + 44 strictDeps = true; 45 46 depsBuildBuild = [ pkg-config ]; ··· 51 ninja 52 vala 53 glib # for glib-mkenums needed during the build 54 gobject-introspection 55 ]; 56 57 buildInputs = [ 58 + gobject-introspection 59 udev 60 glib 61 ]; ··· 63 mesonFlags = [ 64 # There's a dependency cycle with umockdev and the tests fail to LD_PRELOAD anyway 65 "-Dtests=disabled" 66 ]; 67 68 passthru = {
+3 -8
pkgs/development/libraries/libical/default.nix
··· 13 , python3 14 , tzdata 15 , fixDarwinDylibNames 16 - , withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform 17 , gobject-introspection 18 , vala 19 }: ··· 37 ninja 38 perl 39 pkg-config 40 # Docs building fails: 41 # https://github.com/NixOS/nixpkgs/pull/67204 42 # previously with https://github.com/NixOS/nixpkgs/pull/61657#issuecomment-495579489 ··· 44 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 45 # provides ical-glib-src-generator that runs during build 46 libical 47 - ] ++ lib.optionals withIntrospection [ 48 - gobject-introspection 49 - vala 50 ] ++ lib.optionals stdenv.isDarwin [ 51 fixDarwinDylibNames 52 ]; 53 installCheckInputs = [ 54 # running libical-glib tests 55 - (python3.withPackages (pkgs: with pkgs; [ 56 pygobject3 57 ])) 58 ]; ··· 61 glib 62 libxml2 63 icu 64 - ] ++ lib.optionals withIntrospection [ 65 gobject-introspection 66 ]; 67 68 cmakeFlags = [ 69 "-DENABLE_GTK_DOC=False" 70 - "-DGOBJECT_INTROSPECTION=${if withIntrospection then "True" else "False"}" 71 - "-DICAL_GLIB_VAPI=${if withIntrospection then "True" else "False"}" 72 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 73 "-DIMPORT_ICAL_GLIB_SRC_GENERATOR=${lib.getDev buildPackages.libical}/lib/cmake/LibIcal/IcalGlibSrcGenerator.cmake" 74 ];
··· 13 , python3 14 , tzdata 15 , fixDarwinDylibNames 16 , gobject-introspection 17 , vala 18 }: ··· 36 ninja 37 perl 38 pkg-config 39 + gobject-introspection 40 + vala 41 # Docs building fails: 42 # https://github.com/NixOS/nixpkgs/pull/67204 43 # previously with https://github.com/NixOS/nixpkgs/pull/61657#issuecomment-495579489 ··· 45 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 46 # provides ical-glib-src-generator that runs during build 47 libical 48 ] ++ lib.optionals stdenv.isDarwin [ 49 fixDarwinDylibNames 50 ]; 51 installCheckInputs = [ 52 # running libical-glib tests 53 + (python3.pythonForBuild.withPackages (pkgs: with pkgs; [ 54 pygobject3 55 ])) 56 ]; ··· 59 glib 60 libxml2 61 icu 62 gobject-introspection 63 ]; 64 65 cmakeFlags = [ 66 "-DENABLE_GTK_DOC=False" 67 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 68 "-DIMPORT_ICAL_GLIB_SRC_GENERATOR=${lib.getDev buildPackages.libical}/lib/cmake/LibIcal/IcalGlibSrcGenerator.cmake" 69 ];
+4
pkgs/development/libraries/libmanette/default.nix
··· 2 , fetchurl 3 , ninja 4 , meson 5 , pkg-config 6 , vala 7 , gobject-introspection ··· 34 gtk-doc 35 docbook-xsl-nons 36 docbook_xml_dtd_43 37 ]; 38 39 buildInputs = [ 40 glib 41 libgudev 42 libevdev
··· 2 , fetchurl 3 , ninja 4 , meson 5 + , mesonEmulatorHook 6 , pkg-config 7 , vala 8 , gobject-introspection ··· 35 gtk-doc 36 docbook-xsl-nons 37 docbook_xml_dtd_43 38 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 39 + mesonEmulatorHook 40 ]; 41 42 buildInputs = [ 43 + gobject-introspection 44 glib 45 libgudev 46 libevdev
+13 -11
pkgs/development/libraries/librdf/raptor2.nix
··· 1 - { lib, stdenv, fetchurl, libxml2, libxslt }: 2 3 stdenv.mkDerivation rec { 4 pname = "raptor2"; 5 - version = "2.0.15"; 6 7 - src = fetchurl { 8 - url = "http://download.librdf.org/source/${pname}-${version}.tar.gz"; 9 - sha256 = "ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed"; 10 }; 11 12 patches = [ 13 - (fetchurl { 14 - name = "CVE-2017-18926.patch"; 15 - url = "https://github.com/dajobe/raptor/commit/590681e546cd9aa18d57dc2ea1858cb734a3863f.patch"; 16 - sha256 = "1qlpb5rm3j2yi0x6zgdi5apymg5zlvwq3g1zl417gkjrlvxmndgp"; 17 }) 18 ]; 19 20 buildInputs = [ libxml2 libxslt ]; 21 - 22 - postInstall = "rm -rvf $out/share/gtk-doc"; 23 24 meta = { 25 description = "The RDF Parser Toolkit";
··· 1 + { lib, stdenv, libxml2, libxslt, pkg-config, cmake, fetchFromGitHub, perl, bison, flex, fetchpatch }: 2 3 stdenv.mkDerivation rec { 4 pname = "raptor2"; 5 + version = "unstable-2022-06-06"; 6 7 + src = fetchFromGitHub { 8 + owner = "dajobe"; 9 + repo = "raptor"; 10 + rev = "3cca62a33da68143b687c9e486eefc7c7cbb4586"; 11 + sha256 = "sha256-h03IyFH1GHPqajfHBBTb19lCEu+VXzQLGC1wiEGVvgY="; 12 }; 13 14 patches = [ 15 + # https://github.com/dajobe/raptor/pull/52 16 + (fetchpatch { 17 + name = "fix-cmake-generated-pc-file"; 18 + url = "https://github.com/dajobe/raptor/commit/fa1ef9a27d8762f5588ac2e92554a188e73dee9f.diff"; 19 + sha256 = "sha256-zXIbrYGgC9oTpiD0WUikT4vRdc9b6bsyfnDkwUSlqao="; 20 }) 21 ]; 22 23 + nativeBuildInputs = [ pkg-config cmake perl bison flex ]; 24 buildInputs = [ libxml2 libxslt ]; 25 26 meta = { 27 description = "The RDF Parser Toolkit";
+5
pkgs/development/libraries/libsecret/default.nix
··· 31 sha256 = "P7PONA/NfbVNh8iT5pv8Kx9uTUsnkGX/5m2snw/RK00="; 32 }; 33 34 nativeBuildInputs = [ 35 meson 36 ninja ··· 48 49 buildInputs = [ 50 libgcrypt 51 ]; 52 53 propagatedBuildInputs = [
··· 31 sha256 = "P7PONA/NfbVNh8iT5pv8Kx9uTUsnkGX/5m2snw/RK00="; 32 }; 33 34 + depsBuildBuild = [ 35 + pkg-config 36 + ]; 37 + 38 nativeBuildInputs = [ 39 meson 40 ninja ··· 52 53 buildInputs = [ 54 libgcrypt 55 + gobject-introspection 56 ]; 57 58 propagatedBuildInputs = [
+14 -11
pkgs/development/libraries/libsoup/default.nix
··· 8 , pkg-config 9 , gnome 10 , libsysprof-capture 11 - , gnomeSupport ? true 12 - , sqlite 13 - , glib-networking 14 , gobject-introspection 15 - , withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform 16 , vala 17 - , withVala ? stdenv.buildPlatform == stdenv.hostPlatform 18 , libpsl 19 - , python3 20 , brotli 21 }: 22 23 stdenv.mkDerivation rec { ··· 30 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 31 sha256 = "sha256-8KQnZW5f4Z4d9xwQfojfobLmc8JcVHt4I7YBi0DQEVk="; 32 }; 33 34 nativeBuildInputs = [ 35 meson 36 ninja 37 pkg-config 38 glib 39 - ] ++ lib.optionals withIntrospection [ 40 gobject-introspection 41 - ] ++ lib.optionals withVala [ 42 vala 43 ]; 44 45 buildInputs = [ 46 - python3 47 sqlite 48 libpsl 49 glib.out ··· 60 mesonFlags = [ 61 "-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency 62 "-Dgssapi=disabled" 63 - "-Dvapi=${if withVala then "enabled" else "disabled"}" 64 - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" 65 "-Dgnome=${lib.boolToString gnomeSupport}" 66 "-Dntlm=disabled" 67 ] ++ lib.optionals (!stdenv.isLinux) [ ··· 73 doCheck = false; # ERROR:../tests/socket-test.c:37:do_unconnected_socket_test: assertion failed (res == SOUP_STATUS_OK): (2 == 200) 74 75 postPatch = '' 76 patchShebangs libsoup/ 77 ''; 78
··· 8 , pkg-config 9 , gnome 10 , libsysprof-capture 11 , gobject-introspection 12 , vala 13 , libpsl 14 , brotli 15 + , gnomeSupport ? true 16 + , sqlite 17 + , glib-networking 18 }: 19 20 stdenv.mkDerivation rec { ··· 27 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 28 sha256 = "sha256-8KQnZW5f4Z4d9xwQfojfobLmc8JcVHt4I7YBi0DQEVk="; 29 }; 30 + 31 + depsBuildBuild = [ 32 + pkg-config 33 + ]; 34 35 nativeBuildInputs = [ 36 meson 37 ninja 38 pkg-config 39 glib 40 gobject-introspection 41 vala 42 ]; 43 44 buildInputs = [ 45 + gobject-introspection 46 sqlite 47 libpsl 48 glib.out ··· 59 mesonFlags = [ 60 "-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency 61 "-Dgssapi=disabled" 62 "-Dgnome=${lib.boolToString gnomeSupport}" 63 "-Dntlm=disabled" 64 ] ++ lib.optionals (!stdenv.isLinux) [ ··· 70 doCheck = false; # ERROR:../tests/socket-test.c:37:do_unconnected_socket_test: assertion failed (res == SOUP_STATUS_OK): (2 == 200) 71 72 postPatch = '' 73 + # fixes finding vapigen when cross-compiling 74 + # the commit is in 3.0.6 75 + # https://gitlab.gnome.org/GNOME/libsoup/-/commit/5280e936d0a76f94dbc5d8489cfbdc0a06343f65 76 + substituteInPlace meson.build \ 77 + --replace "required: vapi_opt)" "required: vapi_opt, native: false)" 78 + 79 patchShebangs libsoup/ 80 ''; 81
+4
pkgs/development/libraries/neon/default.nix
··· 35 (lib.withFeature sslSupport "ssl") 36 ]; 37 38 passthru = {inherit compressionSupport sslSupport;}; 39 40 meta = with lib; {
··· 35 (lib.withFeature sslSupport "ssl") 36 ]; 37 38 + preConfigure = '' 39 + export PKG_CONFIG="$(command -v "$PKG_CONFIG")" 40 + ''; 41 + 42 passthru = {inherit compressionSupport sslSupport;}; 43 44 meta = with lib; {
+5
pkgs/development/libraries/opencv/4.x.nix
··· 13 , protobuf 14 , config 15 , ocl-icd 16 17 , enableJPEG ? true 18 , libjpeg ··· 291 "-DOPENCV_GENERATE_PKGCONFIG=ON" 292 "-DWITH_OPENMP=ON" 293 "-DBUILD_PROTOBUF=OFF" 294 "-DPROTOBUF_UPDATE_FILES=ON" 295 "-DOPENCV_ENABLE_NONFREE=${printEnabled enableUnfree}" 296 "-DBUILD_TESTS=OFF" 297 "-DBUILD_PERF_TESTS=OFF" 298 "-DBUILD_DOCS=${printEnabled enableDocs}" 299 (opencvFlag "IPP" enableIpp) 300 (opencvFlag "TIFF" enableTIFF) 301 (opencvFlag "WEBP" enableWebP)
··· 13 , protobuf 14 , config 15 , ocl-icd 16 + , buildPackages 17 18 , enableJPEG ? true 19 , libjpeg ··· 292 "-DOPENCV_GENERATE_PKGCONFIG=ON" 293 "-DWITH_OPENMP=ON" 294 "-DBUILD_PROTOBUF=OFF" 295 + "-DProtobuf_PROTOC_EXECUTABLE=${lib.getExe buildPackages.protobuf}" 296 "-DPROTOBUF_UPDATE_FILES=ON" 297 "-DOPENCV_ENABLE_NONFREE=${printEnabled enableUnfree}" 298 "-DBUILD_TESTS=OFF" 299 "-DBUILD_PERF_TESTS=OFF" 300 "-DBUILD_DOCS=${printEnabled enableDocs}" 301 + # "OpenCV disables pkg-config to avoid using of host libraries. Consider using PKG_CONFIG_LIBDIR to specify target SYSROOT" 302 + # but we have proper separation of build and host libs :), fixes cross 303 + "-DOPENCV_ENABLE_PKG_CONFIG=ON" 304 (opencvFlag "IPP" enableIpp) 305 (opencvFlag "TIFF" enableTIFF) 306 (opencvFlag "WEBP" enableWebP)
+16 -12
pkgs/development/libraries/pango/default.nix
··· 16 , ninja 17 , glib 18 , python3 19 - , x11Support? !stdenv.isDarwin, libXft 20 - , withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform) 21 , gobject-introspection 22 - , withDocs ? (stdenv.buildPlatform == stdenv.hostPlatform) 23 }: 24 25 stdenv.mkDerivation rec { 26 pname = "pango"; 27 version = "1.50.7"; 28 29 - outputs = [ "bin" "out" "dev" ] 30 - ++ lib.optionals withDocs [ "devdoc" ]; 31 32 src = fetchurl { 33 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 34 sha256 = "BHfzaaPUxpXfcpmmmJ3ABHVqf03ifuysQFxnkLfjrTM="; 35 }; 36 37 - strictDeps = !withIntrospection; 38 - 39 depsBuildBuild = [ 40 pkg-config 41 ]; ··· 44 meson ninja 45 glib # for glib-mkenum 46 pkg-config 47 - ] ++ lib.optionals withIntrospection [ 48 gobject-introspection 49 - ] ++ lib.optionals withDocs [ 50 gi-docgen 51 python3 52 ]; ··· 54 buildInputs = [ 55 fribidi 56 libthai 57 ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ 58 ApplicationServices 59 Carbon ··· 71 ]; 72 73 mesonFlags = [ 74 - "-Dgtk_doc=${lib.boolToString withDocs}" 75 - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" 76 ] ++ lib.optionals (!x11Support) [ 77 "-Dxft=disabled" # only works with x11 78 ]; ··· 82 fontDirectories = [ freefont_ttf ]; 83 }; 84 85 doCheck = false; # test-font: FAIL 86 87 - postFixup = lib.optionalString withDocs '' 88 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. 89 moveToOutput "share/doc" "$devdoc" 90 '';
··· 16 , ninja 17 , glib 18 , python3 19 , gobject-introspection 20 + , x11Support? !stdenv.isDarwin, libXft 21 }: 22 23 stdenv.mkDerivation rec { 24 pname = "pango"; 25 version = "1.50.7"; 26 27 + outputs = [ "bin" "out" "dev" "devdoc" ]; 28 29 src = fetchurl { 30 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 31 sha256 = "BHfzaaPUxpXfcpmmmJ3ABHVqf03ifuysQFxnkLfjrTM="; 32 }; 33 34 depsBuildBuild = [ 35 pkg-config 36 ]; ··· 39 meson ninja 40 glib # for glib-mkenum 41 pkg-config 42 gobject-introspection 43 gi-docgen 44 python3 45 ]; ··· 47 buildInputs = [ 48 fribidi 49 libthai 50 + gobject-introspection 51 ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ 52 ApplicationServices 53 Carbon ··· 65 ]; 66 67 mesonFlags = [ 68 + "-Dgtk_doc=true" 69 ] ++ lib.optionals (!x11Support) [ 70 "-Dxft=disabled" # only works with x11 71 ]; ··· 75 fontDirectories = [ freefont_ttf ]; 76 }; 77 78 + # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) 79 + # it should be a build-time dep for build 80 + # TODO: send upstream 81 + postPatch = '' 82 + substituteInPlace meson.build \ 83 + --replace "dependency('gi-docgen', ver" "dependency('gi-docgen', native:true, ver" 84 + 85 + substituteInPlace docs/meson.build \ 86 + --replace "'gi-docgen', req" "'gi-docgen', native:true, req" 87 + ''; 88 + 89 doCheck = false; # test-font: FAIL 90 91 + postFixup = '' 92 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. 93 moveToOutput "share/doc" "$devdoc" 94 '';
+11 -9
pkgs/development/libraries/polkit/default.nix
··· 6 , expat 7 , pam 8 , meson 9 , ninja 10 , perl 11 , rsync ··· 23 , useSystemd ? stdenv.isLinux 24 , systemd 25 , elogind 26 - # needed until gobject-introspection does cross-compile (https://github.com/NixOS/nixpkgs/pull/88222) 27 - , withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform) 28 - # cross build fails on polkit-1-scan (https://github.com/NixOS/nixpkgs/pull/152704) 29 - , withGtkDoc ? (stdenv.buildPlatform == stdenv.hostPlatform) 30 # A few tests currently fail on musl (polkitunixusertest, polkitunixgrouptest, polkitidentitytest segfault). 31 # Not yet investigated; it may be due to the "Make netgroup support optional" 32 # patch not updating the tests correctly yet, or doing something wrong, ··· 88 }) 89 ]; 90 91 nativeBuildInputs = [ 92 glib 93 gtk-doc ··· 97 ninja 98 perl 99 rsync 100 - (python3.withPackages (pp: with pp; [ 101 dbus-python 102 (python-dbusmock.overridePythonAttrs (attrs: { 103 # Avoid dependency cycle. ··· 109 libxslt 110 docbook-xsl-nons 111 docbook_xml_dtd_412 112 ]; 113 114 buildInputs = [ 115 expat 116 pam 117 spidermonkey_78 118 ] ++ lib.optionals stdenv.isLinux [ 119 # On Linux, fall back to elogind when systemd support is off. 120 (if useSystemd then systemd else elogind) 121 - ] ++ lib.optionals withIntrospection [ 122 - gobject-introspection 123 ]; 124 125 propagatedBuildInputs = [ ··· 136 "-Dsystemdsystemunitdir=${placeholder "out"}/etc/systemd/system" 137 "-Dpolkitd_user=polkituser" #TODO? <nixos> config.ids.uids.polkituser 138 "-Dos_type=redhat" # only affects PAM includes 139 - "-Dintrospection=${lib.boolToString withIntrospection}" 140 "-Dtests=${lib.boolToString doCheck}" 141 - "-Dgtk_doc=${lib.boolToString withGtkDoc}" 142 "-Dman=true" 143 ] ++ lib.optionals stdenv.isLinux [ 144 "-Dsession_tracking=${if useSystemd then "libsystemd-login" else "libelogind"}"
··· 6 , expat 7 , pam 8 , meson 9 + , mesonEmulatorHook 10 , ninja 11 , perl 12 , rsync ··· 24 , useSystemd ? stdenv.isLinux 25 , systemd 26 , elogind 27 # A few tests currently fail on musl (polkitunixusertest, polkitunixgrouptest, polkitidentitytest segfault). 28 # Not yet investigated; it may be due to the "Make netgroup support optional" 29 # patch not updating the tests correctly yet, or doing something wrong, ··· 85 }) 86 ]; 87 88 + depsBuildBuild = [ 89 + pkg-config 90 + ]; 91 + 92 nativeBuildInputs = [ 93 glib 94 gtk-doc ··· 98 ninja 99 perl 100 rsync 101 + gobject-introspection 102 + (python3.pythonForBuild.withPackages (pp: with pp; [ 103 dbus-python 104 (python-dbusmock.overridePythonAttrs (attrs: { 105 # Avoid dependency cycle. ··· 111 libxslt 112 docbook-xsl-nons 113 docbook_xml_dtd_412 114 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 115 + mesonEmulatorHook 116 ]; 117 118 buildInputs = [ 119 + gobject-introspection 120 expat 121 pam 122 spidermonkey_78 123 + dbus 124 ] ++ lib.optionals stdenv.isLinux [ 125 # On Linux, fall back to elogind when systemd support is off. 126 (if useSystemd then systemd else elogind) 127 ]; 128 129 propagatedBuildInputs = [ ··· 140 "-Dsystemdsystemunitdir=${placeholder "out"}/etc/systemd/system" 141 "-Dpolkitd_user=polkituser" #TODO? <nixos> config.ids.uids.polkituser 142 "-Dos_type=redhat" # only affects PAM includes 143 "-Dtests=${lib.boolToString doCheck}" 144 "-Dman=true" 145 ] ++ lib.optionals stdenv.isLinux [ 146 "-Dsession_tracking=${if useSystemd then "libsystemd-login" else "libelogind"}"
+22 -10
pkgs/development/libraries/tracker/default.nix
··· 25 , json-glib 26 , systemd 27 , dbus 28 }: 29 30 stdenv.mkDerivation rec { ··· 46 patchShebangs utils/data-generators/cc/generate 47 ''; 48 49 nativeBuildInputs = [ 50 meson 51 ninja ··· 58 gobject-introspection 59 docbook-xsl-nons 60 docbook_xml_dtd_45 61 - python3 # for data-generators 62 - systemd # used for checks to install systemd user service 63 - dbus # used for checks and pkg-config to install dbus service/s 64 - ] ++ checkInputs; # gi is in the main meson.build and checked regardless of 65 - # whether tests are enabled 66 67 buildInputs = [ 68 glib 69 libxml2 70 sqlite ··· 74 libuuid 75 json-glib 76 libstemmer 77 - ]; 78 - 79 - checkInputs = with python3.pkgs; [ 80 - pygobject3 81 ]; 82 83 mesonFlags = [ 84 "-Ddocs=true" 85 - ]; 86 87 doCheck = true; 88
··· 25 , json-glib 26 , systemd 27 , dbus 28 + , writeText 29 }: 30 31 stdenv.mkDerivation rec { ··· 47 patchShebangs utils/data-generators/cc/generate 48 ''; 49 50 + depsBuildBuild = [ 51 + pkg-config 52 + ]; 53 + 54 nativeBuildInputs = [ 55 meson 56 ninja ··· 63 gobject-introspection 64 docbook-xsl-nons 65 docbook_xml_dtd_45 66 + (python3.pythonForBuild.withPackages (p: [ p.pygobject3 ])) 67 + ]; 68 69 buildInputs = [ 70 + gobject-introspection 71 glib 72 libxml2 73 sqlite ··· 77 libuuid 78 json-glib 79 libstemmer 80 + dbus 81 + systemd 82 ]; 83 84 mesonFlags = [ 85 "-Ddocs=true" 86 + ] ++ ( 87 + let 88 + # https://gitlab.gnome.org/GNOME/tracker/-/blob/master/meson.build#L159 89 + crossFile = writeText "cross-file.conf" '' 90 + [properties] 91 + sqlite3_has_fts5 = '${lib.boolToString (lib.hasInfix "-DSQLITE_ENABLE_FTS3" sqlite.NIX_CFLAGS_COMPILE)}' 92 + ''; 93 + in 94 + [ 95 + "--cross-file=${crossFile}" 96 + ] 97 + ); 98 99 doCheck = true; 100
+14 -1
pkgs/development/python-modules/pygobject/3.nix
··· 12 , ninja 13 , isPy3k 14 , gnome 15 }: 16 17 buildPythonPackage rec { ··· 29 sha256 = "HzS192JN415E61p+tCg1MoW9AwBNVRMaX39/qbkPPMk="; 30 }; 31 32 nativeBuildInputs = [ 33 pkg-config 34 meson ··· 37 ]; 38 39 buildInputs = [ 40 glib 41 - gobject-introspection 42 ] ++ lib.optionals stdenv.isDarwin [ 43 ncurses 44 ]; ··· 46 propagatedBuildInputs = [ 47 pycairo 48 cairo 49 ]; 50 51 passthru = {
··· 12 , ninja 13 , isPy3k 14 , gnome 15 + , python 16 }: 17 18 buildPythonPackage rec { ··· 30 sha256 = "HzS192JN415E61p+tCg1MoW9AwBNVRMaX39/qbkPPMk="; 31 }; 32 33 + depsBuildBuild = [ 34 + pkg-config 35 + ]; 36 + 37 nativeBuildInputs = [ 38 pkg-config 39 meson ··· 42 ]; 43 44 buildInputs = [ 45 + # # .so files link to these 46 + gobject-introspection 47 glib 48 ] ++ lib.optionals stdenv.isDarwin [ 49 ncurses 50 ]; ··· 52 propagatedBuildInputs = [ 53 pycairo 54 cairo 55 + ]; 56 + 57 + mesonFlags = [ 58 + # This is only used for figuring out what version of Python is in 59 + # use, and related stuff like figuring out what the install prefix 60 + # should be, but it does need to be able to execute Python code. 61 + "-Dpython=${python.pythonForBuild.interpreter}" 62 ]; 63 64 passthru = {
+21 -4
pkgs/tools/networking/networkmanager/default.nix
··· 34 , iputils 35 , kmod 36 , jansson 37 , gtk-doc 38 , libxslt 39 , docbook_xsl ··· 43 , openconnect 44 , curl 45 , meson 46 , ninja 47 , libpsl 48 , mobile-broadband-provider-info 49 , runtimeShell 50 }: 51 52 let 53 - pythonForDocs = python3.withPackages (pkgs: with pkgs; [ pygobject3 ]); 54 in 55 stdenv.mkDerivation rec { 56 pname = "networkmanager"; ··· 102 "-Ddhcpcanon=no" 103 104 # Miscellaneous 105 - "-Ddocs=true" 106 # We don't use firewalld in NixOS 107 "-Dfirewalld_zone=false" 108 "-Dtests=no" ··· 138 ]; 139 140 buildInputs = [ 141 systemd 142 libselinux 143 audit ··· 150 mobile-broadband-provider-info 151 bluez5 152 dnsmasq 153 - gobject-introspection 154 modemmanager 155 readline 156 newt 157 libsoup 158 jansson 159 ]; 160 161 propagatedBuildInputs = [ gnutls libgcrypt ]; ··· 167 pkg-config 168 vala 169 gobject-introspection 170 - dbus 171 # Docs 172 gtk-doc 173 libxslt ··· 176 docbook_xml_dtd_42 177 docbook_xml_dtd_43 178 pythonForDocs 179 ]; 180 181 doCheck = false; # requires /sys, the net ··· 183 postPatch = '' 184 patchShebangs ./tools 185 patchShebangs libnm/generate-setting-docs.py 186 ''; 187 188 preBuild = '' ··· 192 # We are using a symlink that will be overridden during installation. 193 mkdir -p ${placeholder "out"}/lib 194 ln -s $PWD/src/libnm-client-impl/libnm.so.0 ${placeholder "out"}/lib/libnm.so.0 195 ''; 196 197 passthru = {
··· 34 , iputils 35 , kmod 36 , jansson 37 + , elfutils 38 , gtk-doc 39 , libxslt 40 , docbook_xsl ··· 44 , openconnect 45 , curl 46 , meson 47 + , mesonEmulatorHook 48 , ninja 49 , libpsl 50 , mobile-broadband-provider-info 51 , runtimeShell 52 + , buildPackages 53 }: 54 55 let 56 + pythonForDocs = python3.pythonForBuild.withPackages (pkgs: with pkgs; [ pygobject3 ]); 57 in 58 stdenv.mkDerivation rec { 59 pname = "networkmanager"; ··· 105 "-Ddhcpcanon=no" 106 107 # Miscellaneous 108 + # almost cross-compiles, however fails with 109 + # ** (process:9234): WARNING **: Failed to load shared library '/nix/store/...-networkmanager-aarch64-unknown-linux-gnu-1.38.2/lib/libnm.so.0' referenced by the typelib: /nix/store/...-networkmanager-aarch64-unknown-linux-gnu-1.38.2/lib/libnm.so.0: cannot open shared object file: No such file or directory 110 + "-Ddocs=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" 111 # We don't use firewalld in NixOS 112 "-Dfirewalld_zone=false" 113 "-Dtests=no" ··· 143 ]; 144 145 buildInputs = [ 146 + gobject-introspection 147 systemd 148 libselinux 149 audit ··· 156 mobile-broadband-provider-info 157 bluez5 158 dnsmasq 159 modemmanager 160 readline 161 newt 162 libsoup 163 jansson 164 + dbus # used to get directory paths with pkg-config during configuration 165 ]; 166 167 propagatedBuildInputs = [ gnutls libgcrypt ]; ··· 173 pkg-config 174 vala 175 gobject-introspection 176 + elfutils # used to find jansson soname 177 # Docs 178 gtk-doc 179 libxslt ··· 182 docbook_xml_dtd_42 183 docbook_xml_dtd_43 184 pythonForDocs 185 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 186 + mesonEmulatorHook 187 ]; 188 189 doCheck = false; # requires /sys, the net ··· 191 postPatch = '' 192 patchShebangs ./tools 193 patchShebangs libnm/generate-setting-docs.py 194 + 195 + # TODO: submit upstream 196 + substituteInPlace meson.build \ 197 + --replace "'vala', req" "'vala', native: false, req" 198 ''; 199 200 preBuild = '' ··· 204 # We are using a symlink that will be overridden during installation. 205 mkdir -p ${placeholder "out"}/lib 206 ln -s $PWD/src/libnm-client-impl/libnm.so.0 ${placeholder "out"}/lib/libnm.so.0 207 + ''; 208 + 209 + postFixup = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' 210 + cp -r ${buildPackages.networkmanager.devdoc} $devdoc 211 + cp -r ${buildPackages.networkmanager.man} $man 212 ''; 213 214 passthru = {
+3 -3
pkgs/top-level/all-packages.nix
··· 4148 # example of an error which this fixes 4149 # [Errno 8] Exec format error: './gdk3-scan' 4150 mesonEmulatorHook = 4151 - if (stdenv.buildPlatform != stdenv.targetPlatform) then 4152 makeSetupHook 4153 { 4154 name = "mesonEmulatorHook"; ··· 4159 ''; 4160 }; 4161 } ../development/tools/build-managers/meson/emulator-hook.sh 4162 - else throw "mesonEmulatorHook has to be in a cross conditional i.e. (stdenv.buildPlatform != stdenv.hostPlatform)"; 4163 4164 meson-tools = callPackage ../misc/meson-tools { }; 4165 ··· 17943 gns3-gui = gns3Packages.guiStable; 17944 gns3-server = gns3Packages.serverStable; 17945 17946 - gobject-introspection = if (stdenv.hostPlatform != stdenv.targetPlatform) 17947 then callPackage ../development/libraries/gobject-introspection/wrapper.nix { } else gobject-introspection-unwrapped; 17948 17949 gobject-introspection-unwrapped = callPackage ../development/libraries/gobject-introspection {
··· 4148 # example of an error which this fixes 4149 # [Errno 8] Exec format error: './gdk3-scan' 4150 mesonEmulatorHook = 4151 + if (!stdenv.buildPlatform.canExecute stdenv.targetPlatform) then 4152 makeSetupHook 4153 { 4154 name = "mesonEmulatorHook"; ··· 4159 ''; 4160 }; 4161 } ../development/tools/build-managers/meson/emulator-hook.sh 4162 + else throw "mesonEmulatorHook has to be in a conditional to check if the target binaries can be executed i.e. (!stdenv.buildPlatform.canExecute stdenv.hostPlatform)"; 4163 4164 meson-tools = callPackage ../misc/meson-tools { }; 4165 ··· 17943 gns3-gui = gns3Packages.guiStable; 17944 gns3-server = gns3Packages.serverStable; 17945 17946 + gobject-introspection = if (!stdenv.hostPlatform.canExecute stdenv.targetPlatform) 17947 then callPackage ../development/libraries/gobject-introspection/wrapper.nix { } else gobject-introspection-unwrapped; 17948 17949 gobject-introspection-unwrapped = callPackage ../development/libraries/gobject-introspection {
+2 -1
pkgs/top-level/python-packages.nix
··· 7476 pygobject2 = callPackage ../development/python-modules/pygobject { }; 7477 7478 pygobject3 = callPackage ../development/python-modules/pygobject/3.nix { 7479 - inherit (pkgs) meson; 7480 }; 7481 7482 pygogo = callPackage ../development/python-modules/pygogo { };
··· 7476 pygobject2 = callPackage ../development/python-modules/pygobject { }; 7477 7478 pygobject3 = callPackage ../development/python-modules/pygobject/3.nix { 7479 + # inherit (pkgs) meson won't work because it won't be spliced 7480 + inherit (pkgs.buildPackages) meson; 7481 }; 7482 7483 pygogo = callPackage ../development/python-modules/pygogo { };