mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 21:18:28 +03:00
gavin-bc: enable extra options
This commit is contained in:
parent
98157f131d
commit
d37bd519ba
@ -1,8 +1,14 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitea
|
, fetchFromGitea
|
||||||
|
, editline
|
||||||
|
, readline
|
||||||
|
, historyType ? "internal"
|
||||||
|
, predefinedBuildType ? "BSD"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert lib.elem historyType [ "editline" "readline" "internal" ];
|
||||||
|
assert lib.elem predefinedBuildType [ "BSD" "GNU" "GDH" "DBG" ];
|
||||||
stdenv.mkDerivation (self: {
|
stdenv.mkDerivation (self: {
|
||||||
pname = "gavin-bc";
|
pname = "gavin-bc";
|
||||||
version = "6.2.4";
|
version = "6.2.4";
|
||||||
@ -15,6 +21,17 @@ stdenv.mkDerivation (self: {
|
|||||||
hash = "sha256-KQheSyBbxh2ROOvwt/gqhJM+qWc+gDS/x4fD6QIYUWw=";
|
hash = "sha256-KQheSyBbxh2ROOvwt/gqhJM+qWc+gDS/x4fD6QIYUWw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
(lib.optional (historyType == "editline") editline)
|
||||||
|
++ (lib.optional (historyType == "readline") readline);
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--disable-nls"
|
||||||
|
"--predefined-build-type=${historyType}"
|
||||||
|
]
|
||||||
|
++ (lib.optional (historyType == "editline") "--enable-editline")
|
||||||
|
++ (lib.optional (historyType == "readline") "--enable-readline");
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://git.gavinhoward.com/gavin/bc";
|
homepage = "https://git.gavinhoward.com/gavin/bc";
|
||||||
description = "Gavin Howard's BC calculator implementation";
|
description = "Gavin Howard's BC calculator implementation";
|
||||||
|
Loading…
Reference in New Issue
Block a user