Fix impurity
This commit is contained in:
parent
63665ae641
commit
1693f64ce2
|
@ -1,6 +1,6 @@
|
||||||
self: { lib, config, pkgs, ... }: with lib; let
|
self: { lib, config, pkgs, ... }: with lib; let
|
||||||
relativePath = path: assert types.path.check path;
|
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
|
impurityGroupEnabled = group: let
|
||||||
impurityGroups = strings.splitString " " (builtins.getEnv "IMPURITY_GROUPS");
|
impurityGroups = strings.splitString " " (builtins.getEnv "IMPURITY_GROUPS");
|
||||||
|
@ -10,9 +10,13 @@ self: { lib, config, pkgs, ... }: with lib; let
|
||||||
impurePathEnv = builtins.getEnv "IMPURITY_PATH";
|
impurePathEnv = builtins.getEnv "IMPURITY_PATH";
|
||||||
in if impurePathEnv == ""
|
in if impurePathEnv == ""
|
||||||
then throw "impurity.enable is true but IMPURITY_PATH is not set"
|
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 {
|
in {
|
||||||
options.impurity.enable = mkOption {
|
options.impurity.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
|
Loading…
Reference in a new issue