2024-09-21 22:26:39 +00:00
{
lib ,
rustPlatform ,
fetchFromGitHub ,
pkg-config ,
libxkbcommon ,
python3 ,
2024-10-29 06:25:31 +00:00
runCommand ,
wprs ,
2024-09-21 22:26:39 +00:00
} :
2024-10-29 05:34:32 +00:00
rustPlatform . buildRustPackage {
2024-09-21 22:26:39 +00:00
pname = " w p r s " ;
version = " 0 - u n s t a b l e - 2 0 2 4 - 1 0 - 2 2 " ;
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 = " 6 b 9 9 3 3 3 2 c 5 5 5 6 8 e 6 6 9 6 1 b 5 2 b b 6 2 8 5 e 7 6 d 9 7 d 5 0 d f " ;
hash = " s h a 2 5 6 - W r P r 9 b 1 r 8 A s 4 Y 5 c + Q C O Y n H v Y 9 x 1 4 5 + p L 4 O S m r G s Y D p k = " ;
} ;
nativeBuildInputs = [
pkg-config
] ;
buildInputs = [
libxkbcommon
2024-10-29 05:34:32 +00:00
( python3 . withPackages ( pp : with pp ; [ psutil ] ) )
2024-09-21 22:26:39 +00:00
] ;
cargoLock = {
lockFile = ./Cargo.lock ;
outputHashes = {
" d i v b u f - 0 . 3 . 2 - p r e " = " s h a 2 5 6 - x V 0 R W T 4 x u / L T V U G Q S r a f O g J + X 7 F l n H 7 C z 6 K r e K S l C j w = " ;
" s m i t h a y - 0 . 3 . 0 " = " s h a 2 5 6 - l q A J A C m k J 6 A p / z R G j J j w J b Q O y n U P P h X A A p H S 6 0 j Y L x o = " ;
" s m i t h a y - c l i e n t - t o o l k i t - 0 . 1 9 . 1 " = " s h a 2 5 6 - S w / e M 5 r j a K V V F a E Y a Y j 0 9 j s x a L Z T p D 2 I d Q G p r / o 0 F p c = " ;
} ;
} ;
preFixup = ''
cp wprs " $ o u t / b i n / w p r s "
'' ;
2024-10-29 06:25:31 +00:00
passthru . tests . sanity = runCommand " w p r s - s a n i t y " { nativeBuildInputs = [ wprs ] ; } ''
$ { wprs } /bin/wprs - h > /dev/null && touch $ out
'' ;
2024-09-21 22:26:39 +00:00
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 " ;
} ;
}