[Nix-dev] Using Nix as the preferred package manager for a new language
Rok Garbas
rok at garbas.si
Tue Feb 9 21:52:39 CET 2016
Quoting stewart mackenzie (2016-02-09 18:32:01)
> We're doing almost exactly this at github.com/fractalide/fractalide.
> Fractalide is a Flow-based programming language implemented in Rust
>
> We're also facing many of the issues you are :-)
>
> Rust has a slow compilation, so nix's lazy evaluation means (after a
> long initial build of every component) we only compile the needed
> dependency chain after a change thereafter. Secondly we've have a
> component_lookup (which maps a common name such as
> 'maths_boolean_nand' to /nix/store/<hash>-maths_boolean_nand) of which
> every single component is dependent, so we have to build everything
> first time round.
>
> The only way around this I see: is a conservative language extension
> to hopefully make fbp expressive enough to be able directory walks. ie
> similar to ./. in nix.
> Then...
> The path I'd like to go is that of guix and implement our own nix in
> fbp (bootstrapping with nix) thus we can have a coordination layer
> over rust flow based programming components and components wrapped
> around other non-rust projects such as postgres etc. This would be
> activated as simple as `postgres_instance_1(postgres)`.
>
> Say for example:
>
> 'path:(path="${fractalide_docs}")' -> www_dir server(web_server)
> 'domain_port:(domainPort="localhost:8080")' -> domain_port server()
>
> Normally the above wouldn't be committed into the fractalide repo but
> having a "fractalnix" means ${fractalide_docs} could be evaluated. I'm
> unsure of the details as yet.
>
> Anyway keen to see this conversation take off!
>
You could also create a wrapper around nix-build/nix-shell and generate part of
the derivation and feed it to standard buildFlowPackage function, right? Also
instead of generating you could also define a json format or any other format
but then you would have to implement a parser in nix yourself, but it is still
possible.
--
Rok Garbas - http://www.garbas.si
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160209/6f96818d/attachment.bin
More information about the nix-dev
mailing list