lol

writers.makeDataWriter: Deprecate

+1 -1
+1 -1
pkgs/build-support/writers/data.nix
··· 23 23 # writeJSON = makeDataWriter { input = builtins.toJSON; output = "cp $inputPath $out"; }; 24 24 # myConfig = writeJSON "config.json" { hello = "world"; } 25 25 # 26 - makeDataWriter = { input ? lib.id, output ? "cp $inputPath $out" }: nameOrPath: data: 26 + makeDataWriter = lib.warn "pkgs.writers.makeDataWriter is deprecated. Use pkgs.writeTextFile." ({ input ? lib.id, output ? "cp $inputPath $out" }: nameOrPath: data: 27 27 assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null); 28 28 let 29 29 name = last (builtins.split "/" nameOrPath);