shells and stuff 3

This commit is contained in:
cnst
2024-07-13 13:18:22 +02:00
parent df0a92cde1
commit 8c9c99e0e8
5 changed files with 76 additions and 24 deletions

View File

@@ -1,19 +1,10 @@
{nixpkgs ? import <nixpkgs> {}}: let
rustOverlay = builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
pinnedPkgs = nixpkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "1fe6ed37fd9beb92afe90671c0c2a662a03463dd";
sha256 = "1daa0y3p17shn9gibr321vx8vija6bfsb5zd7h4pxdbbwjkfq8n2";
};
pkgs = import pinnedPkgs {
overlays = [(import rustOverlay)];
};
in
pkgs.mkShell {
{pkgs ? import <nixpkgs> {}, ...}: {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
_rustBuild
];
buildInputs = with pkgs; [
rust-bin.stable.latest.default
rust-analyzer
# rust-bin.stable.latest.default
openssl
pkg-config
ez
@@ -26,4 +17,5 @@ in
alias find=fd
'';
RUST_BACKTRACE = 1;
}
};
}

View File

@@ -0,0 +1,34 @@
{
inputs,
pkgs ? import <nixpkgs> {},
...
}: let
_rustBuildOxalica = inputs.rust-overlay.packages.${pkgs.stdenv.hostPlatform.system}.rust.override {
extensions = [
"rust-src"
"rust-analyzer"
"clippy"
];
};
_rustBuild = _rustBuildOxalica;
in {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
_rustBuild
];
buildInputs = with pkgs; [
rust-bin.stable.latest.default
openssl
pkg-config
ez
fd
gtk3
gtk4
];
shellHook = ''
alias ls=eza
alias find=fd
'';
RUST_BACKTRACE = 1;
};
}