mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-19 20:09:01 +02:00
Avoid top-level with ...;
in pkgs/games/factorio/utils.nix
This commit is contained in:
parent
75d2271a90
commit
9be6e22037
|
@ -1,7 +1,18 @@
|
||||||
# This file provides a top-level function that will be used by both nixpkgs and nixos
|
# This file provides a top-level function that will be used by both nixpkgs and nixos
|
||||||
# to generate mod directories for use at runtime by factorio.
|
# to generate mod directories for use at runtime by factorio.
|
||||||
{ lib, stdenv }:
|
{ lib, stdenv }:
|
||||||
with lib;
|
let
|
||||||
|
inherit (lib)
|
||||||
|
flatten
|
||||||
|
head
|
||||||
|
optionals
|
||||||
|
optionalString
|
||||||
|
removeSuffix
|
||||||
|
replaceStrings
|
||||||
|
splitString
|
||||||
|
unique
|
||||||
|
;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
mkModDirDrv = mods: modsDatFile: # a list of mod derivations
|
mkModDirDrv = mods: modsDatFile: # a list of mod derivations
|
||||||
let
|
let
|
||||||
|
@ -18,7 +29,7 @@ with lib;
|
||||||
# NB: there will only ever be a single zip file in each mod derivation's output dir
|
# NB: there will only ever be a single zip file in each mod derivation's output dir
|
||||||
ln -s $modDrv/*.zip $out
|
ln -s $modDrv/*.zip $out
|
||||||
done
|
done
|
||||||
'' + (lib.optionalString (modsDatFile != null) ''
|
'' + (optionalString (modsDatFile != null) ''
|
||||||
cp ${modsDatFile} $out/mod-settings.dat
|
cp ${modsDatFile} $out/mod-settings.dat
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue