uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
56
pkgs/development/misc/msp430/mspds/default.nix
Normal file
56
pkgs/development/misc/msp430/mspds/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl, unzip
|
||||
, boost, pugixml
|
||||
, hidapi
|
||||
, libusb1 ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
assert stdenv.isLinux -> libusb1 != null;
|
||||
|
||||
let
|
||||
hidapiDriver = optionalString stdenv.isLinux "-libusb";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "msp-debug-stack";
|
||||
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/MSPDebugStack_OS_Package_3_15_1_1.zip";
|
||||
sha256 = "1j5sljqwc20zrb50mrji4mnmw5i680qc7n0lb0pakrrxqjc9m9g3";
|
||||
};
|
||||
sourceRoot = ".";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
libName = "libmsp430${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
makeFlags = [ "OUTPUT=$(libName)" "HIDOBJ=" ];
|
||||
NIX_LDFLAGS = [ "-lpugixml" "-lhidapi${hidapiDriver}" ];
|
||||
NIX_CFLAGS_COMPILE = [ "-I${hidapi}/include/hidapi" ];
|
||||
|
||||
patches = [ ./bsl430.patch ];
|
||||
|
||||
preBuild = ''
|
||||
rm ThirdParty/src/pugixml.cpp
|
||||
rm ThirdParty/include/pugi{config,xml}.hpp
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
makeFlagsArray+=(OUTNAME="-install_name ")
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0755 -t $out/lib $libName
|
||||
install -Dm0644 -t $out/include DLL430_v3/include/*.h
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildInputs = [ boost hidapi pugixml ]
|
||||
++ optional stdenv.isLinux libusb1;
|
||||
|
||||
meta = {
|
||||
description = "TI MSP430 FET debug driver";
|
||||
homepage = "https://www.ti.com/tool/MSPDS";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ aerialx ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue