NixOS/nix — pull request #400 by ehmry (2014-11-24 18:42:01+00:00)
Title: Add primop 'glob'

I'd like to do something like this
``` nix
# set of imported expressions
builtins.listToAttrs (map
(path: {
name = myDropPrefixFunc ".nix" (baseNameOf (toString path));
value = myImportFunc path;
})
(builtins.glob "./expressions/*.nix") # or `(builtins.glob (./expressions + "/*.nix"))`
);
```

I've found a way to do something that effectively has the same result, but not without hashing a directory and importing the output of an intermediary derivation.

I don't see there being problems as long as globs must be resolved to absolute paths, but please correct me if I'm wrong.

It turns out my glibc came with this handy glob header so I went ahead and made a new primop.