![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
27 lines
757 B
Nix
27 lines
757 B
Nix
{ lib, stdenv, fetchurl, perl /*, xmlto */}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "colordiff-1.0.19";
|
|
|
|
src = fetchurl {
|
|
urls = [
|
|
"https://www.colordiff.org/${name}.tar.gz"
|
|
"http://www.colordiff.org/archive/${name}.tar.gz"
|
|
];
|
|
sha256 = "069vzzgs7b44bmfh3ks2psrdb26s1w19gp9w4xxbgi7nhx6w3s26";
|
|
};
|
|
|
|
buildInputs = [ perl /* xmlto */ ];
|
|
|
|
dontBuild = 1; # do not build doc yet.
|
|
|
|
installPhase = ''make INSTALL_DIR=/bin MAN_DIR=/share/man/man1 DESTDIR="$out" install'';
|
|
|
|
meta = with lib; {
|
|
description = "Wrapper for 'diff' that produces the same output but with pretty 'syntax' highlighting";
|
|
homepage = "https://www.colordiff.org/";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
};
|
|
}
|