Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9121c914fc68
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4be9fcd18408
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Oct 29, 2019

  1. firecracker: 0.18.0 -> 0.19.0, some cleanups

    Signed-off-by: Austin Seipp <aseipp@pobox.com>
    thoughtpolice committed Oct 29, 2019
    Copy the full SHA
    610a6fc View commit details
  2. firecracker: support on aarch64-linux

    Signed-off-by: Austin Seipp <aseipp@pobox.com>
    thoughtpolice committed Oct 29, 2019
    Copy the full SHA
    4be9fcd View commit details
Showing with 38 additions and 12 deletions.
  1. +38 −12 pkgs/applications/virtualization/firecracker/default.nix
50 changes: 38 additions & 12 deletions pkgs/applications/virtualization/firecracker/default.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,61 @@
{ fetchurl, stdenv }:

let
version = "0.18.0";
baseurl = "https://github.com/firecracker-microvm/firecracker/releases/download";
version = "0.19.0";

suffix = {
x86_64-linux = "";
aarch64-linux = "-aarch64";
}."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");

baseurl = "https://github.com/firecracker-microvm/firecracker/releases/download";
fetchbin = name: sha256: fetchurl {
url = "${baseurl}/v${version}/${name}-v${version}";
inherit sha256;
url = "${baseurl}/v${version}/${name}-v${version}${suffix}";
sha256 = sha256."${stdenv.hostPlatform.system}";
};

firecracker-bin = fetchbin "firecracker" {
x86_64-linux = "0yjhw77xc2nc96p36jhf0va95gf6hwi9n270g4iiwakycdy048mx";
aarch64-linux = "165yca7pcwpqw3x6dihcjz1xcwjh37sdi9qrrjk9zasxx7xcniym";
};

jailer-bin = fetchbin "jailer" {
x86_64-linux = "1q792b4bl1q3ach8nc8l0fbcil44knv3wa542xrskndzdz28lhsp";
aarch64-linux = "1cnwlpy5bswjprk7fcjgf6lxidhp7z00qx691nkwhzjkby80j490";
};

firecracker-bin = fetchbin "firecracker" "140g93z0k8yd9lr049ps4dj0psb9ac1v7g5zs7lzpws9rj8shmgh";
jailer-bin = fetchbin "jailer" "0sk1zm1fx0zdy5il8vyygzads72ni2lcil42wv59j8b2bg8p7fwd";
in
stdenv.mkDerivation {
name = "firecracker-${version}";
pname = "firecracker";
inherit version;

srcs = [ firecracker-bin jailer-bin ];
phases = [ "installPhase" ];

unpackPhase = ":";
configurePhase = ":";

buildPhase = ''
cp ${firecracker-bin} firecracker
cp ${jailer-bin} jailer
chmod +x firecracker jailer
'';

doCheck = true;
checkPhase = ''
./firecracker --version
./jailer --version
'';

installPhase = ''
mkdir -p $out/bin
install -D ${firecracker-bin} $out/bin/firecracker
install -D ${jailer-bin} $out/bin/jailer
install -D firecracker $out/bin/firecracker
install -D jailer $out/bin/jailer
'';

meta = with stdenv.lib; {
description = "Secure, fast, minimal micro-container virtualization";
homepage = http://firecracker-microvm.io;
license = licenses.asl20;
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
maintainers = with maintainers; [ thoughtpolice ];
};
}