wleave: add updateScript; 0.5.1 -> 0.6.2 (#441309)
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
nix-update-script,
|
||||
|
||||
# Deps
|
||||
installShellFiles,
|
||||
pkg-config,
|
||||
scdoc,
|
||||
@@ -10,19 +13,22 @@
|
||||
glib,
|
||||
gtk4,
|
||||
gtk4-layer-shell,
|
||||
libadwaita,
|
||||
librsvg,
|
||||
libxml2,
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "wleave";
|
||||
version = "0.5.1";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AMNatty";
|
||||
repo = "wleave";
|
||||
rev = version;
|
||||
hash = "sha256-xl0JOepQDvYdeTv0LFYzp8QdufKXkayJcHklLBjupeA=";
|
||||
hash = "sha256-+0EKnaxRaHRxRvhASuvfpUijEZJFimR4zSzOyC3FOkQ=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-csnArsVk/Ifhi3aO3bSG0mkSA81KACxR/xC1L8JJfmc=";
|
||||
cargoHash = "sha256-MRVWiQNzETFbWeKwYeoXSUY9gncRCsYdPEZhpOKcTvA=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
@@ -36,18 +42,21 @@ rustPlatform.buildRustPackage rec {
|
||||
glib
|
||||
gtk4
|
||||
gtk4-layer-shell
|
||||
libadwaita
|
||||
librsvg
|
||||
libxml2
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace style.css \
|
||||
--replace-fail "/usr/share/wleave" "$out/share/${pname}"
|
||||
|
||||
substituteInPlace src/main.rs \
|
||||
substituteInPlace src/config.rs \
|
||||
--replace-fail "/etc/wleave" "$out/etc/${pname}"
|
||||
|
||||
substituteInPlace layout.json \
|
||||
--replace-fail "/usr/share/wleave" "$out/share/${pname}"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 -t "$out/etc/wleave" {"style.css","layout"}
|
||||
install -Dm644 -t "$out/etc/wleave" {"style.css","layout.json"}
|
||||
install -Dm644 -t "$out/share/wleave/icons" icons/*
|
||||
|
||||
for f in man/*.scd; do
|
||||
@@ -62,6 +71,8 @@ rustPlatform.buildRustPackage rec {
|
||||
--zsh <(cat completions/_wleave)
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Wayland-native logout script written in GTK4";
|
||||
homepage = "https://github.com/AMNatty/wleave";
|
||||
|
||||
Reference in New Issue
Block a user