mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
Merge pull request #298380 from mweinelt/escapeSystemdExecArg-derivation
nixos/lib: Support derivations in escapeSystemdExecArg
This commit is contained in:
commit
790aa81418
@ -64,8 +64,8 @@ rec {
|
||||
let
|
||||
s = if builtins.isPath arg then "${arg}"
|
||||
else if builtins.isString arg then arg
|
||||
else if builtins.isInt arg || builtins.isFloat arg then toString arg
|
||||
else throw "escapeSystemdExecArg only allows strings, paths and numbers";
|
||||
else if builtins.isInt arg || builtins.isFloat arg || lib.isDerivation arg then toString arg
|
||||
else throw "escapeSystemdExecArg only allows strings, paths, numbers and derivations";
|
||||
in
|
||||
replaceStrings [ "%" "$" ] [ "%%" "$$" ] (builtins.toJSON s);
|
||||
|
||||
|
@ -87,7 +87,6 @@ stdenv.mkDerivation rec {
|
||||
passthru.tests = {
|
||||
kea = nixosTests.kea;
|
||||
prefix-delegation = nixosTests.systemd-networkd-ipv6-prefix-delegation;
|
||||
prometheus-exporter = nixosTests.prometheus-exporters.kea;
|
||||
networking-scripted = lib.recurseIntoAttrs { inherit (nixosTests.networking.scripted) dhcpDefault dhcpSimple dhcpOneIf; };
|
||||
networking-networkd = lib.recurseIntoAttrs { inherit (nixosTests.networking.networkd) dhcpDefault dhcpSimple dhcpOneIf; };
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user