summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/text/highlight
diff options
context:
space:
mode:
authorndowens <ndowens04@gmail.com>2017-03-19 15:22:57 -0500
committerGitHub <noreply@github.com>2017-03-19 15:22:57 -0500
commit93ec1ad987e0d5130509c06e4eb2b3e9b7b5cb5f (patch)
tree46da024324de89dbcbb8d1029e111a16f5f695b1 /pkgs/tools/text/highlight
parent6ea3eefdfc9313c850304d01a398c6199805b726 (diff)
highlight: 3.28 -> 3.35 (#24068)
* highlight: 3.28 -> 3.35 highlight: Add support for darwin, suspecting needs gcc highlight: Fixed isDarwin [gcc] * highlight: enable darwin build
Diffstat (limited to 'pkgs/tools/text/highlight')
-rw-r--r--pkgs/tools/text/highlight/default.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/tools/text/highlight/default.nix b/pkgs/tools/text/highlight/default.nix
index 6f2a2df82f8d..666dae1db9b8 100644
--- a/pkgs/tools/text/highlight/default.nix
+++ b/pkgs/tools/text/highlight/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, getopt, lua, boost, pkgconfig }:
+{ stdenv, fetchurl, getopt, lua, boost, pkgconfig, gcc }:
+
+with stdenv.lib;
stdenv.mkDerivation rec {
name = "highlight-${version}";
@@ -9,16 +11,23 @@ stdenv.mkDerivation rec {
sha256 = "8a14b49f5e0c07daa9f40b4ce674baa00bb20061079473a5d386656f6d236d05";
};
- nativeBuildInputs = [ pkgconfig ];
+ nativeBuildInputs = [ pkgconfig ] ++ optional stdenv.isDarwin gcc ;
buildInputs = [ getopt lua boost ];
- preConfigure = ''makeFlags="PREFIX=$out conf_dir=$out/etc/highlight/"'';
+ prePatch = stdenv.lib.optionalString stdenv.cc.isClang ''
+ substituteInPlace src/makefile \
+ --replace 'CXX=g++' 'CXX=clang++'
+ '';
+
+ preConfigure = ''
+ makeFlags="PREFIX=$out conf_dir=$out/etc/highlight/"
+ '';
meta = with stdenv.lib; {
description = "Source code highlighting tool";
homepage = "http://www.andre-simon.de/doku/highlight/en/highlight.php";
- platforms = platforms.linux;
- maintainers = maintainers.ndowens;
+ platforms = platforms.unix;
+ maintainers = [ maintainers.ndowens ];
};
}