depot/third_party/nixpkgs/pkgs/applications/version-management/git-lfs/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

55 lines
1.1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, ronn, installShellFiles, git, testers, git-lfs }:
buildGoModule rec {
pname = "git-lfs";
version = "3.2.0";
src = fetchFromGitHub {
owner = "git-lfs";
repo = "git-lfs";
rev = "v${version}";
sha256 = "sha256-3gVUPfZs5GViEA3D7Zm5NdxhuEz9DhwPLoQqHFdGCrI=";
};
vendorSha256 = null;
nativeBuildInputs = [ ronn installShellFiles ];
ldflags = [
"-s"
"-w"
"-X github.com/git-lfs/git-lfs/v${lib.versions.major version}/config.Vendor=${version}"
];
subPackages = [ "." ];
preBuild = ''
GOARCH= go generate ./commands
'';
postBuild = ''
make man
'';
checkInputs = [ git ];
preCheck = ''
unset subPackages
'';
postInstall = ''
installManPage man/man*/*
'';
passthru.tests.version = testers.testVersion {
package = git-lfs;
};
meta = with lib; {
description = "Git extension for versioning large files";
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 ];
};
}