Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: libxkbcommon + pkg-config for linux devshell #34

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@
system,
...
}: let
inherit (pkgs) alejandra cargo cmake deno gauntlet gtk3 libxkbcommon libGL mkShell nodejs protobuf stdenv xorg wayland;
inherit (lib) makeBinPath makeLibraryPath optionals optionalString;
inherit (pkgs) alejandra cargo cmake deno gauntlet gtk3 libxkbcommon libGL mkShell nodejs pkg-config protobuf stdenv xorg wayland;
inherit (stdenv.hostPlatform) isLinux;
in {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [inputs.self.overlays.default];
};
devShells.default = mkShell {
packages = [cargo cmake deno nodejs protobuf];
shellHook = lib.optionalString stdenv.hostPlatform.isLinux ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${lib.makeLibraryPath [libxkbcommon libGL xorg.libX11 wayland]}"
export PATH="$PATH:${lib.makeBinPath [gtk3]}"
packages = [cargo cmake deno nodejs protobuf] ++ optionals isLinux [libxkbcommon pkg-config];
shellHook = optionalString isLinux ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${makeLibraryPath [libGL xorg.libX11 wayland]}"
export PATH="$PATH:${makeBinPath [gtk3]}"
'';
};
formatter = alejandra;
Expand Down
Loading