Go to file
clerie be06e4989a Init repo 2024-02-20 17:11:28 +01:00
.gitignore Init repo 2024-02-20 17:11:28 +01:00
LICENSE Init repo 2024-02-20 17:11:28 +01:00
README.md Init repo 2024-02-20 17:11:28 +01:00
flake.lock Init repo 2024-02-20 17:11:28 +01:00
flake.nix Init repo 2024-02-20 17:11:28 +01:00
test.csv Init repo 2024-02-20 17:11:28 +01:00

README.md

nix-csv

Load a csv and use it in your nix as an attribute.

The challenge here is, that you could -in theory- parse files in nix directly, but nix is really bad at this. What we do here, is using builtins.fromJSON by just converting the csv file to a json file first.

Quick summary of the pipeline:

test.csv -> csv-to-json -> test.json -> readFile -> fromJSON

See comments in flake.nix for how it works.

Technically this can adapted to any type of data source.