From 8f421eef7d265e53eb24aa33ba583bee19738a97 Mon Sep 17 00:00:00 2001 From: SnIcK Date: Mon, 26 Dec 2022 16:49:30 -0600 Subject: [PATCH 1/2] maintainers: add realsnick --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 99907a6877f8..0d7e7b238591 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -11436,6 +11436,12 @@ githubId = 1973389; name = "Reuben D'Netto"; }; + realsnick = { + name = "Ido Samuelson"; + email = "ido.samuelson@gmail.com"; + github = "realsnick"; + githubId = 1440852; + }; redbaron = { email = "ivanov.maxim@gmail.com"; github = "redbaron"; From fff47fb03946e6036bad1a7e22de2d47aed1c211 Mon Sep 17 00:00:00 2001 From: SnIcK Date: Mon, 26 Dec 2022 16:50:13 -0600 Subject: [PATCH 2/2] libusb1: add option to build with examples --- pkgs/development/libraries/libusb1/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index f7f1633ed446..326ee3028158 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , fetchpatch , autoreconfHook @@ -8,6 +9,7 @@ , libobjc , IOKit , Security +, withExamples ? false , withStatic ? false }: @@ -31,12 +33,20 @@ stdenv.mkDerivation rec { dontDisableStatic = withStatic; - configureFlags = lib.optional (!enableUdev) "--disable-udev"; + configureFlags = + lib.optional (!enableUdev) "--disable-udev" + ++ lib.optional (withExamples) "--enable-examples-build"; preFixup = lib.optionalString enableUdev '' sed 's,-ludev,-L${lib.getLib udev}/lib -ludev,' -i $out/lib/libusb-1.0.la ''; + postInstall = lib.optionalString withExamples '' + mkdir -p $out/{bin,sbin,examples/bin} + cp -r examples/.libs/* $out/examples/bin + ln -s $out/examples/bin/fxload $out/sbin/fxload + ''; + meta = with lib; { homepage = "https://libusb.info/"; description = "cross-platform user-mode USB device library"; @@ -45,6 +55,6 @@ stdenv.mkDerivation rec { ''; platforms = platforms.all; license = licenses.lgpl21Plus; - maintainers = with maintainers; [ prusnak ]; + maintainers = with maintainers; [ prusnak realsnick ]; }; }