waylock: 1.3.0 -> 1.4.0
https://codeberg.org/ifreund/waylock/releases/tag/v1.4.0
This commit is contained in:
parent
db54ea84bf
commit
3bda6a1974
@ -1,107 +1,20 @@
|
||||
# generated by zon2nix (https://github.com/Cloudef/zig2nix)
|
||||
# generated by zon2nix (https://github.com/nix-community/zon2nix)
|
||||
|
||||
{
|
||||
lib,
|
||||
linkFarm,
|
||||
fetchurl,
|
||||
fetchgit,
|
||||
runCommandLocal,
|
||||
zig,
|
||||
name ? "zig-packages",
|
||||
}:
|
||||
{ linkFarm, fetchzip }:
|
||||
|
||||
with builtins;
|
||||
with lib;
|
||||
|
||||
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 = splitString "#" url;
|
||||
url_base = elemAt parts 0;
|
||||
url_without_query = elemAt (splitString "?" url_base) 0;
|
||||
rev_base = elemAt parts 1;
|
||||
rev = if 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 = splitString "://" url;
|
||||
proto = elemAt parts 0;
|
||||
path = 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 = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242";
|
||||
path = fetchZigArtifact {
|
||||
name = "zig-wayland";
|
||||
url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz";
|
||||
hash = "sha256-gxzkHLCq2NqX3l4nEly92ARU5dqP1SqnjpGMDgx4TXA=";
|
||||
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=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "1220c90b2228d65fd8427a837d31b0add83e9fade1dcfa539bb56fd06f1f8461605f";
|
||||
path = fetchZigArtifact {
|
||||
name = "zig-xkbcommon";
|
||||
url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.2.0.tar.gz";
|
||||
hash = "sha256-f5oEJU5i2qeVN3GBrnQcqzEJCiOT7l4ak7GQ6gw5cH0=";
|
||||
name = "xkbcommon-0.3.0-VDqIe3K9AQB2fG5ZeRcMC9i7kfrp5m2rWgLrmdNn9azr";
|
||||
path = fetchzip {
|
||||
url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.3.0.tar.gz";
|
||||
hash = "sha256-e5bPEfxl4SQf0cqccLt/py1KOW1+Q1+kWZUEXBbh9oQ=";
|
||||
};
|
||||
}
|
||||
]
|
||||
|
@ -10,31 +10,32 @@
|
||||
wayland,
|
||||
wayland-scanner,
|
||||
wayland-protocols,
|
||||
zig_0_13,
|
||||
zig_0_14,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "waylock";
|
||||
version = "1.3.0";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "ifreund";
|
||||
repo = "waylock";
|
||||
rev = "v${finalAttrs.version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-jfMSar+Y3inu1Cly6rIDw+akBJIQ6huL0smAstgQmEo=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-lshXVqSn50AujTjIJIcbyhe5GeLLMdmF+Vh3/QvZt00=";
|
||||
};
|
||||
|
||||
deps = callPackage ./build.zig.zon.nix {
|
||||
zig = zig_0_13;
|
||||
};
|
||||
postPatch = ''
|
||||
substituteInPlace build.zig --replace-fail "1.4.0-dev" "1.4.0"
|
||||
'';
|
||||
|
||||
deps = callPackage ./build.zig.zon.nix { };
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
scdoc
|
||||
wayland-scanner
|
||||
zig_0_13.hook
|
||||
zig_0_14.hook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -6,7 +6,7 @@ latest_tag=$(list-git-tags --url=https://codeberg.org/ifreund/waylock | sed 's/^
|
||||
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
|
||||
nix --extra-experimental-features 'nix-command flakes' run github:nix-community/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
|
||||
|
Loading…
x
Reference in New Issue
Block a user