mattpolzin / nix-idris2-packages

1 stars 0 forks source link

Include an overlay for merging the idris2 packages with a nixpkgs set #17

Open mitchmindtree opened 2 days ago

mitchmindtree commented 2 days ago

It would be convenient if the idris2 packages were exposed via an overlay to make them a little more easily available to projects using nixpkgs.

I find it's often easiest to first collect the packages as a part of the overlay, then use them from the nixpkgs set in the packages output.

mitchmindtree commented 1 day ago

I made a bit of an adaptation that just uses the resolved JSON and exposes an overlay here in case anyone is interested. Ideally will upstream it to here at some point if #16 isn't solved first

mattpolzin commented 1 day ago

Nice. An overlay makes sense. There are some things I'm not sure I'm happy with about the conflict between packages as-in community libraries and packages as-in the compiler and LSP in nix-idris2-packages right now and I see you also found it to be not great since you surfaced community packages under idris2Packages.packdb. I'm not totally sure yet but I think I like that namespacing.

mitchmindtree commented 1 day ago

Fwiw I am also unsure about this namespacing :sweat_smile: My real motivation was as a quick hack to make it easier to only expose the packdb packages from the flake's outputs. Here or in nixpkgs I think I'd be happy to go either way (i.e. with or without the separate namespace).

mitchmindtree commented 1 day ago

Come to think of it, I'm not even sure if the plan is to keep the occasional namespacing in nixpkgs? My impression is that unless contributions are to some existing package, all new packages should go in /by-name/ now, but maybe there's still some caveat language ecosystem pkgs :thinking:

mattpolzin commented 1 day ago

Yeah, there's a caveat there. The caveat is mostly around packages that don't get included via callPackage, though. Python for example. Technically Idris packages may be considered more idiomatic as individual top level packages in the nixpkgs by-name directory except for the fact that if that were the case then none of them belong in nixpkgs to begin with because they don't meet the high level requirement that things in nixpkgs are useful to more than a handful of people (the Idris community is small much less the subset that uses Nix).

My hope is that no one objects to continuing to have an idris2Packages namespace.