waylock: port update script to bash
This commit is contained in:
@@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace pam.d/waylock --replace-fail "system-auth" "login"
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.nu;
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
homepage = "https://codeberg.org/ifreund/waylock";
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i nu -p nushell common-updater-scripts zon2nix
|
||||
|
||||
let latest_tag = list-git-tags --url=https://codeberg.org/ifreund/waylock | lines | sort --natural | str replace v '' | last
|
||||
update-source-version waylock $latest_tag
|
||||
|
||||
http get $"https://codeberg.org/ifreund/waylock/raw/tag/v($latest_tag)/build.zig.zon" | save build.zig.zon
|
||||
zon2nix > pkgs/by-name/wa/waylock/build.zig.zon.nix
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p bash common-updater-scripts gnused nixfmt-rfc-style zon2nix
|
||||
|
||||
latest_tag=$(list-git-tags --url=https://codeberg.org/ifreund/waylock | sed 's/^v//' | tail -n 1)
|
||||
|
||||
update-source-version waylock "$latest_tag"
|
||||
|
||||
wget "https://codeberg.org/ifreund/waylock/raw/tag/v${latest_tag}/build.zig.zon"
|
||||
nix --extra-experimental-features 'nix-command flakes' run github:Cloudef/zig2nix#zon2nix -- build.zig.zon >pkgs/by-name/wa/waylock/build.zig.zon.nix
|
||||
# strip file protocol
|
||||
sed -i '\|file = unpackZigArtifact { inherit name; artifact = /. + path; };|d' pkgs/by-name/wa/waylock/build.zig.zon.nix
|
||||
nixfmt pkgs/by-name/wa/waylock/build.zig.zon.nix
|
||||
|
||||
rm -f build.zig.zon build.zig.zon2json-lock
|
||||
Reference in New Issue
Block a user