at 23.05-pre 37 lines 1.2 kB view raw
1{ stdenv, lib, fetchurl, unzip, autoPatchelfHook }: 2 3with lib; 4 5let 6 archPostfix = optionalString (stdenv.is64bit && !stdenv.isDarwin) "_64"; 7in stdenv.mkDerivation rec { 8 pname = "msp-debug-stack-bin"; 9 version = "3.15.1.1"; 10 src = fetchurl { 11 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"; 12 sha256 = "1m1ssrwbhqvqwbp3m4hnjyxnz3f9d4acz9vl1av3fbnhvxr0d2hb"; 13 }; 14 sourceRoot = "."; 15 16 libname = 17 if stdenv.hostPlatform.isWindows then "MSP430${archPostfix}.dll" 18 else "libmsp430${archPostfix}${stdenv.hostPlatform.extensions.sharedLibrary}"; 19 20 nativeBuildInputs = [ unzip ] 21 ++ lib.optional stdenv.isLinux autoPatchelfHook; 22 buildInputs = [ stdenv.cc.cc ]; 23 24 installPhase = '' 25 install -Dm0755 $libname $out/lib/''${libname//_64/} 26 install -Dm0644 -t $out/include Inc/*.h 27 ''; 28 29 meta = { 30 description = "Unfree binary release of the TI MSP430 FET debug driver"; 31 homepage = "https://www.ti.com/tool/MSPDS"; 32 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 33 license = licenses.unfree; 34 platforms = platforms.linux ++ platforms.darwin; 35 maintainers = with maintainers; [ aerialx ]; 36 }; 37}