1{ stdenv, fetchgit, libxml2, libxslt, docbook-xsl, docbook_xml_dtd_44, perl, IPCRun, TimeDate, TimeDuration, makeWrapper, darwin }:
2
3with stdenv.lib;
4stdenv.mkDerivation rec {
5 name = "moreutils-${version}";
6 version = "0.62";
7
8 src = fetchgit {
9 url = "git://git.joeyh.name/moreutils";
10 rev = "refs/tags/${version}";
11 sha256 = "0sk7rgqsqbdwr69mh7y4v9lv4v0nfmsrqgvbpy2gvy82snhfzar2";
12 };
13
14 preBuild = ''
15 substituteInPlace Makefile --replace /usr/share/xml/docbook/stylesheet/docbook-xsl ${docbook-xsl}/xml/xsl/docbook
16 '';
17
18 buildInputs = [ libxml2 libxslt docbook-xsl docbook_xml_dtd_44 makeWrapper ]
19 ++ optional stdenv.isDarwin darwin.cctools;
20
21 propagatedBuildInputs = [ perl IPCRun TimeDate TimeDuration ];
22
23 buildFlags = "CC=cc";
24 installFlags = "PREFIX=$(out)";
25
26 postInstall = "wrapProgram $out/bin/chronic --prefix PERL5LIB : $PERL5LIB";
27
28 meta = {
29 description = "Growing collection of the unix tools that nobody thought to write long ago when unix was young";
30 homepage = https://joeyh.name/code/moreutils/;
31 maintainers = with maintainers; [ koral pSub ];
32 platforms = platforms.all;
33 };
34}