Description
In #291, if there is no rockspec
entry, but there is a src.rock
entry in the manifest, rocks will try to install from the rockspec's source first, falling back to fetching the src.rock
if the rockspec.source can't be fetched.
This is fine, but it has one edge case: If the rockspec source can be fetched, the lockfile is populated with the rockspec.source hash and not the .src.rock
hash. To be able to fetch the rockspec from the src.rock
, in a pure manner, nix will need to know the hash of the .src.rock
.
To solve this, we should:
- Split
build
into separatepub(crate)
fetch_source
andbuild
steps (we can still expose the currentbuild
function). - Build using the
src.rock
if no rockspec entry exists in the manifest.