[Vm-dev] Fwd: Nix package for Pharo flavor of opensmalltalk-vm

Luke Gorrie luke at snabb.co
Wed Apr 19 16:21:00 UTC 2017


Hi Ben & all,

I revised the nix packaging. I'll do a little testing and cleaning up and
then send it upstream. Quick testing or feedback would be really welcome!

This (long, single line) command installs the VMs (cog, spur, spur64)
behind a simple wrapper:

nix-env --option tarball-ttl 0 -f
https://github.com/lukego/nixpkgs/archive/pharo6.tar.gz -iA pharo.vm


Then you can start an image like this:

pharo-vm ...


You can also install a few off-the-shelf images with dedicated startup
scripts. Here's how to install all of them:

nix-env --option tarball-ttl 0 -f
https://github.com/lukego/nixpkgs/archive/pharo6.tar.gz -iA pharo


Then you can start one of those images with these shell commands:

pharo-6.0
pharo64-6.0
pharo-5.0
moose-6.1
pharo-launcher-2017.02.28


There is a little automatic testing: Each image is started under Xvfb to
see if it crashes.

I am having some trouble doing "Save as..." to persist these images. The
image seems to suggest saving them in the root directory, rather than the
current directory, and I haven't managed to actually save an image. Weird.
Have to look a bit harder. Let me know if you see the problem!

btw: The images are maintained manually
<https://github.com/lukego/nixpkgs/blob/pharo6/pkgs/development/pharo/images/default.nix>.
Could be automated in the future with a program to generate that file. Or
maybe packaging images is the wrong idea and the launcher is better. Time
will tell.


On 18 April 2017 at 23:00, Luke Gorrie <luke at snabb.co> wrote:

> On 18 April 2017 at 18:59, Ben Coman <btc at openinworld.com> wrote:
>
>> This worked fine for me on 32bit Debian 8 Jessie, resulting in...
>>
>
> Cool! Thanks for testing that.
>
> The reason you see some "Jan 1 1970" timestamps is that nix resets file
> modification times back to the epoch to make the build more reproducible.
>
> Being able to try a compiler upgrade and then cleanly rollback is a great
>> feature.  I gather that under the covers, so switching between two
>> environments is just a quick link change?
>>
>
> Yep.
>
> You can also skip the symlinks and construct the software environment you
> want with a custom $PATH. Here is a command to start a sub-shell with
> exactly the build environment used for compiling the vm:
>
> $ nix-shell https://github.com/lukego/nixpkgs/archive/pharo6.tar.gz -A
> pkgs.pharo-vm
>
> This will start a shell with $PATH including exactly the expected versions
> of bash, gcc, autoconf, libtool, etc, that the build would use. Good for
> trouble shooting.
>
> The binaries that you build will also remember exactly which shared
> objects they are supposed to link with (e.g. which build of glibc):
>
> $ ldd $(which ls)
>         linux-gate.so.1 (0xf7767000)
>         librt.so.1 => /nix/store/djclawhih7363vlvsbrgfi1fr8l3glix-glibc-2.25/lib/librt.so.1
> (0xf7759000)
>         libacl.so.1 => /nix/store/v480rw5maz01wh5ysrma8mhl6qy1kvjd-acl-2.2.52/lib/libacl.so.1
> (0xf774f000)
>         libattr.so.1 => /nix/store/h6k7bwddlfzv1sbwxbnl795h0317wr
> wp-attr-2.4.47/lib/libattr.so.1 (0xf7749000)
>         libpthread.so.0 => /nix/store/djclawhih7363vlvsbrgfi1fr8l3gl
> ix-glibc-2.25/lib/libpthread.so.0 (0xf772b000)
>         libc.so.6 => /nix/store/djclawhih7363vlvsbrgfi1fr8l3glix-glibc-2.25/lib/libc.so.6
> (0xf7573000)
>
>         /nix/store/djclawhih7363vlvsbrgfi1fr8l3gl
> ix-glibc-2.25/lib/ld-linux.so.2 (0xf7769000)
>
>
> More nice tricks here: https://gist.github.com/travisbhartwell/
> f972aab227306edfcfea
>
> Now would any of the other dialects like to add to this?
>> At a minimum, perhaps just adding sources filesto...
>> https://github.com/lukego/nixpkgs/blob/pharo6/pkgs/developme
>> nt/pharo/vm/share.nix
>>
>
> That would be neat!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170419/87af9a0e/attachment.html>


More information about the Vm-dev mailing list