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

Negative term in mkTuple #31

Closed
michzappa opened this issue Dec 1, 2020 · 2 comments · Fixed by #40
Closed

Negative term in mkTuple #31

michzappa opened this issue Dec 1, 2020 · 2 comments · Fixed by #40
Labels
bug Something isn't working

Comments

@michzappa
Copy link

Using dfconf2nix as found in https://gvolpe.com/blog/gnome3-on-nixos/ (excellent guide thank you), it gave a .nix file which contains a syntax error in mkTuple.

If either of the two numbers is negative, it is an "unexpected '-'" to the syntax checker of Nix. This came up in the "org/gnome/settings-daemon/plugins/color/night-light-last-coordinates" section of the dconf.settings.

I made it a string ("-71.xxxx" instead of -71.xxxx) and there is no longer a syntax error but I don't know if it is still performing correctly.

Have you seen this before?

Thank you

@michzappa
Copy link
Author

This appears to only be an issue with the version from nix-env. I added it as a system package and it is no longer occurring. Thank you for this program.

@johanbrandhorst
Copy link

This is still present in v0.0.8. The following input:

[org/gnome/settings-daemon/plugins/color]
night-light-last-coordinates=(43.684199280057591, -79.347200000000001)

Produces

# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix
{ lib, ... }:

let
  mkTuple = lib.hm.gvariant.mkTuple;
in
{
  dconf.settings = {
    "org/gnome/settings-daemon/plugins/color" = {
      night-light-last-coordinates = mkTuple [ 43.68419928005759 -79.3472 ];
    };
}

@gvolpe gvolpe reopened this Jun 14, 2021
@gvolpe gvolpe added the bug Something isn't working label Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants