Merge pull request #66469 from emilazy/update-blackmagic

blackmagic: 1.6.1 -> unstable-2019-08-13
This commit is contained in:
worldofpeace 2019-08-13 20:17:36 -04:00 committed by GitHub
commit 24870b40d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 14 deletions

View file

@ -1,28 +1,30 @@
{ stdenv, lib, fetchFromGitHub { stdenv, lib, fetchFromGitHub
, gcc-arm-embedded, binutils-arm-embedded, libftdi , gcc-arm-embedded, libftdi1
, python, pythonPackages , python, pythonPackages
}: }:
with lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "blackmagic-${version}"; pname = "blackmagic";
version = "1.6.1"; version = "unstable-2019-08-13";
# `git describe --always`
firmwareVersion = "v1.6.1-317-gc9c8b08";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "blacksphere"; owner = "blacksphere";
repo = "blackmagic"; repo = "blackmagic";
rev = "29386aee140e5e99a958727358f60980418b4c88"; rev = "c9c8b089f716c31433432f5ee54c5c206e4945cf";
sha256 = "05x19y80mixk6blpnfpfngy5d41jpjvdqgjzkmhv1qc03bhyhc82"; sha256 = "0175plba7h3r1p584ygkjlvg2clvxa2m0xfdcb2v8jza2vzc8ywd";
fetchSubmodules = true; fetchSubmodules = true;
}; };
nativeBuildInputs = [ nativeBuildInputs = [
gcc-arm-embedded binutils-arm-embedded gcc-arm-embedded
]; ];
buildInputs = [ buildInputs = [
libftdi libftdi1
python python
pythonPackages.intelhex pythonPackages.intelhex
]; ];
@ -30,7 +32,7 @@ stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
# Prevent calling out to `git' to generate a version number: # Prevent calling out to `git' to generate a version number:
substituteInPlace src/Makefile \ substituteInPlace src/Makefile \
--replace '`git describe --always --dirty`' '${version}' --replace '$(shell git describe --always --dirty)' '${firmwareVersion}'
# Fix scripts that generate headers: # Fix scripts that generate headers:
for f in $(find scripts libopencm3/scripts -type f); do for f in $(find scripts libopencm3/scripts -type f); do
@ -41,6 +43,8 @@ stdenv.mkDerivation rec {
buildPhase = "${stdenv.shell} ${./helper.sh}"; buildPhase = "${stdenv.shell} ${./helper.sh}";
installPhase = ":"; # buildPhase does this. installPhase = ":"; # buildPhase does this.
enableParallelBuilding = true;
meta = { meta = {
description = "In-application debugger for ARM Cortex microcontrollers"; description = "In-application debugger for ARM Cortex microcontrollers";
longDescription = '' longDescription = ''
@ -56,7 +60,7 @@ stdenv.mkDerivation rec {
''; '';
homepage = https://github.com/blacksphere/blackmagic; homepage = https://github.com/blacksphere/blackmagic;
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ pjones ]; maintainers = with maintainers; [ pjones emily ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }

View file

@ -10,6 +10,8 @@ out=${out:-/tmp}
################################################################################ ################################################################################
export CFLAGS=$NIX_CFLAGS_COMPILE export CFLAGS=$NIX_CFLAGS_COMPILE
export MAKEFLAGS="\
${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}"
################################################################################ ################################################################################
PRODUCTS="blackmagic.bin blackmagic.hex blackmagic_dfu.bin blackmagic_dfu.hex" PRODUCTS="blackmagic.bin blackmagic.hex blackmagic_dfu.bin blackmagic_dfu.hex"

View file

@ -9111,11 +9111,7 @@ in
bison = bison3; bison = bison3;
yacc = bison; # TODO: move to aliases.nix yacc = bison; # TODO: move to aliases.nix
blackmagic = callPackage ../development/tools/misc/blackmagic { blackmagic = callPackage ../development/tools/misc/blackmagic { };
stdenv = gcc6Stdenv;
gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc;
binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils;
};
bloaty = callPackage ../development/tools/bloaty { }; bloaty = callPackage ../development/tools/bloaty { };