Skip to content

Instantly share code, notes, and snippets.

@sodiboo
Created September 16, 2024 15:04
Show Gist options
  • Select an option

  • Save sodiboo/633357d5a8dfc3f12d977005c5154e9d to your computer and use it in GitHub Desktop.

Select an option

Save sodiboo/633357d5a8dfc3f12d977005c5154e9d to your computer and use it in GitHub Desktop.
minimal flake.nix for use with iced
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {nixpkgs, ...} @ inputs: let
pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.fenix.overlays.default;
in {
formatter.x86_64-linux = pkgs.alejandra;
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = with pkgs; [
(fenix.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
pkg-config
libxkbcommon
wayland
];
LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath (with pkgs; [
vulkan-loader
wayland
]);
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment