Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 argtable, 6 cmake, 7 libserialport, 8 pkg-config, 9 testers, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "blisp"; 14 version = "0.0.4"; 15 16 src = fetchFromGitHub { 17 owner = "pine64"; 18 repo = "blisp"; 19 rev = "v${finalAttrs.version}"; 20 hash = "sha256-cN35VLbdQFA3KTZ8PxgpbsLGXqfFhw5eh3nEBRZqAm4="; 21 }; 22 23 nativeBuildInputs = [ 24 cmake 25 pkg-config 26 ]; 27 28 buildInputs = [ 29 argtable 30 libserialport 31 ]; 32 33 cmakeFlags = [ 34 "-DBLISP_BUILD_CLI=ON" 35 "-DBLISP_USE_SYSTEM_LIBRARIES=ON" 36 ]; 37 38 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-error=implicit-function-declaration"; 39 40 passthru.tests.version = testers.testVersion { 41 package = finalAttrs.finalPackage; 42 version = "v${finalAttrs.version}"; 43 }; 44 45 meta = with lib; { 46 description = "In-System-Programming (ISP) tool & library for Bouffalo Labs RISC-V Microcontrollers and SoCs"; 47 license = licenses.mit; 48 mainProgram = "blisp"; 49 homepage = "https://github.com/pine64/blisp"; 50 platforms = platforms.unix; 51 maintainers = [ maintainers.bdd ]; 52 }; 53})