ziglint: init at 0.5.3 (#544238)
This commit is contained in:
@@ -30891,6 +30891,11 @@
|
||||
githubId = 106241330;
|
||||
name = "Success Kingsley";
|
||||
};
|
||||
xqtc161 = {
|
||||
github = "xqtc161";
|
||||
githubId = 65857432;
|
||||
name = "tila";
|
||||
};
|
||||
xrelkd = {
|
||||
github = "xrelkd";
|
||||
githubId = 46590321;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
zig_0_16,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
let
|
||||
zig = zig_0_16;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ziglint";
|
||||
version = "0.5.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rockorager";
|
||||
repo = "ziglint";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-kLcUIFMDJHuCA0rn3l5a3h/E6TUwNWA5mWRADCDB1cw=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace build.zig \
|
||||
--replace-fail "getVersion(b)" '"${finalAttrs.version}"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ zig.hook ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/rockorager/ziglint";
|
||||
description = "Linter for Zig source code";
|
||||
changelog = "https://github.com/rockorager/ziglint/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ xqtc161 ];
|
||||
mainProgram = "ziglint";
|
||||
inherit (zig.meta) platforms;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user