idris-modules: Read the filesystem to populate package list
This commit is contained in:
parent
efbee054fd
commit
a5ca796f55
@ -1,4 +1,4 @@
|
|||||||
{ idris, buildIdrisPackage }: name: deps: buildIdrisPackage (args: {
|
{ idris, build-idris-package }: name: deps: build-idris-package (args: {
|
||||||
inherit name;
|
inherit name;
|
||||||
|
|
||||||
propagatedBuildInputs = deps;
|
propagatedBuildInputs = deps;
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
|
|
||||||
callPackage = callPackageWithScope defaultScope;
|
callPackage = callPackageWithScope defaultScope;
|
||||||
|
|
||||||
buildBuiltinPackage = callPackage ./build-builtin-package.nix {};
|
builtins_ = pkgs.lib.mapAttrs self.build-builtin-package {
|
||||||
|
|
||||||
builtins = pkgs.lib.mapAttrs buildBuiltinPackage {
|
|
||||||
prelude = [];
|
prelude = [];
|
||||||
|
|
||||||
base = [ self.prelude ];
|
base = [ self.prelude ];
|
||||||
@ -26,13 +24,13 @@
|
|||||||
|
|
||||||
pruviloj = [ self.prelude self.base ];
|
pruviloj = [ self.prelude self.base ];
|
||||||
};
|
};
|
||||||
in {
|
|
||||||
inherit idris;
|
|
||||||
|
|
||||||
withPackages = callPackage ./with-packages-wrapper.nix {};
|
files = builtins.filter (n: n != null) (pkgs.lib.mapAttrsToList (name: type: let
|
||||||
|
m = builtins.match "(.*)\.nix" name;
|
||||||
|
in if m == null then null else builtins.head m) (builtins.readDir ./.));
|
||||||
|
in (builtins.listToAttrs (map (name: { inherit name; value = callPackage (./. + "/${name}.nix") {}; }) files)) // {
|
||||||
|
inherit idris callPackage;
|
||||||
|
|
||||||
buildIdrisPackage = callPackage ./build-idris-package.nix {};
|
builtins = pkgs.lib.mapAttrsToList (name: value: value) builtins_;
|
||||||
|
} // builtins_;
|
||||||
builtins = pkgs.lib.mapAttrsToList (name: value: value) builtins;
|
|
||||||
} // builtins;
|
|
||||||
in fix' (extends overrides idrisPackages)
|
in fix' (extends overrides idrisPackages)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user