Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 56 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchzip, 5 glib, 6 zlib, 7 libglvnd, 8 python3, 9 autoPatchelfHook, 10}: 11 12stdenv.mkDerivation rec { 13 version = "3.5"; 14 pname = "sam-ba"; 15 16 src = fetchzip { 17 url = "https://ww1.microchip.com/downloads/en/DeviceDoc/sam-ba_${version}-linux_x86_64.tar.gz"; 18 sha256 = "1k0nbgyc98z94nphm2q7s82b274clfnayf4a2kv93l5594rzdbp1"; 19 }; 20 21 buildInputs = [ 22 glib 23 libglvnd 24 zlib 25 26 (python3.withPackages (ps: [ ps.pyserial ])) 27 ]; 28 29 nativeBuildInputs = [ autoPatchelfHook ]; 30 31 installPhase = '' 32 runHook preInstall 33 34 mkdir -p "$out/bin/" \ 35 "$out/opt/sam-ba/" 36 cp -a . "$out/opt/sam-ba/" 37 ln -sr "$out/opt/sam-ba/sam-ba" "$out/bin/" 38 ln -sr "$out/opt/sam-ba/multi_sam-ba.py" "$out/bin/" 39 40 runHook postInstall 41 ''; 42 43 meta = with lib; { 44 description = "Programming tools for Atmel SAM3/7/9 ARM-based microcontrollers"; 45 longDescription = '' 46 Atmel SAM-BA software provides an open set of tools for programming the 47 Atmel SAM3, SAM7 and SAM9 ARM-based microcontrollers. 48 ''; 49 # Alternatively: https://www.microchip.com/en-us/development-tool/SAM-BA-In-system-Programmer 50 homepage = "http://www.at91.com/linux4sam/bin/view/Linux4SAM/SoftwareTools"; 51 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 52 license = lib.licenses.gpl2Only; 53 platforms = [ "x86_64-linux" ]; 54 maintainers = [ maintainers.bjornfor ]; 55 }; 56}