nixpkgs/pkgs/applications/version-management/meld/default.nix
Sergei Trofimovich 51a383c15f meld: avoid -dev paths in runtime closure
Use `pythonPath` instead of `propagatedBuildInputs`.

Closure before the change:

    $ nix path-info -rsSh $(nix-build '<nixpkgs>' -A meld) | unnix | nl | tail -n1
    185  /<<NIX>>/meld-3.22.0 5.2M  512.7M

After the change:

    $ nix path-info -rsSh $(nix-build -A meld) | unnix | nl | tail -n1
   155  /<<NIX>>/meld-3.22.0 5.2M  480.8M

This way we avoid 30 depends and 32MB of closure. Those were the
following packages:

    /<<NIX>>/brotli-1.1.0
    /<<NIX>>/brotli-1.1.0-dev
    /<<NIX>>/bzip2-1.0.8-dev
    /<<NIX>>/cairo-1.16.0-dev
    /<<NIX>>/expat-2.5.0-dev
    /<<NIX>>/fontconfig-2.14.2-bin
    /<<NIX>>/fontconfig-2.14.2-dev
    /<<NIX>>/freetype-2.13.2-dev
    /<<NIX>>/gettext-0.21.1
    /<<NIX>>/glib-2.76.4-bin
    /<<NIX>>/glib-2.76.4-dev
    /<<NIX>>/glibc-2.38-23-bin
    /<<NIX>>/glibc-2.38-23-dev
    /<<NIX>>/glibc-iconv-2.38
    /<<NIX>>/libelf-0.8.13
    /<<NIX>>/libffi-3.4.4-dev
    /<<NIX>>/libGL-1.6.0-dev
    /<<NIX>>/libglvnd-1.6.0-dev
    /<<NIX>>/libpng-apng-1.6.40-dev
    /<<NIX>>/libX11-1.8.7-dev
    /<<NIX>>/libXau-1.0.11-dev
    /<<NIX>>/libxcb-1.16-dev
    /<<NIX>>/libXext-1.3.5-dev
    /<<NIX>>/libXrender-0.9.11-dev
    /<<NIX>>/linux-headers-6.5
    /<<NIX>>/python3.11-pygobject-3.44.1-dev
    /<<NIX>>/xcb-util-0.4.1
    /<<NIX>>/xcb-util-0.4.1-dev
    /<<NIX>>/xorgproto-2023.2
    /<<NIX>>/zlib-1.3-dev
2023-11-04 14:38:53 +00:00

73 lines
1.4 KiB
Nix

{ lib
, fetchurl
, gettext
, itstool
, python3
, meson
, ninja
, wrapGAppsHook
, libxml2
, pkg-config
, desktop-file-utils
, gobject-introspection
, gtk3
, gtksourceview4
, gnome
, gsettings-desktop-schemas
}:
python3.pkgs.buildPythonApplication rec {
pname = "meld";
version = "3.22.0";
format = "other";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "sha256-P8EHyY7251NY/9Kw0UyF3bSP4UoR6TmpQyL6qo6QxA0=";
};
nativeBuildInputs = [
meson
ninja
gettext
itstool
libxml2
pkg-config
desktop-file-utils
gobject-introspection
wrapGAppsHook
gtk3 # for gtk-update-icon-cache
];
buildInputs = [
gtk3
gtksourceview4
gsettings-desktop-schemas
gnome.adwaita-icon-theme
];
pythonPath = with python3.pkgs; [
pygobject3
pycairo
];
postPatch = ''
patchShebangs meson_shebang_normalisation.py
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "none"; # should be odd-unstable but we are tracking unstable versions for now
};
};
meta = with lib; {
description = "Visual diff and merge tool";
homepage = "https://meld.app/";
license = licenses.gpl2Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ jtojnar mimame ];
};
}