ryangibb / hillingar Goto Github PK
View Code? Open in Web Editor NEWBuild Mirage unikernels with Nix
Build Mirage unikernels with Nix
E.g. use
$ opam monorepo lock
$ opam monorepo list
(or read the lockfile instead of list)
Will require mirage configure
and opam monorepo lock
outside of a nix derivation.
Kind of similar to https://github.com/tweag/opam-nix/#materialization but using opam-native mirage/<unikernel-name>.opam.locked
isntead of opam-nix's package-defs.json
E.g. omit mirage configure -t <target>
step.
Updating the flake inputs of the example repo causes it to fail to build
since the release of ptime.1.1.0
, even when ensuring ocaml 4 is used.
This invocation fails to build (my fork just updates the flake.lock
and adds package "ocaml" ~max:"5.0.0"
to the packages
in the config.ml
):
nix build "github:LogicalOverflow/mirage-hello-hillingar" --override-input opam-repository \
"github:ocaml/opam-repository?rev=49c3ad31df3f2f60c2006211900b6553c097277c"
With the following error:
File "duniverse/mirage-logs/src/dune", line 4, characters 50-55:
4 | (libraries logs mirage-clock lwt mirage-profile ptime))
^^^^^
Error: Library "ptime" not found.
-> required by library "mirage-logs" in
_build/default/duniverse/mirage-logs/src
-> required by executable main in dune.build:12
-> required by _build/default/main.exe
-> required by _build/default/hello
-> required by _build/default/dist/hello
-> required by alias dist/all
-> required by alias dist/default
The previous commit of opam-repository
still works:
nix build "github:LogicalOverflow/mirage-hello-hillingar" --override-input opam-repository \
"github:ocaml/opam-repository?rev=29869b0a1ad4fb7fc4a08d8a888a7abb6d0fa5cc"
The first bad commit is ocaml/opam-repository@49c3ad3, which adds ptime.1.1.0
I am not sure yet, where the issue lies (here, with opam-nix or somewhere else), but I am still able to build the example unikernel without nix. (mirage configure -t unix
followed by make
)
As a work-around, adding package "ptime" ~max:"1.1.0"
to the packages
in the config.ml
allows the build with nix to work again.
E.g. for github.com/RyanGibb/mirage-www (which now builds with Nix using Hillingar)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.