diff --git a/pkgs/development/tools/misc/blackmagic/default.nix b/pkgs/development/tools/misc/blackmagic/default.nix index 281463528354..ddc15f856b53 100644 --- a/pkgs/development/tools/misc/blackmagic/default.nix +++ b/pkgs/development/tools/misc/blackmagic/default.nix @@ -1,28 +1,30 @@ { stdenv, lib, fetchFromGitHub -, gcc-arm-embedded, binutils-arm-embedded, libftdi +, gcc-arm-embedded, libftdi1 , python, pythonPackages }: with lib; stdenv.mkDerivation rec { - name = "blackmagic-${version}"; - version = "1.6.1"; + pname = "blackmagic"; + version = "unstable-2019-08-13"; + # `git describe --always` + firmwareVersion = "v1.6.1-317-gc9c8b08"; src = fetchFromGitHub { owner = "blacksphere"; repo = "blackmagic"; - rev = "29386aee140e5e99a958727358f60980418b4c88"; - sha256 = "05x19y80mixk6blpnfpfngy5d41jpjvdqgjzkmhv1qc03bhyhc82"; + rev = "c9c8b089f716c31433432f5ee54c5c206e4945cf"; + sha256 = "0175plba7h3r1p584ygkjlvg2clvxa2m0xfdcb2v8jza2vzc8ywd"; fetchSubmodules = true; }; nativeBuildInputs = [ - gcc-arm-embedded binutils-arm-embedded + gcc-arm-embedded ]; buildInputs = [ - libftdi + libftdi1 python pythonPackages.intelhex ]; @@ -30,7 +32,7 @@ stdenv.mkDerivation rec { postPatch = '' # Prevent calling out to `git' to generate a version number: substituteInPlace src/Makefile \ - --replace '`git describe --always --dirty`' '${version}' + --replace '$(shell git describe --always --dirty)' '${firmwareVersion}' # Fix scripts that generate headers: for f in $(find scripts libopencm3/scripts -type f); do @@ -41,6 +43,8 @@ stdenv.mkDerivation rec { buildPhase = "${stdenv.shell} ${./helper.sh}"; installPhase = ":"; # buildPhase does this. + enableParallelBuilding = true; + meta = { description = "In-application debugger for ARM Cortex microcontrollers"; longDescription = '' @@ -56,7 +60,7 @@ stdenv.mkDerivation rec { ''; homepage = https://github.com/blacksphere/blackmagic; license = licenses.gpl3Plus; - maintainers = with maintainers; [ pjones ]; + maintainers = with maintainers; [ pjones emily ]; platforms = platforms.unix; }; } diff --git a/pkgs/development/tools/misc/blackmagic/helper.sh b/pkgs/development/tools/misc/blackmagic/helper.sh index b4c7558885bb..991d0249e169 100755 --- a/pkgs/development/tools/misc/blackmagic/helper.sh +++ b/pkgs/development/tools/misc/blackmagic/helper.sh @@ -10,6 +10,8 @@ out=${out:-/tmp} ################################################################################ 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" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0d02357f0030..cb586dad0b71 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9095,11 +9095,7 @@ in bison = bison3; yacc = bison; # TODO: move to aliases.nix - blackmagic = callPackage ../development/tools/misc/blackmagic { - stdenv = gcc6Stdenv; - gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc; - binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils; - }; + blackmagic = callPackage ../development/tools/misc/blackmagic { }; bloaty = callPackage ../development/tools/bloaty { };