2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2019-02-07 02:17:17 +01:00
|
|
|
|
2019-11-01 10:20:00 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "chezmoi";
|
2021-04-12 21:36:45 +02:00
|
|
|
version = "2.0.9";
|
2019-02-07 02:17:17 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twpayne";
|
|
|
|
repo = "chezmoi";
|
|
|
|
rev = "v${version}";
|
2021-04-12 21:36:45 +02:00
|
|
|
sha256 = "sha256-yDd9u9cwC+bjB0ZQW0EgEDaHmWwkUprwXIiVrOVP2nk=";
|
2019-02-07 02:17:17 +01:00
|
|
|
};
|
|
|
|
|
2021-04-12 21:36:45 +02:00
|
|
|
vendorSha256 = "sha256-c6YIWpC8sQA/gbgD2vuuFvwccEE00aUrj6gcPpJsn0k=";
|
2019-02-07 02:17:17 +01:00
|
|
|
|
2020-08-04 02:26:27 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-02-07 02:17:17 +01:00
|
|
|
buildFlagsArray = [
|
2020-04-04 22:15:25 +02:00
|
|
|
"-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 = [ "." ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with 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 ];
|
|
|
|
};
|
2020-07-31 05:58:04 +02:00
|
|
|
}
|