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

37 lines
1 KiB
Nix
Raw Normal View History

{ 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-06-14 13:32:29 +02:00
version = "1.8.2";
2019-02-07 02:17:17 +01:00
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
2020-06-14 13:32:29 +02:00
sha256 = "0s2a0q3lgrdz7w69sacn23k4dybw6wrk63xxnylj88wss7mqnpj8";
2019-02-07 02:17:17 +01:00
};
2020-06-14 13:32:29 +02:00
vendorSha256 = "0hpjvpai2i9jn8hlxhx4pvvawjh6lfmlz7ffi320pp7vanzqhch1";
2019-02-07 02:17:17 +01:00
buildFlagsArray = [
"-ldflags=-s -w -X main.version=${version} -X main.builtBy=nixpkgs"
2019-02-07 02:17:17 +01:00
];
2019-11-01 10:20:00 +01:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
2020-03-05 00:00:00 +01:00
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
2019-11-01 10:20:00 +01:00
installShellCompletion --fish completions/chezmoi.fish
installShellCompletion --zsh completions/chezmoi.zsh
'';
subPackages = [ "." ];
2019-02-07 02:17:17 +01:00
meta = with stdenv.lib; {
2020-03-05 00:00:00 +01:00
homepage = "https://www.chezmoi.io/";
2019-02-07 02:17:17 +01:00
description = "Manage your dotfiles across multiple machines, securely";
license = licenses.mit;
maintainers = with maintainers; [ jhillyerd ];
platforms = platforms.all;
};
}