about summary refs log tree commit diff
path: root/pkgs/development/misc/msp430
diff options
context:
space:
mode:
authorShawn8901 <shawn8901@googlemail.com>2023-01-26 18:31:02 +0100
committerShawn8901 <shawn8901@googlemail.com>2023-01-26 18:31:02 +0100
commita59dda942cbe3d40c1ae424d4d8a6db715cac0d5 (patch)
treec4d7e17a260da0a29c9690de071787d3ca62b3d2 /pkgs/development/misc/msp430
parentaedc95590cdc13e99441684b7aca81cdbfa542ad (diff)
treewide: remove global with lib; statements in pkgs/development
Diffstat (limited to 'pkgs/development/misc/msp430')
-rw-r--r--pkgs/development/misc/msp430/mspds/binary.nix6
-rw-r--r--pkgs/development/misc/msp430/mspds/default.nix9
2 files changed, 6 insertions, 9 deletions
diff --git a/pkgs/development/misc/msp430/mspds/binary.nix b/pkgs/development/misc/msp430/mspds/binary.nix
index 5b64ec328ae62..3558599c2de04 100644
--- a/pkgs/development/misc/msp430/mspds/binary.nix
+++ b/pkgs/development/misc/msp430/mspds/binary.nix
@@ -1,9 +1,7 @@
 { stdenv, lib, fetchurl, unzip, autoPatchelfHook }:
 
-with lib;
-
 let
-  archPostfix = optionalString (stdenv.is64bit && !stdenv.isDarwin) "_64";
+  archPostfix = lib.optionalString (stdenv.is64bit && !stdenv.isDarwin) "_64";
 in stdenv.mkDerivation rec {
   pname = "msp-debug-stack-bin";
   version = "3.15.1.1";
@@ -26,7 +24,7 @@ in stdenv.mkDerivation rec {
     install -Dm0644 -t $out/include Inc/*.h
   '';
 
-  meta = {
+  meta = with lib; {
     description = "Unfree binary release of the TI MSP430 FET debug driver";
     homepage = "https://www.ti.com/tool/MSPDS";
     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
diff --git a/pkgs/development/misc/msp430/mspds/default.nix b/pkgs/development/misc/msp430/mspds/default.nix
index 891e7d980b4a9..ec0ac507a46d6 100644
--- a/pkgs/development/misc/msp430/mspds/default.nix
+++ b/pkgs/development/misc/msp430/mspds/default.nix
@@ -6,11 +6,10 @@
 , libusb1 ? null
 }:
 
-with lib;
 assert stdenv.isLinux -> libusb1 != null;
 
 let
-  hidapiDriver = optionalString stdenv.isLinux "-libusb";
+  hidapiDriver = lib.optionalString stdenv.isLinux "-libusb";
 
 in stdenv.mkDerivation {
   pname = "msp-debug-stack";
@@ -33,7 +32,7 @@ in stdenv.mkDerivation {
   preBuild = ''
     rm ThirdParty/src/pugixml.cpp
     rm ThirdParty/include/pugi{config,xml}.hpp
-  '' + optionalString stdenv.isDarwin ''
+  '' + lib.optionalString stdenv.isDarwin ''
     makeFlagsArray+=(OUTNAME="-install_name ")
   '';
 
@@ -44,9 +43,9 @@ in stdenv.mkDerivation {
 
   nativeBuildInputs = [ unzip ];
   buildInputs = [ boost hidapi pugixml ]
-    ++ optional stdenv.isLinux libusb1;
+    ++ lib.optional stdenv.isLinux libusb1;
 
-  meta = {
+  meta = with lib; {
     description = "TI MSP430 FET debug driver";
     homepage = "https://www.ti.com/tool/MSPDS";
     license = licenses.bsd3;