symlinkJoin: accept set as an argument with additional options
This commit is contained in:
parent
ae8a3a14f0
commit
dfe608c8a2
|
@ -11,7 +11,10 @@ let
|
||||||
rm $out/logcheck.*
|
rm $out/logcheck.*
|
||||||
'';
|
'';
|
||||||
|
|
||||||
rulesDir = pkgs.symlinkJoin "logcheck-rules-dir" ([ defaultRules ] ++ cfg.extraRulesDirs);
|
rulesDir = pkgs.symlinkJoin
|
||||||
|
{ name = "logcheck-rules-dir";
|
||||||
|
paths = ([ defaultRules ] ++ cfg.extraRulesDirs);
|
||||||
|
};
|
||||||
|
|
||||||
configFile = pkgs.writeText "logcheck.conf" cfg.config;
|
configFile = pkgs.writeText "logcheck.conf" cfg.config;
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,10 @@ let
|
||||||
cfg.extraConfig
|
cfg.extraConfig
|
||||||
];
|
];
|
||||||
|
|
||||||
modulesDir = pkgs.symlinkJoin "dovecot-modules"
|
modulesDir = pkgs.symlinkJoin {
|
||||||
(map (pkg: "${pkg}/lib/dovecot") ([ dovecotPkg ] ++ map (module: module.override { dovecot = dovecotPkg; }) cfg.modules));
|
name = "dovecot-modules";
|
||||||
|
paths = map (pkg: "${pkg}/lib/dovecot") ([ dovecotPkg ] ++ map (module: module.override { dovecot = dovecotPkg; }) cfg.modules);
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,16 +47,24 @@ rec {
|
||||||
|
|
||||||
|
|
||||||
# Create a forest of symlinks to the files in `paths'.
|
# Create a forest of symlinks to the files in `paths'.
|
||||||
symlinkJoin = name: paths:
|
symlinkJoin =
|
||||||
|
{ name
|
||||||
|
, paths
|
||||||
|
, preferLocalBuild ? true
|
||||||
|
, allowSubstitutes ? false
|
||||||
|
, postBuild ? ""
|
||||||
|
, buildInputs ? []
|
||||||
|
, meta ? {}
|
||||||
|
}:
|
||||||
runCommand name
|
runCommand name
|
||||||
{ inherit paths;
|
{ inherit paths preferLocalBuild allowSubstitutes buildInputs meta;
|
||||||
preferLocalBuild = true; allowSubstitutes = false;
|
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
for i in $paths; do
|
for i in $paths; do
|
||||||
${lndir}/bin/lndir $i $out
|
${lndir}/bin/lndir $i $out
|
||||||
done
|
done
|
||||||
|
${postBuild}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,10 @@ let
|
||||||
let
|
let
|
||||||
version = (builtins.parseDrvName breeze-qt5.name).version;
|
version = (builtins.parseDrvName breeze-qt5.name).version;
|
||||||
in
|
in
|
||||||
symlinkJoin "breeze-${version}"
|
symlinkJoin {
|
||||||
(map (pkg: pkg.out or pkg) [ breeze-gtk breeze-qt4 breeze-qt5 ]);
|
name = "breeze-${version}";
|
||||||
|
paths = map (pkg: pkg.out or pkg) [ breeze-gtk breeze-qt4 breeze-qt5 ];
|
||||||
|
};
|
||||||
kde-cli-tools = callPackage ./kde-cli-tools.nix {};
|
kde-cli-tools = callPackage ./kde-cli-tools.nix {};
|
||||||
kde-gtk-config = callPackage ./kde-gtk-config {};
|
kde-gtk-config = callPackage ./kde-gtk-config {};
|
||||||
kdecoration = callPackage ./kdecoration.nix {};
|
kdecoration = callPackage ./kdecoration.nix {};
|
||||||
|
|
Loading…
Reference in New Issue