2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, argtable
|
|
|
|
, cmake
|
|
|
|
, libserialport
|
|
|
|
, pkg-config
|
2023-10-09 19:29:22 +00:00
|
|
|
, testers
|
2023-08-04 22:07:22 +00:00
|
|
|
, IOKit
|
|
|
|
}:
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-08-04 22:07:22 +00:00
|
|
|
pname = "blisp";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.0.4";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pine64";
|
|
|
|
repo = "blisp";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-cN35VLbdQFA3KTZ8PxgpbsLGXqfFhw5eh3nEBRZqAm4=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
argtable
|
|
|
|
libserialport
|
|
|
|
] ++ lib.optional stdenv.isDarwin IOKit;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBLISP_BUILD_CLI=ON"
|
|
|
|
"-DBLISP_USE_SYSTEM_LIBRARIES=ON"
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=implicit-function-declaration";
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
version = "v${finalAttrs.version}";
|
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
description = "An In-System-Programming (ISP) tool & library for Bouffalo Labs RISC-V Microcontrollers and SoCs";
|
2023-08-04 22:07:22 +00:00
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "blisp";
|
2023-08-04 22:07:22 +00:00
|
|
|
homepage = "https://github.com/pine64/blisp";
|
2024-01-02 11:29:13 +00:00
|
|
|
platforms = platforms.unix;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = [ maintainers.bdd ];
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
})
|