I noticed there is a trend to use magic strings in some places
of nixpkgs, e.g. in
https://nixos.org/nixos/manual/ch-options.html#opt-security.pki.certificateFiles
where the example is:

[ "${pkgs.cacert}/etc/ca-bundle.crt" ]

I find that alarming, because in exactly that case it silently broke when 
pkgs.cacert
moved its files to /etc/ssl/certs/ca-bundle.crt.

It got fixed in the meantime, but I’m pretty sure only after someone noticed it
suddenly stopped working.

There should be a variable exported by these packages that always points to the
correct file. And before inserting a magic string a variable should be created
and used in my opinion.

-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to