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

38 lines
1 KiB
Nix
Raw Normal View History

2019-11-01 10:20:00 +01:00
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-02-07 02:17:17 +01:00
2019-11-01 10:20:00 +01:00
buildGoModule rec {
pname = "chezmoi";
2020-01-06 09:45:44 +01:00
version = "1.7.10";
2019-02-07 02:17:17 +01:00
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
2020-01-06 09:45:44 +01:00
sha256 = "1miki6p611s0m3s0q5qsc9cks0akm59ks3x1gzi9wvhzf6k9h0dn";
2019-02-07 02:17:17 +01:00
};
2019-12-22 06:00:00 +01:00
modSha256 = "0rzwslpikadhqw8rcbg4hbasfcgjcc850ccfnprdxva4g1bb5rqc";
2019-02-07 02:17:17 +01:00
buildFlagsArray = [
2019-11-01 10:20:00 +01:00
"-ldflags=-s -w -X github.com/twpayne/chezmoi/cmd.VersionStr=${version}"
2019-02-07 02:17:17 +01:00
];
2019-11-01 10:20:00 +01:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --bash completions/chezmoi-completion.bash
installShellCompletion --fish completions/chezmoi.fish
installShellCompletion --zsh completions/chezmoi.zsh
'';
subPackages = [ "." ];
2019-02-07 02:17:17 +01: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;
};
}