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

40 lines
1.0 KiB
Nix
Raw Normal View History

{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-02-07 04:17:17 +03:00
2019-11-01 12:20:00 +03:00
buildGoModule rec {
pname = "chezmoi";
2020-07-02 09:55:27 +03:00
version = "1.8.3";
2019-02-07 04:17:17 +03:00
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
2020-07-02 09:55:27 +03:00
sha256 = "01px0nj2llas835g1hf8lvhigip4jm4innjacz18c7nf1ddwn7ss";
2019-02-07 04:17:17 +03:00
};
2020-07-02 09:55:27 +03:00
vendorSha256 = "1gzg73lrx73rhb9yj6yakv95m8rz1rhjgqjl1a78c8nvaii27a9x";
2019-02-07 04:17:17 +03:00
doCheck = false;
2019-02-07 04:17:17 +03:00
buildFlagsArray = [
"-ldflags=-s -w -X main.version=${version} -X main.builtBy=nixpkgs"
2019-02-07 04:17:17 +03:00
];
2019-11-01 12:20:00 +03:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
2020-03-05 02:00:00 +03:00
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
2019-11-01 12:20:00 +03:00
installShellCompletion --fish completions/chezmoi.fish
installShellCompletion --zsh completions/chezmoi.zsh
'';
subPackages = [ "." ];
2019-02-07 04:17:17 +03:00
meta = with stdenv.lib; {
2020-03-05 02:00:00 +03:00
homepage = "https://www.chezmoi.io/";
2019-02-07 04:17:17 +03:00
description = "Manage your dotfiles across multiple machines, securely";
license = licenses.mit;
maintainers = with maintainers; [ jhillyerd ];
platforms = platforms.all;
};
}