2025-04-16 14:26:49 +00:00
{
lib ,
rustPlatform ,
fetchFromGitHub ,
pkg-config ,
libxkbcommon ,
python3 ,
runCommand ,
wprs ,
} :
rustPlatform . buildRustPackage {
pname = " w p r s " ;
version = " 0 - u n s t a b l e - 2 0 2 5 - 0 4 - 1 6 " ;
2025-04-18 08:22:52 +00:00
buildType = " d e b u g " ;
dontStrip = true ;
2025-04-16 14:26:49 +00:00
src = fetchFromGitHub {
owner = " w a y l a n d - t r a n s p o s i t o r " ;
repo = " w p r s " ;
rev = " d f c 1 3 8 5 b c b 7 3 7 3 4 c d 0 d 0 5 a 7 e 3 5 3 5 2 2 9 8 3 c 2 3 6 5 6 2 " ;
hash = " s h a 2 5 6 - M r f Y r K A V F o T 4 5 3 B 2 z E D 6 A x 2 c o Z / K Z 7 C W Y d Z C x 4 6 9 Q / 4 = " ;
} ;
nativeBuildInputs = [
pkg-config
] ;
buildInputs = [
libxkbcommon
( python3 . withPackages ( pp : with pp ; [ psutil ] ) )
] ;
useFetchCargoVendor = true ;
cargoHash = " s h a 2 5 6 - 0 1 P T f g D e a g C 7 2 z 8 X A D X E n 5 A i o 6 U W Q A A Y g D P 4 z K F T P p Y = " ;
preFixup = ''
cp wprs " $ o u t / b i n / w p r s "
'' ;
passthru . tests . sanity = runCommand " w p r s - s a n i t y " { nativeBuildInputs = [ wprs ] ; } ''
$ { wprs } /bin/wprs - h > /dev/null && touch $ out
'' ;
meta = with lib ; {
description = " r o o t l e s s r e m o t e d e s k t o p a c c e s s f o r r e m o t e W a y l a n d " ;
license = licenses . asl20 ;
maintainers = with maintainers ; [ mksafavi ] ;
platforms = [ " x 8 6 _ 6 4 - l i n u x " ] ; # The aarch64-linux support is not implemented in upstream yet. Also, the darwin platform is not supported as it requires wayland.
homepage = " h t t p s : / / g i t h u b . c o m / w a y l a n d - t r a n s p o s i t o r / w p r s " ;
mainProgram = " w p r s " ;
} ;
}