Skip to content

Instantly share code, notes, and snippets.

@mstone
Last active October 3, 2021 15:27
Show Gist options
  • Save mstone/aee0b07ffef8b0fccff88c04651971bf to your computer and use it in GitHub Desktop.
Save mstone/aee0b07ffef8b0fccff88c04651971bf to your computer and use it in GitHub Desktop.
qemu-m1-mbox
{
description = "qemu-m1";
inputs.utils.url = "github:numtide/flake-utils";
inputs.qemuUpstream.url = "git+https://github.com/qemu/qemu?ref=refs/tags/v6.1.0";
inputs.qemuUpstream.flake = false;
outputs = { self, nixpkgs, utils, qemuUpstream }: let
name = "qemu-m1";
in utils.lib.simpleFlake {
inherit self nixpkgs name;
systems = utils.lib.defaultSystems;
overlay = (final: prev: {
qemu-m1 = with final; rec {
qemu-m1 = (prev.qemu.overrideAttrs (old: rec {
version = "6.1.0";
src = fetchurl {
url = "https://download.qemu.org/qemu-${version}.tar.xz";
sha256 = "sha256-7rwInbNBS77t8eRkvtoKdRWq0w9zJhq8JGybJ1A6PJY=";
};
patches = [(builtins.head (builtins.tail old.patches))] ++ [ ./m1.patch ];
buildInputs = old.buildInputs ++ [ libtasn1 ];
nativeBuildInputs = [ (python39.withPackages (ps: with ps; [sphinx sphinx_rtd_theme])) ]
++ (lib.drop 2 old.nativeBuildInputs);
})).override { hostCpuOnly = true; };
defaultPackage = qemu-m1;
};
});
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment