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
adapta-gtk-theme: 3.94.0.132 -> 3.95.0.1 #47610
Conversation
Success on aarch64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
pkgs/misc/themes/adapta/default.nix
Outdated
}: | ||
|
||
let | ||
enableFlag = flag: en: stdenv.lib.optional en "--enable-${flag}"; |
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.
Why not
enableFlag = flag: en: if en then "--enable-${flag}" else "--disable-"${flag}"
?
I'm pretty sure I've seen that pattern before, maybe its already in lib somewhere. Otherwise maybe it should be.
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.
Ah, yes. I'll fix.
https://github.com/NixOS/nixpkgs/blob/master/lib/strings.nix#L424
pkgs/misc/themes/adapta/default.nix
Outdated
"--disable-unity" | ||
]; | ||
configureFlags = [ "--enable-parallel" ] | ||
++ (disableFlag "gnome" enableGnome) |
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.
disableFlag
returns a string, so why the ++
?
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.
It returns an array (using lib.optional).
But I'd rather use lib.enableFeature
like you suggested.
pkgs/misc/themes/adapta/default.nix
Outdated
|
||
stdenv.mkDerivation rec { | ||
, # Enable Gnome Shell support |
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 think the comma should be in the same line as the flags. Most of these comments are pretty redundant anyways. I also don't much like the empty lines between all flags, but thats a matter of taste.
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 can just remove these.
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.
BTW, I based this off of existing arg documentation, such as fetchurl
: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/default.nix#L41
I agree that it looks odd.
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.
Yeah there is a lot of weird formatting in the repo and since we don't have a comprehensive style guide I can only review based on my personal preference. I try not to block merging on that though.
We really should have a style guide, I just don't want to be the one that leads the bikeshed.
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.
Some of the later comments are useful of course - just the enableFoo # enables foo
ones could be removed.
Note that #47619 also does the same update. |
@timokau Updated. lib does have a |
@GrahamcOfBorg build adapta-gtk-theme |
Success on aarch64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
pkgs/misc/themes/adapta/default.nix
Outdated
, enablePlank ? false | ||
, enableTelegram ? false | ||
, enableTweetdeck ? false | ||
, withSelectionColor ? null # Primary color for 'selected-items' (Default: #3F51B5 = Indigo500) |
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.
Please don't align the comments
configureFlags = | ||
let | ||
inherit (stdenv.lib) enableFeature optional; | ||
withOptional = feat: value: optional (value != null) "--with-${feat}=${value}"; |
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.
Are you sure there is no --without
counterpart? Isn't that an autotools standard? Or are they not using autotools?
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.
They are using autotools, but these options are provided via custom m4 scripts. These are simple customization options, not feature flags.
pkgs/misc/themes/adapta/default.nix
Outdated
withOptional = feat: value: optional (value != null) "--with-${feat}=${value}"; | ||
in [ | ||
"--enable-parallel" | ||
(enableFeature enableGnome "gnome") |
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'm confused: Wouldnt't this result in --enable-gnome=true
(does nix coalesce booleans to strings)? Shouldn't it be = yes
?
Also please no alignment 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.
enableFeature doesn't produce assignments, so you'll get either --enable-{feature}
or --disable-{feature}
.
@timokau Removed code alignment. |
@GrahamcOfBorg build adapta-gtk-theme |
Success on aarch64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
@timokau Upstream has reverted to the previous version, so this PR is no longer valid. Closing. |
Success on aarch64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: adapta-gtk-theme Partial log (click to expand)
|
They removed a release? Very weird. |
Motivation for this change
Update to the latest Adapta release.
Add override flags for all knobs that can be tweaked by Adapta's configuration scripts.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)