mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 06:36:43 +00:00
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
37 lines
1 KiB
Nix
37 lines
1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkgconfig, makeWrapper, openssl, git, libiconv, Security, installShellFiles }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "git-gone";
|
|
version = "0.3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lunaryorn";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0hhy1yazda9r4n753a5m9jf31fbzmm4v8wvl3pksspj2syglmll8";
|
|
};
|
|
|
|
cargoSha256 = "1g2jijx8y34lid9qwa26v4svab5v9ki6gn9vcfiy61dqa964c3l9";
|
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper installShellFiles ];
|
|
|
|
buildInputs = [ openssl ]
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
postInstall = ''
|
|
installManPage git-gone.1
|
|
'';
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/git-gone --prefix PATH : "${stdenv.lib.makeBinPath [ git ]}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Cleanup stale Git branches of pull requests";
|
|
homepage = "https://github.com/lunaryorn/git-gone";
|
|
license = licenses.asl20;
|
|
maintainers = [ maintainers.marsam ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|