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

Getting length-12 hex strings for rgb values when expecting length-6 strings #55

Open
idrisr opened this issue Apr 19, 2024 · 2 comments

Comments

@idrisr
Copy link

idrisr commented Apr 19, 2024

I have just added nix-colors to my flake, and am attempting to use it in home-manager.
I was getting errors at first because all the color values I tried were 12-character hex strings, instead of 6. Upon inspection the 12-character strings were the 6-character strings repeated twice. For example, instead of 282828 for nix-colors.colorSchemes.gruvbox-mark-medium.base00, I am getting 282828282828.

The error seems to be consistent, so I'm using builtins.subString 0 6 as a temporary workaround.

The relevant portion from my flake.lock is as follows

    "nix-colors": {
      "inputs": {
        "base16-schemes": "base16-schemes",
        "nixpkgs-lib": "nixpkgs-lib"
      },
      "locked": {
        "lastModified": 1707825078,
        "narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=",
        "owner": "misterio77",
        "repo": "nix-colors",
        "rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1",
        "type": "github"
      },
      "original": {
        "owner": "misterio77",
        "repo": "nix-colors",
        "type": "github"
      }
    },
@Kailokk
Copy link

Kailokk commented Jun 8, 2024

I have had the same problem. Thanks for the substring fix.

I've also had this issue with a variable that i defined myself. When used as part of a string interpolation, the file that was generated from it had the value placed twice.

I haven't found a fix, but maybe this suggests it's a syntax issue or maybe something upstream?

I'm new to nix so i'm not really sure how to go about diagnosing it

@Kailokk
Copy link

Kailokk commented Jun 9, 2024

For myself it was actually caused by a double import of my home manager config.

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

No branches or pull requests

2 participants