about summary refs log tree commit diff
path: root/pkgs/games/factorio
diff options
context:
space:
mode:
authorPhilip Taron <philip.taron@gmail.com>2024-03-14 11:40:44 -0700
committerValentin Gagarin <valentin.gagarin@tweag.io>2024-03-31 00:42:56 +0100
commit9be6e2203771aaa21f2eb373994aef7a0e130fed (patch)
treee46e2c089030ce53d9c208002ae7ff2751e446d6 /pkgs/games/factorio
parent75d2271a90e2fc6f1ececc3e5faa9467901fc9e0 (diff)
Avoid top-level `with ...;` in pkgs/games/factorio/utils.nix
Diffstat (limited to 'pkgs/games/factorio')
-rw-r--r--pkgs/games/factorio/utils.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/games/factorio/utils.nix b/pkgs/games/factorio/utils.nix
index d2b52ae483660..b68cc921996e8 100644
--- a/pkgs/games/factorio/utils.nix
+++ b/pkgs/games/factorio/utils.nix
@@ -1,7 +1,18 @@
 # 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.
 { lib, stdenv }:
-with lib;
+let
+  inherit (lib)
+    flatten
+    head
+    optionals
+    optionalString
+    removeSuffix
+    replaceStrings
+    splitString
+    unique
+    ;
+in
 {
   mkModDirDrv = mods: modsDatFile: # a list of mod derivations
     let
@@ -18,7 +29,7 @@ with lib;
           # NB: there will only ever be a single zip file in each mod derivation's output dir
           ln -s $modDrv/*.zip $out
         done
-      '' + (lib.optionalString (modsDatFile != null) ''
+      '' + (optionalString (modsDatFile != null) ''
        cp ${modsDatFile} $out/mod-settings.dat
       '');
     };