From 9929c7e9e464e11eb080283a686d6fb037ed8ca5 Mon Sep 17 00:00:00 2001 From: naurissteins Date: Fri, 24 Apr 2026 23:58:52 +0300 Subject: [PATCH] veila: init at 0.4.0 (cherry picked from commit a4290796278ce5179b7eabcb06b213ef3faedd91) --- pkgs/by-name/ve/veila/package.nix | 69 +++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 pkgs/by-name/ve/veila/package.nix diff --git a/pkgs/by-name/ve/veila/package.nix b/pkgs/by-name/ve/veila/package.nix new file mode 100644 index 000000000000..b2cb091c13a2 --- /dev/null +++ b/pkgs/by-name/ve/veila/package.nix @@ -0,0 +1,69 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + makeWrapper, + nix-update-script, + pkg-config, + pam, + wayland, + libxkbcommon, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "veila"; + version = "0.4.0"; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "naurissteins"; + repo = "Veila"; + tag = finalAttrs.version; + hash = "sha256-SrYG5rvywiPEfIjTbZfXOlXqnmdn0fZcOR16fxHJ0Ns="; + }; + + cargoHash = "sha256-jcZ33dJwvK94YqMFpXb9QXURjtOGrY4QdZh0I9LTwUU="; + + nativeBuildInputs = [ + makeWrapper + pkg-config + ]; + + buildInputs = [ + pam + wayland + libxkbcommon + ]; + + cargoBuildFlags = [ "--workspace" ]; + + postInstall = '' + pushd assets + for assetDir in fonts icons systemd themes; do + find "$assetDir" -type d -exec install -d "$out/share/veila/{}" ';' + find "$assetDir" -type f -exec install -Dm644 "{}" "$out/share/veila/{}" ';' + done + popd + + wrapProgram "$out/bin/veila" \ + --set VEILA_ASSET_DIR "$out/share/veila" + + wrapProgram "$out/bin/veila-curtain" \ + --set VEILA_ASSET_DIR "$out/share/veila" + + wrapProgram "$out/bin/veilad" \ + --set VEILA_ASSET_DIR "$out/share/veila" \ + --set VEILA_CURTAIN_BIN "$out/bin/veila-curtain" + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Screen locker for Wayland compositors"; + homepage = "https://naurissteins.com/veila"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ naurissteins ]; + platforms = lib.platforms.linux; + mainProgram = "veila"; + }; +})