about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/qbe/default.nix
blob: d9694c9b4bce6f5bdf9942ed9bc5060dc78b48c7 (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
{ lib
, stdenv
, fetchzip
, callPackage
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "qbe";
  version = "1.2";

  src = fetchzip {
    url = "https://c9x.me/compile/release/qbe-${finalAttrs.version}.tar.xz";
    hash = "sha256-UgtJnZF/YtD54OBy9HzGRAEHx5tC9Wo2YcUidGwrv+s=";
  };

  makeFlags = [ "PREFIX=$(out)" ];

  doCheck = true;

  passthru = {
    tests.can-run-hello-world = callPackage ./test-can-run-hello-world.nix { };
  };

  meta = with lib; {
    homepage = "https://c9x.me/compile/";
    description = "A small compiler backend written in C";
    maintainers = with maintainers; [ fgaz ];
    license = licenses.mit;
    platforms = platforms.all;
    mainProgram = "qbe";
  };
})