river: fix updateScript
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, callPackage
|
||||
, fetchFromGitea
|
||||
, libGL
|
||||
, libX11
|
||||
, libevdev
|
||||
, libinput
|
||||
, libxkbcommon
|
||||
, pixman
|
||||
, pkg-config
|
||||
, scdoc
|
||||
, udev
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, wayland-scanner
|
||||
, wlroots_0_18
|
||||
, xwayland
|
||||
, zig_0_13
|
||||
, withManpages ? true
|
||||
, xwaylandSupport ? true
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
callPackage,
|
||||
fetchFromGitea,
|
||||
libGL,
|
||||
libX11,
|
||||
libevdev,
|
||||
libinput,
|
||||
libxkbcommon,
|
||||
pixman,
|
||||
pkg-config,
|
||||
scdoc,
|
||||
udev,
|
||||
wayland,
|
||||
wayland-protocols,
|
||||
wayland-scanner,
|
||||
wlroots_0_18,
|
||||
xwayland,
|
||||
zig_0_13,
|
||||
withManpages ? true,
|
||||
xwaylandSupport ? true,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -43,8 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
wayland-scanner
|
||||
xwayland
|
||||
zig_0_13.hook
|
||||
]
|
||||
++ lib.optional withManpages scdoc;
|
||||
] ++ lib.optional withManpages scdoc;
|
||||
|
||||
buildInputs = [
|
||||
libGL
|
||||
@@ -60,10 +60,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
zigBuildFlags = [
|
||||
"--system"
|
||||
"${finalAttrs.deps}"
|
||||
] ++ lib.optional withManpages "-Dman-pages" ++ lib.optional xwaylandSupport "-Dxwayland";
|
||||
zigBuildFlags =
|
||||
[
|
||||
"--system"
|
||||
"${finalAttrs.deps}"
|
||||
]
|
||||
++ lib.optional withManpages "-Dman-pages"
|
||||
++ lib.optional xwaylandSupport "-Dxwayland";
|
||||
|
||||
postInstall = ''
|
||||
install contrib/river.desktop -Dt $out/share/wayland-sessions
|
||||
@@ -71,7 +74,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
passthru = {
|
||||
providedSessions = [ "river" ];
|
||||
updateScript = ./update.nu;
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,9 +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/river/river | lines | sort --natural | str replace v '' | last
|
||||
update-source-version river $latest_tag
|
||||
|
||||
http get $"https://codeberg.org/river/river/raw/tag/v($latest_tag)/build.zig.zon" | save build.zig.zon
|
||||
zon2nix | save -f pkgs/by-name/ri/river/build.zig.zon.nix
|
||||
rm build.zig.zon
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p bash common-updater-scripts gnused nixfmt-rfc-style
|
||||
|
||||
latest_tag=$(list-git-tags --url=https://codeberg.org/river/river | sed 's/^v//' | tail -n 1)
|
||||
|
||||
update-source-version river "$latest_tag"
|
||||
|
||||
wget "https://codeberg.org/river/river/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/ri/river/build.zig.zon.nix
|
||||
# strip file protocol
|
||||
sed -i '\|file = unpackZigArtifact { inherit name; artifact = /. + path; };|d' pkgs/by-name/ri/river/build.zig.zon.nix
|
||||
nixfmt pkgs/by-name/ri/river/build.zig.zon.nix
|
||||
|
||||
rm -f build.zig.zon build.zig.zon2json-lock
|
||||
Reference in New Issue
Block a user