pkgs: add rkvm and enable it when kde is enabled

This commit is contained in:
Aaron Bieber 2023-01-04 06:22:18 -07:00
parent 67966b88b0
commit f8f3da9a91
No known key found for this signature in database
3 changed files with 41 additions and 0 deletions

View File

@ -273,6 +273,7 @@
inherit pkgs;
isUnstable = true;
};
rkvm = pkgs.callPackage ./pkgs/rkvm.nix { inherit pkgs; };
inherit (xintray.packages.${system}) xintray;
inherit (tsvnstat.packages.${system}) tsvnstat;
});

View File

@ -17,6 +17,7 @@ in {
environment.systemPackages = with pkgs; [
(callPackage ../pkgs/tile-gaps.nix { })
(callPackage ../pkgs/rkvm.nix { })
plasma5Packages.kdeconnect-kde
libsForQt5.bismuth
];

39
pkgs/rkvm.nix Normal file
View File

@ -0,0 +1,39 @@
{ pkgs, lib, stdenv, cargo, fetchFromGitHub, rustPlatform, pkg-config
, openssl_1_1, llvmPackages, libevdev, linuxHeaders }:
rustPlatform.buildRustPackage {
pname = "rkvm";
version = "0.0.0";
src = fetchFromGitHub {
owner = "htrefil";
repo = "rkvm";
rev = "bf133665eb446d9f128d02e4440cc67bce50f666";
sha256 = "sha256-naWoLo3pPETkYuW4HATkrfjGcEHSGAAXixgp1HOlIcg=";
};
cargoSha256 = "sha256-5COhHc453QYiUoCtucg/Sz9bGq/Bpn/muDDZTsEsRII=";
BINDGEN_EXTRA_CLANG_ARGS = "-I${lib.getDev libevdev}/include/libevdev-1.0";
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
nativeBuildInputs = [ llvmPackages.clang pkg-config openssl_1_1 ];
buildInputs = [ libevdev openssl_1_1 linuxHeaders ];
doCheck = false;
postInstall = ''
mv $out/bin/certificate-gen $out/bin/rkvm-cert-gen
mv $out/bin/server $out/bin/rkvm-server
mv $out/bin/client $out/bin/rkvm-client
'';
meta = with lib; {
description = "Virtual KVM switch for Linux machines";
homepage = "https://github.com/htrefil/rkvm";
license = licenses.mit;
maintainers = with maintainers; [ qbit ];
platforms = [ "x86_64-linux" ];
mainProgram = "rkvm";
};
}