]> git.scottworley.com Git - nix-env-apps/commitdiff
Desktop Entry
authorScott Worley <scottworley@scottworley.com>
Sat, 13 Sep 2025 19:09:25 +0000 (12:09 -0700)
committerScott Worley <scottworley@scottworley.com>
Sat, 13 Sep 2025 19:09:25 +0000 (12:09 -0700)
Changelog
apps.png [new file with mode: 0644]
default.nix

index 1e421edcc2ae75cdd5501bce5a36a28961ca8141..b0c0da58484c8d62d5a8cb1afc2e8a0cf121cbdd 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,5 @@
 ## [Unreleased]
 ## [Unreleased]
-
+Desktop entry
 
 ## [1.0.0] - 2025-09-13
 Initial version
 
 ## [1.0.0] - 2025-09-13
 Initial version
diff --git a/apps.png b/apps.png
new file mode 100644 (file)
index 0000000..e82aab6
Binary files /dev/null and b/apps.png differ
index ad68b48de9755dd8a7535f4c845eb17a94ff8e19..defa1ef136f4344be3c7b64dbc2fb9dda0a78aba 100644 (file)
@@ -1,7 +1,7 @@
 { pkgs ? import <nixpkgs> { }, lint ? false }:
 pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage
 { pkgs ? import <nixpkgs> { }, lint ? false }:
 pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage
-  , gobject-introspection, gtk4, lib, mypy, pylint, pygobject3, wrapGAppsHook4,
-  }:
+  , gobject-introspection, gtk4, lib, makeDesktopItem, mypy, pylint, pygobject3
+  , wrapGAppsHook4, }:
   buildPythonPackage rec {
     pname = "apps";
     version = "1.0.0";
   buildPythonPackage rec {
     pname = "apps";
     version = "1.0.0";
@@ -16,6 +16,20 @@ pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage
     buildInputs = [ gtk4 ];
     pythonPath = [ pygobject3 ];
 
     buildInputs = [ gtk4 ];
     pythonPath = [ pygobject3 ];
 
+    postInstall = ''
+      cp -r $desktopItem/share $out
+    '';
+
+    desktopItem = makeDesktopItem {
+      name = "Apps";
+      exec = "apps";
+      icon = ./apps.png;
+      comment = "Configure nix-env Apps";
+      desktopName = "Apps";
+      genericName = "Configure Apps";
+      categories = [ "Settings" ];
+    };
+
     meta = {
       description =
         "A simple GUI for managing declarative nix-env user environments";
     meta = {
       description =
         "A simple GUI for managing declarative nix-env user environments";