1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00

stlink: add withGUI option (#124017)

This commit is contained in:
Nicolas Dudebout 2021-05-25 22:01:37 -04:00 committed by GitHub
parent 34fb933665
commit 60753cefb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 3 deletions

View file

@ -1,4 +1,13 @@
{ lib, stdenv, fetchFromGitHub, cmake, libusb1 }: { lib
, stdenv
, fetchFromGitHub
, cmake
, libusb1
, gtk3
, pkg-config
, wrapGAppsHook
, withGUI ? false
}:
let let
# The Darwin build of stlink explicitly refers to static libusb. # The Darwin build of stlink explicitly refers to static libusb.
@ -18,8 +27,17 @@ in stdenv.mkDerivation rec {
sha256 = "03xypffpbp4imrczbxmq69vgkr7mbp0ps9dk815br5wwlz6vgygl"; sha256 = "03xypffpbp4imrczbxmq69vgkr7mbp0ps9dk815br5wwlz6vgygl";
}; };
buildInputs = [ libusb1' ]; buildInputs = [
nativeBuildInputs = [ cmake ]; libusb1'
] ++ lib.optionals withGUI [
gtk3
];
nativeBuildInputs = [
cmake
] ++ lib.optionals withGUI [
pkg-config
wrapGAppsHook
];
cmakeFlags = [ cmakeFlags = [
"-DSTLINK_MODPROBED_DIR=${placeholder "out"}/etc/modprobe.d" "-DSTLINK_MODPROBED_DIR=${placeholder "out"}/etc/modprobe.d"

View file

@ -18055,6 +18055,7 @@ in
stfl = callPackage ../development/libraries/stfl { }; stfl = callPackage ../development/libraries/stfl { };
stlink = callPackage ../development/tools/misc/stlink { }; stlink = callPackage ../development/tools/misc/stlink { };
stlink-gui = callPackage ../development/tools/misc/stlink { withGUI = true; };
stegseek = callPackage ../tools/security/stegseek {}; stegseek = callPackage ../tools/security/stegseek {};