idris-lang / Idris2

A purely functional programming language with first class types
https://idris-lang.org/
Other
2.46k stars 369 forks source link

[nix] allow `buildIdris` output to be used as a dependency in other `buildIdris` calls more directly #3333

Closed mattpolzin closed 1 week ago

mattpolzin commented 1 week ago

Description

Following in the footsteps of a recent change to the Nixpkgs variant of buildIdris, this PR just makes it a bit easier to work with the output of the buildIdris function as an input to another Idris package. The changes are backwards compatible so they just provide more flexibility and better ergonomics going forward.

Before:

let myLib = buildIdris { ... };
in buildIdris {
  ...
  idrisLibraries = [ (myLib.library {}) ];
}

After:

let myLib = buildIdris { ... };
in buildIdris {
  ...
  idrisLibraries = [ myLib ];
}

Should this change go in the CHANGELOG?