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";
2019-12-21 21:00:00 -08:00
version = "1.7.9";
2019-02-06 17:17:17 -08:00
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
2019-12-21 21:00:00 -08:00
sha256 = "1qvrzksqr06lslryh7qzs56bs11xfyah5153x3aab2f5kgk1i8md";
2019-02-06 17:17:17 -08:00
};
2019-12-21 21:00:00 -08:00
modSha256 = "0rzwslpikadhqw8rcbg4hbasfcgjcc850ccfnprdxva4g1bb5rqc";
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 = ''
installShellCompletion --bash completions/chezmoi-completion.bash
installShellCompletion --fish completions/chezmoi.fish
installShellCompletion --zsh completions/chezmoi.zsh
'';
subPackages = [ "." ];
2019-02-06 17:17:17 -08:00
meta = with stdenv.lib; {
homepage = https://github.com/twpayne/chezmoi;
description = "Manage your dotfiles across multiple machines, securely";
license = licenses.mit;
maintainers = with maintainers; [ jhillyerd ];
platforms = platforms.all;
};
}