mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
5c9bd5bf82
- use `perl.withPackages` instead of manually wrapping. - plumb the docbook via `DOCBOOKXSL` instead of patching. - specify `INSTALL_BIN=install` instead of upstream's default `install -s`. this lets the user control stripping (via stdenv's `dontStrip` option), and notably in a way which is compatible with cross compilation (`install -s` is not).
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchgit
|
|
, libxml2
|
|
, libxslt
|
|
, docbook-xsl
|
|
, docbook_xml_dtd_44
|
|
, perlPackages
|
|
, makeWrapper
|
|
, perl # for pod2man
|
|
, darwin
|
|
, gitUpdater
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "moreutils";
|
|
version = "0.69";
|
|
|
|
src = fetchgit {
|
|
url = "git://git.joeyh.name/moreutils";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-hVvRAIXlG8+pAD2v/Ma9Z6EUL/1xIRz7Gx1fOxoQyi0=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
nativeBuildInputs = [ makeWrapper perl libxml2 libxslt docbook-xsl docbook_xml_dtd_44 ];
|
|
buildInputs = [
|
|
(perl.withPackages (p: [ p.IPCRun p.TimeDate p.TimeDuration ]))
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
darwin.cctools
|
|
];
|
|
|
|
makeFlags = [
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
"DOCBOOKXSL=${docbook-xsl}/xml/xsl/docbook"
|
|
"INSTALL_BIN=install"
|
|
"PREFIX=${placeholder "out"}"
|
|
];
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
# No nicer place to find latest release.
|
|
url = "git://git.joeyh.name/moreutils";
|
|
};
|
|
|
|
meta = with lib; {
|
|
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;
|
|
};
|
|
}
|