depot/third_party/nixpkgs/pkgs/tools/text/discount/default.nix
Default email 4cb23072fc Project import generated by Copybara.
GitOrigin-RevId: 6d8215281b2f87a5af9ed7425a26ac575da0438f
2022-01-20 00:45:15 +01:00

47 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "2.2.7";
pname = "discount";
src = fetchFromGitHub {
owner = "Orc";
repo = pname;
rev = "v${version}";
sha256 = "0p2gznrsvv82zxbajqir8y2ap1ribbgagqg1bzhv3i81p2byhjh7";
};
patches = [
./fix-configure-path.patch
# Fix parallel make depends:
# - https://github.com/Orc/discount/commit/e42188e6c4c30d9de668cf98d98dd0c13ecce7cf.patch
# - https://github.com/Orc/discount/pull/245
./parallel-make.patch
];
configureScript = "./configure.sh";
configureFlags = [
"--enable-all-features"
"--pkg-config"
"--shared"
"--with-fenced-code"
# Use deterministic mangling
"--debian-glitch"
];
enableParallelBuilding = true;
doCheck = true;
postFixup = lib.optionalString stdenv.isDarwin ''
install_name_tool -id $out/lib/libmarkdown.dylib $out/lib/libmarkdown.dylib
'';
meta = with lib; {
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 ];
platforms = platforms.unix;
};
}