writers.makeDataWriter: Deprecate
This commit is contained in:
parent
79130267d3
commit
e64f987fd6
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ rec {
|
|||
# writeJSON = makeDataWriter { input = builtins.toJSON; output = "cp $inputPath $out"; };
|
||||
# myConfig = writeJSON "config.json" { hello = "world"; }
|
||||
#
|
||||
makeDataWriter = { input ? lib.id, output ? "cp $inputPath $out" }: nameOrPath: data:
|
||||
makeDataWriter = lib.warn "pkgs.writers.makeDataWriter is deprecated. Use pkgs.writeTextFile." ({ input ? lib.id, output ? "cp $inputPath $out" }: nameOrPath: data:
|
||||
assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
|
||||
let
|
||||
name = last (builtins.split "/" nameOrPath);
|
||||
|
|
Loading…
Reference in a new issue