about summary refs log tree commit diff
path: root/pkgs/development/compilers/bfc/default.nix
blob: 83710df4c13b51a05ae6886211b52bfefe26d49f (plain) (blame)
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
{ lib
, rustPlatform
, fetchFromGitHub
, llvmPackages_13
, libxml2
, ncurses
, zlib
, stdenv
}:

rustPlatform.buildRustPackage rec {
  pname = "bfc";
  version = "1.12.0";

  src = fetchFromGitHub {
    owner = "Wilfred";
    repo = "bfc";
    rev = version;
    hash = "sha256-5pcvwCtXWEexvV3TS62dZ6Opg8ANP2L8B0Z8u/OQENU=";
  };

  cargoHash = "sha256-1w/jPBO1TZpa0ju+O/NxQ/oMyzIvYVoXpj+ZLcIpQoU=";

  buildInputs = [
    libxml2
    ncurses
    zlib
  ];

  env.LLVM_SYS_130_PREFIX = llvmPackages_13.llvm.dev;

  # process didn't exit successfully: <...> SIGSEGV
  doCheck = false;

  meta = with lib; {
    description = "Industrial-grade brainfuck compiler";
    mainProgram = "bfc";
    homepage = "https://bfc.wilfred.me.uk";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ figsoda ];
    broken = stdenv.isAarch64 && stdenv.isLinux;
  };
}