Update from source
This commit is contained in:
parent
c0a10971eb
commit
89ab4c3423
17 changed files with 321 additions and 146 deletions
|
@ -9,12 +9,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, rust-overlay
|
||||
,
|
||||
}:
|
||||
outputs = { self, nixpkgs, rust-overlay }:
|
||||
let
|
||||
overlays = [
|
||||
rust-overlay.overlays.default
|
||||
|
@ -23,10 +18,10 @@
|
|||
let
|
||||
rust = prev.rust-bin;
|
||||
in
|
||||
if builtins.pathExists ./rust-toolchain.toml
|
||||
then rust.fromRustupToolchainFile ./rust-toolchain.toml
|
||||
else if builtins.pathExists ./rust-toolchain
|
||||
then rust.fromRustupToolchainFile ./rust-toolchain
|
||||
if builtins.pathExists ./rust-toolchain.toml then
|
||||
rust.fromRustupToolchainFile ./rust-toolchain.toml
|
||||
else if builtins.pathExists ./rust-toolchain then
|
||||
rust.fromRustupToolchainFile ./rust-toolchain
|
||||
else
|
||||
rust.stable.latest.default.override {
|
||||
extensions = [ "rust-src" "rustfmt" ];
|
||||
|
@ -34,18 +29,15 @@
|
|||
})
|
||||
];
|
||||
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; };
|
||||
});
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit overlays system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
rustToolchain
|
||||
rustup
|
||||
openssl
|
||||
pkg-config
|
||||
cargo-deny
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue