Fix impurity
This commit is contained in:
parent
63665ae641
commit
1693f64ce2
|
@ -1,6 +1,6 @@
|
|||
self: { lib, config, pkgs, ... }: with lib; let
|
||||
relativePath = path: assert types.path.check path;
|
||||
with builtins; strings.removePrefix ("${toString self}") (toString path);
|
||||
with builtins; strings.removePrefix (toString self) (toString path);
|
||||
|
||||
impurityGroupEnabled = group: let
|
||||
impurityGroups = strings.splitString " " (builtins.getEnv "IMPURITY_GROUPS");
|
||||
|
@ -10,9 +10,13 @@ self: { lib, config, pkgs, ... }: with lib; let
|
|||
impurePathEnv = builtins.getEnv "IMPURITY_PATH";
|
||||
in if impurePathEnv == ""
|
||||
then throw "impurity.enable is true but IMPURITY_PATH is not set"
|
||||
else /. + impurePathEnv;
|
||||
else impurePathEnv;
|
||||
|
||||
createImpurePath = path: let
|
||||
relative = (relativePath path);
|
||||
full = impurePath + relative;
|
||||
in pkgs.runCommand "impurity-${relative}" {} "ln -s ${full} $out";
|
||||
|
||||
createImpurePath = path: impurePath + (relativePath path);
|
||||
in {
|
||||
options.impurity.enable = mkOption {
|
||||
type = types.bool;
|
||||
|
|
Loading…
Reference in a new issue