Comments (6)
Yeah, that seems good. I should say that I wasn't using this directly, I was using github.com/divnix/digga, which called the function. So maybe this problem should be resolved there.
I guess it should at least be documented that this cannot be called on an arbitrary overlay.
from flake-utils-plus.
That code also assumes overlays
is a set. overlays
is also allowed to be a list, right?
from flake-utils-plus.
Yeah the code very much relies on the lazy eval of overlays. I'm not really sure how to get around that for a function that needs to know the names of the packages the overlay creates.
That code also assumes overlays is a set. overlays is also allowed to be a list, right?
I don't think thats true for the overlays
flake output.
from flake-utils-plus.
I can't think of an actual solution to overlays
evaluation issue, do you have anything in mind in terms of a fix? I doubt that it is even possible :/
But by looking at your provided example wouldn't something like this fix your particular issue?
nixpkgs.lib.genAttrs # nixpkgs instead of prev
(builtins.readDir ./packages)
(pkgName: _: prev.callPackage ./packages + "/${pkgName}");
Also as far as I know overlays
must evaluate to a set
from flake-utils-plus.
I don't think thats true for the overlays flake output.
Ah, okay. I stand corrected then.
I can't think of an actual solution to overlays evaluation issue, do you have anything in mind in terms of a fix? I doubt that it is even possible :/
It may not be possible to find a fix. It's a rather nasty surprise though, if someone makes a valid overlay
, and someone else includes it in their config, and it breaks because flake-utils-plus
is making assumptions about the structure of that overlay. How essential is knowing the names of the packages? Is it something we can take out? Is there a way to catch the error somehow and just ignore the packages for that overlay?
from flake-utils-plus.
Okay so first of all it breaks overlays exporter, not everything. a possible workaround is to use builtins.removeAttrs
function to keep it from crashing.
One of the ideas I thought of just now is to use builtins.tryEval
function as a try/catch. Basically idea is to ignore overlay if evaluation fails
from flake-utils-plus.
Related Issues (20)
- Unable to explicitly specify networking.hostName HOT 1
- `generateNixPathFromInputs` should use a dir entry instead of per-flake entries HOT 4
- `generateNixPathFromInputs == true && linkInputs == false` should be an error HOT 1
- `generateNixPathFromInputs` should check for `default.nix` file instead of for package set HOT 3
- Print which host is being built HOT 4
- Same condition as previous if expression HOT 1
- `ca-references` in extra-experimental-features is now causing errors HOT 2
- Build fails with nix-darwin: The option `_module.args.inputs' is defined multiple times. HOT 12
- Deprecated evalModules arguments HOT 2
- How to use new flake overlays HOT 2
- How to cross compile? HOT 8
- Expose `fup-repl` through `blueprints` HOT 1
- Need for a `system` arg for outputsBuilder HOT 1
- Add 'channels' argument to sharedOverlays HOT 1
- nix-shell to respect system's overlays HOT 4
- Devshell attribute 'x86_64-linux' missing
- FUP broken on nixos-unstable-small HOT 2
- Can't use flakes inputs modifying `nixpkgs.config` anymore HOT 3
- channels.<nixpkgs>.overlaysBuilder doesn't work if supportedSystems contains more than one architecture HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flake-utils-plus.