outfly/build/nix/default.nix

48 lines
771 B
Nix
Raw Normal View History

2024-04-26 21:16:03 +00:00
{
2024-04-27 13:11:42 +00:00
rustPlatform,
pkg-config,
alsa-lib,
libcap,
libxkbcommon,
wayland,
udev,
vulkan-loader,
xorg,
lib,
2024-04-26 21:16:03 +00:00
}:
rustPlatform.buildRustPackage rec {
2024-04-27 13:11:42 +00:00
src = ../../..;
pname = "outfly";
version = "0.8.1";
cargoLock = {
lockFile = "${src}/Cargo.lock";
};
nativeBuildInputs = [ pkg-config ];
buildNoDefaultFeatures = true;
buildFeatures = [
"release_linux"
2024-04-27 13:11:42 +00:00
];
buildInputs = [
alsa-lib
libcap
wayland
2024-04-27 13:11:42 +00:00
];
postFixup =
let
runtimeDeps = [
vulkan-loader
libxkbcommon
xorg.libX11
xorg.libXrandr
xorg.libXi
xorg.libXcursor
];
libPath = lib.makeLibraryPath runtimeDeps;
in
''
patchelf $out/bin/outfly \
--add-rpath ${libPath}
'';
2024-04-26 21:16:03 +00:00
}