2023-07-27 05:02:12 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, buildPackages
|
|
|
|
}:
|
2018-05-31 17:55:23 +02:00
|
|
|
|
2023-07-27 05:02:12 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "scdoc";
|
2024-02-18 09:07:24 +01:00
|
|
|
version = "1.11.3";
|
2018-05-31 17:55:23 +02:00
|
|
|
|
2021-03-13 12:33:02 +01:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~sircmpwn";
|
2023-07-27 05:02:12 +02:00
|
|
|
repo = "scdoc";
|
2024-02-18 09:07:24 +01:00
|
|
|
rev = finalAttrs.version;
|
|
|
|
hash = "sha256-MbLDhLn/JY6OcdOz9/mIPAQRp5TZ6IKuQ/FQ/R3wjGc=";
|
2018-05-31 17:55:23 +02:00
|
|
|
};
|
|
|
|
|
2023-07-27 05:02:12 +02:00
|
|
|
outputs = [ "out" "man" "dev" ];
|
|
|
|
|
2018-05-31 17:55:23 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
2023-10-06 02:47:45 +02:00
|
|
|
--replace "LDFLAGS+=-static" "LDFLAGS+="
|
2018-05-31 17:55:23 +02:00
|
|
|
'';
|
|
|
|
|
2023-07-27 05:02:12 +02:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
|
|
"HOST_SCDOC=${lib.getExe buildPackages.scdoc}"
|
2022-11-21 08:34:04 +01:00
|
|
|
];
|
|
|
|
|
2018-05-31 17:55:23 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
2023-07-27 05:02:12 +02:00
|
|
|
meta = {
|
|
|
|
description = "A simple man page generator written in C99 for POSIX systems";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://git.sr.ht/~sircmpwn/scdoc";
|
2023-10-06 02:47:45 +02:00
|
|
|
changelog = "https://git.sr.ht/~sircmpwn/scdoc/refs/${finalAttrs.src.rev}";
|
2023-07-27 05:02:12 +02:00
|
|
|
license = lib.licenses.mit;
|
2023-10-06 02:47:45 +02:00
|
|
|
mainProgram = "scdoc";
|
2023-07-27 05:02:12 +02:00
|
|
|
maintainers = with lib.maintainers; [ primeos AndersonTorres ];
|
|
|
|
platforms = lib.platforms.unix;
|
2018-05-31 17:55:23 +02:00
|
|
|
};
|
2023-07-27 05:02:12 +02:00
|
|
|
})
|