2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
, gnome-menus
|
|
|
|
, gtk3
|
|
|
|
, intltool
|
|
|
|
, gobject-introspection
|
|
|
|
, wrapGAppsHook
|
2024-04-21 15:54:59 +00:00
|
|
|
, nix-update-script
|
2024-02-29 20:09:43 +00:00
|
|
|
, testers
|
|
|
|
, menulibre
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
name = "menulibre";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.4.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bluesabre";
|
|
|
|
repo = "menulibre";
|
|
|
|
rev = "menulibre-${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-IfsuOYP/H3r1GDWMVVSBfYvQS+01VJaAlZu+c05geWg=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
pygobject3
|
|
|
|
gnome-menus
|
|
|
|
psutil
|
|
|
|
distutils-extra
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gtk3
|
|
|
|
intltool
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail 'data_dir =' "data_dir = '$out/share/menulibre' #" \
|
|
|
|
--replace-fail 'update_desktop_file(desktop_file, script_path)' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = menulibre;
|
|
|
|
command = "HOME=$TMPDIR menulibre --version | cut -d' ' -f2";
|
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An advanced menu editor with an easy-to-use interface";
|
|
|
|
homepage = "https://bluesabre.org/projects/menulibre";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ lelgenio ];
|
|
|
|
mainProgram = "menulibre";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|