Files
nixpkgs/pkgs/by-name/li/libiberty/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

47 lines
1.0 KiB
Nix

{
lib,
stdenv,
buildPackages,
staticBuild ? stdenv.hostPlatform.isStatic,
}:
let
inherit (buildPackages.buildPackages) gcc;
in
stdenv.mkDerivation {
pname = "libiberty";
version = "${gcc.cc.version}";
inherit (gcc.cc) src;
outputs = [
"out"
"dev"
];
postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
# needed until config scripts are updated to not use /usr/bin/uname on FreeBSD native
# updateAutotoolsGnuConfigScriptsHook doesn't seem to work here
postPatch = ''
substituteInPlace ../config.guess --replace-fail /usr/bin/uname uname
'';
configureFlags = [ "--enable-install-libiberty" ] ++ lib.optional (!staticBuild) "--enable-shared";
postInstall = lib.optionalString (!staticBuild) ''
cp pic/libiberty.a $out/lib*/libiberty.a
'';
meta = with lib; {
homepage = "https://gcc.gnu.org/";
license = licenses.lgpl2;
description = "Collection of subroutines used by various GNU programs";
maintainers = with maintainers; [
ericson2314
];
platforms = platforms.unix;
};
}