nixpkgs/pkgs/applications/version-management/src/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

43 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, python, rcs, git, makeWrapper }:
stdenv.mkDerivation rec {
pname = "src";
version = "1.28";
src = fetchurl {
url = "http://www.catb.org/~esr/src/${pname}-${version}.tar.gz";
sha256 = "1fkr5z3mlj13djz9w1sb644wc7r1fywz52qq97byw1yyw0bqyi7f";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python rcs git ];
preConfigure = ''
patchShebangs .
'';
makeFlags = [ "prefix=${placeholder "out"}" ];
postInstall = ''
wrapProgram $out/bin/src \
--suffix PATH ":" "${rcs}/bin"
'';
meta = with lib; {
description = "Simple single-file revision control";
longDescription = ''
SRC, acronym of Simple Revision Control, is RCS/SCCS reloaded with a
modern UI, designed to manage single-file solo projects kept more than one
to a directory. Use it for FAQs, ~/bin directories, config files, and the
like. Features integer sequential revision numbers, a command set that
will seem familiar to Subversion/Git/hg users, and no binary blobs
anywhere.
'';
homepage = "http://www.catb.org/esr/src/";
changelog = "https://gitlab.com/esr/src/raw/${version}/NEWS";
license = licenses.bsd2;
platforms = platforms.all;
maintainers = with maintainers; [ calvertvl AndersonTorres ];
};
}