From 45156e2bdb359c22398f8c7a60fb729ad168786a Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Thu, 25 Jan 2024 11:26:31 -0600 Subject: This distribution is coming together --- modules/builder.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 modules/builder.nix (limited to 'modules/builder.nix') diff --git a/modules/builder.nix b/modules/builder.nix new file mode 100644 index 0000000..5f74a1e --- /dev/null +++ b/modules/builder.nix @@ -0,0 +1,11 @@ +{ pkgs, lib, ... }: +with builtins // lib; +{ + copyFile = { source, directory, executable, target, ... }: '' + cp -${if directory then "r" else ""}v "${source}" "${target}" + + ${optionalString (isBool executable) '' + chmod ${if executable then "+" else "-"}x "${target}" + ''} + ''; +} -- cgit v1.2.3