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

Development on nixos #66

Open
twitchyliquid64 opened this issue May 24, 2023 · 1 comment
Open

Development on nixos #66

twitchyliquid64 opened this issue May 24, 2023 · 1 comment

Comments

@twitchyliquid64
Copy link

Not sure where this goes, but just wanted to share that I got xilem building / working on nixos. You just need to jump into a nix-shell with the following shell.nix in your tree:

let
  pkgs = import <nixpkgs> {};

  fenix = pkgs.callPackage
    (pkgs.fetchFromGitHub {
      owner = "nix-community";
      repo = "fenix";
      # commit from: 2023-03-03
      rev = "e2ea04982b892263c4d939f1cc3bf60a9c4deaa1";
      hash = "sha256-AsOim1A8KKtMWIxG+lXh5Q4P2bhOZjoUhFWJ1EuZNNk=";
    })
    { };

in pkgs.mkShell rec {

  buildInputs = with pkgs; [
    libxkbcommon xorg.libxcb libclang
    wayland wayland-protocols vulkan-loader
  ];

  nativeBuildInputs = with pkgs; [
    # Note: to use stable, just replace `default` with `stable`
    fenix.default.toolchain

    pkgs.rustPlatform.bindgenHook
    wayland-scanner
    pkg-config
  ];

  RUST_SRC_PATH = "${fenix.complete.rust-src}/lib/rustlib/src/rust/library";
  LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
  LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
}
@zoechi
Copy link

zoechi commented Jan 30, 2024

Wouldn't this be nice to have this committed to the repo so that it becomes easy to enable with with direnv?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants