Skip to content

Commit

Permalink
lib/customisation.nix: Refactor: convert if to or
Browse files Browse the repository at this point in the history
Should be faster.
  • Loading branch information
roberth committed Feb 20, 2023
1 parent 3290d04 commit 4002775
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions lib/customisation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,15 @@ rec {
inherit outputName;
outputSpecified = true;
drvPath = assert condition;
if isAttrs drv.${outputName}
then
drv.${outputName}.drvPath
else
assert isString drv.${outputName};
drv.${outputName};
drv.${outputName}.drvPath or (
assert isString drv.drvPath;
drv.drvPath
);
outPath = assert condition;
if isAttrs drv.${outputName}
then
drv.${outputName}.outPath
else
drv.${outputName}.outPath or (
assert isString drv.${outputName};
drv.${outputName};
drv.${outputName}
);
};
};

Expand Down

0 comments on commit 4002775

Please sign in to comment.