1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

+ generate-shell-nix

This commit is contained in:
Kierán Meinhardt
2018-10-10 13:03:22 +02:00
parent 5b53dd89ce
commit e2ee80e2bb
6 changed files with 66 additions and 0 deletions

10
package/default.nix Normal file
View File

@@ -0,0 +1,10 @@
{ lib }:
with lib;
let
callPackage = set: f: overrides: f ((builtins.intersectAttrs (builtins.functionArgs f) set) // overrides);
subdirsOf = path: lib.mapAttrs (name: _: path + "/${name}") (filterAttrs (_: eq "directory") (readDir path));
in mapAttrs
(_: flip callPackage {})
(filterAttrs
(_: dir: pathExists (dir + "/default.nix"))
(subdirsOf ./.))