2021-08-20 16:02:11 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-03-08 12:56:51 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, dbus
|
|
|
|
, ffmpeg
|
|
|
|
, x264
|
|
|
|
, libva
|
2021-08-20 16:02:11 +01:00
|
|
|
, gst_all_1
|
|
|
|
, xorg
|
|
|
|
, libdrm
|
2022-03-08 12:56:51 +00:00
|
|
|
, pkg-config
|
|
|
|
, pango
|
|
|
|
, cmake
|
|
|
|
, autoconf
|
|
|
|
, libtool
|
|
|
|
, nodePackages
|
|
|
|
, ApplicationServices
|
|
|
|
, Carbon
|
|
|
|
, Cocoa
|
|
|
|
, VideoToolbox
|
2021-08-20 16:02:11 +01:00
|
|
|
}:
|
|
|
|
|
2022-03-08 12:56:51 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-08-20 16:02:11 +01:00
|
|
|
pname = "weylus";
|
2021-10-31 23:16:53 +00:00
|
|
|
version = "0.11.4";
|
2021-08-20 16:02:11 +01:00
|
|
|
|
2022-03-08 12:56:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "H-M-H";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0gq2czxvahww97j4i3k18np29zl6wx85f8253wn3ibqrpfnklz6l";
|
2021-08-20 16:02:11 +01: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 16:02:11 +01:00
|
|
|
dbus
|
|
|
|
libva
|
|
|
|
gst_all_1.gst-plugins-base
|
2022-03-08 12:56:51 +00:00
|
|
|
xorg.libXext
|
2021-08-20 16:02:11 +01:00
|
|
|
xorg.libXft
|
|
|
|
xorg.libXinerama
|
|
|
|
xorg.libXcursor
|
2022-03-08 12:56:51 +00:00
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXtst
|
2021-08-20 16:02:11 +01:00
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXcomposite
|
2022-03-08 12:56:51 +00:00
|
|
|
xorg.libXi
|
|
|
|
xorg.libXv
|
|
|
|
pango
|
|
|
|
libdrm
|
2021-08-20 16:02:11 +01:00
|
|
|
];
|
|
|
|
|
2022-03-08 12:56:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
nodePackages.typescript
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
autoconf
|
|
|
|
libtool
|
|
|
|
];
|
|
|
|
|
|
|
|
cargoSha256 = "1pigmch0sy9ipsafd83b8q54xwqjxdaif363n1q8n46arq4v81j0";
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "--features=ffmpeg-system" ];
|
|
|
|
cargoTestFlags = [ "--features=ffmpeg-system" ];
|
2021-11-08 09:29:36 +00:00
|
|
|
|
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 16:02:11 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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 16:02:11 +01:00
|
|
|
};
|
|
|
|
}
|