On Fri, Jun 23, 2017 at 11:59 PM, Luke Gorrie <[email protected]> wrote: > Hi again Ben, > > I have an idea for a hacky way to import all of the Pharo packages into my > universe. Shooting holes in this idea would be welcome :). > > Suppose that for each package "P" in the catalog I want to make a list of > the recursive dependencies (mcz files) and their sha256 hashes. I would do > this using a script that runs Pharo outside the sandbox and with access to > the network: > > - Start Pharo with an empty package cache. > - Download "P" and all of its dependencies automatically with Gofer. > - Inspect the package cache to see every mcz file that was downloaded and > its sha256 hash. > > Then I could use this process to bootstrap a package repository: > > - Having a copy of all the .mcz files in a common ftp directory. > - Having a mapping of filename->sha256 to provide to nix. > - Having a mapping from package name ("P") to all .mcz dependencies. > > This package repository could then be used for Nix such that I say which > packages I want and it automatically downloads all of the required .mcz > files, validates them with sha256 to make sure the build is reproducible, > and then loads them all into an image and dumps the result ready for use. > > So then on the Nix side I would write something like: > > nix-build -E 'pharo6 { packages = [ roassal2 neojson ... ]; }' > > and it would automatically create an image for me based on the package > repository definition that it finds in Git. > > Sane? Workable? Fatal flaws? >
That is exactly the approach I was thinking of also. But btw note, IIUC the bootstrap hasn't got a far as programatically creating an empty file and writing nil,true,false to it yet (if ever?). You will always be starting with a minimal.image rather than an empty.image. cheers -ben
