Files
nixpkgs/pkgs/by-name/li/libxo/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

71 lines
1.4 KiB
Nix

{
lib,
autoreconfHook,
bashNonInteractive,
libtool,
fetchFromGitHub,
nix-update-script,
perl,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libxo";
version = "1.7.5";
src = fetchFromGitHub {
owner = "Juniper";
repo = "libxo";
rev = finalAttrs.version;
hash = "sha256-ElSxegY2ejw7IuIMznfVpl29Wyvpx9k1BdXregzYsoQ=";
};
postPatch = ''
substituteInPlace configure.ac \
--replace-fail LIBTOOL=glibtool 'LIBTOOL=${lib.getExe libtool}'
# Remove impurities
substituteInPlace libxo/Makefile.am \
--replace-fail '-L/opt/local/lib' ""
'';
outputs = [
"bin"
"out"
"dev"
"man"
];
configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [
# libxo misdetects malloc and realloc when cross-compiling on Darwin
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
strictDeps = true;
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
autoreconfHook
# For patchShebangs in postInstall
bashNonInteractive
perl
];
postInstall = ''
moveToOutput "bin/libxo-config" "$dev"
patchShebangs --host "$out/bin"
'';
__structuredAttrs = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Library to generate text, XML, JSON, and HTML";
license = lib.licenses.bsd2;
maintainers = [ lib.maintainers.reckenrode ];
platforms = lib.platforms.unix;
};
})