nix-helpers: 39b83c775938dc9bbce955936145b7c685fdd83c
1: { die, hello, lib, nothing }:
2:
3: with builtins;
4: with lib;
5: with import ./util.nix { };
6: with rec {
7: stillNeeded = typeOf (toPath ./.) == "string";
8: obsoleteWarn = x:
9: if stillNeeded then
10: x
11: else
12: trace "WARNING: toPath makes paths, is asPath now redundant?" x;
13:
14: # We must discard any existing context, to prevent the Nix error message
15: # "a string that refers to a store path cannot be appended to a path". Note
16: # that it's safe to do this, because a new context will be created when the
17: # resulting path gets converted to a string (e.g. as a derivation attribute).
18: go = path:
19: if typeOf path == "path" then
20: path
21: else
22: rootPath + (unsafeDiscardStringContext "${path}");
23: };
24:
25: obsoleteWarn go
Generated by git2html.