Skip to content

Commit

Permalink
apptainer: singularity: use lib.concatMapAttrsStringSep
Browse files Browse the repository at this point in the history
Use concatMapAttrsStringSep helper function from the standard library
instead of the locally-improvised one.
  • Loading branch information
ShamrockLee committed Aug 7, 2024
1 parent 13c5586 commit 9ccf45a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkgs/applications/virtualization/singularity/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ let
lib.optional (privileged-un-utils != null) (lib.makeBinPath [ privileged-un-utils ])
++ args.systemBinPaths or [ "/run/wrappers/bin" ];

concatMapStringAttrsSep =
sep: f: attrs:
lib.concatMapStringsSep sep (name: f name attrs.${name}) (lib.attrNames attrs);

addShellDoubleQuotes = s: lib.escapeShellArg ''"'' + s + lib.escapeShellArg ''"'';
in
(buildGoModule {
Expand Down Expand Up @@ -240,7 +236,7 @@ in
patchShebangs --build "$configureScript" makeit e2e scripts mlocal/scripts
# Patching the hard-coded defaultPath by prefixing the packages in defaultPathInputs
${concatMapStringAttrsSep "\n" (fileName: originalDefaultPaths: ''
${lib.concatMapAttrsStringSep "\n" (fileName: originalDefaultPaths: ''
substituteInPlace ${lib.escapeShellArg fileName} \
${
lib.concatMapStringsSep " \\\n " (
Expand Down

0 comments on commit 9ccf45a

Please sign in to comment.