31 lines
868 B
Nix
31 lines
868 B
Nix
{ clangStdenv, lib, fetchFromGitHub, swift, swiftpm, swiftPackages }:
|
|
|
|
swiftPackages.stdenv.mkDerivation rec {
|
|
pname = "swiftformat";
|
|
version = "0.56.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nicklockwood";
|
|
repo = "SwiftFormat";
|
|
rev = version;
|
|
sha256 = "sha256-WnBQTpbz9tcnbvmtWpZ9esirWdQKJOpVmH8zk97OuFE=";
|
|
};
|
|
|
|
nativeBuildInputs = [ swift swiftpm ];
|
|
buildInputs = [ swiftPackages.Dispatch swiftPackages.Foundation ];
|
|
|
|
installPhase = ''
|
|
binPath="$(swiftpmBinPath)"
|
|
mkdir -p $out/bin
|
|
cp $binPath/swiftformat $out/bin/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A code formatting and linting tool for Swift";
|
|
homepage = "https://github.com/nicklockwood/SwiftFormat";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.bdesham ];
|
|
platforms = with lib.platforms; linux ++ darwin;
|
|
hydraPlatforms = [ ];
|
|
};
|
|
}
|