about summary refs log tree commit diff
path: root/pkgs/by-name/hy
diff options
context:
space:
mode:
authorDonovan Glover <donovan@dglover.co>2024-03-15 13:27:39 -0400
committerDonovan Glover <donovan@dglover.co>2024-03-15 13:27:39 -0400
commite6021d44293c2df7dfd6c95da733982137042b9e (patch)
treebd2191aef327d90cd7320d07fd43e227a8baa3d5 /pkgs/by-name/hy
parentd7b558dd23c249a3dbcd86cf76940ac33b014c67 (diff)
hyprnome: migrate to by-name
Diffstat (limited to 'pkgs/by-name/hy')
-rw-r--r--pkgs/by-name/hy/hyprnome/package.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/by-name/hy/hyprnome/package.nix b/pkgs/by-name/hy/hyprnome/package.nix
new file mode 100644
index 0000000000000..d8d6ba70c8f71
--- /dev/null
+++ b/pkgs/by-name/hy/hyprnome/package.nix
@@ -0,0 +1,44 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, installShellFiles
+, nix-update-script
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "hyprnome";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "donovanglover";
+    repo = "hyprnome";
+    rev = version;
+    hash = "sha256-zlXiT2EOIdgIDI4NQuU3C903SSq5bylBAFJXyv7mdJ4=";
+  };
+
+  cargoHash = "sha256-DpbRs97sr5wpJSrYF99ZiQ0SZOZdoQjfaLhKIAU95HA=";
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  postInstall = ''
+    installManPage target/man/hyprnome.1
+
+    installShellCompletion --cmd hyprnome \
+      --bash <(cat target/completions/hyprnome.bash) \
+      --fish <(cat target/completions/hyprnome.fish) \
+      --zsh <(cat target/completions/_hyprnome)
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "GNOME-like workspace switching in Hyprland";
+    homepage = "https://github.com/donovanglover/hyprnome";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ donovanglover ];
+    mainProgram = "hyprnome";
+  };
+}