I want to link some .icm color profile files into my home directory with home-manager, but I’m not sure how to get those files into the Nix store in the first place.
Is there something like writeTextFile for binary data? Perhaps that turns a base64 string into a binary file in the Nix store?
Oh I thought writeTextFile { name ="x"; text = builtins.readFile ./yourfile.icm;} would also work for binary data. Have you tried? Also you should be able to use runCommand "bla" { file =./bla.icm; } "cp $file $out" to simply copy your file in the output derivation (not tested, I’m on the phone).
Edit: or even simpler if you do myfile = ./yourfile.icm then your file should be copied to the store and myfile will contains its path.