bitwarden-desktop: 2024.12.1 -> 2025.1.1 (#374021)
[NixPkgs.git] / pkgs / by-name / ch / chezmoi / package.nix
blobfc24969cc063f8f2c7bda85787a075bfa81528f8
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   installShellFiles,
6 }:
8 let
9   argset = {
10     pname = "chezmoi";
11     version = "2.58.0";
13     src = fetchFromGitHub {
14       owner = "twpayne";
15       repo = "chezmoi";
16       rev = "v${argset.version}";
17       hash = "sha256-qYu6V57SHMcOpcpJrDyX6jBSMaH2NOFbLReWoeutx5k=";
18     };
20     vendorHash = "sha256-jFsrGB7zC4LJNV4CpW/3JLrDIxtD4q7sBbY9gldEleU=";
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