evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ch / chezmoi / package.nix
blobaf04bdfc1413814dbc2a1afaca7bf9bd67dcadc0
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   installShellFiles,
6 }:
8 let
9   argset = {
10     pname = "chezmoi";
11     version = "2.53.1";
13     src = fetchFromGitHub {
14       owner = "twpayne";
15       repo = "chezmoi";
16       rev = "v${argset.version}";
17       hash = "sha256-E7kr2fKBabbFVmtVRjgYy5TWhvQYb/RjhiNEcXYXL0E=";
18     };
20     vendorHash = "sha256-wOdDG/J/JYGNUGSUCPVCNtO+5TFkt5O5kFYniQgcN7A=";
22     nativeBuildInputs = [
23       installShellFiles
24     ];
26     ldflags = [
27       "-s"
28       "-w"
29       "-X main.version=${argset.version}"
30       "-X main.builtBy=nixpkgs"
31     ];
33     doCheck = false;
35     postInstall = ''
36       installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
37       installShellCompletion --fish completions/chezmoi.fish
38       installShellCompletion --zsh completions/chezmoi.zsh
39     '';
41     subPackages = [ "." ];
43     meta = {
44       homepage = "https://www.chezmoi.io/";
45       description = "Manage your dotfiles across multiple machines, securely";
46       changelog = "https://github.com/twpayne/chezmoi/releases/tag/${argset.src.rev}";
47       license = lib.licenses.mit;
48       mainProgram = "chezmoi";
49       maintainers = with lib.maintainers; [ AndersonTorres ];
50     };
51   };
53 buildGoModule argset