diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-01-24 14:54:49 +0000 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-01-24 14:55:23 +0000 |
| commit | 687c37c3bf1793256bbb979b4283da2b7425020b (patch) | |
| tree | d17ed26b7e75bedfc4efcbd98ec9d4a7d36adf6c /shell-scripts.nix | |
| parent | 5996523f1c6a9c1c84cd9e90d69a0bcb53ad02f8 (diff) | |
fix kubeconfig-merge
Diffstat (limited to 'shell-scripts.nix')
| -rw-r--r-- | shell-scripts.nix | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/shell-scripts.nix b/shell-scripts.nix index 5cec1eb..32d77d0 100644 --- a/shell-scripts.nix +++ b/shell-scripts.nix @@ -1,11 +1,23 @@ -{pkgs, ...}: +{pkgs, config, ...}: with builtins; let script-names = attrNames (readDir ./shell-scripts); package = ( - filename: let - contents = readFile ./shell-scripts/${filename}; + filename: with pkgs; let in - pkgs.writeShellScriptBin filename contents + stdenv.mkDerivation { + name = filename; + + buildCommand = '' + install -Dm755 $script $out/bin/${filename} + ''; + + script = substituteAll { + src = ./shell-scripts/${filename}; + isExecutable = true; + inherit bash; + home = config.home.homeDirectory; + }; + } ); packages = map package script-names; in |
