Closed fricklerhandwerk closed 1 month ago
I agree with making this an environment variable, but why at build time though? (Also nit but IMO this is not build time, but packaging time or something, as the actual binary is not affected by it)
Fixed the wording in the commit. The directory is already configurable through an environment variable. This change merely sets a customisable default value in the package recipe so the thing can be used in a shell without going lenghts as I did here, just to tell npins to work in ./nix
:
hm then I don't fully understand your use case, why couldn't you just export an env variable in the shell hook?
🤦 Of course.
{ pkgs }:
pkgs.mkShell {
packages = with pkgs; [
npins
];
env = {
NPINS_DIRECTORY = "nix";
};
}
this is convenient if you want to manage sources in a custom directory, and have npins in the shell environment for all contributors to use: