From 87b9b9f5729df340677adb7c19095c9a857388e0 Mon Sep 17 00:00:00 2001 From: fortuneteller2k Date: Sun, 23 Jul 2023 13:52:53 +0800 Subject: [PATCH] blisp: init at unstable-2023-06-03 --- pkgs/development/embedded/blisp/default.nix | 42 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/embedded/blisp/default.nix diff --git a/pkgs/development/embedded/blisp/default.nix b/pkgs/development/embedded/blisp/default.nix new file mode 100644 index 000000000000..9758b6a2bc39 --- /dev/null +++ b/pkgs/development/embedded/blisp/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +, argtable +, cmake +, libserialport +, pkg-config +, IOKit +}: + +stdenv.mkDerivation { + pname = "blisp"; + version = "unstable-2023-06-03"; + + src = fetchFromGitHub { + owner = "pine64"; + repo = "blisp"; + rev = "048a72408218788d519a87bcdfb23bcf9ed91a84"; + hash = "sha256-hipJrr0D4uEN2hk8ooXeg0gv0X3w4U9ReXbC4oPEPwI="; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ + argtable + libserialport + ] ++ lib.optional stdenv.isDarwin IOKit; + + cmakeFlags = [ + "-DBLISP_BUILD_CLI=ON" + "-DBLISP_USE_SYSTEM_LIBRARIES=ON" + ]; + + meta = with lib; { + description = "ISP tool & library for Bouffalo Labs RISC-V Microcontrollers and SoCs"; + license = licenses.mit; + homepage = "https://github.com/pine64/blisp"; + maintainers = [ maintainers.fortuneteller2k ]; + }; +} +# TODO: update when next stable release supports building without vendored +# libraries diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2185766a0923..3012a4aed2a7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3232,6 +3232,10 @@ with pkgs; blanket = callPackage ../applications/audio/blanket { }; + blisp = darwin.apple_sdk_11_0.callPackage ../development/embedded/blisp { + inherit (darwin.apple_sdk_11_0.frameworks) IOKit; + }; + brakeman = callPackage ../development/tools/analysis/brakeman { }; brewtarget = libsForQt5.callPackage ../applications/misc/brewtarget { } ;