Skip to content

Commit 5c81089

Browse files
creek: init at 0.4.2 (#392212)
2 parents 82a382e + 6df1c4b commit 5c81089

File tree

3 files changed

+174
-0
lines changed

3 files changed

+174
-0
lines changed

maintainers/maintainer-list.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,12 @@
10921092
githubId = 45104896;
10931093
name = "Alexandru Nechita";
10941094
};
1095+
alexandrutocar = {
1096+
email = "[email protected]";
1097+
github = "alexandrutocar";
1098+
githubId = 65486851;
1099+
name = "Alexandru Tocar";
1100+
};
10951101
alexarice = {
10961102
email = "[email protected]";
10971103
github = "alexarice";
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# generated by zon2nix (https://github.com/Cloudef/zig2nix)
2+
{
3+
lib,
4+
linkFarm,
5+
fetchurl,
6+
fetchgit,
7+
runCommandLocal,
8+
zig,
9+
name ? "zig-packages",
10+
}:
11+
let
12+
unpackZigArtifact =
13+
{
14+
name,
15+
artifact,
16+
}:
17+
runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
18+
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
19+
mv "$TMPDIR/p/$hash" "$out"
20+
chmod 755 "$out"
21+
'';
22+
23+
fetchZig =
24+
{
25+
name,
26+
url,
27+
hash,
28+
}:
29+
let
30+
artifact = fetchurl { inherit url hash; };
31+
in
32+
unpackZigArtifact { inherit name artifact; };
33+
34+
fetchGitZig =
35+
{
36+
name,
37+
url,
38+
hash,
39+
}:
40+
let
41+
parts = lib.splitString "#" url;
42+
url_base = builtins.elemAt parts 0;
43+
url_without_query = builtins.elemAt (lib.splitString "?" url_base) 0;
44+
rev_base = builtins.elemAt parts 1;
45+
rev =
46+
if builtins.match "^[a-fA-F0-9]{40}$" rev_base != null then rev_base else "refs/heads/${rev_base}";
47+
in
48+
fetchgit {
49+
inherit name rev hash;
50+
url = url_without_query;
51+
deepClone = false;
52+
};
53+
54+
fetchZigArtifact =
55+
{
56+
name,
57+
url,
58+
hash,
59+
}:
60+
let
61+
parts = lib.splitString "://" url;
62+
proto = builtins.elemAt parts 0;
63+
path = builtins.elemAt parts 1;
64+
fetcher = {
65+
"git+http" = fetchGitZig {
66+
inherit name hash;
67+
url = "http://${path}";
68+
};
69+
"git+https" = fetchGitZig {
70+
inherit name hash;
71+
url = "https://${path}";
72+
};
73+
http = fetchZig {
74+
inherit name hash;
75+
url = "http://${path}";
76+
};
77+
https = fetchZig {
78+
inherit name hash;
79+
url = "https://${path}";
80+
};
81+
};
82+
in
83+
fetcher.${proto};
84+
in
85+
linkFarm name [
86+
{
87+
name = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56";
88+
path = fetchZigArtifact {
89+
name = "zig-pixman";
90+
url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.2.0.tar.gz";
91+
hash = "sha256-CYgFIOR9H5q8UUpFglaixOocCMT6FGpcKQQBUVWpDKQ=";
92+
};
93+
}
94+
{
95+
name = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242";
96+
path = fetchZigArtifact {
97+
name = "zig-wayland";
98+
url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz";
99+
hash = "sha256-gxzkHLCq2NqX3l4nEly92ARU5dqP1SqnjpGMDgx4TXA=";
100+
};
101+
}
102+
{
103+
name = "1220a4029ee3ee70d3175c69878e2b70dccd000c4324bc74ba800d8a143b7250fb38";
104+
path = fetchZigArtifact {
105+
name = "zig-fcft";
106+
url = "https://git.sr.ht/~novakane/zig-fcft/archive/1.1.0.tar.gz";
107+
hash = "sha256-osL/zsXqa8tC/Qvzf0/wXeNCzw02F2viCo+d8Gh2S7U=";
108+
};
109+
}
110+
]

pkgs/by-name/cr/creek/package.nix

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
callPackage,
3+
lib,
4+
zig_0_13,
5+
stdenv,
6+
fetchFromGitHub,
7+
fcft,
8+
pixman,
9+
pkg-config,
10+
wayland,
11+
wayland-scanner,
12+
wayland-protocols,
13+
}:
14+
let
15+
zig = zig_0_13;
16+
in
17+
stdenv.mkDerivation (finalAttrs: {
18+
pname = "creek";
19+
version = "0.4.2";
20+
21+
src = fetchFromGitHub {
22+
owner = "nmeum";
23+
repo = "creek";
24+
tag = "v${finalAttrs.version}";
25+
hash = "sha256-3Q690DEMgPqURTHKzJwH5iVyTLvgYqNpxuwAEV+/Lyw=";
26+
};
27+
28+
nativeBuildInputs = [
29+
zig.hook
30+
pkg-config
31+
wayland
32+
wayland-scanner
33+
];
34+
35+
buildInputs = [
36+
fcft
37+
pixman
38+
wayland-protocols
39+
];
40+
41+
deps = callPackage ./build.zig.zon.nix {
42+
inherit zig;
43+
};
44+
45+
zigBuildFlags = [
46+
"--system"
47+
"${finalAttrs.deps}"
48+
];
49+
50+
meta = {
51+
homepage = "https://git.8pit.net/creek";
52+
description = "Malleable and minimalist status bar for the River compositor";
53+
license = lib.licenses.mit;
54+
maintainers = with lib.maintainers; [ alexandrutocar ];
55+
mainProgram = "creek";
56+
platforms = lib.platforms.linux;
57+
};
58+
})

0 commit comments

Comments
 (0)