diff --git a/lib/default.nix b/lib/default.nix index 6df860f..6610aa3 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -12,17 +12,23 @@ configArg ? "-c ", excecutable ? "${package}/bin/${name}", }: - pkgs.writeShellApplication { + pkgs.symlinkJoin { inherit name; + paths = [ + (pkgs.writeShellApplication { + inherit name; - runtimeInputs = [ package ]; + runtimeInputs = [ package ]; - text = '' - if test -r "${userConfig}"; then - exec -a "$0" "${excecutable}" "$@" - else - exec -a "$0" "${excecutable}" ${configArg}"${globalConfig}" "$@" - fi - ''; + text = '' + if test -r "${userConfig}"; then + exec -a "$0" "${excecutable}" "$@" + else + exec -a "$0" "${excecutable}" ${configArg}"${globalConfig}" "$@" + fi + ''; + }) + package + ]; }; }