diff options
author | Floris Stoica <floris@nusunt.eu> | 2023-12-01 23:49:52 +0200 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-05-06 21:09:33 +0200 |
commit | a9c6372eba7a2bbf72d93299d17c00148f873e43 (patch) | |
tree | d537bd634a461f6c426b301966a0e10e77a8fb08 /pkgs/development/compilers/c3c | |
parent | 901ff63f9c2a39b34c1de6c278240291c317a447 (diff) |
c3c: unstable-2021-07-30 -> 0.5.5
Update c3c compiler to the newest released stable version.
Diffstat (limited to 'pkgs/development/compilers/c3c')
-rw-r--r-- | pkgs/development/compilers/c3c/default.nix | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/pkgs/development/compilers/c3c/default.nix b/pkgs/development/compilers/c3c/default.nix index b68ffc045f64..4310ad931792 100644 --- a/pkgs/development/compilers/c3c/default.nix +++ b/pkgs/development/compilers/c3c/default.nix @@ -3,38 +3,51 @@ , fetchFromGitHub , cmake , python3 +, curl +, libxml2 +, libffi +, xar }: llvmPackages.stdenv.mkDerivation rec { pname = "c3c"; - version = "unstable-2021-07-30"; + version = "0.5.5"; src = fetchFromGitHub { owner = "c3lang"; repo = pname; - rev = "2246b641b16e581aec9059c8358858e10a548d94"; - sha256 = "VdMKdQsedDQCnsmTxO4HnBj5GH/EThspnotvrAscSqE="; + rev = "refs/tags/${version}"; + hash = "sha256-iOljE1BRVc92NJZj+nr1G6KkBTCwJEUOadXHUDNoPGk="; }; - nativeBuildInputs = [ cmake ]; + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail "\''${LLVM_LIBRARY_DIRS}" "${llvmPackages.lld.lib}/lib ${llvmPackages.llvm.lib}/lib" + ''; + + nativeBuildInputs = [ + cmake + ]; buildInputs = [ llvmPackages.llvm llvmPackages.lld + curl + libxml2 + libffi + ] ++ lib.optionals llvmPackages.stdenv.isDarwin [ + xar ]; nativeCheckInputs = [ python3 ]; - doCheck = true; + doCheck = llvmPackages.stdenv.system == "x86_64-linux"; checkPhase = '' + runHook preCheck ( 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 + runHook postCheck ''; meta = with lib; { |