depot/third_party/nixpkgs/pkgs/by-name/sc/scdoc/package.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

42 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromSourcehut
, buildPackages
}:
stdenv.mkDerivation (finalAttrs: {
pname = "scdoc";
version = "1.11.3";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "scdoc";
rev = finalAttrs.version;
hash = "sha256-MbLDhLn/JY6OcdOz9/mIPAQRp5TZ6IKuQ/FQ/R3wjGc=";
};
outputs = [ "out" "man" "dev" ];
postPatch = ''
substituteInPlace Makefile \
--replace "LDFLAGS+=-static" "LDFLAGS+="
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
"HOST_SCDOC=${lib.getExe buildPackages.scdoc}"
];
doCheck = true;
meta = {
description = "A simple man page generator written in C99 for POSIX systems";
homepage = "https://git.sr.ht/~sircmpwn/scdoc";
changelog = "https://git.sr.ht/~sircmpwn/scdoc/refs/${finalAttrs.src.rev}";
license = lib.licenses.mit;
mainProgram = "scdoc";
maintainers = with lib.maintainers; [ primeos AndersonTorres ];
platforms = lib.platforms.unix;
};
})