2021-05-20 23:08:51 +00:00
|
|
|
{ stdenv, lib, fetchurl, unzip, autoPatchelfHook }:
|
|
|
|
|
|
|
|
let
|
2024-09-26 11:04:55 +00:00
|
|
|
archPostfix = lib.optionalString (stdenv.hostPlatform.is64bit && !stdenv.hostPlatform.isDarwin) "_64";
|
2021-05-20 23:08:51 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "msp-debug-stack-bin";
|
|
|
|
version = "3.15.1.1";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPDS/3_15_1_001/export/MSP430_DLL_Developer_Package_Rev_3_15_1_1.zip";
|
|
|
|
sha256 = "1m1ssrwbhqvqwbp3m4hnjyxnz3f9d4acz9vl1av3fbnhvxr0d2hb";
|
|
|
|
};
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
libname =
|
|
|
|
if stdenv.hostPlatform.isWindows then "MSP430${archPostfix}.dll"
|
|
|
|
else "libmsp430${archPostfix}${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [ unzip ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ stdenv.cc.cc ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm0755 $libname $out/lib/''${libname//_64/}
|
|
|
|
install -Dm0644 -t $out/include Inc/*.h
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2021-05-20 23:08:51 +00:00
|
|
|
description = "Unfree binary release of the TI MSP430 FET debug driver";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://www.ti.com/tool/MSPDS";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ aerialx ];
|
|
|
|
};
|
|
|
|
}
|