2 # see the substituteAll in the nixpkgs documentation for usage and constraints
5 # keep this in sync with substituteAll
6 isInvalidArgName = x: builtins.match "^[a-z][a-zA-Z0-9_]*$" x == null;
7 invalidArgs = builtins.filter isInvalidArgName (builtins.attrNames args);
9 if invalidArgs == [] then
10 stdenvNoCC.mkDerivation ({
11 name = if args ? name then args.name else baseNameOf (toString args.src);
12 builder = ./substitute-all.sh;
14 preferLocalBuild = true;
15 allowSubstitutes = false;
18 Argument names for `pkgs.substituteAll` must:
19 - start with a lower case ASCII letter
20 - only contain ASCII letters, digits and underscores
21 Found invalid argument names: ${lib.concatStringsSep ", " invalidArgs}.