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