From bd9441aebcb5af2c997a1d756800a103a8fa5575 Mon Sep 17 00:00:00 2001 From: Cole Mickens Date: Tue, 7 Nov 2023 17:32:16 -0500 Subject: [PATCH] libtypec: init at 0.6.1 Co-authored-by: Cole Mickens Signed-off-by: Daniel Schaefer --- pkgs/by-name/li/libtypec/package.nix | 63 ++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 pkgs/by-name/li/libtypec/package.nix diff --git a/pkgs/by-name/li/libtypec/package.nix b/pkgs/by-name/li/libtypec/package.nix new file mode 100644 index 000000000000..74f6dea699a4 --- /dev/null +++ b/pkgs/by-name/li/libtypec/package.nix @@ -0,0 +1,63 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + pkg-config, + libusb1, + systemd, + libudev0-shim, + gtk3, # utils +}: + +stdenv.mkDerivation rec { + pname = "libtypec"; + version = "0.6.1"; + + src = fetchFromGitHub { + owner = "libtypec"; + repo = pname; + rev = "${pname}-${version}"; + hash = "sha256-XkT0bgBjoJTAFa9NLZdzbJSpchiXxKjeu88PeT/AlPY="; + }; + + outputs = [ + "out" + "lib" + "dev" + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + libusb1 + libudev0-shim + systemd + gtk3 + ]; + + mesonFlags = [ + (lib.mesonBool "utils" true) + "--prefix=${placeholder "dev"}" + ]; + + # Don't propagate out to the dev output to avoid pulling in GUI dependencies + propagatedBuildOutputs = [ "lib" ]; + + meta = with lib; { + homepage = "https://github.com/libtypec/libtypec"; + description = "generic diagnostic tool interface for usb-c ports"; + longDescription = "libtypec is aimed to provide a generic interface abstracting all platform complexity for user space to develop tools for efficient USB-C port management. The library can also enable development of diagnostic and debug tools to debug system issues around USB-C/USB PD topology."; + platforms = platforms.linux; + license = with licenses; [ + mit + gpl2Only + ]; + maintainers = with maintainers; [ johnazoidberg ]; + }; +}