summaryrefslogtreecommitdiffstats
path: root/pkgs/development/compilers/hvm/default.nix
blob: 1d60a610729d734009f9739ac4a08e44cd40ebe9 (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
{ lib
, rustPlatform
, fetchCrate
, stdenv
, darwin
}:

rustPlatform.buildRustPackage rec {
  pname = "hvm";
  version = "1.0.0";

  src = fetchCrate {
    inherit pname version;
    sha256 = "sha256-nPkUGUcekZ2fvQgiVTNvt8vfQsNMyqsrkT2zqEfu/bE=";
  };

  cargoSha256 = "sha256-EaZTpKFZPfDlP/2XylhJHznvlah7VNw4snrKDmT7ecw=";

  buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
    darwin.apple_sdk.frameworks.IOKit
  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
    darwin.apple_sdk_11_0.frameworks.Foundation
  ];

  # tests are broken
  doCheck = false;

  # enable nightly features
  RUSTC_BOOTSTRAP = true;

  meta = with lib; {
    description = "A pure functional compile target that is lazy, non-garbage-collected, and parallel";
    homepage = "https://github.com/kindelia/hvm";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
  };
}