stlink: add withGUI option (#124017)

launchpad/nixpkgs/master
Nicolas Dudebout 3 years ago committed by GitHub
parent 34fb933665
commit 60753cefb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      pkgs/development/tools/misc/stlink/default.nix
  2. 1
      pkgs/top-level/all-packages.nix

@ -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…
Cancel
Save