2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, boost }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "source-highlight";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "3.1.9";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-13 14:23:35 +00:00
|
|
|
url = "mirror://gnu/src-highlite/${pname}-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "148w47k3zswbxvhg83z38ifi85f9dqcpg7icvvw1cm6bg21x4zrs";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# source-highlight uses it's own binary to generate documentation.
|
|
|
|
# During cross-compilation, that binary was built for the target
|
|
|
|
# platform architecture, so it can't run on the build host.
|
|
|
|
patchPhase = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
|
|
|
substituteInPlace Makefile.in --replace "src doc tests" "src tests"
|
|
|
|
'';
|
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ boost ];
|
|
|
|
|
|
|
|
configureFlags = [ "--with-boost=${boost.out}" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
outputs = [ "out" "doc" "dev" ];
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Source code renderer with syntax highlighting";
|
2021-02-13 14:23:35 +00:00
|
|
|
longDescription = ''
|
|
|
|
GNU Source-highlight, given a source file, produces a document
|
|
|
|
with syntax highlighting.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.gnu.org/software/src-highlite/";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|