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

turtlevcs: init at 0.6 #257062

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2642,6 +2642,15 @@
githubId = 37375448;
name = "Buildit";
};
burniintree = {
name = "Lars Mühmel";
email = "[email protected]";
github = "BurNiinTRee";
githubId = 7968493;
keys = [{
fingerprint = "2BC4 CCAD FA56 133A 551C F38C 4106 FBAD F456 6EAC";
}];
};
bwlang = {
email = "[email protected]";
github = "bwlang";
Expand Down
73 changes: 73 additions & 0 deletions pkgs/by-name/tu/turtle/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{ lib
, fetchFromGitLab
, cacert
, gobject-introspection
, gtk4
, glib
, libadwaita
, meld
, python3
, wrapGAppsHook4
}:

python3.pkgs.buildPythonApplication rec {
pname = "turtle";
version = "0.6";
src = fetchFromGitLab {
Copy link
Member

Choose a reason for hiding this comment

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

A new line here and there similar to other packages would help readability a lot.

domain = "gitlab.gnome.org";
owner = "philippun1";
repo = pname;
rev = version;
hash = "sha256-ShZlGZeIjsMOLrdPsl6WphGZcWPrhTQHv2b7HFVm4do=";
};
format = "setuptools";
Copy link
Member

Choose a reason for hiding this comment

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

Please use the new pyproject = true setting instead of format

nativeBuildInputs = [
wrapGAppsHook4
gobject-introspection
];
buildInputs = [
libadwaita
gtk4
glib
];
nativeCheckInputs = [
cacert
];

postInstall = ''
install -Dm644 -t $out/share/nautilus-python/extensions $src/plugins/turtle_nautilus.py
'';

# this runs after the wrapPythonScipts function, hence $program_PYTHONPATH is already populated.
# the turtle_nautilus.py plugin imports turtlevcs, hence we have to patch it
postFixup = ''
patchPythonScript "$out/share/nautilus-python/extensions/turtle_nautilus.py"
'';

propagatedBuildInputs =
(with python3.pkgs; [
pygit2
pygobject3
])
++ [
meld
];

dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
# It can't find pygit2 without also adding $PYTHONPATH to the wrapper
makeWrapperArgs+=( --prefix PYTHONPATH : $out/${python3.sitePackages}:$PYTHONPATH )
Copy link
Member

Choose a reason for hiding this comment

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

We cannot use $PYTHONPATH like this as it draws in build time dependencies

'';

# breaks gobject-introspection
strictDeps = false;

meta = with lib; {
description = "A graphical interface for version control intended to run on gnome and nautilus";
homepage = "https://gitlab.gnome.org/philippun1/turtle";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ burniintree ];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
maintainers = with maintainers; [ burniintree ];
mainProgram = "turtle";
maintainers = with maintainers; [ burniintree ];

platforms = platforms.linux;
};
}