numtide / flake-utils

Pure Nix flake utility functions [maintainer=@zimbatm]
MIT License
1.15k stars 79 forks source link

check-utils: add hasBuilt #37

Closed blaggacao closed 1 year ago

blaggacao commented 3 years ago

This implementation of hasBUilt depends on a very simple IFD (builtins.pathExists drv). It works well for successful builds, but currently build-errors for failing ones, despite of the use of builtins.tryEval.

I'm investigating if this behaviour of builtins.tryEval can be considered an upstream bug, as long as IFD, per se, are not forbidden.

(opinion milage may vary)

gytis-ivaskevicius commented 3 years ago

Can we turn this into an actual PR and see what @zimbatm thinks? (Don't forget to add success/failing cases to the example and paste resulting output)

blaggacao commented 3 years ago

I'll try to have some conversations about tryEval catching or nor catching build errors, first. This is going to be a long hauler. In the current state of tryEval it does not work and upstream opinions seem divided.

Mic92 commented 2 years ago

Is check-utils part of the public api of this flake? @zimbatm

gytis-ivaskevicius commented 2 years ago

Yes

Mic92 commented 2 years ago

It's not part of the documentation though: https://github.com/numtide/flake-utils

zimbatm commented 2 years ago

It was added by blaggacao and gytis. I haven't used it so far.

zimbatm commented 1 year ago

I think this effort has moved elsewhere