summaryrefslogtreecommitdiff
path: root/pkgs/applications/virtualization/qboot/default.nix
blob: 53572437af436862fa514222898543b4a3b55274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
  lib,
  stdenv,
  meson,
  ninja,
  fetchFromGitHub,
  nixosTests,
}:

stdenv.mkDerivation {
  pname = "qboot";
  version = "unstable-2022-09-19";

  src = fetchFromGitHub {
    owner = "bonzini";
    repo = "qboot";
    rev = "8ca302e86d685fa05b16e2b208888243da319941";
    hash = "sha256-YxVGFiyLdhq7yWaXARh7f0nBZgXfJuYvv1BxfyThupM=";
  };

  nativeBuildInputs = [
    meson
    ninja
  ];

  installPhase = ''
    mkdir -p $out
    cp bios.bin bios.bin.elf $out/.
  '';

  hardeningDisable = [
    "stackprotector"
    "pic"
  ];

  passthru.tests.qboot = nixosTests.qboot;

  meta = {
    description = "Simple x86 firmware for booting Linux";
    homepage = "https://github.com/bonzini/qboot";
    license = lib.licenses.gpl2;
    maintainers = [ ];
    platforms = [
      "x86_64-linux"
      "i686-linux"
    ];
  };
}