about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/me
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-20 12:16:56 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-20 12:16:56 +0100
commitb24d64b3b1ef897f07cd072a88a9881cb330aa7f (patch)
treea87bb2eed9af3ef1efd51dd65221d91f0c949041 /nixpkgs/pkgs/by-name/me
parent73338df7473bb3810e70a16b8b0cba4f0f606f2b (diff)
parentfa15b53dbea5028db38d6e09b4cef6eba42aeebb (diff)
downloadnixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.gz
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.bz2
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.lz
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.xz
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.zst
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/by-name/me')
-rw-r--r--nixpkgs/pkgs/by-name/me/menulibre/package.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/me/menulibre/package.nix b/nixpkgs/pkgs/by-name/me/menulibre/package.nix
new file mode 100644
index 000000000000..5abe3a2bb47a
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/me/menulibre/package.nix
@@ -0,0 +1,61 @@
+{ lib
+, fetchFromGitHub
+, python3Packages
+, gnome-menus
+, gtk3
+, intltool
+, gobject-introspection
+, wrapGAppsHook
+, testers
+, menulibre
+}:
+
+python3Packages.buildPythonApplication rec {
+  name = "menulibre";
+  version = "2.2.3";
+
+  src = fetchFromGitHub {
+    owner = "bluesabre";
+    repo = "menulibre";
+    rev = "menulibre-${version}";
+    hash = "sha256-E0ukq3q4YaakOI2mDs3dh0ncZX/dqspCA+97r3JwWyA=";
+  };
+
+  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
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = menulibre;
+    command = "HOME=$TMPDIR menulibre --version | cut -d' ' -f2";
+  };
+
+  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;
+  };
+}