Skip to content

Commit

Permalink
swiftlint: init at 0.55.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Pacini committed Jun 10, 2024
1 parent 45a991d commit 71feffc
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions pkgs/by-name/sw/swiftlint/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
stdenvNoCC,
lib,
fetchurl,
unzip,
nix-update-script,
}:
stdenvNoCC.mkDerivation rec {
pname = "swiftlint";
version = "0.55.1";

src = fetchurl {
url = "https://github.com/realm/SwiftLint/releases/download/${version}/portable_swiftlint.zip";
hash = "sha256-Tmhw30CJaVQlcYnHjzmwrDpugHgR2/ihHIV8M+O2zwI=";
};

dontPatch = true;
dontConfigure = true;
dontBuild = true;

nativeBuildInputs = [ unzip ];

unpackPhase = ''
runHook preUnpack
unzip -q $src
runHook postUnpack
'';

installPhase = ''
runHook preInstall
install -Dm755 swiftlint $out/bin/swiftlint
runHook postInstall
'';

passthru.updateScript = nix-update-script { };

meta = with lib; {
description = "A tool to enforce Swift style and conventions";
homepage = "https://realm.github.io/SwiftLint/";
license = licenses.mit;
mainProgram = "swiftlint";
maintainers = with maintainers; [ matteopacini ];
platforms = platforms.darwin;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}

0 comments on commit 71feffc

Please sign in to comment.