swiftlint: add linux support
This commit is contained in:
@@ -33,11 +33,15 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 swiftlint $out/bin/swiftlint
|
||||
runHook postInstall
|
||||
'';
|
||||
installPhase =
|
||||
let
|
||||
binary = if stdenvNoCC.hostPlatform.isLinux then "swiftlint-static" else "swiftlint";
|
||||
in
|
||||
''
|
||||
runHook preInstall
|
||||
install -Dm755 ${binary} $out/bin/swiftlint
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
|
||||
installShellCompletion --cmd swiftlint \
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{
|
||||
"version": "0.63.2",
|
||||
"platforms": {
|
||||
"x86_64-linux": {
|
||||
"filename": "swiftlint_linux_amd64.zip",
|
||||
"hash": "sha256-3RAXz9IKFFfyZFkLy1h1pu4GzXW5qdT3fNQ6VSSZFDs="
|
||||
},
|
||||
"aarch64-linux": {
|
||||
"filename": "swiftlint_linux_arm64.zip",
|
||||
"hash": "sha256-EE3t/3YhV/XP93UvHMKiibYPPqZ35y1lHG86Mof92Ug="
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"filename": "portable_swiftlint.zip",
|
||||
"hash": "sha256-xZpAXIX5W5LO1nelAIBOCBWWpMrkpqSFr3YGVVfW7Sk="
|
||||
|
||||
Reference in New Issue
Block a user