mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
writers.makeDataWriter: Deprecate
This commit is contained in:
parent
79130267d3
commit
e64f987fd6
@ -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 New Issue
Block a user