mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
48 lines
966 B
Nix
48 lines
966 B
Nix
{ llvmPackages
|
|
, lib
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, python3
|
|
}:
|
|
|
|
llvmPackages.stdenv.mkDerivation rec {
|
|
pname = "c3c";
|
|
version = "unstable-2021-07-30";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "c3lang";
|
|
repo = pname;
|
|
rev = "2246b641b16e581aec9059c8358858e10a548d94";
|
|
sha256 = "VdMKdQsedDQCnsmTxO4HnBj5GH/EThspnotvrAscSqE=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [
|
|
llvmPackages.llvm
|
|
llvmPackages.lld
|
|
];
|
|
|
|
nativeCheckInputs = [ python3 ];
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
( cd ../resources/testproject; ../../build/c3c build )
|
|
( cd ../test; python src/tester.py ../build/c3c test_suite )
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -Dm755 c3c $out/bin/c3c
|
|
cp -r lib $out
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Compiler for the C3 language";
|
|
homepage = "https://github.com/c3lang/c3c";
|
|
license = licenses.lgpl3Only;
|
|
maintainers = with maintainers; [ luc65r ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|