Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
53 lines
997 B
Nix
53 lines
997 B
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
swift,
|
|
swiftformat,
|
|
swiftpm,
|
|
testers,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
swift.stdenv.mkDerivation rec {
|
|
pname = "swiftformat";
|
|
version = "0.58.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nicklockwood";
|
|
repo = "SwiftFormat";
|
|
rev = version;
|
|
sha256 = "sha256-v0ZJzB8PndVo6x4TZuxdw4bAALemY0mubPdmUdcAuHk=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
swift
|
|
swiftpm
|
|
];
|
|
|
|
installPhase = ''
|
|
install -D "$(swiftpmBinPath)/swiftformat" $out/bin/swiftformat
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
doInstallCheck = true;
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Code formatting and linting tool for Swift";
|
|
homepage = "https://github.com/nicklockwood/SwiftFormat";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
bdesham
|
|
DimitarNestorov
|
|
];
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
};
|
|
}
|