mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, pkg-config
|
|
, libevdev
|
|
, openssl
|
|
, makeWrapper
|
|
, nixosTests
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "rkvm";
|
|
version = "0.6.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "htrefil";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-pGCoNmGOeV7ND4kcRjlJZbEMnmKQhlCtyjMoWIwVZrM=";
|
|
};
|
|
|
|
cargoHash = "sha256-aq8Ky29jXY0cW5s0E4NDs29DY8RIA0Fvy2R72WPAYsk=";
|
|
|
|
nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook makeWrapper ];
|
|
buildInputs = [ libevdev ];
|
|
|
|
postInstall = ''
|
|
install -Dm444 -t "$out/lib/systemd/system" systemd/rkvm-*.service
|
|
install -Dm444 example/server.toml "$out/etc/rkvm/server.example.toml"
|
|
install -Dm444 example/client.toml "$out/etc/rkvm/client.example.toml"
|
|
|
|
wrapProgram $out/bin/rkvm-certificate-gen --prefix PATH : ${lib.makeBinPath [ openssl ]}
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) rkvm;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Virtual KVM switch for Linux machines";
|
|
homepage = "https://github.com/htrefil/rkvm";
|
|
changelog = "https://github.com/htrefil/rkvm/releases/tag/${version}";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = [ ];
|
|
};
|
|
}
|