Commit graph

7 commits

Author SHA1 Message Date
Timothy DeHerrera be4b612b23
treewide: format with nixpkgs-fmt 2021-04-09 19:22:08 -06:00
Pacman99 3d1501c384 lib: only readDir if path exists with safeReadDir 2021-04-01 11:39:02 -07:00
Pacman99 b3aa38702b lib/pathsToImportedAttrs: allow directories
check if directory has a default.nix and use directory name as key

Co-authored-by: Timothy DeHerrera <tim.deh@pm.me>
2021-03-29 08:54:25 -07:00
bors[bot] 5a3bae7be5
Merge #220
220: Drop flattenTreeSystem and use custom function for filtering packages r=nrdxp a=Pacman99

I don't think we should flatten the system because if a user doesn't make a package a derivation in pkgs/default.nix we should trust that there is a reason for doing so. So instead this drops the flattenTreeSystem reference(and switches to flake-utils master branch) and replaces its usage with a custom function `filterPackages`. This function filter all packages that match three conditions;
 - is a derivation
 - not broken
 - system is supported

In that order as to not cause errors when trying to reference non-derivation meta attributes.

And then also just dump *all* packages into legacy packages, so everything else is still accessible. I was considering removing the packages that are already in the packages output in legacyPackages, but I don't think its necessary since nix looks to the packages output first.

Co-authored-by: Pacman99 <pachum99@gmail.com>
2021-03-27 00:10:58 +00:00
Pacman99 fb14e20249 lib/filterPackages: filter by flake requirements
returns only non-broken derivations that support the system.
2021-03-26 16:55:27 -07:00
Pacman99 68a5a2eecf lib/pathsToImportedAttrs: discard string context in the names to prevent flake check error 2021-03-26 08:10:56 -07:00
Timothy DeHerrera c012f2f4ed treewide cleanups and refactoring for initial tests (#157)
- [x] refactor lib into separate files, similar to NixOS/nixpkgs/lib.
- [x] refactor ci to automatically generate derivations from flake outputs
- [x] remove cluttered indirection statements throughout the codebase
- [x] refactor hosts to allow for upcoming integration tests
- [x] improve ambiguity in the existing docs 
- [x] add [BORS](https://bors.tech) support
- [x] add initial integration test
- [x] write tests documentation
- [x] test lib
- [x] improve version string generation, and do so automatically for pkgs/flake.nix sources

Clean up the codebase as best we can in preparation for #152 and add tests. From now on, all PRs will be merged with BORS.
2021-03-14 07:10:51 +00:00