build/nix: Put runtime deps in rpath
This commit is contained in:
parent
19b3e57d98
commit
30ab2d3e6e
|
@ -1,20 +1,48 @@
|
||||||
{
|
{
|
||||||
rustPlatform
|
rustPlatform,
|
||||||
, pkg-config
|
pkg-config,
|
||||||
, alsa-lib
|
alsa-lib,
|
||||||
, libcap
|
libcap,
|
||||||
|
libxkbcommon,
|
||||||
|
wayland,
|
||||||
|
udev,
|
||||||
|
vulkan-loader,
|
||||||
|
xorg,
|
||||||
|
lib,
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
src = ../../..;
|
src = ../../..;
|
||||||
pname = "outfly";
|
pname = "outfly";
|
||||||
version = "0.8.0";
|
version = "0.8.1";
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = "${src}/Cargo.lock";
|
lockFile = "${src}/Cargo.lock";
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [pkg-config];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
||||||
|
buildNoDefaultFeatures = true;
|
||||||
|
buildFeatures = [
|
||||||
|
"x11"
|
||||||
|
"embed_assets"
|
||||||
|
];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsa-lib
|
alsa-lib
|
||||||
libcap
|
libcap
|
||||||
#libgcc
|
|
||||||
];
|
];
|
||||||
|
postFixup =
|
||||||
|
let
|
||||||
|
runtimeDeps = [
|
||||||
|
vulkan-loader
|
||||||
|
wayland
|
||||||
|
libxkbcommon
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXrandr
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXcursor
|
||||||
|
];
|
||||||
|
libPath = lib.makeLibraryPath runtimeDeps;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
patchelf $out/bin/outfly \
|
||||||
|
--add-rpath ${libPath}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue