diff --git a/builder/default.nix b/builder/default.nix index fd82e39..8f3b579 100644 --- a/builder/default.nix +++ b/builder/default.nix @@ -7,7 +7,6 @@ , go }: let - parseGoMod = import ./parser.nix; removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}''; @@ -73,10 +72,10 @@ let ${lib.concatStringsSep "\n" localReplaceCommands} '' + (if customVendorSrc == null - then "" - else '' - cp -R ${customVendorSrc}/* vendor/ - '' + then "" + else '' + cp -R ${customVendorSrc}/* vendor/ + '' ) + '' find vendor diff --git a/builder/parser.nix b/builder/parser.nix index 88bcffa..1e0486f 100644 --- a/builder/parser.nix +++ b/builder/parser.nix @@ -1,7 +1,6 @@ # Parse go.mod in Nix # Returns a Nix structure with the contents of the go.mod passed in # in normalised form. - let inherit (builtins) elemAt mapAttrs split foldl' match filter typeOf;