Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / ch / chezmoi / package.nix
blob60b76b1565de49afc033e6063c4965672471a82a
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   installShellFiles,
6 }:
8 let
9   argset = {
10     pname = "chezmoi";
11     version = "2.51.0";
13     src = fetchFromGitHub {
14       owner = "twpayne";
15       repo = "chezmoi";
16       rev = "v${argset.version}";
17       hash = "sha256-18y1AmCCoxu365bsLwUrPTUqT/Hy6e2WC2xt0o4K8/8=";
18     };
20     vendorHash = "sha256-wWvvNc7W+7/Hwy4/hwCyY0k/Qm5M7Z6PPCa9DXbXY0E=";
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