fix: catchup with the latest stable Rust (#409)

This commit is contained in:
XYenon 2023-11-29 20:37:10 +08:00 committed by GitHub
parent 57c7d20d39
commit 8998753625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 22 deletions

View File

@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1697793076,
"narHash": "sha256-02e7sCuqLtkyRgrZmdOyvAcQTQdcXj+vpyp9bca6cY4=",
"lastModified": 1701174899,
"narHash": "sha256-1W+FMe8mWsJKXoBc+QgKmEeRj33kTFnPq7XCjU+bfnA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "038b2922be3fc096e1d456f93f7d0f4090628729",
"rev": "010c7296f3b19a58b206fdf7d68d75a5b0a09e9e",
"type": "github"
},
"original": {
@ -51,11 +51,11 @@
]
},
"locked": {
"lastModified": 1697854201,
"narHash": "sha256-H+0Wb20PQx/8N7X/OfwwAVPeN9TbfjcyG0sXbdgsh50=",
"lastModified": 1701224160,
"narHash": "sha256-qnMmxNMKmd6Soel0cfauyMJ+LzuZbvmiDQPSIuTbQ+M=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "6e8e3332433847cd56186b1f6fc8c47603cf5b46",
"rev": "4a080e26d55eaedb95ab1bf8eeaeb84149c10f12",
"type": "github"
},
"original": {

View File

@ -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;

View File

@ -2,6 +2,7 @@
pkgs.mkShell {
packages = with pkgs; [
rustToolchain
rust-analyzer
nodePackages.cspell
@ -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"; };
}