nixpkgs/pkgs/tools/misc/moreutils/default.nix

40 lines
1.3 KiB
Nix
Raw Normal View History

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