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

redshift-wlroots: init at 1.12 #63926

Closed
wants to merge 2 commits into from
Closed

Conversation

matthias-t
Copy link
Contributor

Motivation for this change

Make redshift available on sway and other wlroots based wayland compositors. Can be used in services.redshift.package. See also #57602. Please review thoroughly as this is my first contribution and I have no idea what I'm doing.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@JohnAZoidberg JohnAZoidberg left a comment

Choose a reason for hiding this comment

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

It doesn't seem like it builds the wayland parts, as the dependencies are missing (minus7/redshift@eecbfed#diff-67e997bcfdac55191033d57a16d1408aR70) as well as the --enable-wayland configure flag.

You haven't tried to run it yet, right?

version = "1.12";

src = fetchFromGitHub {
src = fetchFromGitHub (if wlrootsSupport then {
Copy link
Member

Choose a reason for hiding this comment

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

It's just a single patch. If it applies to the lastest release of the proper redshift, I'd rather do that with patches = [ fetchpatch { url = "https://github.com/minus7/redshift/commit/eecbfedac48f827e96ad5e151de8f41f6cd3af66.diff"; sha256 = ""; } ]; rather than substituting the entire soruce tree.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it applies to the latest commit on master, which is 24 commits ahead of redshift v1.12

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i agree that it's more elegant, but won't this be hard to maintain anyway in case redshift-wlroots falls behind and conflicts develop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JohnAZoidberg here you go, anyway

@matthias-t
Copy link
Contributor Author

it seems to work on my machine. which dependencies am i missing?

@matthias-t matthias-t force-pushed the master branch 2 times, most recently from 36b8e28 to 525d511 Compare July 18, 2019 08:00
Copy link
Contributor

@megheaiulian megheaiulian left a comment

Choose a reason for hiding this comment

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

I've tested this PR with sway by setting services.redshift.package and it works correctly.

@worldofpeace
Copy link
Contributor

Is wayland support even added upstream?

If not, I don't think we should create a new package just for this feature.
It would be better to wait for the upstream maintainer to merge the change and
make a release.

@matthias-t
Copy link
Contributor Author

Is wayland support even added upstream?

no, see jonls/redshift#55

If not, I don't think we should create a new package just for this feature.
It would be better to wait for the upstream maintainer to merge the change and
make a release.

It's not exactly a feature, but a completely different backend, jonls/redshift#663 is open since september 2018, there seems to be no movement upstream and it's the only way to keep my eyes sane on wayland in the meantime. Although if it isn't worth a new package that's fine since I'm using my fork anyway.

@worldofpeace
Copy link
Contributor

Yeah, something like this would be a better fit for NUR.
IIRC there's a lot of wayland users in nixos.

Closing as we've converged on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants