slackdump: 3.0.3 -> 3.0.5 (#379390)
[NixPkgs.git] / pkgs / by-name / sw / swiftlint / package.nix
blob74193b6a7eaa725bff7ec84bff1e296e2a87faf0
2   stdenvNoCC,
3   lib,
4   fetchurl,
5   unzip,
6   nix-update-script,
7   versionCheckHook,
8 }:
9 stdenvNoCC.mkDerivation rec {
10   pname = "swiftlint";
11   version = "0.58.2";
13   src = fetchurl {
14     url = "https://github.com/realm/SwiftLint/releases/download/${version}/portable_swiftlint.zip";
15     hash = "sha256-rQcdWjbX9Ddt/pLX7Z9LrvizvedbdRMdwofPNPEDU6U=";
16   };
18   dontPatch = true;
19   dontConfigure = true;
20   dontBuild = true;
22   nativeBuildInputs = [ unzip ];
24   sourceRoot = ".";
26   installPhase = ''
27     runHook preInstall
28     install -Dm755 swiftlint $out/bin/swiftlint
29     runHook postInstall
30   '';
32   doInstallCheck = true;
33   nativeInstallCheckInputs = [ versionCheckHook ];
35   passthru.updateScript = nix-update-script { };
37   meta = {
38     description = "A tool to enforce Swift style and conventions";
39     homepage = "https://realm.github.io/SwiftLint/";
40     license = lib.licenses.mit;
41     mainProgram = "swiftlint";
42     maintainers = with lib.maintainers; [
43       matteopacini
44       DimitarNestorov
45     ];
46     platforms = lib.platforms.darwin;
47     sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
48   };