nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 52 lines 997 B view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 swift, 6 swiftformat, 7 swiftpm, 8 testers, 9 versionCheckHook, 10 nix-update-script, 11}: 12 13swift.stdenv.mkDerivation rec { 14 pname = "swiftformat"; 15 version = "0.58.5"; 16 17 src = fetchFromGitHub { 18 owner = "nicklockwood"; 19 repo = "SwiftFormat"; 20 rev = version; 21 sha256 = "sha256-QTfdMJpdm4m2YSZefPclGcAZFjyFgJeeWIYLf3apuFo="; 22 }; 23 24 nativeBuildInputs = [ 25 swift 26 swiftpm 27 ]; 28 29 installPhase = '' 30 install -D "$(swiftpmBinPath)/swiftformat" $out/bin/swiftformat 31 ''; 32 33 nativeInstallCheckInputs = [ 34 versionCheckHook 35 ]; 36 doInstallCheck = true; 37 38 passthru = { 39 updateScript = nix-update-script { }; 40 }; 41 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 }; 52}