Closed bobbbay closed 2 years ago
On a relatively different vein, I just noticed that an idrisPackages
set exists on nixpkgs, which contains (one of) the packages I want to depend on (effects
). However, it doesn't work when I add it to my TOML depends.idrisLibs
. Out of sheer interest, why doesn't idris2-pkgs
channel from these derivations as well?
EDIT: Oops, seems like that's only for Idris 1 :). Are there plans to get all of the derivations in idris2-pkgs
into an official attribute set on nixpkgs? Would be pretty cool, in my opinion.
I have figured out to use callNix
on an attrset containing the package. I cannot used callTOML because, well, it's not exposed :). So... I'm stuck on two points:
idris2-pkgs
reads in idrisLibs
? i.e., the following doesn't work:# myproject/myproject.toml
[ depends ]
idrisLibs = [ "some-package" ] # err: some-package doesn't exist
I have tried adding some-package
to my pkgs.idrisPackages
via an overlay, but that doesn't help the situation. Thoughts?
As an update, I managed to create an overlay that adds some-package
to pkgs.idris2.packages
, but it seems the call is internal to idris2-pkgs
, because this doesn't help, either. Thoughts @claymager?
callTOML
and idris2.packages
(or ipkgs
, as it is/was called in utils/callToml.nix
) are mutually dependent. There's currently no way to inject new packages, short of just using callNix
.
I've started sketching in my callToml-tweaks
branch, but haven't had the chance to do more than basic tests with it yet.
callToml-tweaks
looks really good! My only issue is that local
doesn't work, pointing to the utils
source directory instead of the project directory. Apart from that, thank you for the time you put in for this!
This feature is built into the new idrisPackage
.
Since
buildIdris
is now exposed to consumer flakes, it must be possible to add custom packages to a project (via an overlay (?)), that are then callable in a TOML file. To be completely honest, I'm not exactly certain the steps to do so, but here's exactly what I'd like to do:Am I overthinking this?