Skip to content

Commit c725c91

Browse files
authored
fix(nix): shell env (#3363)
1 parent 449450d commit c725c91

File tree

4 files changed

+25
-20
lines changed

4 files changed

+25
-20
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@
5252
};
5353

5454
devShells = {
55-
default = pkgs.callPackage ./nix/shell.nix { };
55+
default = pkgs.callPackage ./nix/shell.nix {
56+
inherit toolchain;
57+
inherit (self.packages.${system}) yazi yazi-unwrapped;
58+
};
5659
};
5760

58-
formatter = pkgs.nixfmt-rfc-style;
61+
formatter = pkgs.nixfmt-tree;
5962
}
6063
)
6164
// {

nix/shell.nix

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
2-
callPackage,
3-
rust-bin,
2+
mkShell,
3+
yazi,
4+
toolchain,
45
nodePackages,
6+
yazi-unwrapped,
57
}:
6-
let
7-
mainPkg = callPackage ./yazi.nix { };
8-
in
9-
mainPkg.overrideAttrs (oa: {
10-
nativeBuildInputs = [
11-
(rust-bin.nightly.latest.default.override {
8+
9+
mkShell {
10+
packages = yazi.passthru.runtimePaths ++ [
11+
(toolchain.override {
1212
extensions = [
1313
"rust-src"
1414
"rustfmt"
1515
"rust-analyzer"
1616
"clippy"
1717
];
1818
})
19-
2019
nodePackages.cspell
21-
]
22-
++ (oa.nativeBuildInputs or [ ]);
20+
];
21+
22+
inputsFrom = [ yazi-unwrapped ];
2323

2424
env.RUST_BACKTRACE = "1";
25-
})
25+
}

nix/yazi.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ runCommand yazi-unwrapped.name
9696
inherit (yazi-unwrapped) pname version meta;
9797

9898
nativeBuildInputs = [ makeWrapper ];
99+
100+
passthru.runtimePaths = runtimePaths;
99101
}
100102
''
101103
mkdir -p $out/bin

0 commit comments

Comments
 (0)