wii-u-gc-adapter: init

This commit is contained in:
2025-06-05 05:55:27 -06:00
parent 1390585d71
commit 3b3f00fa6b
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
{ stdenv, pkg-config, udev, libusb1, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "wii-u-gc-adapter";
version = "fa098ef";
src = fetchFromGitHub {
owner = "ToadKing";
repo = "wii-u-gc-adapter";
rev = "fa098efa7f6b34f8cd82e2c249c81c629901976c";
hash = "sha256-wm0vDU7QckFvpgI50PG4/elgPEkfr8xTmroz8kE6QMo=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
udev
libusb1
];
patches = [
./remove-Wformat.patch
];
installPhase = ''
mkdir -p $out/bin
mv wii-u-gc-adapter $out/bin
'';
}

View File

@@ -0,0 +1,10 @@
diff --git a/Makefile b/Makefile
index a00f13a..f13d0c2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CFLAGS += -Wall -Wextra -pedantic -Wno-format -std=c99 $(shell pkg-config --cflags libusb-1.0) $(shell pkg-config --cflags udev)
+CFLAGS += -Wall -Wextra -Wformat -std=c99 $(shell pkg-config --cflags libusb-1.0) $(shell pkg-config --cflags udev)
LDFLAGS += -lpthread -ludev $(shell pkg-config --libs libusb-1.0) $(shell pkg-config --libs udev)
ifeq ($(DEBUG), 1)