2021-09-10 13:29:06 +02:00
|
|
|
{ lib, stdenv, fetchpatch, fetchurl, boost }:
|
2010-04-30 14:23:26 +02:00
|
|
|
|
2021-02-12 04:26:59 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "source-highlight";
|
2019-11-13 18:41:39 +01:00
|
|
|
version = "3.1.9";
|
2010-04-30 14:23:26 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-12 04:26:59 +01:00
|
|
|
url = "mirror://gnu/src-highlite/${pname}-${version}.tar.gz";
|
2019-11-13 18:41:39 +01:00
|
|
|
sha256 = "148w47k3zswbxvhg83z38ifi85f9dqcpg7icvvw1cm6bg21x4zrs";
|
2013-12-10 12:02:53 +01:00
|
|
|
};
|
2010-04-30 14:23:26 +02:00
|
|
|
|
2021-09-10 13:29:06 +02:00
|
|
|
patches = [
|
|
|
|
# gcc-11 compat upstream patch
|
|
|
|
(fetchpatch {
|
|
|
|
url = "http://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=904949c9026cb772dc93fbe0947a252ef47127f4";
|
|
|
|
sha256 = "1wnj0jmkmrwjww7qk9dvfxh8h06jdn7mi8v2fvwh95b6x87z5l47";
|
|
|
|
excludes = [ "ChangeLog" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-08-31 13:52:09 +02: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.
|
2021-09-10 13:29:06 +02:00
|
|
|
postPatch = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
2020-08-31 13:52:09 +02:00
|
|
|
substituteInPlace Makefile.in --replace "src doc tests" "src tests"
|
|
|
|
'';
|
|
|
|
|
|
|
|
strictDeps = true;
|
2013-12-10 12:02:53 +01:00
|
|
|
buildInputs = [ boost ];
|
|
|
|
|
2016-04-27 23:41:28 +02:00
|
|
|
configureFlags = [ "--with-boost=${boost.out}" ];
|
2013-12-10 12:02:53 +01:00
|
|
|
|
2021-09-18 20:25:45 +02:00
|
|
|
doCheck = !stdenv.cc.isClang;
|
2021-09-11 10:33:33 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# Upstream uses the same intermediate files in multiple tests, running
|
|
|
|
# them in parallel by make will eventually break one or more tests.
|
|
|
|
enableParallelChecking = false;
|
2010-04-30 14:23:26 +02:00
|
|
|
|
2021-02-14 08:56:28 +01:00
|
|
|
outputs = [ "out" "doc" "dev" ];
|
|
|
|
|
2021-02-12 04:26:59 +01:00
|
|
|
meta = with lib; {
|
2013-12-10 12:02:53 +01:00
|
|
|
description = "Source code renderer with syntax highlighting";
|
2021-02-12 04:26:59 +01:00
|
|
|
longDescription = ''
|
|
|
|
GNU Source-highlight, given a source file, produces a document
|
|
|
|
with syntax highlighting.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.gnu.org/software/src-highlite/";
|
2021-02-12 04:26:59 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2010-04-30 14:23:26 +02:00
|
|
|
};
|
|
|
|
}
|