2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2017-03-01 00:45:06 +00:00
|
|
|
|
2014-10-10 14:58:11 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-05-17 03:47:56 +00:00
|
|
|
version = "2.2.7b";
|
2019-05-06 13:44:40 +00:00
|
|
|
pname = "discount";
|
2014-10-10 14:58:11 +00:00
|
|
|
|
2019-05-06 13:44:40 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orc";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-05-17 03:47:56 +00:00
|
|
|
sha256 = "sha256-S6OVKYulhvEPRqNXBsvZ7m2W4cbdnrpZKPAo3SfD+9s=";
|
2014-10-10 14:58:11 +00:00
|
|
|
};
|
2017-03-01 00:45:06 +00:00
|
|
|
|
2022-05-17 03:47:56 +00:00
|
|
|
patches = [ ./fix-configure-path.patch ];
|
2014-10-10 14:58:11 +00:00
|
|
|
configureScript = "./configure.sh";
|
2019-01-20 02:54:16 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--shared"
|
2022-05-17 03:47:56 +00:00
|
|
|
"--debian-glitch" # use deterministic mangling
|
|
|
|
"--pkg-config"
|
|
|
|
"--h1-title"
|
2019-01-20 02:54:16 +00:00
|
|
|
];
|
|
|
|
|
2021-10-21 17:28:24 +00:00
|
|
|
enableParallelBuilding = true;
|
2022-05-17 03:47:56 +00:00
|
|
|
installTargets = [ "install.everything" ];
|
|
|
|
|
2019-05-06 13:44:40 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-01-18 15:24:31 +00:00
|
|
|
postFixup = lib.optionalString stdenv.isDarwin ''
|
|
|
|
install_name_tool -id $out/lib/libmarkdown.dylib $out/lib/libmarkdown.dylib
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-10-10 14:58:11 +00:00
|
|
|
description = "Implementation of Markdown markup language in C";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.pell.portland.or.us/~orc/Code/discount/";
|
2014-10-10 14:58:11 +00:00
|
|
|
license = licenses.bsd3;
|
2019-12-26 21:28:10 +00:00
|
|
|
maintainers = with maintainers; [ shell ];
|
2022-05-05 00:46:39 +00:00
|
|
|
mainProgram = "markdown";
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = platforms.unix;
|
2014-10-10 14:58:11 +00:00
|
|
|
};
|
|
|
|
}
|