From 4a9a8c37a8bc07475c86b128229cc01e50abedce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=84=A1=E5=90=8D=E6=B0=8F?= Date: Mon, 26 Aug 2024 08:48:41 +0800 Subject: [PATCH] wayprompt: init at 0.1.2 --- pkgs/by-name/wa/wayprompt/build.zig.zon.nix | 48 +++++++++++++++++ pkgs/by-name/wa/wayprompt/package.nix | 58 +++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 pkgs/by-name/wa/wayprompt/build.zig.zon.nix create mode 100644 pkgs/by-name/wa/wayprompt/package.nix diff --git a/pkgs/by-name/wa/wayprompt/build.zig.zon.nix b/pkgs/by-name/wa/wayprompt/build.zig.zon.nix new file mode 100644 index 0000000000000..42deb3f11a67f --- /dev/null +++ b/pkgs/by-name/wa/wayprompt/build.zig.zon.nix @@ -0,0 +1,48 @@ +# generated by zon2nix (https://github.com/nix-community/zon2nix) + +{ linkFarm, fetchzip }: + +linkFarm "zig-packages" [ + { + name = "12201bbf05e1fb73323a9b13d2599dc4bf82851e6d328d7523a1af5b861a87edf286"; + path = fetchzip { + url = "https://git.sr.ht/~leon_plickat/zig-ini/archive/879c74a3a801d49fa34343aebd55a22f591899b3.tar.gz"; + hash = "sha256-in7abjMSWtnmrri2tbTJW2WVL4ZLrKkTT8Bxy8njJT4="; + }; + } + { + name = "12202727aaaf0e742d4945be55af1ace8b25902095e0c1b0a24b70cc80a81b7ac518"; + path = fetchzip { + url = "https://git.sr.ht/~leon_plickat/zig-spoon/archive/fdba8e643c9558254bf4e6c600dfbd782fa7a267.tar.gz"; + hash = "sha256-c8V+HqtDMW6JBDKilzrC39GizvWPp1eMton1X4PpxJI="; + }; + } + { + name = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz"; + hash = "sha256-dvit+yvc0MnipqWjxJdfIsA6fJaJZOaIpx4w4woCxbE="; + }; + } + { + name = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.2.0.tar.gz"; + hash = "sha256-zcfZEMnipWDPuptl9UN0PoaJDjy2EHc7Wwi4GQq3hkY="; + }; + } + { + name = "1220a4029ee3ee70d3175c69878e2b70dccd000c4324bc74ba800d8a143b7250fb38"; + path = fetchzip { + url = "https://git.sr.ht/~novakane/zig-fcft/archive/1.1.0.tar.gz"; + hash = "sha256-JAR6Ticav9l/3aemJWGsjXMEUyHjuhUr3L0fznnLoEY="; + }; + } + { + name = "1220c90b2228d65fd8427a837d31b0add83e9fade1dcfa539bb56fd06f1f8461605f"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.2.0.tar.gz"; + hash = "sha256-T+EZiStBfmxFUjaX05WhYkFJ8tRok/UQtpc9QY9NxZk="; + }; + } +] diff --git a/pkgs/by-name/wa/wayprompt/package.nix b/pkgs/by-name/wa/wayprompt/package.nix new file mode 100644 index 0000000000000..ac4fdd35bfbc3 --- /dev/null +++ b/pkgs/by-name/wa/wayprompt/package.nix @@ -0,0 +1,58 @@ +{ + callPackage, + lib, + zig_0_13, + stdenv, + fetchFromSourcehut, + fcft, + libxkbcommon, + pixman, + pkg-config, + scdoc, + wayland, + wayland-protocols, + wayland-scanner, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "wayprompt"; + version = "0.1.2"; + + src = fetchFromSourcehut { + owner = "~leon_plickat"; + repo = "wayprompt"; + rev = "v${finalAttrs.version}"; + hash = "sha256-+9Zgq5/Zbb1I3CMH1pivPkddThaGDXM+vVCzWppXq+0="; + }; + + deps = callPackage ./build.zig.zon.nix { }; + + nativeBuildInputs = [ + zig_0_13.hook + pkg-config + wayland + wayland-scanner + scdoc + ]; + + buildInputs = [ + fcft + libxkbcommon + pixman + wayland-protocols + ]; + + zigBuildFlags = [ + "--system" + "${finalAttrs.deps}" + ]; + + meta = { + homepage = "https://git.sr.ht/~leon_plickat/wayprompt"; + description = "Multi-purpose (password-)prompt tool for Wayland"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ sg-qwt ]; + mainProgram = "pinentry-wayprompt"; + platforms = lib.platforms.linux; + }; +})