depot/third_party/nixpkgs/pkgs/tools/misc/gaphor/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

66 lines
1.4 KiB
Nix

{ lib
, buildPythonApplication
, fetchPypi
, poetry-core
, gobject-introspection
, pango
, gtksourceview4
, wrapGAppsHook
, makeDesktopItem
, copyDesktopItems
, gaphas
, generic
, pycairo
, pygobject3
, python
, tinycss2
}:
buildPythonApplication rec {
pname = "gaphor";
version = "2.6.5";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-IFsbWx5lblKsnEibVihM6ZPRoydXC+JM1gdZEUUTKxw=";
};
nativeBuildInputs = [
poetry-core copyDesktopItems gobject-introspection wrapGAppsHook
];
# Setting gobject-introspection on booth nativeBuildInputs and
# buildInputs because of #56943. This recognizes pango, avoiding
# a "ValueError: Namespace PangoCairo not available".
buildInputs = [ gobject-introspection gtksourceview4 pango ];
propagatedBuildInputs = [
gaphas
generic
pycairo
pygobject3
tinycss2
];
desktopItems = makeDesktopItem {
name = pname;
exec = "gaphor";
icon = "gaphor";
comment = meta.description;
desktopName = "Gaphor";
};
postInstall = ''
install -Dm644 $out/${python.sitePackages}/gaphor/ui/icons/hicolor/scalable/apps/org.gaphor.Gaphor.svg $out/share/pixmaps/gaphor.svg
'';
meta = with lib; {
description = "Simple modeling tool written in Python";
maintainers = with maintainers; [ wolfangaukang ];
homepage = "https://github.com/gaphor/gaphor";
license = licenses.asl20;
platforms = [ "x86_64-linux" ];
};
}