librsvg: 2.50.1 → 2.50.5
This commit is contained in:
parent
58c6cbf78b
commit
e288b9d1b2
|
@ -1,47 +1,79 @@
|
||||||
{ lib, stdenv, fetchurl, pkg-config, glib, gdk-pixbuf, pango, cairo, libxml2
|
{ lib
|
||||||
, bzip2, libintl, darwin, rustc, cargo, gnome3
|
, stdenv
|
||||||
, vala, gobject-introspection }:
|
, fetchurl
|
||||||
|
, pkg-config
|
||||||
|
, glib
|
||||||
|
, gdk-pixbuf
|
||||||
|
, pango
|
||||||
|
, cairo
|
||||||
|
, libxml2
|
||||||
|
, bzip2
|
||||||
|
, libintl
|
||||||
|
, ApplicationServices
|
||||||
|
, Foundation
|
||||||
|
, libobjc
|
||||||
|
, rustc
|
||||||
|
, cargo
|
||||||
|
, gnome3
|
||||||
|
, vala
|
||||||
|
, gobject-introspection
|
||||||
|
, nixosTests
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
pname = "librsvg";
|
|
||||||
version = "2.50.1";
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "${pname}-${version}";
|
pname = "librsvg";
|
||||||
|
version = "2.50.5";
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
|
|
||||||
sha256 = "02csvx2nzygh8kyal2qiy3y6xb7d52vszxxr37dzav704a9pkncv";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [ "out" "dev" "installedTests" ];
|
outputs = [ "out" "dev" "installedTests" ];
|
||||||
|
|
||||||
buildInputs = [ libxml2 bzip2 pango libintl ]
|
src = fetchurl {
|
||||||
++ lib.optionals stdenv.isDarwin [ darwin.libobjc ];
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
|
sha256 = "0wlj5g1jgp93sj3rr6qspj282whz13ahnv8ca99d7zilq9s1aw1j";
|
||||||
|
};
|
||||||
|
|
||||||
NIX_LDFLAGS = if stdenv.isDarwin then "-lobjc" else null;
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
rustc
|
||||||
|
cargo
|
||||||
|
vala
|
||||||
|
gobject-introspection
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
ApplicationServices
|
||||||
|
Foundation
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ glib gdk-pixbuf cairo ];
|
buildInputs = [
|
||||||
|
libxml2
|
||||||
|
bzip2
|
||||||
|
pango
|
||||||
|
libintl
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
libobjc
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config rustc cargo vala gobject-introspection ]
|
propagatedBuildInputs = [
|
||||||
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
glib
|
||||||
ApplicationServices
|
gdk-pixbuf
|
||||||
]);
|
cairo
|
||||||
|
];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-introspection"
|
"--enable-introspection"
|
||||||
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||||
|
# Vapi does not build on MacOS.
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/117081#issuecomment-827782004
|
||||||
"--enable-vala"
|
"--enable-vala"
|
||||||
|
] ++ [
|
||||||
"--enable-installed-tests"
|
"--enable-installed-tests"
|
||||||
"--enable-always-build-tests"
|
"--enable-always-build-tests"
|
||||||
] ++ lib.optional stdenv.isDarwin "--disable-Bsymbolic";
|
] ++ lib.optional stdenv.isDarwin "--disable-Bsymbolic";
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"installed_test_metadir=$(installedTests)/share/installed-tests/RSVG"
|
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/RSVG"
|
||||||
"installed_testdir=$(installedTests)/libexec/installed-tests/RSVG"
|
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/RSVG"
|
||||||
];
|
];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE
|
doCheck = false; # all tests fail on libtool-generated rsvg-convert not being able to find coreutils
|
||||||
= lib.optionalString stdenv.isDarwin "-I${cairo.dev}/include/cairo";
|
|
||||||
|
|
||||||
# It wants to add loaders and update the loaders.cache in gdk-pixbuf
|
# It wants to add loaders and update the loaders.cache in gdk-pixbuf
|
||||||
# Patching the Makefiles to it creates rsvg specific loaders and the
|
# Patching the Makefiles to it creates rsvg specific loaders and the
|
||||||
|
@ -63,8 +95,6 @@ stdenv.mkDerivation rec {
|
||||||
-i gdk-pixbuf-loader/librsvg.thumbnailer.in
|
-i gdk-pixbuf-loader/librsvg.thumbnailer.in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = false; # fails 20 of 145 tests, very likely to be buggy
|
|
||||||
|
|
||||||
# Merge gdkpixbuf and librsvg loaders
|
# Merge gdkpixbuf and librsvg loaders
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv $GDK_PIXBUF/loaders.cache $GDK_PIXBUF/loaders.cache.tmp
|
mv $GDK_PIXBUF/loaders.cache $GDK_PIXBUF/loaders.cache.tmp
|
||||||
|
|
|
@ -16232,7 +16232,10 @@ in
|
||||||
|
|
||||||
libroxml = callPackage ../development/libraries/libroxml { };
|
libroxml = callPackage ../development/libraries/libroxml { };
|
||||||
|
|
||||||
librsvg = callPackage ../development/libraries/librsvg { };
|
librsvg = callPackage ../development/libraries/librsvg {
|
||||||
|
inherit (darwin) libobjc;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) ApplicationServices Foundation;
|
||||||
|
};
|
||||||
|
|
||||||
librsync = callPackage ../development/libraries/librsync { };
|
librsync = callPackage ../development/libraries/librsync { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue