Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

113 lines
2.2 KiB
Nix

{
lib,
asciidoc,
fetchFromGitHub,
gobject-introspection,
gtk3,
installShellFiles,
libappindicator-gtk3,
libnotify,
librsvg,
python3Packages,
udisks2,
wrapGAppsHook3,
testers,
udiskie,
}:
python3Packages.buildPythonApplication rec {
pname = "udiskie";
version = "2.5.7";
pyproject = true;
src = fetchFromGitHub {
owner = "coldfix";
repo = "udiskie";
rev = "v${version}";
hash = "sha256-ndoTVeF6iTe4+aqFDRaLUEaBavgCWHzULXeG3Kj3ptY=";
};
patches = [
./locale-path.patch
];
postPatch = ''
substituteInPlace udiskie/locale.py --subst-var out
'';
nativeBuildInputs = [
asciidoc # Man page
gobject-introspection
installShellFiles
wrapGAppsHook3
];
build-system = with python3Packages; [
setuptools
];
dontWrapGApps = true;
buildInputs = [
gtk3
libappindicator-gtk3
libnotify
librsvg # SVG icons
udisks2
];
dependencies = with python3Packages; [
docopt
keyutils
pygobject3
pyyaml
];
postBuild = ''
make -C doc
'';
postInstall = ''
installManPage doc/udiskie.8
installShellCompletion \
--bash completions/bash/* \
--zsh completions/zsh/*
'';
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
nativeCheckInputs = with python3Packages; [
pytestCheckHook
];
passthru.tests.version = testers.testVersion {
package = udiskie;
};
meta = with lib; {
homepage = "https://github.com/coldfix/udiskie";
changelog = "https://github.com/coldfix/udiskie/blob/${src.rev}/CHANGES.rst";
description = "Removable disk automounter for udisks";
longDescription = ''
udiskie is a udisks2 front-end that allows to manage removeable media such
as CDs or flash drives from userspace.
Its features include:
- automount removable media
- notifications
- tray icon
- command line tools for manual un-/mounting
- LUKS encrypted devices
- unlocking with keyfiles (requires udisks 2.6.4)
- loop devices (mounting iso archives)
- password caching (requires python keyutils 0.3)
'';
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}