Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
stdenvNoCC,
|
|
lib,
|
|
fetchurl,
|
|
unzip,
|
|
nix-update-script,
|
|
versionCheckHook,
|
|
}:
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "swiftlint";
|
|
version = "0.61.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/realm/SwiftLint/releases/download/${version}/portable_swiftlint.zip";
|
|
hash = "sha256-I0LzeEMHoCEX4Y90X801DGrMbKsOUhwMDgHDKlOjsnQ=";
|
|
};
|
|
|
|
dontPatch = true;
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
sourceRoot = ".";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm755 swiftlint $out/bin/swiftlint
|
|
runHook postInstall
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Tool to enforce Swift style and conventions";
|
|
homepage = "https://realm.github.io/SwiftLint/";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "swiftlint";
|
|
maintainers = with lib.maintainers; [
|
|
matteopacini
|
|
DimitarNestorov
|
|
];
|
|
platforms = lib.platforms.darwin;
|
|
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
|
};
|
|
}
|