blob: 5e5743f51ea6624c47353fbe9ffb47806f4aefe0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
{ lib }:
rec {
# Produces a Bourne shell like variable export statement.
export = n: v: ''export ${n}="${toString v}"'';
# Given an attribute set containing shell variable names and their
# assignment, this function produces a string containing an export
# statement for each set entry.
exportAll = vars: lib.concatStringsSep "\n" (lib.mapAttrsToList export vars);
}
|