Replaced direct buildInputs with LD_LIBRARY_PATH configuration to streamline dependency handling. This makes library paths explicitly managed and simplifies runtime linking for the required packages. Updated the devShells configuration accordingly.
68 lines
1.5 KiB
Nix
68 lines
1.5 KiB
Nix
{
|
|
inputs.nixify.url = "github:rvolosatovs/nixify";
|
|
|
|
outputs =
|
|
{ nixify, ... }:
|
|
with nixify.lib;
|
|
rust.mkFlake {
|
|
src = ./.;
|
|
|
|
withDevShells =
|
|
{
|
|
devShells,
|
|
pkgs,
|
|
...
|
|
}:
|
|
extendDerivations {
|
|
env.LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${
|
|
with pkgs;
|
|
pkgs.lib.makeLibraryPath [
|
|
xorg.libX11
|
|
xorg.libXcursor
|
|
xorg.libXi
|
|
libxkbcommon
|
|
xorg.libxcb
|
|
pkgs.vulkan-loader
|
|
pkgs.glfw
|
|
]
|
|
}";
|
|
buildInputs = with pkgs; [
|
|
pkgs.pkg-config
|
|
pkgs.alsa-lib.dev
|
|
pkgs.udev.dev
|
|
];
|
|
} devShells;
|
|
|
|
buildOverrides =
|
|
{
|
|
pkgs,
|
|
pkgsCross ? pkgs,
|
|
...
|
|
}:
|
|
{
|
|
buildInputs ? [ ],
|
|
nativeBuildInputs ? [ ],
|
|
depsBuildBuild ? [ ],
|
|
...
|
|
}:
|
|
with pkgs.lib;
|
|
{
|
|
nativeBuildInputs =
|
|
nativeBuildInputs
|
|
++ optional (pkgs.stdenv.hostPlatform.isLinux) [ pkgs.pkg-config ];
|
|
|
|
buildInputs =
|
|
buildInputs
|
|
++ optional pkgs.stdenv.hostPlatform.isDarwin pkgs.libiconv
|
|
++ optional (pkgs.stdenv.hostPlatform.isLinux) [
|
|
pkgs.alsa-lib.dev
|
|
pkgs.udev.dev
|
|
];
|
|
|
|
depsBuildBuild =
|
|
depsBuildBuild
|
|
++ optional pkgsCross.stdenv.hostPlatform.isDarwin pkgsCross.xcbuild.xcrun;
|
|
};
|
|
};
|
|
}
|