Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: catchup with the latest stable Rust #409

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions flake.lock

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

29 changes: 16 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,28 @@
};
})
];
in flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system overlays; };
versionSuffix = "pre${
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
version = (builtins.fromTOML
(builtins.readFile ./yazi-fm/Cargo.toml)).package.version
+ versionSuffix;
yazi = pkgs.callPackage ./nix/yazi.nix { inherit version; };
in {
packages.default = yazi;
packages.yazi = yazi;
yazi = pkgs.callPackage ./nix/yazi.nix { inherit version; };
in
{
packages.default = yazi;
packages.yazi = yazi;

formatter = pkgs.nixpkgs-fmt;
formatter = pkgs.nixpkgs-fmt;

devShells.default = import ./nix/shell.nix { inherit pkgs inputs; };
})
devShells.default = import ./nix/shell.nix { inherit pkgs inputs; };
})
// {
overlays = rec {
default = yazi;
Expand Down
5 changes: 2 additions & 3 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

nodePackages.cspell
Expand All @@ -15,13 +16,11 @@ 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 ]);
(with darwin.apple_sdk.frameworks; [ Foundation ]);

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