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

38 lines
1.0 KiB
Nix
Raw Normal View History

2019-11-01 02:20:00 -07:00
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-02-06 17:17:17 -08:00
2019-11-01 02:20:00 -07:00
buildGoModule rec {
pname = "chezmoi";
2020-03-04 15:00:00 -08:00
version = "1.7.16";
2019-02-06 17:17:17 -08:00
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
2020-03-04 15:00:00 -08:00
sha256 = "1fkjdpqal0yzm58l146pf5xpbhij9iq79933i9a77v2jihdbjn52";
2019-02-06 17:17:17 -08:00
};
2020-03-04 15:00:00 -08:00
modSha256 = "0gh314d3mspqmz2z3m05bgsp62mrhb48m4mwhfy5h62fs7aqymr8";
2019-02-06 17:17:17 -08:00
buildFlagsArray = [
2019-11-01 02:20:00 -07:00
"-ldflags=-s -w -X github.com/twpayne/chezmoi/cmd.VersionStr=${version}"
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 = [ "." ];
2019-02-06 17:17:17 -08:00
meta = with stdenv.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 ];
platforms = platforms.all;
};
}