![Profpatsch](/assets/img/avatar_default.png)
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
29 lines
844 B
Nix
29 lines
844 B
Nix
{ lib, stdenv, fetchurl, pythonPackages }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "git-filter-repo";
|
|
version = "2.29.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/newren/git-filter-repo/releases/download/v${version}/${pname}-${version}.tar.xz";
|
|
sha256 = "00nn7k9jqrybb762486fmigsnbcn9lbvimgpfvvarz4ikdp9y9pb";
|
|
};
|
|
|
|
buildInputs = [ pythonPackages.python ];
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
install -Dm755 -t $out/bin git-filter-repo
|
|
install -Dm644 -t $out/share/man/man1 Documentation/man1/git-filter-repo.1
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/newren/git-filter-repo";
|
|
description = "Quickly rewrite git repository history (filter-branch replacement)";
|
|
license = licenses.mit;
|
|
inherit (pythonPackages.python.meta) platforms;
|
|
maintainers = [ maintainers.marsam ];
|
|
};
|
|
}
|