nixpkgs-suyu/pkgs/tools/misc/chezmoi/default.nix

39 lines
1,006 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-02-07 02:17:17 +01:00
2019-11-01 10:20:00 +01:00
buildGoModule rec {
pname = "chezmoi";
2021-10-04 17:26:21 +02:00
version = "2.6.1";
2019-02-07 02:17:17 +01:00
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
2021-10-04 17:26:21 +02:00
sha256 = "sha256-x5KqDVy+thIymZHsmyO+WsGq0IBb2cZxogKsjzunC2o=";
2019-02-07 02:17:17 +01:00
};
2021-10-04 17:26:21 +02:00
vendorSha256 = "sha256-8NhJfA9q6di/IPL53U/dwGNAAdtuBX5Lf6fhTk4Mz0Q=";
2019-02-07 02:17:17 +01:00
doCheck = false;
2021-08-26 08:45:51 +02:00
ldflags = [
"-s" "-w" "-X main.version=${version}" "-X main.builtBy=nixpkgs"
2019-02-07 02:17:17 +01:00
];
2019-11-01 10:20:00 +01:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
2020-03-05 00:00:00 +01:00
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
2019-11-01 10:20:00 +01:00
installShellCompletion --fish completions/chezmoi.fish
installShellCompletion --zsh completions/chezmoi.zsh
'';
subPackages = [ "." ];
meta = with lib; {
2020-03-05 00:00:00 +01:00
homepage = "https://www.chezmoi.io/";
2019-02-07 02:17:17 +01:00
description = "Manage your dotfiles across multiple machines, securely";
license = licenses.mit;
maintainers = with maintainers; [ jhillyerd ];
};
}