about summary refs log tree commit diff
path: root/pkgs/development/misc
diff options
context:
space:
mode:
authorAaron Lindsay <aerialx@users.noreply.github.com>2019-03-29 22:16:55 -0700
committerAaron Lindsay <aerialx@users.noreply.github.com>2020-06-01 16:40:54 -0700
commit1436bb9968fd14f2b992b2150c83d9b671d3a75e (patch)
tree81efcbf64d14d1f9c993f353453e1438ad86f256 /pkgs/development/misc
parentb6f084797a4f4e38b6fdca49c750f8ea017f3e0a (diff)
mspdebug: enableParallelBuilding and minor cleanup
Diffstat (limited to 'pkgs/development/misc')
-rw-r--r--pkgs/development/misc/msp430/mspdebug.nix21
1 files changed, 14 insertions, 7 deletions
diff --git a/pkgs/development/misc/msp430/mspdebug.nix b/pkgs/development/misc/msp430/mspdebug.nix
index 3c7ff00151a4d..f8abc15de574c 100644
--- a/pkgs/development/misc/msp430/mspdebug.nix
+++ b/pkgs/development/misc/msp430/mspdebug.nix
@@ -1,10 +1,15 @@
-{ stdenv, fetchFromGitHub, libusb-compat-0_1, readline ? null }:
+{ stdenv
+, fetchFromGitHub
+, libusb-compat-0_1
+, readline ? null
+, enableReadline ? true
+}:
 
-let
+assert enableReadline -> readline != null;
+
+stdenv.mkDerivation rec {
   version = "0.25";
-in stdenv.mkDerivation {
   pname = "mspdebug";
-  inherit version;
   src = fetchFromGitHub {
     owner = "dlbeer";
     repo = "mspdebug";
@@ -12,9 +17,11 @@ in stdenv.mkDerivation {
     sha256 = "0prgwb5vx6fd4bj12ss1bbb6axj2kjyriyjxqrzd58s5jyyy8d3c";
   };
 
-  buildInputs = [ libusb-compat-0_1 readline ];
-  makeFlags = [ "PREFIX=$(out)" "INSTALL=install" ] ++
-    (if readline == null then [ "WITHOUT_READLINE=1" ] else []);
+  buildInputs = [ libusb-compat-0_1 ]
+  ++ stdenv.lib.optional enableReadline readline;
+  installFlags = [ "PREFIX=$(out)" "INSTALL=install" ];
+  makeFlags = stdenv.lib.optional (!enableReadline) "WITHOUT_READLINE=1";
+  enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
     description = "A free programmer, debugger, and gdb proxy for MSP430 MCUs";