lol

l8w8jwt: init at 2.5.0

+58
+58
pkgs/by-name/l8/l8w8jwt/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitea, 5 + cmake, 6 + }: 7 + 8 + stdenv.mkDerivation (finalAttrs: { 9 + pname = "l8w8jwt"; 10 + version = "2.5.0"; 11 + 12 + src = fetchFromGitea { 13 + domain = "codeberg.org"; 14 + owner = "GlitchedPolygons"; 15 + repo = "l8w8jwt"; 16 + tag = finalAttrs.version; 17 + fetchSubmodules = true; 18 + hash = "sha256-aR3r84AYvCNx3jm9lB1qtbbEh9rU3LTkI+TK9LPQaPk="; 19 + }; 20 + 21 + nativeBuildInputs = [ cmake ]; 22 + 23 + cmakeFlags = [ 24 + "-DL8W8JWT_PACKAGE=On" 25 + (lib.cmakeBool "L8W8JWT_ENABLE_TESTS" finalAttrs.finalPackage.doCheck) 26 + ]; 27 + 28 + # chillibuff header isn't installed correctly 29 + preConfigure = '' 30 + mv lib/chillbuff/include/chillbuff.h include/ 31 + ''; 32 + 33 + doCheck = true; 34 + checkPhase = '' 35 + runHook preCheck 36 + ./run_tests 37 + runHook postCheck 38 + ''; 39 + 40 + installPhase = '' 41 + runHook preInstall 42 + 43 + mkdir -p -m777 $out/include $out/lib64 44 + cp -pr $src/include/l8w8jwt $out/include 45 + cp -pr l8w8jwt/bin/release/libl8w8jwt.a $out/lib64 46 + 47 + runHook postInstall 48 + ''; 49 + 50 + meta = { 51 + description = "Minimal, OpenSSL-less and super lightweight JWT library written in C"; 52 + homepage = "https://codeberg.org/GlitchedPolygons/l8w8jwt"; 53 + changelog = "https://codeberg.org/GlitchedPolygons/l8w8jwt/releases/tag/${finalAttrs.version}"; 54 + license = lib.licenses.asl20; 55 + maintainers = with lib.maintainers; [ jherland ]; 56 + platforms = lib.platforms.unix; 57 + }; 58 + })