mirror of
https://github.com/pine64/blisp.git
synced 2024-12-21 22:10:12 +00:00
3490c37581
This adds a Nix flake, shims for 'legacy' Nix, and a `.envrc` for `direnv`. blisp is now able to run directly via: `nix run github:pine64/blisp` and for Nix/NixOS users, this helps with a one-click developer environment. Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
50 lines
1.0 KiB
Nix
50 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
self,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
argtable,
|
|
cmake,
|
|
libserialport,
|
|
pkg-config,
|
|
testers,
|
|
IOKit ? null,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "blisp";
|
|
version = "0.0.4-unstable";
|
|
src = self;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
argtable
|
|
libserialport
|
|
] ++ lib.optional stdenv.hostPlatform.isDarwin IOKit;
|
|
|
|
cmakeFlags = [
|
|
"-DBLISP_BUILD_CLI=ON"
|
|
"-DBLISP_USE_SYSTEM_LIBRARIES=ON"
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-error=implicit-function-declaration";
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
version = "v${finalAttrs.version}";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "In-System-Programming (ISP) tool & library for Bouffalo Labs RISC-V Microcontrollers and SoCs";
|
|
license = licenses.mit;
|
|
mainProgram = "blisp";
|
|
homepage = "https://github.com/pine64/blisp";
|
|
platforms = platforms.unix;
|
|
maintainers = [ maintainers.bdd ];
|
|
};
|
|
})
|