-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
mlterm: Add support for many build configuration variables #226218
Conversation
88b595b
to
498853d
Compare
nativeBuildInputs = [ | ||
pkg-config | ||
autoconf | ||
] ++ addIfHas "mlconfig" toolsChoices [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something tells me this is not the best way to do this.
It looks like searching a hash table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer individual boolean flags rather than list flags. Lists don't compose very well with overrides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer individual boolean flags rather than list flags. Lists don't compose very well with overrides.
Composing overrides indeed that would have been ideal, but these lists are not that long, and users using them should anyway read the source code, and choose the list they want to be compiled.
Something tells me this is not the best way to do this. It looks like searching a hash table.
I'm open to suggestions. Unless you'd both insist that it's better to use boolean flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussion on a third alternative which you already implemented: #226218 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest inline this, using lib.elem x list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest inline this, using
lib.elem x list
That was I missing, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result of nixpkgs-review pr 226218
run on aarch64-darwin 1
2 packages failed to build:
- mlterm
- mlterm-wayland
For Darwin support, we need to disable Xorg and enable the quartz GUI toolkit.
Despite all my nitpickings and change requests, I am absolutely in support of this PR; this is great!
libX11 | ||
gtk | ||
vte | ||
] ++ lib.optionals (imagelibChoice == "gdk-pixbuf") [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: If you use optionals
that often, just inherit it from lib once and stop the lib.
spam.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: If you use
optionals
that often, just inherit it from lib once and stop thelib.
spam.
I don't mind this spam that much personally, I copy paste these lines anyway, and it will save me only 4 letters. Will do it if you insist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't insist, it just goes against the DRY principle.
77e2061
to
566f585
Compare
libX11 | ||
gtk | ||
vte | ||
] ++ lib.optionals (imagelibChoice == "gdk-pixbuf") [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't insist, it just goes against the DRY principle.
mlterm now builds on Darwin as well, according to ofborg. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff looks very good now. Some minor things, then it's ready I think.
Result of nixpkgs-review pr 226218
run on aarch64-darwin 1
1 package built:
- mlterm (mlterm-wayland)
I have a branch with most commits squashed, ready to be pushed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result of nixpkgs-review pr 226218
run on aarch64-darwin 1
1 package built:
- mlterm (mlterm-wayland)
Which one? I pushed the rebased branch, with fewer commit messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the ones that are upper case ;)
I'd squash the desktopItem related commits.
Remove deprecated `Application` category and make `comment` different then `name`.
c555c0b
to
b633ffb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is GTG I think.
Any last objections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
b633ffb
to
52016d5
Compare
With your permission, I'll merge this when CI is green, in the next few hours. |
We don't need to wait on aarch64-darwin CI, it's dog slow and I already tested it. |
I will note here that something went wrong with the compilation of the |
Fix in #232706 |
Motivation for this change
I wanted to be able to decoratively and elegantly enable or disable features, specifically wayland features.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes