znur/default.nix

14 lines
392 B
Nix

{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs) callPackage;
inherit (pkgs.lib) filterAttrs mapAttrs;
inherit (builtins) substring readDir toString;
here = ./.;
want = filterAttrs (name: type:
type == "directory" && (substring 0 1 name) != "."
) (readDir here);
in mapAttrs (name: type:
callPackage ((toString here) + "/" + (toString name)) {}
) want