Loading pkgs/games/factorio/utils.nix +13 −2 Original line number Diff line number Diff line # 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 Loading @@ -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 ''); }; Loading Loading
pkgs/games/factorio/utils.nix +13 −2 Original line number Diff line number Diff line # 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 Loading @@ -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 ''); }; Loading