2023-09-22 11:08:17 +03:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2023-10-22 03:10:53 +03:00
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2023-09-22 11:08:17 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-10-24 11:16:24 +03:00
|
|
|
outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }@inputs:
|
2023-10-22 03:10:53 +03:00
|
|
|
let
|
|
|
|
# Nixpkgs overlays
|
|
|
|
overlays = [
|
|
|
|
rust-overlay.overlays.default
|
|
|
|
(final: prev: {
|
|
|
|
rustToolchain = final.rust-bin.stable.latest.default.override {
|
|
|
|
extensions = [ "rust-src" ];
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
2023-10-24 11:16:24 +03:00
|
|
|
in flake-utils.lib.eachDefaultSystem (system:
|
2023-09-22 11:08:17 +03:00
|
|
|
let
|
2023-10-22 03:10:53 +03:00
|
|
|
pkgs = import nixpkgs { inherit system overlays; };
|
2023-10-24 11:16:24 +03:00
|
|
|
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;
|
2023-10-16 19:45:22 +03:00
|
|
|
yazi = pkgs.callPackage ./nix/yazi.nix { inherit version; };
|
2023-10-24 11:16:24 +03:00
|
|
|
in {
|
2023-09-22 11:08:17 +03:00
|
|
|
packages.default = yazi;
|
|
|
|
packages.yazi = yazi;
|
|
|
|
|
|
|
|
formatter = pkgs.nixpkgs-fmt;
|
|
|
|
|
|
|
|
devShells.default = import ./nix/shell.nix { inherit pkgs inputs; };
|
|
|
|
});
|
|
|
|
}
|