Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions pkgs/by-name/ge/gexiv2/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
gnome,
gobject-introspection,
vala,
gtk-doc,
docbook-xsl-nons,
docbook_xml_dtd_43,
gi-docgen,
python3,
}:

stdenv.mkDerivation rec {
pname = "gexiv2";
version = "0.14.6";
version = "0.16.0";

outputs = [
"out"
Expand All @@ -29,7 +27,7 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "mirror://gnome/sources/gexiv2/${lib.versions.majorMinor version}/gexiv2-${version}.tar.xz";
sha256 = "YGwoqq57Hz71yOq+Xn3/18WhyGbSW3Zx+4R/4oenK4s=";
sha256 = "2W+JXyRTn5ZvV3srskia6E+CMpcKjQwGTkoAdHSne7s=";
};

nativeBuildInputs = [
Expand All @@ -38,9 +36,7 @@ stdenv.mkDerivation rec {
pkg-config
gobject-introspection
vala
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_43
gi-docgen
(python3.pythonOnBuildForHost.withPackages (ps: [ ps.pygobject3 ]))
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
Expand All @@ -64,17 +60,23 @@ stdenv.mkDerivation rec {

preCheck =
let
libSuffix = if stdenv.hostPlatform.isDarwin then "2.dylib" else "so.2";
libName = if stdenv.hostPlatform.isDarwin then "libgexiv2-0.16.4.dylib" else "libgexiv2-0.16.so.4";
in
''
# Our gobject-introspection patches make the shared library paths absolute
# in the GIR files. When running unit tests, the library is not yet installed,
# though, so we need to replace the absolute path with a local one during build.
# We are using a symlink that will be overridden during installation.
mkdir -p $out/lib
ln -s $PWD/gexiv2/libgexiv2.${libSuffix} $out/lib/libgexiv2.${libSuffix}
ln -s $PWD/gexiv2/${libName} $out/lib/${libName}
export GI_TYPELIB_PATH=$PWD/gexiv2
'';

postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';

passthru = {
updateScript = gnome.updateScript {
packageName = pname;
Expand Down
Loading