@ -12,10 +12,12 @@
, ApplicationServices
, Foundation
, libobjc
, rustPlatform
, rustc
, cargo
, gnome
, vala
, withIntrospection ? stdenv . hostPlatform == stdenv . buildPlatform
, gobject-introspection
, nixosTests
} :
@ -31,6 +33,8 @@ stdenv.mkDerivation rec {
sha256 = " / / t h s I z V K C q q 4 U e g K z B R Z q d C b 6 0 i q L l C d w j w 8 v x C b r w = " ;
} ;
cargoVendorDir = " v e n d o r " ;
strictDeps = true ;
depsBuildBuild = [ pkg-config ] ;
@ -41,6 +45,8 @@ stdenv.mkDerivation rec {
rustc
cargo
vala
rustPlatform . cargoSetupHook
] ++ lib . optionals withIntrospection [
gobject-introspection
] ++ lib . optionals stdenv . isDarwin [
ApplicationServices
@ -52,6 +58,7 @@ stdenv.mkDerivation rec {
bzip2
pango
libintl
] ++ lib . optionals withIntrospection [
gobject-introspection
] ++ lib . optionals stdenv . isDarwin [
libobjc
@ -64,12 +71,12 @@ stdenv.mkDerivation rec {
] ;
configureFlags = [
" - - e n a b l e - i n t r o s p e c t i o n "
] ++ lib . optionals ( ! stdenv . isDarwin ) [
( lib . enableFeature withIntrospection " i n t r o s p e c t i o n " )
# Vapi does not build on MacOS.
# https://github.com/NixOS/nixpkgs/pull/117081#issuecomment-827782004
" - - e n a b l e - v a l a "
] ++ [
( lib . enableFeature ( withIntrospection && ! stdenv . isDarwin ) " v a l a " )
" - - e n a b l e - i n s t a l l e d - t e s t s "
" - - e n a b l e - a l w a y s - b u i l d - t e s t s "
] ++ lib . optional stdenv . isDarwin " - - d i s a b l e - B s y m b o l i c " ;
@ -101,11 +108,11 @@ stdenv.mkDerivation rec {
- i gdk-pixbuf-loader/librsvg.thumbnailer.in
'' ;
# Merge gdkpixbuf and librsvg loaders
postInstall = ''
mv $ GDK_PIXBUF/loaders.cache $ GDK_PIXBUF/loaders.cache.tmp
cat $ { gdk-pixbuf . out } /lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $ GDK_PIXBUF/loaders.cache.tmp > $ GDK_PIXBUF/loaders.cache
r m $ GDK_PIXBUF/loaders.cache.tmp
# Not generated when cross compiling.
postInstall = lib . optionalString ( stdenv . hostPlatform == stdenv . buildPlatform ) ''
# Merge gdkpixbuf and librsvg loaders
cat $ { gdk-pixbuf . out } /lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $ GDK_PIXBUF/loaders.cache > $ GDK_PIXBUF/loaders.cache.tmp
mv $ GDK_PIXBUF/loaders.cache.tmp $ GDK_PIXBUF/loaders.cache
'' ;
passthru = {