blob: f1443c5466a0be1b4de4a3005b6043ee009180ca (
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);
}
|