4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "chezmoi";
|
|
version = "1.8.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "twpayne";
|
|
repo = "chezmoi";
|
|
rev = "v${version}";
|
|
sha256 = "07jsakihci98ww1hgppilq942raz05c5xi2pzq632vq5i11fi0nj";
|
|
};
|
|
|
|
vendorSha256 = "0adva7crl6dachbf76920aniki3zcq9chdjjrzssasm89zqgwicf";
|
|
|
|
doCheck = false;
|
|
|
|
buildFlagsArray = [
|
|
"-ldflags=-s -w -X main.version=${version} -X main.builtBy=nixpkgs"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
|
|
installShellCompletion --fish completions/chezmoi.fish
|
|
installShellCompletion --zsh completions/chezmoi.zsh
|
|
'';
|
|
|
|
subPackages = [ "." ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://www.chezmoi.io/";
|
|
description = "Manage your dotfiles across multiple machines, securely";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jhillyerd ];
|
|
};
|
|
}
|