2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchgit, libxml2, libxslt, docbook-xsl, docbook_xml_dtd_44, perlPackages, makeWrapper, darwin }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "moreutils";
|
2021-12-30 13:39:12 +00:00
|
|
|
version = "0.67";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.joeyh.name/moreutils";
|
|
|
|
rev = "refs/tags/${version}";
|
2021-12-30 13:39:12 +00:00
|
|
|
sha256 = "sha256-8Mu7L3KqOsW9OmidMkWB+q9TofHd1P1sbsNrtE4MUoA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace Makefile --replace /usr/share/xml/docbook/stylesheet/docbook-xsl ${docbook-xsl}/xml/xsl/docbook
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ libxml2 libxslt docbook-xsl docbook_xml_dtd_44 ]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ optional stdenv.isDarwin darwin.cctools;
|
|
|
|
|
|
|
|
propagatedBuildInputs = with perlPackages; [ perl IPCRun TimeDate TimeDuration ];
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/chronic --prefix PERL5LIB : $PERL5LIB
|
|
|
|
wrapProgram $out/bin/ts --prefix PERL5LIB : $PERL5LIB
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Growing collection of the unix tools that nobody thought to write long ago when unix was young";
|
|
|
|
homepage = "https://joeyh.name/code/moreutils/";
|
|
|
|
maintainers = with maintainers; [ koral pSub ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
};
|
|
|
|
}
|