Merge pull request 'build/nix: Put runtime deps in rpath' (#1) from axeman/outfly:fix-nix into main
Reviewed-on: https://codeberg.org/hut/outfly/pulls/1
This commit is contained in:
commit
e5e0b13ce1
|
@ -1,20 +1,48 @@
|
|||
{
|
||||
rustPlatform
|
||||
, pkg-config
|
||||
, alsa-lib
|
||||
, libcap
|
||||
rustPlatform,
|
||||
pkg-config,
|
||||
alsa-lib,
|
||||
libcap,
|
||||
libxkbcommon,
|
||||
wayland,
|
||||
udev,
|
||||
vulkan-loader,
|
||||
xorg,
|
||||
lib,
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
src = ../../..;
|
||||
pname = "outfly";
|
||||
version = "0.8.0";
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
};
|
||||
nativeBuildInputs = [pkg-config];
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
libcap
|
||||
#libgcc
|
||||
];
|
||||
src = ../../..;
|
||||
pname = "outfly";
|
||||
version = "0.8.1";
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
};
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildNoDefaultFeatures = true;
|
||||
buildFeatures = [
|
||||
"x11"
|
||||
"embed_assets"
|
||||
];
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
libcap
|
||||
];
|
||||
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