Merge pull request #142708 from WolfangAukang/gaphor
This commit is contained in:
commit
5db4c4e5d6
45
pkgs/development/python-modules/gaphas/default.nix
Normal file
45
pkgs/development/python-modules/gaphas/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchPypi
|
||||
, poetry-core
|
||||
, gobject-introspection
|
||||
, gtk3
|
||||
, pycairo
|
||||
, pygobject3
|
||||
, typing-extensions
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gaphas";
|
||||
version = "3.1.9";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-S6cRsfqXYM4mSVSs2M8fET5ShFClKkGkod2w2y6F2gc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
buildInputs = [ gobject-introspection gtk3 ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pycairo
|
||||
pygobject3
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "gaphas" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "GTK+ based diagramming widget";
|
||||
maintainers = with maintainers; [ wolfangaukang ];
|
||||
homepage = "https://github.com/gaphor/gaphas";
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
32
pkgs/development/python-modules/generic/default.nix
Normal file
32
pkgs/development/python-modules/generic/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchPypi
|
||||
, poetry-core
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "generic";
|
||||
version = "1.0.1";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-ex93I+ofo5lP6qoolZwzjxSspeqJimY3vpB32RLJ00k=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "generic" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generic programming (Multiple dispatch) library for Python";
|
||||
maintainers = with maintainers; [ wolfangaukang ];
|
||||
homepage = "https://github.com/gaphor/generic";
|
||||
license = licenses.bsdOriginal;
|
||||
};
|
||||
}
|
66
pkgs/tools/misc/gaphor/default.nix
Normal file
66
pkgs/tools/misc/gaphor/default.nix
Normal file
@ -0,0 +1,66 @@
|
||||
{ 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" ];
|
||||
};
|
||||
}
|
@ -5392,6 +5392,8 @@ with pkgs;
|
||||
|
||||
gandom-fonts = callPackage ../data/fonts/gandom-fonts { };
|
||||
|
||||
gaphor = python3Packages.callPackage ../tools/misc/gaphor { };
|
||||
|
||||
garmin-plugin = callPackage ../applications/misc/garmin-plugin {};
|
||||
|
||||
garmintools = callPackage ../development/libraries/garmintools {};
|
||||
|
@ -2968,6 +2968,8 @@ in {
|
||||
pythonPackages = self;
|
||||
});
|
||||
|
||||
gaphas = callPackage ../development/python-modules/gaphas { };
|
||||
|
||||
garminconnect-aio = callPackage ../development/python-modules/garminconnect-aio { };
|
||||
|
||||
garminconnect-ha = callPackage ../development/python-modules/garminconnect-ha { };
|
||||
@ -3006,6 +3008,8 @@ in {
|
||||
|
||||
genanki = callPackage ../development/python-modules/genanki { };
|
||||
|
||||
generic = callPackage ../development/python-modules/generic { };
|
||||
|
||||
genome-collector = callPackage ../development/python-modules/genome-collector { };
|
||||
|
||||
genpy = callPackage ../development/python-modules/genpy { };
|
||||
|
Loading…
Reference in New Issue
Block a user