Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromSourcehut, 5 buildPackages, 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "scdoc"; 10 version = "1.11.3"; 11 12 src = fetchFromSourcehut { 13 owner = "~sircmpwn"; 14 repo = "scdoc"; 15 rev = finalAttrs.version; 16 hash = "sha256-MbLDhLn/JY6OcdOz9/mIPAQRp5TZ6IKuQ/FQ/R3wjGc="; 17 }; 18 19 outputs = [ 20 "out" 21 "man" 22 "dev" 23 ]; 24 25 postPatch = '' 26 substituteInPlace Makefile \ 27 --replace "LDFLAGS+=-static" "LDFLAGS+=" 28 ''; 29 30 makeFlags = [ 31 "PREFIX=${placeholder "out"}" 32 ] 33 ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 34 "HOST_SCDOC=${lib.getExe buildPackages.scdoc}" 35 ]; 36 37 doCheck = true; 38 39 meta = { 40 description = "Simple man page generator written in C99 for POSIX systems"; 41 homepage = "https://git.sr.ht/~sircmpwn/scdoc"; 42 changelog = "https://git.sr.ht/~sircmpwn/scdoc/refs/${finalAttrs.src.rev}"; 43 license = lib.licenses.mit; 44 mainProgram = "scdoc"; 45 maintainers = with lib.maintainers; [ ]; 46 platforms = lib.platforms.unix; 47 }; 48})