nixpkgs/pkgs/applications/misc/udiskie/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

108 lines
2.2 KiB
Nix

{ lib
, asciidoc
, fetchFromGitHub
, gobject-introspection
, gtk3
, installShellFiles
, libappindicator-gtk3
, libnotify
, librsvg
, python3
, udisks2
, wrapGAppsHook3
, testers
, udiskie
}:
python3.pkgs.buildPythonApplication rec {
pname = "udiskie";
version = "2.5.2";
pyproject = true;
src = fetchFromGitHub {
owner = "coldfix";
repo = "udiskie";
rev = "v${version}";
hash = "sha256-r9ppuWYY3e2thsfFh4ooOgfqNvmCVw7fS0SpJCJcysQ=";
};
patches = [
./locale-path.patch
];
postPatch = ''
substituteInPlace udiskie/locale.py --subst-var out
'';
nativeBuildInputs = [
asciidoc # Man page
gobject-introspection
installShellFiles
python3.pkgs.setuptools
wrapGAppsHook3
];
dontWrapGApps = true;
buildInputs = [
gtk3
libappindicator-gtk3
libnotify
librsvg # SVG icons
udisks2
];
propagatedBuildInputs = with python3.pkgs; [
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 python3.pkgs; [
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; [ AndersonTorres dotlambda ];
};
}