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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchgit
, libxml2
, libxslt
, docbook-xsl
, docbook_xml_dtd_44
, perlPackages
, makeWrapper
, perl # for pod2man
, darwin
, gitUpdater
}:
2014-12-14 11:49:07 +00:00
stdenv.mkDerivation rec {
pname = "moreutils";
version = "0.69";
2014-12-14 11:49:07 +00:00
2017-05-28 18:00:07 +00:00
src = fetchgit {
url = "git://git.joeyh.name/moreutils";
rev = "refs/tags/${version}";
hash = "sha256-hVvRAIXlG8+pAD2v/Ma9Z6EUL/1xIRz7Gx1fOxoQyi0=";
2014-12-14 11:49:07 +00:00
};
preBuild = ''
substituteInPlace Makefile --replace /usr/share/xml/docbook/stylesheet/docbook-xsl ${docbook-xsl}/xml/xsl/docbook
'';
strictDeps = true;
nativeBuildInputs = [ makeWrapper perl libxml2 libxslt docbook-xsl docbook_xml_dtd_44 ];
buildInputs = lib.optional stdenv.isDarwin darwin.cctools;
2014-12-14 11:49:07 +00:00
propagatedBuildInputs = with perlPackages; [ perl IPCRun TimeDate TimeDuration ];
2014-12-14 11:49:07 +00:00
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installFlags = [ "PREFIX=$(out)" ];
2014-12-14 11:49:07 +00:00
postInstall = ''
wrapProgram $out/bin/chronic --prefix PERL5LIB : $PERL5LIB
wrapProgram $out/bin/ts --prefix PERL5LIB : $PERL5LIB
'';
2014-12-14 11:49:07 +00:00
passthru.updateScript = gitUpdater {
# No nicer place to find latest release.
url = "git://git.joeyh.name/moreutils";
};
meta = with lib; {
2015-04-28 08:54:58 +00: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 18:00:07 +00:00
maintainers = with maintainers; [ koral pSub ];
2016-05-09 18:32:32 +00:00
platforms = platforms.all;
license = licenses.gpl2Plus;
2014-12-14 11:49:07 +00:00
};
}