2021-08-08 23:34:03 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, go-md2man
|
|
|
|
, installShellFiles
|
|
|
|
, libusb-compat-0_1
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "teensy-loader-cli";
|
2021-08-08 23:34:03 +00:00
|
|
|
version = "2.1+unstable=2021-04-10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PaulStoffregen";
|
|
|
|
repo = "teensy_loader_cli";
|
2021-08-08 23:34:03 +00:00
|
|
|
rev = "9dbbfa3b367b6c37e91e8a42dae3c6edfceccc4d";
|
|
|
|
sha256 = "lQ1XtaWPr6nvE8NArD1980QVOH6NggO3FlfsntUjY7s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
go-md2man
|
|
|
|
installShellFiles
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
buildInputs = [
|
|
|
|
libusb-compat-0_1
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-08 23:34:03 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
install -Dm555 teensy_loader_cli $out/bin/teensy-loader-cli
|
|
|
|
install -Dm444 -t $out/share/doc/${pname} *.md *.txt
|
|
|
|
go-md2man -in README.md -out ${pname}.1
|
|
|
|
installManPage *.1
|
2021-08-08 23:34:03 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Firmware uploader for the Teensy microcontroller boards";
|
|
|
|
homepage = "https://www.pjrc.com/teensy/";
|
2021-08-08 23:34:03 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|