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

39 lines
1018 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-02-06 17:17:17 -08:00
2019-11-01 02:20:00 -07:00
buildGoModule rec {
pname = "chezmoi";
2021-05-16 20:36:01 -07:00
version = "2.0.12";
2019-02-06 17:17:17 -08:00
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
2021-05-16 20:36:01 -07:00
sha256 = "sha256-CF/Ers/w1ZGBSvRVxyNf1R4CwwidK9ItiFBCIjToYg0=";
2019-02-06 17:17:17 -08:00
};
2021-05-16 20:36:01 -07:00
vendorSha256 = "sha256-tdd3uUxN+ZJ0hX4IqSM/xPZzcawtOa5xgjPhRrns5yM=";
2019-02-06 17:17:17 -08:00
doCheck = false;
2019-02-06 17:17:17 -08:00
buildFlagsArray = [
"-ldflags=-s -w -X main.version=${version} -X main.builtBy=nixpkgs"
2019-02-06 17:17:17 -08:00
];
2019-11-01 02:20:00 -07:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
2020-03-04 15:00:00 -08:00
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
2019-11-01 02:20:00 -07:00
installShellCompletion --fish completions/chezmoi.fish
installShellCompletion --zsh completions/chezmoi.zsh
'';
subPackages = [ "." ];
meta = with lib; {
2020-03-04 15:00:00 -08:00
homepage = "https://www.chezmoi.io/";
2019-02-06 17:17:17 -08:00
description = "Manage your dotfiles across multiple machines, securely";
license = licenses.mit;
maintainers = with maintainers; [ jhillyerd ];
};
}