2021-01-15 22:18:51 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, ronn, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
buildGoPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "git-lfs";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "3.1.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "git-lfs";
|
|
|
|
repo = "git-lfs";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-dGqb7gw7l2SPGwhHIFbEq6XqMB9QRw3+3Pfbk2S4kW4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
goPackagePath = "github.com/git-lfs/git-lfs";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ronn installShellFiles ];
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X ${goPackagePath}/config.Vendor=${version}" "-X ${goPackagePath}/config.GitCommit=${src.rev}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
preBuild = ''
|
|
|
|
pushd go/src/github.com/git-lfs/git-lfs
|
|
|
|
go generate ./commands
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
postBuild = ''
|
|
|
|
make -C go/src/${goPackagePath} man
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage go/src/${goPackagePath}/man/*.{1,5}
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Git extension for versioning large files";
|
|
|
|
homepage = "https://git-lfs.github.com/";
|
2021-10-28 06:52:43 +00:00
|
|
|
changelog = "https://github.com/git-lfs/git-lfs/raw/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = [ licenses.mit ];
|
2020-05-03 17:38:23 +00:00
|
|
|
maintainers = [ maintainers.twey maintainers.marsam ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|