Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub }: 2 3stdenv.mkDerivation rec { 4 version = "2.2.7b"; 5 pname = "discount"; 6 7 src = fetchFromGitHub { 8 owner = "Orc"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "sha256-S6OVKYulhvEPRqNXBsvZ7m2W4cbdnrpZKPAo3SfD+9s="; 12 }; 13 14 patches = [ ./fix-configure-path.patch ]; 15 configureScript = "./configure.sh"; 16 configureFlags = [ 17 "--shared" 18 "--debian-glitch" # use deterministic mangling 19 "--pkg-config" 20 "--h1-title" 21 ]; 22 23 enableParallelBuilding = true; 24 installTargets = [ "install.everything" ]; 25 26 doCheck = true; 27 28 postFixup = lib.optionalString stdenv.isDarwin '' 29 install_name_tool -id $out/lib/libmarkdown.dylib $out/lib/libmarkdown.dylib 30 ''; 31 32 meta = with lib; { 33 description = "Implementation of Markdown markup language in C"; 34 homepage = "http://www.pell.portland.or.us/~orc/Code/discount/"; 35 license = licenses.bsd3; 36 maintainers = with maintainers; [ shell ]; 37 mainProgram = "markdown"; 38 platforms = platforms.unix; 39 }; 40}