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
brillo: init at 1.4.8 #58173
brillo: init at 1.4.8 #58173
Conversation
Have just realised this is not putting the udev rule in the correct location. Will try to fix soon |
url = "https://gitlab.com/cameronnemo/brillo/-/archive/v${v}/brillo-v${v}.tar.bz2"; | ||
sha256 = "0wjpw9vn521rwpnlhvczzfzdsdq812vsyl151627qw51zadynvz1"; | ||
}; | ||
patches = [./brillo.patch]; |
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.
Can you briefly explain the rationale for the patch either in the patch header or in a comment here?
Installing apparmor rules seems harmless to me; NixOS even has (some) apparmor 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've just made another commit which changes all this
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.
should I add something along the lines of security.apparmor.packages = [pkgs.brillo] ?
}; | ||
|
||
|
||
config = mkIf cfg.enable { |
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 might also need environment.systemPackages
for polkit rules.
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 have done this and now pkexec works but only if you input the full path (e.g. pkexec /nix/store/ddavxh7mmbmxds6wpvqws1jw34j3nldh-brillo-1.4.3/bin/brillo -A 5
) I don't know if this is how 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.
Should the polkit file be patched so that it lists the executable as something else
Please add an entry for this in |
And it looks like 1.4.4 is out, so might want to bump to that :). |
I have bumped up the version number though for some reason I cannot work out it seems to be accepting the old sha256 hash. I don't think it should be doing this as if I purposefully break it then it says it is wrong and that it was expecting a hash which is not the one it is currently using. I've just checked and both hashes work in the derivation. Any idea what is causing this to happen and is it a problem @dtzWill |
I believe my above observation was due to caching on my laptop, it is now fixed. |
@dtzWill @jtojnar @symphorien is there anything else I need to do for this to be merged? |
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 would ask that you please rewrite the git history as it has become rather difficult to follow. The first commit should be simply adding yourself to the maintainer list. After that you can probably lump all other changes into a single commit.
I've made the changes you suggested and I think I've managed to rebase everything @aanderse though can't see how to mark as resolved |
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
@jtojnar & @symphorien are you two satisfied to merge?
LGTM :) |
0fbf0ef
to
5d53e3b
Compare
@alexarice I'm testing this out on a laptop but can't seem to get anything to happen... |
|
@alexarice I made a mistake and it turns out running
|
Interesting, I've done a bit of investigation and I think the following is happening:
|
I have looked over the code and believe there could be an upstream error, should I revert this to 1.4.3 and submit an issue there? |
I have had a bit more of an investigate and have submitted a merge request upstream, though I believe at the moment the only functionality which doesn't work is the minimum brightness setting and this can be manually set |
I installed the brillo module that you have here. I also tried bumping the version down to 1.4.3 and same error.
I feel like I'm doing something wrong? |
Just for a new data point-- we also have `light` (which brillo forked)
which you may want to try.
…On Wed, 17 Apr 2019 01:01:04 +0000 (UTC), Aaron Andersen ***@***.***> wrote:
> * I believe you are getting a permission denied as you don't have `services.udev.packages = [ brillo ];` in your `configuration.nix`. This should be set by the module but I don't know of a way to test modules without rebuilding my configuration off my local nixpkgs
I installed the brillo module that you have here. I also tried bumping the version down to 1.4.3 and same error.
```
brillo -A 0.5 -v 1
!ERR: src/file.c:192 file_read(): fopen: No such file or directory: '/home/andersea/.cache/brillo/backlight.intel_backlight.mincap'
!ERR: src/file.c:163 file_open(): open: Permission denied: '/sys/class/backlight/intel_backlight/brightness'
!ERR: src/main.c:27 main(): Execution failed
```
I feel like I'm doing something wrong?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#58173 (comment) part: text/html
|
That is very strange, I just built my system against this fork with
But my screen gets brighter. For the error above I am trying to get a fix upstream https://gitlab.com/cameronnemo/brillo/merge_requests/4 |
Upstream issues have been fixed and I have moved this to 1.4.6. |
It looks like you might want to nudge upstream on that 1.4.6 release...
https://gitlab.com/cameronnemo/brillo/blob/v1.4.6/src/light.h#L8 The issue persists. I have to assume I'm doing something wrong at this point. As a KDE user I don't actually need this program... so I'm going to leave it up to someone else to say whether the program works or not. It would be nice if at least one person other than @alexarice could confirm this works under X11 as expected. |
Did you try if the program light works for you as that has near identical module definition. Have asked for the version to be bumped upstream |
@alexarice I have not and as I mentioned at this point I'm happy if someone else can confirm. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/48 |
Motivation for this change
I wanted to use the brillo tool for backlight control on wayland but i could not find it.
Things done
Added brillo to nixpkgs/pkgs/os-specific/linux/brillo and added myself as a maintainer of it.
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)I have not tried to add a nix package before so please let me know if I have messed something up.