2021-08-20 15:02:11 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-03-08 12:56:51 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2022-05-25 07:20:58 +00:00
|
|
|
, makeWrapper
|
2022-03-08 12:56:51 +00:00
|
|
|
, dbus
|
|
|
|
, ffmpeg
|
|
|
|
, x264
|
|
|
|
, libva
|
2021-08-20 15:02:11 +00:00
|
|
|
, gst_all_1
|
|
|
|
, xorg
|
|
|
|
, libdrm
|
2022-03-08 12:56:51 +00:00
|
|
|
, pkg-config
|
|
|
|
, pango
|
2022-05-25 07:20:58 +00:00
|
|
|
, pipewire
|
2022-03-08 12:56:51 +00:00
|
|
|
, cmake
|
2023-01-21 15:52:29 +00:00
|
|
|
, git
|
2022-03-08 12:56:51 +00:00
|
|
|
, autoconf
|
|
|
|
, libtool
|
2023-06-26 18:36:12 +00:00
|
|
|
, typescript
|
2022-03-08 12:56:51 +00:00
|
|
|
, ApplicationServices
|
|
|
|
, Carbon
|
|
|
|
, Cocoa
|
|
|
|
, VideoToolbox
|
2021-08-20 15:02:11 +00:00
|
|
|
}:
|
|
|
|
|
2022-03-08 12:56:51 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-08-20 15:02:11 +00:00
|
|
|
pname = "weylus";
|
2022-05-25 07:20:59 +00:00
|
|
|
version = "unstable-2022-06-07";
|
2021-08-20 15:02:11 +00:00
|
|
|
|
2022-03-08 12:56:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "H-M-H";
|
|
|
|
repo = pname;
|
2022-05-25 07:20:59 +00:00
|
|
|
rev = "b169a6be2bf3e8d105273d92f032cca5438de53a";
|
|
|
|
sha256 = "sha256-J9eVFIfmyBviVuT1MYKb5yoacbPqOAT3A8jahWv5qw8=";
|
2021-08-20 15:02:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-03-08 12:56:51 +00:00
|
|
|
ffmpeg
|
|
|
|
x264
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
ApplicationServices
|
|
|
|
Carbon
|
|
|
|
Cocoa
|
|
|
|
VideoToolbox
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2021-08-20 15:02:11 +00:00
|
|
|
dbus
|
|
|
|
libva
|
|
|
|
gst_all_1.gst-plugins-base
|
2022-03-08 12:56:51 +00:00
|
|
|
xorg.libXext
|
2021-08-20 15:02:11 +00:00
|
|
|
xorg.libXft
|
|
|
|
xorg.libXinerama
|
|
|
|
xorg.libXcursor
|
2022-03-08 12:56:51 +00:00
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXtst
|
2021-08-20 15:02:11 +00:00
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXcomposite
|
2022-03-08 12:56:51 +00:00
|
|
|
xorg.libXi
|
|
|
|
xorg.libXv
|
|
|
|
pango
|
|
|
|
libdrm
|
2021-08-20 15:02:11 +00:00
|
|
|
];
|
|
|
|
|
2022-03-08 12:56:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2023-01-21 15:52:29 +00:00
|
|
|
git
|
2023-06-26 18:36:12 +00:00
|
|
|
typescript
|
2022-05-25 07:20:58 +00:00
|
|
|
makeWrapper
|
2022-03-08 12:56:51 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
autoconf
|
|
|
|
libtool
|
|
|
|
];
|
|
|
|
|
2023-03-25 23:16:46 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"autopilot-0.4.0" = "sha256-1DRuhAAXaIADUmXlDVr8UNbI/Ab2PYdrx9Qh0j9rTX8=";
|
|
|
|
};
|
|
|
|
};
|
2022-03-08 12:56:51 +00:00
|
|
|
|
|
|
|
cargoBuildFlags = [ "--features=ffmpeg-system" ];
|
|
|
|
cargoTestFlags = [ "--features=ffmpeg-system" ];
|
2021-11-08 09:29:36 +00:00
|
|
|
|
2022-05-25 07:20:58 +00:00
|
|
|
postFixup = let
|
|
|
|
GST_PLUGIN_PATH = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
pipewire
|
|
|
|
];
|
|
|
|
in lib.optionalString stdenv.isLinux ''
|
|
|
|
wrapProgram $out/bin/weylus --prefix GST_PLUGIN_PATH : ${GST_PLUGIN_PATH}
|
|
|
|
'';
|
|
|
|
|
2022-03-08 12:56:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -vDm755 weylus.desktop $out/share/applications/weylus.desktop
|
2021-11-08 09:29:36 +00:00
|
|
|
'';
|
2021-08-20 15:02:11 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-28 13:28:44 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-08-20 15:02:11 +00:00
|
|
|
description = "Use your tablet as graphic tablet/touch screen on your computer";
|
|
|
|
homepage = "https://github.com/H-M-H/Weylus";
|
|
|
|
license = with licenses; [ agpl3Only ];
|
2021-12-01 23:19:48 +00:00
|
|
|
maintainers = with maintainers; [ lom ];
|
2021-08-20 15:02:11 +00:00
|
|
|
};
|
|
|
|
}
|