From 966ee2be2f107e2c47e42d110de56ec376a3fef5 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 4 Dec 2024 15:50:32 +0100 Subject: [PATCH] git-lfs: format --- .../version-management/git-lfs/default.nix | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/version-management/git-lfs/default.nix b/pkgs/applications/version-management/git-lfs/default.nix index 22ee1a17f218..eb6b52c2809a 100644 --- a/pkgs/applications/version-management/git-lfs/default.nix +++ b/pkgs/applications/version-management/git-lfs/default.nix @@ -1,4 +1,14 @@ -{ lib, buildGoModule, fetchFromGitHub, asciidoctor, installShellFiles, git, testers, git-lfs, stdenv }: +{ + lib, + buildGoModule, + fetchFromGitHub, + asciidoctor, + installShellFiles, + git, + testers, + git-lfs, + stdenv, +}: buildGoModule rec { pname = "git-lfs"; @@ -13,7 +23,10 @@ buildGoModule rec { vendorHash = "sha256-JT0r/hs7ZRtsYh4aXy+v8BjwiLvRJ10e4yRirqmWVW0="; - nativeBuildInputs = [ asciidoctor installShellFiles ]; + nativeBuildInputs = [ + asciidoctor + installShellFiles + ]; ldflags = [ "-s" @@ -37,14 +50,16 @@ buildGoModule rec { unset subPackages ''; - postInstall = '' - installManPage man/man*/* - '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - installShellCompletion --cmd git-lfs \ - --bash <($out/bin/git-lfs completion bash) \ - --fish <($out/bin/git-lfs completion fish) \ - --zsh <($out/bin/git-lfs completion zsh) - ''; + postInstall = + '' + installManPage man/man*/* + '' + + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd git-lfs \ + --bash <($out/bin/git-lfs completion bash) \ + --fish <($out/bin/git-lfs completion fish) \ + --zsh <($out/bin/git-lfs completion zsh) + ''; passthru.tests.version = testers.testVersion { package = git-lfs;