stlink: add withGUI option (#124017)
This commit is contained in:
parent
34fb933665
commit
60753cefb7
2 changed files with 22 additions and 3 deletions
|
@ -1,4 +1,13 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, libusb1 }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, libusb1
|
||||
, gtk3
|
||||
, pkg-config
|
||||
, wrapGAppsHook
|
||||
, withGUI ? false
|
||||
}:
|
||||
|
||||
let
|
||||
# The Darwin build of stlink explicitly refers to static libusb.
|
||||
|
@ -18,8 +27,17 @@ in stdenv.mkDerivation rec {
|
|||
sha256 = "03xypffpbp4imrczbxmq69vgkr7mbp0ps9dk815br5wwlz6vgygl";
|
||||
};
|
||||
|
||||
buildInputs = [ libusb1' ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
libusb1'
|
||||
] ++ lib.optionals withGUI [
|
||||
gtk3
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
] ++ lib.optionals withGUI [
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSTLINK_MODPROBED_DIR=${placeholder "out"}/etc/modprobe.d"
|
||||
|
|
|
@ -18055,6 +18055,7 @@ in
|
|||
stfl = callPackage ../development/libraries/stfl { };
|
||||
|
||||
stlink = callPackage ../development/tools/misc/stlink { };
|
||||
stlink-gui = callPackage ../development/tools/misc/stlink { withGUI = true; };
|
||||
|
||||
stegseek = callPackage ../tools/security/stegseek {};
|
||||
|
||||
|
|
Loading…
Reference in a new issue