Files
nixpkgs/pkgs/by-name/ga/gavin-bc/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

58 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitea,
editline,
readline,
historyType ? "internal",
predefinedBuildType ? "BSD",
}:
assert lib.elem historyType [
"editline"
"readline"
"internal"
];
assert lib.elem predefinedBuildType [
"BSD"
"GNU"
"GDH"
"DBG"
""
];
stdenv.mkDerivation (finalAttrs: {
pname = "gavin-bc";
version = "6.5.0";
src = fetchFromGitea {
domain = "git.gavinhoward.com";
owner = "gavin";
repo = "bc";
rev = finalAttrs.version;
hash = "sha256-V0L5OmpcI0Zu5JvESjuhp4wEs5Bu/CvjF6B5WllTEqo=";
};
buildInputs =
(lib.optional (historyType == "editline") editline)
++ (lib.optional (historyType == "readline") readline);
configureFlags = [
"--disable-nls"
]
++ (lib.optional (predefinedBuildType != "") "--predefined-build-type=${predefinedBuildType}")
++ (lib.optional (historyType == "editline") "--enable-editline")
++ (lib.optional (historyType == "readline") "--enable-readline")
++ (lib.optional (historyType == "internal") "--enable-internal-history");
meta = {
homepage = "https://git.gavinhoward.com/gavin/bc";
description = "Gavin Howard's BC calculator implementation";
changelog = "https://git.gavinhoward.com/gavin/bc/raw/tag/${finalAttrs.version}/NEWS.md";
license = lib.licenses.bsd2;
maintainers = [ ];
platforms = lib.platforms.unix;
broken = stdenv.hostPlatform.isDarwin;
};
})
# TODO: cover most of configure settings