Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gaphor: init at 2.6.5 #142708

Merged
merged 3 commits into from Nov 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions pkgs/development/python-modules/gaphas/default.nix
@@ -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 changes: 32 additions & 0 deletions pkgs/development/python-modules/generic/default.nix
@@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, poetry-core
}:

buildPythonPackage rec {
pname = "generic";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing against your PR, just the package name -_-

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ikr, I thought the same. If you have any recommendations, I would be happy to change it, because it is too "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 changes: 66 additions & 0 deletions pkgs/tools/misc/gaphor/default.nix
@@ -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" ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -5336,6 +5336,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 {};
Expand Down
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -2920,6 +2920,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 { };
Expand Down Expand Up @@ -2958,6 +2960,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 { };
Expand Down