diff options
author | éclairevoyant <848000+eclairevoyant@users.noreply.github.com> | 2024-06-17 21:09:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-17 21:09:01 +0000 |
commit | 5bbede523a48ac140ee25ea6e203f86d79f415b6 (patch) | |
tree | 37a5ebaaf0725e1bfeef2a1a775ed113b6d21d2f /pkgs | |
parent | ffdfcd923e3c2d3de26c3277d443c0077b99e9b8 (diff) | |
parent | 3760be881c18292c29354dcba253c0c125ff5858 (diff) |
Merge pull request #304409 from tomodachi94/enhance/c3c/add-testVersion
c3c: add version check
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/compilers/c3c/default.nix | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/development/compilers/c3c/default.nix b/pkgs/development/compilers/c3c/default.nix index 4310ad931792e..2577f1321d749 100644 --- a/pkgs/development/compilers/c3c/default.nix +++ b/pkgs/development/compilers/c3c/default.nix @@ -7,16 +7,17 @@ , libxml2 , libffi , xar +, testers }: -llvmPackages.stdenv.mkDerivation rec { +llvmPackages.stdenv.mkDerivation (finalAttrs: { pname = "c3c"; version = "0.5.5"; src = fetchFromGitHub { owner = "c3lang"; - repo = pname; - rev = "refs/tags/${version}"; + repo = "c3c"; + rev = "refs/tags/${finalAttrs.version}"; hash = "sha256-iOljE1BRVc92NJZj+nr1G6KkBTCwJEUOadXHUDNoPGk="; }; @@ -50,11 +51,18 @@ llvmPackages.stdenv.mkDerivation rec { runHook postCheck ''; + passthru.tests = { + version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + }; + 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; + mainProgram = "c3c"; }; -} +}) |