Revamp all templates to remove flake-utils and nixpkgs-unstable
This commit is contained in:
parent
db0398d60d
commit
8532ea5be8
58 changed files with 587 additions and 1299 deletions
rust-toolchain
|
@ -2,32 +2,27 @@
|
|||
description = "A Nix-flake-based Rust development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, flake-utils
|
||||
, rust-overlay
|
||||
}:
|
||||
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
outputs = { self, nixpkgs, rust-overlay }:
|
||||
let
|
||||
overlays = [
|
||||
(import rust-overlay)
|
||||
(self: super: {
|
||||
rustToolchain = super.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
rust-overlay.overlays.default
|
||||
(final: prev: {
|
||||
rustToolchain = prev.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
})
|
||||
];
|
||||
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit overlays system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
rustToolchain
|
||||
openssl
|
||||
pkg-config
|
||||
|
@ -36,10 +31,7 @@
|
|||
cargo-watch
|
||||
rust-analyzer
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
${pkgs.rustToolchain}/bin/cargo --version
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue