creek: 0.4.2 -> 0.4.3 (#398022)

This commit is contained in:
Arne Keller
2025-04-16 11:35:00 +02:00
committed by GitHub
3 changed files with 41 additions and 104 deletions
+16 -95
View File
@@ -1,110 +1,31 @@
# generated by zon2nix (https://github.com/Cloudef/zig2nix)
# generated by zon2nix (https://github.com/nix-community/zon2nix)
{
lib,
linkFarm,
fetchurl,
fetchzip,
fetchgit,
runCommandLocal,
zig,
name ? "zig-packages",
}:
let
unpackZigArtifact =
{
name,
artifact,
}:
runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
mv "$TMPDIR/p/$hash" "$out"
chmod 755 "$out"
'';
fetchZig =
{
name,
url,
hash,
}:
let
artifact = fetchurl { inherit url hash; };
in
unpackZigArtifact { inherit name artifact; };
fetchGitZig =
{
name,
url,
hash,
}:
let
parts = lib.splitString "#" url;
url_base = builtins.elemAt parts 0;
url_without_query = builtins.elemAt (lib.splitString "?" url_base) 0;
rev_base = builtins.elemAt parts 1;
rev =
if builtins.match "^[a-fA-F0-9]{40}$" rev_base != null then rev_base else "refs/heads/${rev_base}";
in
fetchgit {
inherit name rev hash;
url = url_without_query;
deepClone = false;
};
fetchZigArtifact =
{
name,
url,
hash,
}:
let
parts = lib.splitString "://" url;
proto = builtins.elemAt parts 0;
path = builtins.elemAt parts 1;
fetcher = {
"git+http" = fetchGitZig {
inherit name hash;
url = "http://${path}";
};
"git+https" = fetchGitZig {
inherit name hash;
url = "https://${path}";
};
http = fetchZig {
inherit name hash;
url = "http://${path}";
};
https = fetchZig {
inherit name hash;
url = "https://${path}";
};
};
in
fetcher.${proto};
in
linkFarm name [
linkFarm "zig-packages" [
{
name = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56";
path = fetchZigArtifact {
name = "zig-pixman";
url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.2.0.tar.gz";
hash = "sha256-CYgFIOR9H5q8UUpFglaixOocCMT6FGpcKQQBUVWpDKQ=";
name = "fcft-2.0.0-zcx6C5EaAADIEaQzDg5D4UvFFMjSEwDE38vdE9xObeN9";
path = fetchzip {
url = "https://git.sr.ht/~novakane/zig-fcft/archive/v2.0.0.tar.gz";
hash = "sha256-qDEtiZNSkzN8jUSnZP/itqh8rMf+lakJy4xMB0I8sxQ=";
};
}
{
name = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242";
path = fetchZigArtifact {
name = "zig-wayland";
url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz";
hash = "sha256-gxzkHLCq2NqX3l4nEly92ARU5dqP1SqnjpGMDgx4TXA=";
name = "pixman-0.3.0-LClMnz2VAAAs7QSCGwLimV5VUYx0JFnX5xWU6HwtMuDX";
path = fetchzip {
url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.3.0.tar.gz";
hash = "sha256-8tA4auo5FEI4IPnomV6bkpQHUe302tQtorFQZ1l14NU=";
};
}
{
name = "1220a4029ee3ee70d3175c69878e2b70dccd000c4324bc74ba800d8a143b7250fb38";
path = fetchZigArtifact {
name = "zig-fcft";
url = "https://git.sr.ht/~novakane/zig-fcft/archive/1.1.0.tar.gz";
hash = "sha256-osL/zsXqa8tC/Qvzf0/wXeNCzw02F2viCo+d8Gh2S7U=";
name = "wayland-0.3.0-lQa1kjPIAQDmhGYpY-zxiRzQJFHQ2VqhJkQLbKKdt5wl";
path = fetchzip {
url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.3.0.tar.gz";
hash = "sha256-ydEavD9z20wRwn9ZVX56ZI2T5i1tnm3LupVxfa30o84=";
};
}
]
+12 -9
View File
@@ -1,7 +1,7 @@
{
callPackage,
lib,
zig_0_13,
zig_0_14,
stdenv,
fetchFromGitHub,
fcft,
@@ -12,43 +12,46 @@
wayland-protocols,
}:
let
zig = zig_0_13;
zig = zig_0_14;
in
stdenv.mkDerivation (finalAttrs: {
pname = "creek";
version = "0.4.2";
version = "0.4.3";
src = fetchFromGitHub {
owner = "nmeum";
repo = "creek";
tag = "v${finalAttrs.version}";
hash = "sha256-3Q690DEMgPqURTHKzJwH5iVyTLvgYqNpxuwAEV+/Lyw=";
hash = "sha256-5TANQt/VWafm6Lj4dYViiK0IMy/chGr/Gzq0S66HZqI=";
};
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [
zig.hook
pkg-config
wayland
wayland-scanner
];
buildInputs = [
fcft
pixman
wayland
wayland-protocols
];
deps = callPackage ./build.zig.zon.nix {
inherit zig;
};
deps = callPackage ./build.zig.zon.nix { };
zigBuildFlags = [
"--system"
"${finalAttrs.deps}"
];
passthru.updateScript = ./update.sh;
meta = {
homepage = "https://git.8pit.net/creek";
homepage = "https://github.com/nmeum/creek";
changelog = "https://github.com/nmeum/creek/releases/v${finalAttrs.version}";
description = "Malleable and minimalist status bar for the River compositor";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ alexandrutocar ];
+13
View File
@@ -0,0 +1,13 @@
#!/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://github.com/nmeum/creek | sed 's/^v//' | tail -n 1)
update-source-version creek "$latest_tag"
wget "https://raw.githubusercontent.com/nmeum/creek/v${latest_tag}/build.zig.zon"
nix --extra-experimental-features 'nix-command flakes' run github:nix-community/zon2nix# -- build.zig.zon >pkgs/by-name/cr/creek/build.zig.zon.nix
nixfmt pkgs/by-name/cr/creek/build.zig.zon.nix
rm -rf build.zig.zon