Skip to content

Commit

Permalink
deprecate schemeToYAML
Browse files Browse the repository at this point in the history
It's not that useful of a function, and whoever needs it can simply use
nixpkgs functions to do it instead.
  • Loading branch information
Misterio77 committed Jan 30, 2024
1 parent f84b425 commit fc080c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,24 +206,6 @@ Just grab (or create yours) a `.yaml` file, read it into a string (with
This path can come from wherever nix can read, even another repo! That's what
we do to expose base16's schemes.

### `schemeToYAML`

Maybe you took a liking to writting (or generating) colors in nix-colors sweet
nix syntax, but want to contribute back to base16. No, no, don't write that
YAML by hand!

We have a `schemeToYAML` for converting from nix-colors's `.nix` to
base16's `.yaml` format.

Grab your nix-colors scheme, pass it to the function, and you get the YAML
string (you can write it `toFile` if you want) in return. Here's an example
with nix-repl:
```bash
$ nix repl
nix-repl> :lf .
nix-repl> bultins.toFile "pasque.yaml" (inputs.nix-colors.lib.schemeToYAML inputs.nix-colors.colorSchemes.pasque)
```

### More soon(TM)

We plan on helping you turn existing base16 templates into nifty nix functions
Expand Down
3 changes: 2 additions & 1 deletion lib/core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
}
*/
schemeFromYAML = import ./schemeFromYAML.nix;
schemeToYAML = import ./schemeToYAML.nix;

schemeToYAML = builtins.trace "nix-colors: schemeToYAML is deprecated and will be removed soon." (import ./schemeToYAML.nix);

conversions = import ./conversions.nix { inherit nixpkgs-lib; };
}

0 comments on commit fc080c5

Please sign in to comment.