Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mathemagix: add configure parameters #307556

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions pkgs/by-name/ma/mathemagix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
libtool,
gmp,
mpfr,
enable-algebramix ? true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. As far as I remember, the current status quo is to use camelCase (enableAlgebramix)
  2. [RFC 0169] Feature parameter names rfcs#169 suggests snake case (enable_algebramix), because Bash has some problems with hyphenated names.

enable-automagix ? true,
enable-basix ? true,
enable-mmcompileregg ? true,
enable-mmcompiler ? true,
enable-mmdoc ? true,
enable-numerix ? true,
enable-analyziz ? true,
enable-graphix ? true,
enable-symbolix ? true,
enable-mmxlight ? true,
enable-caas ? true,
}:

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -22,6 +34,32 @@ stdenv.mkDerivation (finalAttrs: {

strictDeps = true;

configureFlags = lib.optionals enable-algebramix [
"--enable-algebramix"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
configureFlags = lib.optionals enable-algebramix [
"--enable-algebramix"
configureFlags = [
(lib.enableFeature enableAlgebramix "algebramix")

and repeat the pattern

] ++ lib.optionals enable-automagix [
"--enable-automagix"
] ++ lib.optionals enable-analyziz [
"--enable-analyziz"
] ++ lib.optionals enable-basix [
"--enable-basix"
] ++ lib.optionals enable-caas [
"--enable-caas"
] ++ lib.optionals enable-graphix [
"--enable-graphix"
] ++ lib.optionals enable-mmcompileregg [
"--enable-mmcompileregg"
] ++ lib.optionals enable-mmcompiler [
"--enable-mmcompiler"
] ++ lib.optionals enable-mmdoc [
"--enable-mmdoc"
] ++ lib.optionals enable-mmxlight [
"--enable-mmxlight"
] ++ lib.optionals enable-numerix [
"--enable-numerix"
] ++ lib.optionals enable-symbolix [
"--enable-symbolix"
];

buildInputs = [
gmp
libtool
Expand Down