2022-06-21 20:19:35 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchgit
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
, docbook-xsl
|
|
|
|
, docbook_xml_dtd_44
|
|
|
|
, perlPackages
|
|
|
|
, makeWrapper
|
|
|
|
, perl # for pod2man
|
|
|
|
, darwin
|
|
|
|
}:
|
2014-12-14 12:49:07 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "moreutils";
|
2021-12-25 19:26:47 +01:00
|
|
|
version = "0.67";
|
2014-12-14 12:49:07 +01:00
|
|
|
|
2017-05-28 20:00:07 +02:00
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.joeyh.name/moreutils";
|
|
|
|
rev = "refs/tags/${version}";
|
2021-12-25 19:26:47 +01:00
|
|
|
sha256 = "sha256-8Mu7L3KqOsW9OmidMkWB+q9TofHd1P1sbsNrtE4MUoA=";
|
2014-12-14 12:49:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace Makefile --replace /usr/share/xml/docbook/stylesheet/docbook-xsl ${docbook-xsl}/xml/xsl/docbook
|
|
|
|
'';
|
|
|
|
|
2022-06-21 20:19:35 +02:00
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper perl libxml2 libxslt docbook-xsl docbook_xml_dtd_44 ];
|
2023-01-24 17:35:54 +01:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin darwin.cctools;
|
2014-12-14 12:49:07 +01:00
|
|
|
|
2018-12-15 04:50:31 +01:00
|
|
|
propagatedBuildInputs = with perlPackages; [ perl IPCRun TimeDate TimeDuration ];
|
2014-12-14 12:49:07 +01:00
|
|
|
|
2021-02-16 12:48:46 +01:00
|
|
|
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
2019-10-27 14:03:25 +01:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2014-12-14 12:49:07 +01:00
|
|
|
|
2019-02-01 11:28:09 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/chronic --prefix PERL5LIB : $PERL5LIB
|
|
|
|
wrapProgram $out/bin/ts --prefix PERL5LIB : $PERL5LIB
|
|
|
|
'';
|
2014-12-14 12:49:07 +01:00
|
|
|
|
2023-01-24 17:35:54 +01:00
|
|
|
meta = with lib; {
|
2015-04-28 10:54:58 +02:00
|
|
|
description = "Growing collection of the unix tools that nobody thought to write long ago when unix was young";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://joeyh.name/code/moreutils/";
|
2017-05-28 20:00:07 +02:00
|
|
|
maintainers = with maintainers; [ koral pSub ];
|
2016-05-09 20:32:32 +02:00
|
|
|
platforms = platforms.all;
|
2018-08-06 12:42:49 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2014-12-14 12:49:07 +01:00
|
|
|
};
|
|
|
|
}
|