2020-03-27 07:33:21 +00:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2019-02-07 01:17:17 +00:00
|
|
|
|
2019-11-01 09:20:00 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "chezmoi";
|
2020-04-01 10:39:13 +01:00
|
|
|
version = "1.7.18";
|
2019-02-07 01:17:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twpayne";
|
|
|
|
repo = "chezmoi";
|
|
|
|
rev = "v${version}";
|
2020-04-01 10:39:13 +01:00
|
|
|
sha256 = "12gx78cbs7abizlqhs7y2w6lwlk5d1hhvixj0ki8d1d5vdr747bc";
|
2019-02-07 01:17:17 +00:00
|
|
|
};
|
|
|
|
|
2020-04-01 10:39:13 +01:00
|
|
|
modSha256 = "15b3hik3nzb7xnd6806dqdb36v7z2a0wmvxbrfwvnbigd8zd2y0j";
|
2019-02-07 01:17:17 +00:00
|
|
|
|
|
|
|
buildFlagsArray = [
|
2019-11-01 09:20:00 +00:00
|
|
|
"-ldflags=-s -w -X github.com/twpayne/chezmoi/cmd.VersionStr=${version}"
|
2019-02-07 01:17:17 +00:00
|
|
|
];
|
|
|
|
|
2019-11-01 09:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-03-04 23:00:00 +00:00
|
|
|
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
|
2019-11-01 09:20:00 +00:00
|
|
|
installShellCompletion --fish completions/chezmoi.fish
|
|
|
|
installShellCompletion --zsh completions/chezmoi.zsh
|
|
|
|
'';
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2019-02-07 01:17:17 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-04 23:00:00 +00:00
|
|
|
homepage = "https://www.chezmoi.io/";
|
2019-02-07 01:17:17 +00:00
|
|
|
description = "Manage your dotfiles across multiple machines, securely";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jhillyerd ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|