From 624f44bf25902beaf5599bf031ef3610820b1f6a Mon Sep 17 00:00:00 2001 From: Olivia Crain Date: Thu, 26 Sep 2024 14:28:25 -0500 Subject: build: fix deprecated uses of configure_file Using `configure_file` to copy files has been deprecated since Meson 0.64.0. The intended replacement is the `fs.copyfile` method. This removes the following deprecation warning that arises when a minimum Meson version is specified: `` Project [...] uses feature deprecated since '0.64.0': copy arg in configure_file. Use fs.copyfile instead `` Change-Id: I09ffc92e96311ef9ed594343a0a16d51e74b114a --- misc/bash/meson.build | 7 +++---- misc/fish/meson.build | 7 +++---- misc/meson.build | 6 +----- misc/zsh/meson.build | 7 +++---- 4 files changed, 10 insertions(+), 17 deletions(-) (limited to 'misc') diff --git a/misc/bash/meson.build b/misc/bash/meson.build index 75acce2ea..178692536 100644 --- a/misc/bash/meson.build +++ b/misc/bash/meson.build @@ -1,8 +1,7 @@ -configure_file( - input : 'completion.sh', - output : 'nix', +fs.copyfile( + 'completion.sh', + 'nix', install : true, install_dir : datadir / 'bash-completion/completions', install_mode : 'rw-r--r--', - copy : true, ) diff --git a/misc/fish/meson.build b/misc/fish/meson.build index d54de9a13..7f9cd0896 100644 --- a/misc/fish/meson.build +++ b/misc/fish/meson.build @@ -1,8 +1,7 @@ -configure_file( - input : 'completion.fish', - output : 'nix.fish', +fs.copyfile( + 'completion.fish', + 'nix.fish', install : true, install_dir : datadir / 'fish/vendor_completions.d', install_mode : 'rw-r--r--', - copy : true, ) diff --git a/misc/meson.build b/misc/meson.build index bf3c157f7..4e2f6aacf 100644 --- a/misc/meson.build +++ b/misc/meson.build @@ -5,8 +5,4 @@ subdir('zsh') subdir('systemd') subdir('flake-registry') -runinpty = configure_file( - copy : true, - input : meson.current_source_dir() / 'runinpty.py', - output : 'runinpty.py', -) +runinpty = fs.copyfile('runinpty.py') diff --git a/misc/zsh/meson.build b/misc/zsh/meson.build index 8063a5cb8..bd388a31f 100644 --- a/misc/zsh/meson.build +++ b/misc/zsh/meson.build @@ -1,10 +1,9 @@ foreach script : [ [ 'completion.zsh', '_nix' ], [ 'run-help-nix' ] ] - configure_file( - input : script[0], - output : script.get(1, script[0]), + fs.copyfile( + script[0], + script.get(1, script[0]), install : true, install_dir : datadir / 'zsh/site-functions', install_mode : 'rw-r--r--', - copy : true, ) endforeach -- cgit v1.2.3