Skip to content

Commit

Permalink
bootcommander: init at 011500
Browse files Browse the repository at this point in the history
  • Loading branch information
simoneruffini committed May 25, 2024
1 parent f0863ad commit e659fed
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions pkgs/by-name/bo/bootcommander/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ lib, stdenv, fetchFromGitHub, cmake, libopenblt }:

let
pname = "bootcommander";
version = "1.15.00";
in
stdenv.mkDerivation rec {

inherit pname version;

src = fetchFromGitHub {
owner = "feaser";
repo = "openblt";
rev = "openblt_v${lib.replaceStrings ["."] [""] version}"; # will break at version 10.x.x
sparseCheckout = [ "Host/Source/" ];
hash = "sha256-eO72zVZFFQPoo75pfeqawwYKimoLqUeqnzz/E2YvSYc=";
};

preConfigure = ''
export SRCDIRPWD=$(pwd) # to avoid using NIX_BUILD_TOP
cd ./Host/Source/BootCommander/
'';

installPhase = ''
cd $SRCDIRPWD
install -D "Host/BootCommander" "$out/bin/BootCommander"
ln -s "$out/bin/BootCommander" "$out/bin/bootcommander"
'';

buildInputs = [ libopenblt ];
nativeBuildInputs = [ cmake ];

meta = {
description = "CLI program to performe firmware updates on microcontrollers that run the OpenBLT bootloader";
homepage = "https://www.feaser.com/openblt/doku.php?id=manual:bootcommander";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ simoneruffini ];
};
}

0 comments on commit e659fed

Please sign in to comment.