Loading pkgs/build-support/replace-dependencies.nix +12 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ let inherit (builtins) unsafeDiscardStringContext appendContext; inherit (lib) listToAttrs isStorePath isStringLike readFile attrValues mapAttrs Loading @@ -53,6 +53,16 @@ let ; inherit (lib.attrsets) mergeAttrsList; isNonCaStorePath = x: if isStringLike x then let str = toString x; in builtins.substring 0 1 str == "/" && (dirOf str == builtins.storeDir) else false; toContextlessString = x: unsafeDiscardStringContext (toString x); warn = if verbose then lib.warn else (x: y: y); Loading Loading @@ -90,7 +100,7 @@ let realisation = drv: if isStorePath drv then if isNonCaStorePath drv then # Input-addressed and fixed-output derivations have their realisation as outPath. toContextlessString drv else Loading pkgs/build-support/replace-direct-dependencies.nix +12 −2 Original line number Diff line number Diff line Loading @@ -12,20 +12,30 @@ }: let inherit (lib) isStorePath isStringLike substring stringLength optionalString escapeShellArgs concatMap ; isNonCaStorePath = x: if isStringLike x then let str = toString x; in builtins.substring 0 1 str == "/" && (dirOf str == builtins.storeDir) else false; in if replacements == [ ] then drv else let drvName = if isStorePath drv then if isNonCaStorePath drv then # Reconstruct the name from the actual store path if available. substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv) else if drv ? drvAttrs.name then Loading Loading
pkgs/build-support/replace-dependencies.nix +12 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ let inherit (builtins) unsafeDiscardStringContext appendContext; inherit (lib) listToAttrs isStorePath isStringLike readFile attrValues mapAttrs Loading @@ -53,6 +53,16 @@ let ; inherit (lib.attrsets) mergeAttrsList; isNonCaStorePath = x: if isStringLike x then let str = toString x; in builtins.substring 0 1 str == "/" && (dirOf str == builtins.storeDir) else false; toContextlessString = x: unsafeDiscardStringContext (toString x); warn = if verbose then lib.warn else (x: y: y); Loading Loading @@ -90,7 +100,7 @@ let realisation = drv: if isStorePath drv then if isNonCaStorePath drv then # Input-addressed and fixed-output derivations have their realisation as outPath. toContextlessString drv else Loading
pkgs/build-support/replace-direct-dependencies.nix +12 −2 Original line number Diff line number Diff line Loading @@ -12,20 +12,30 @@ }: let inherit (lib) isStorePath isStringLike substring stringLength optionalString escapeShellArgs concatMap ; isNonCaStorePath = x: if isStringLike x then let str = toString x; in builtins.substring 0 1 str == "/" && (dirOf str == builtins.storeDir) else false; in if replacements == [ ] then drv else let drvName = if isStorePath drv then if isNonCaStorePath drv then # Reconstruct the name from the actual store path if available. substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv) else if drv ? drvAttrs.name then Loading