2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-07-14 12:49:19 +00:00
|
|
|
, fetchzip
|
2021-06-28 23:13:55 +00:00
|
|
|
, callPackage
|
2020-11-21 19:51:51 +00:00
|
|
|
}:
|
2024-02-29 20:09:43 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "qbe";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
src = fetchzip {
|
2024-02-29 20:09:43 +00:00
|
|
|
url = "https://c9x.me/compile/release/qbe-${finalAttrs.version}.tar.xz";
|
|
|
|
hash = "sha256-UgtJnZF/YtD54OBy9HzGRAEHx5tC9Wo2YcUidGwrv+s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2020-11-21 19:51:51 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
passthru = {
|
2024-02-29 20:09:43 +00:00
|
|
|
tests.can-run-hello-world = callPackage ./test-can-run-hello-world.nix { };
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
2020-11-21 19:51:51 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://c9x.me/compile/";
|
|
|
|
description = "A small compiler backend written in C";
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "qbe";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
})
|