Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Pin the rust version in flake.nix
Browse files Browse the repository at this point in the history
Before we were just using whatever was the latest stable (according to
the time that our flake.lock file was updated. This was Rust 1.69.0 FYI.

Now we're specifically pinning the version of Rust. Synapse only
requires Rust 1.60.0.
  • Loading branch information
anoadragon453 committed Jul 14, 2023
1 parent 20ae617 commit 0f50ea5
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 43 deletions.
96 changes: 63 additions & 33 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 20 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@
systems.url = "github:nix-systems/default";
# A development environment manager built on Nix. See https://devenv.sh.
devenv.url = "github:cachix/devenv/main";
# Rust toolchains and rust-analyzer nightly.
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Rust toolchain.
rust-overlay.url = "github:oxalica/rust-overlay";
};

outputs = { self, nixpkgs, devenv, systems, ... } @ inputs:
outputs = { self, nixpkgs, devenv, systems, rust-overlay, ... } @ inputs:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in {
devShells = forEachSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
in {
# Everything is configured via devenv - a Nix module for creating declarative
# developer environments. See https://devenv.sh/reference/options/ for a list
Expand All @@ -76,6 +76,17 @@
# Configure packages to install.
# Search for package names at https://search.nixos.org/packages?channel=unstable
packages = with pkgs; [
# The rust toolchain and related tools.
# This will install the "default" profile of rust components.
# https://rust-lang.github.io/rustup/concepts/profiles.html
(rust-bin.stable."1.60.0".default.override {
# Additionally install the "rust-src" extension to allow diving into the
# Rust source code in an IDE (rust-analyzer will also make use of it).
extensions = [ "rust-src" ];
})
# The rust-analyzer language server implementation.
rust-analyzer

# Native dependencies for running Synapse.
icu
libffi
Expand Down Expand Up @@ -124,12 +135,11 @@
# Install dependencies for the additional programming languages
# involved with Synapse development.
#
# * Rust is used for developing and running Synapse.
# * Golang is needed to run the Complement test suite.
# * Perl is needed to run the SyTest test suite.
# * Rust is used for developing and running Synapse.
# It is installed manually with `packages` above.
languages.go.enable = true;
languages.rust.enable = true;
languages.rust.version = "stable";
languages.perl.enable = true;

# Postgres is needed to run Synapse with postgres support and
Expand Down

0 comments on commit 0f50ea5

Please sign in to comment.