diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore index 9b8adcb..629f81b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target +/.direnv flamegraph.svg perf.data* diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..1cc9698 --- /dev/null +++ b/shell.nix @@ -0,0 +1,40 @@ +let + nixpkgs = builtins.fetchGit { + name = "nixos-23.11"; + url = "https://github.com/nixos/nixpkgs"; + ref = "refs/heads/nixos-23.11"; + }; + + nixpkgs-unstable = builtins.fetchGit { + name = "nixos-unstable"; + url = "https://github.com/nixos/nixpkgs"; + ref = "refs/heads/nixos-unstable"; + }; + + pkgs = import nixpkgs {}; + pkgs-unstable = import nixpkgs-unstable {}; + +in pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + pkgs-unstable.rustc + pkgs-unstable.rustfmt + pkgs-unstable.cargo + pkgs-unstable.clippy + + gcc + cmake + pkg-config + ]; + + buildInputs = with pkgs; [ + gtk4 + glib + gdk-pixbuf + gobject-introspection + + libadwaita + ]; + + RUST_SRC_PATH = "${pkgs-unstable.rust.packages.stable.rustPlatform.rustLibSrc}"; + RUST_BACKTRACE = 1; +}