narsil: bbc8fc5efd779ec885045f9b8d903d0df1bec1b2 -> f5ec6bd6b8013f2a2b74fc45b6f4c5374...
[NixPkgs.git] / pkgs / by-name / sw / swiftformat / package.nix
blobda95f8af799834f36663dbcc476293b58b848cfd
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   swift,
6   swiftformat,
7   swiftpm,
8   testers,
9   versionCheckHook,
10   nix-update-script,
13 swift.stdenv.mkDerivation rec {
14   pname = "swiftformat";
15   version = "0.55.5";
17   src = fetchFromGitHub {
18     owner = "nicklockwood";
19     repo = "SwiftFormat";
20     rev = version;
21     sha256 = "sha256-AZAQSwmGNHN6ykh9ufeQLC1dEXvTt32X24MPTDh6bI8=";
22   };
24   nativeBuildInputs = [
25     swift
26     swiftpm
27   ];
29   installPhase = ''
30     install -D "$(swiftpmBinPath)/swiftformat" $out/bin/swiftformat
31   '';
33   nativeInstallCheckInputs = [
34     versionCheckHook
35   ];
36   doInstallCheck = true;
38   passthru = {
39     updateScript = nix-update-script { };
40   };
42   meta = {
43     description = "Code formatting and linting tool for Swift";
44     homepage = "https://github.com/nicklockwood/SwiftFormat";
45     license = lib.licenses.mit;
46     maintainers = with lib.maintainers; [
47       bdesham
48       DimitarNestorov
49     ];
50     platforms = lib.platforms.linux ++ lib.platforms.darwin;
51   };