mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
nixos/tandoor-recipes: improve manage script
This is mirroring the way the manage script is created in the paperless module, which is more robust to special characters.
This commit is contained in:
parent
61276c8099
commit
5e43c70867
@ -17,14 +17,11 @@ let
|
||||
lib.mapAttrs (_: toString) cfg.extraConfig
|
||||
);
|
||||
|
||||
manage =
|
||||
let
|
||||
setupEnv = lib.concatStringsSep "\n" (mapAttrsToList (name: val: "export ${name}=\"${val}\"") env);
|
||||
in
|
||||
pkgs.writeShellScript "manage" ''
|
||||
${setupEnv}
|
||||
exec ${pkg}/bin/tandoor-recipes "$@"
|
||||
'';
|
||||
manage = pkgs.writeShellScript "manage" ''
|
||||
set -o allexport # Export the following env vars
|
||||
${lib.toShellVars env}
|
||||
exec ${pkg}/bin/tandoor-recipes "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
meta.maintainers = with maintainers; [ ambroisie ];
|
||||
|
Loading…
Reference in New Issue
Block a user