From ae53b42a97870331a61c74ebd951bc04502220b8 Mon Sep 17 00:00:00 2001 From: genga Date: Tue, 12 Nov 2024 12:35:32 +0300 Subject: [PATCH] hyprwall: init at 0.1.8 hyprwall: update icon hash and description hyprwall: remove desktopitems and add postInstall command hyprwall: update dependencies hyprwall: update hyprwall: update --- pkgs/by-name/hy/hyprwall/package.nix | 54 ++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pkgs/by-name/hy/hyprwall/package.nix diff --git a/pkgs/by-name/hy/hyprwall/package.nix b/pkgs/by-name/hy/hyprwall/package.nix new file mode 100644 index 00000000000000..787abfefa90f0b --- /dev/null +++ b/pkgs/by-name/hy/hyprwall/package.nix @@ -0,0 +1,54 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + + pkg-config, + glib, + pango, + gtk3, + wrapGAppsHook4, +}: + +rustPlatform.buildRustPackage rec { + pname = "hyprwall"; + version = "0.1.8"; + + src = fetchFromGitHub { + owner = "hyprutils"; + repo = "hyprwall"; + rev = "refs/tags/v${version}"; + hash = "sha256-dzPd+5cws3hKhdd1CKKEO7EWMS0XW0y1vqxg1XKX+gY="; + }; + + cargoHash = "sha256-gT2ysWHckcUl1yx5tciy6kSvZZ0srrs4OwI1mr/58Pc="; + + nativeBuildInputs = [ + pkg-config + glib + pango + wrapGAppsHook4 + ]; + + # Required in build process, prevents gdk-sys build error. + buildInputs = [ + gtk3 + ]; + + postInstall = '' + install -Dm644 hyprwall.desktop -t $out/share/applications + install -Dm644 hyprwall.png -t $out/share/pixmaps + substituteInPlace "$out/share/applications/hyprwall.desktop" \ + --replace-fail 'Exec=/usr/bin/hyprwall' "Exec=hyprwall" + ''; + + meta = { + description = "GUI for setting wallpapers with hyprpaper"; + homepage = "https://github.com/hyprutils/hyprwall"; + changelog = "https://github.com/hyprutils/hyprwall/releases/tag/v${version}"; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ genga898 ]; + mainProgram = "hyprwall"; + platforms = lib.platforms.linux; + }; +}