2022-06-16 17:23:12 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, ronn, installShellFiles, git, testers, git-lfs }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "git-lfs";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "3.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "git-lfs";
|
|
|
|
repo = "git-lfs";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-3gVUPfZs5GViEA3D7Zm5NdxhuEz9DhwPLoQqHFdGCrI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
vendorSha256 = null;
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ ronn installShellFiles ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/git-lfs/git-lfs/v${lib.versions.major version}/config.Vendor=${version}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
preBuild = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
GOARCH= go generate ./commands
|
2022-01-26 04:04:25 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
postBuild = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
make man
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ git ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
unset subPackages
|
2020-05-03 17:38:23 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
installManPage man/man*/*
|
2020-05-03 17:38:23 +00:00
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = git-lfs;
|
|
|
|
};
|
|
|
|
|
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";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://git-lfs.github.com/";
|
|
|
|
changelog = "https://github.com/git-lfs/git-lfs/raw/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ twey marsam ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|