diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-10-24 11:01:50 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-10-24 11:17:38 +0200 |
commit | e64f987fd6b922cfc0b42d2dd516c8e7924befd4 (patch) | |
tree | 06fcd26ddec91bf05cb6f7d41de3657309e554d0 | |
parent | 79130267d31bed7f88236b4245f0da3d187fef26 (diff) | |
download | nixpkgs-e64f987fd6b922cfc0b42d2dd516c8e7924befd4.tar nixpkgs-e64f987fd6b922cfc0b42d2dd516c8e7924befd4.tar.gz nixpkgs-e64f987fd6b922cfc0b42d2dd516c8e7924befd4.tar.bz2 nixpkgs-e64f987fd6b922cfc0b42d2dd516c8e7924befd4.tar.lz nixpkgs-e64f987fd6b922cfc0b42d2dd516c8e7924befd4.tar.xz nixpkgs-e64f987fd6b922cfc0b42d2dd516c8e7924befd4.tar.zst nixpkgs-e64f987fd6b922cfc0b42d2dd516c8e7924befd4.zip |
writers.makeDataWriter: Deprecate
-rw-r--r-- | pkgs/build-support/writers/data.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/writers/data.nix b/pkgs/build-support/writers/data.nix index 052e640694e..45ed5360eae 100644 --- a/pkgs/build-support/writers/data.nix +++ b/pkgs/build-support/writers/data.nix @@ -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); |