mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-23 09:00:51 +00:00
committed by
github-actions[bot]
parent
6d66618a03
commit
5cf2290348
48
pkgs/by-name/zi/ziglint/package.nix
Normal file
48
pkgs/by-name/zi/ziglint/package.nix
Normal file
@@ -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