Skip to content

Commit

Permalink
chore: update to rust 1.82 (#2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellie authored Oct 22, 2024
1 parent 62473c6 commit 2e332c2
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 62 deletions.
17 changes: 12 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exclude = ["ui/backend"]
[workspace.package]
version = "18.4.0-beta.3"
authors = ["Ellie Huxtable <ellie@atuin.sh>"]
rust-version = "1.80"
rust-version = "1.82"
license = "MIT"
homepage = "https://atuin.sh"
repository = "https://github.com/atuinsh/atuin"
Expand All @@ -18,9 +18,9 @@ async-trait = "0.1.58"
base64 = "0.22"
log = "0.4"
time = { version = "0.3.36", features = [
"serde-human-readable",
"macros",
"local-offset",
"serde-human-readable",
"macros",
"local-offset",
] }
clap = { version = "4.5.7", features = ["derive"] }
config = { version = "0.13", default-features = false, features = ["toml"] }
Expand Down Expand Up @@ -67,7 +67,14 @@ ci = "github"
# The installers to generate for each app
installers = ["shell"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl"]
targets = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
]
# Publish jobs to run in CI
pr-run-mode = "plan"
# Whether to install an updater program
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

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

98 changes: 51 additions & 47 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,62 @@
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
flake-utils,
fenix,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.outputs.legacyPackages.${system};
in {
packages.atuin = pkgs.callPackage ./atuin.nix {
inherit (pkgs.darwin.apple_sdk.frameworks) Security SystemConfiguration AppKit;
rustPlatform = let
toolchain =
fenix.packages.${system}.fromToolchainFile
{
file = ./rust-toolchain.toml;
sha256 = "sha256-3jVIIf5XPnUU1CRaTyAiO0XHVbJl12MSx3eucTXCjtE=";
outputs =
{ self
, nixpkgs
, flake-utils
, fenix
, ...
}:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.outputs.legacyPackages.${system};
in
{
packages.atuin = pkgs.callPackage ./atuin.nix {
inherit (pkgs.darwin.apple_sdk.frameworks) Security SystemConfiguration AppKit;
rustPlatform =
let
toolchain =
fenix.packages.${system}.fromToolchainFile
{
file = ./rust-toolchain.toml;
sha256 = "sha256-yMuSb5eQPO/bHv+Bcf/US8LVMbf/G/0MSfiPwBhiPpk=";
};
in
pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in
pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
};
packages.default = self.outputs.packages.${system}.atuin;
};
packages.default = self.outputs.packages.${system}.atuin;

devShells.default = self.packages.${system}.default.overrideAttrs (super: {
nativeBuildInputs = with pkgs;
super.nativeBuildInputs
++ [
cargo-edit
clippy
rustfmt
];
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
devShells.default = self.packages.${system}.default.overrideAttrs (super: {
nativeBuildInputs = with pkgs;
super.nativeBuildInputs
++ [
cargo-edit
clippy
rustfmt
];
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";

shellHook = ''
echo >&2 "Setting development database path"
export ATUIN_DB_PATH="/tmp/atuin_dev.db"
export ATUIN_RECORD_STORE_PATH="/tmp/atuin_records.db"
shellHook = ''
echo >&2 "Setting development database path"
export ATUIN_DB_PATH="/tmp/atuin_dev.db"
export ATUIN_RECORD_STORE_PATH="/tmp/atuin_records.db"
if [ -e "''${ATUIN_DB_PATH}" ]; then
echo >&2 "''${ATUIN_DB_PATH} already exists, you might want to double-check that"
fi
if [ -e "''${ATUIN_DB_PATH}" ]; then
echo >&2 "''${ATUIN_DB_PATH} already exists, you might want to double-check that"
fi
if [ -e "''${ATUIN_RECORD_STORE_PATH}" ]; then
echo >&2 "''${ATUIN_RECORD_STORE_PATH} already exists, you might want to double-check that"
fi
'';
});
})
if [ -e "''${ATUIN_RECORD_STORE_PATH}" ]; then
echo >&2 "''${ATUIN_RECORD_STORE_PATH} already exists, you might want to double-check that"
fi
'';
});
})
// {
overlays.default = final: prev: {
inherit (self.packages.${final.system}) atuin;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.80.1"
channel = "1.82"

0 comments on commit 2e332c2

Please sign in to comment.