2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "2.2.7b";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "discount";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orc";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
sha256 = "sha256-S6OVKYulhvEPRqNXBsvZ7m2W4cbdnrpZKPAo3SfD+9s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
patches = [ ./fix-configure-path.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureScript = "./configure.sh";
|
|
|
|
configureFlags = [
|
|
|
|
"--shared"
|
2022-05-18 14:49:53 +00:00
|
|
|
"--debian-glitch" # use deterministic mangling
|
|
|
|
"--pkg-config"
|
|
|
|
"--h1-title"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
enableParallelBuilding = true;
|
2022-05-18 14:49:53 +00:00
|
|
|
installTargets = [ "install.everything" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
postFixup = lib.optionalString stdenv.isDarwin ''
|
|
|
|
install_name_tool -id $out/lib/libmarkdown.dylib $out/lib/libmarkdown.dylib
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Implementation of Markdown markup language in C";
|
|
|
|
homepage = "http://www.pell.portland.or.us/~orc/Code/discount/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ shell ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "markdown";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|