Skip to content

Commit

Permalink
fix: change the rust tool chain in shell.nix from stable to nightly (
Browse files Browse the repository at this point in the history
  • Loading branch information
15cm committed Oct 24, 2023
1 parent 6a651f4 commit b46e71a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
17 changes: 10 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
};
};

outputs = { self, nixpkgs, flake-utils, rust-overlay, ... } @ inputs:
outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }@inputs:
let
# Nixpkgs overlays
overlays = [
Expand All @@ -22,15 +22,18 @@
};
})
];
in
flake-utils.lib.eachDefaultSystem (system:
in flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system overlays; };
versionSuffix = "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}";
version = (builtins.fromTOML (builtins.readFile ./yazi-fm/Cargo.toml)).package.version + versionSuffix;
versionSuffix = "pre${
builtins.substring 0 8
(self.lastModifiedDate or self.lastModified or "19700101")
}_${self.shortRev or "dirty"}";
version = (builtins.fromTOML
(builtins.readFile ./yazi-fm/Cargo.toml)).package.version
+ versionSuffix;
yazi = pkgs.callPackage ./nix/yazi.nix { inherit version; };
in
{
in {
packages.default = yazi;
packages.yazi = yazi;

Expand Down
13 changes: 6 additions & 7 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

pkgs.mkShell {
packages = with pkgs; [
rustToolchain
rust-analyzer

nodePackages.cspell
Expand All @@ -16,13 +15,13 @@ pkgs.mkShell {
ripgrep
fzf
zoxide

(rust-bin.nightly.latest.rust.override { extensions = [ "rust-src" ]; })
];

buildInputs = with pkgs; lib.optionals stdenv.isDarwin (
with darwin.apple_sdk.frameworks; [ Foundation ]
);
buildInputs = with pkgs;
lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ Foundation ]);

env = {
RUST_BACKTRACE = "1";
};
env = { RUST_BACKTRACE = "1"; };
}

0 comments on commit b46e71a

Please sign in to comment.