fix(rust-crane): pull stdenv from correct option, pass drvs separately in devshell

This commit is contained in:
Yusuf Bera Ertan 2023-09-05 21:31:01 +03:00 committed by DavHau
parent 45bf32881c
commit 1422324ae1
2 changed files with 7 additions and 6 deletions

View File

@ -208,9 +208,10 @@ in {
public = {
devShell = import ./devshell.nix {
name = "${pname}-devshell";
drvs = [cfg.depsDrv.public config.public];
depsDrv = cfg.depsDrv.public;
mainDrv = config.public;
inherit lib;
inherit (config.deps) libiconv mkShell stdenv cargo;
inherit (config.deps) libiconv mkShell cargo;
};
dependencies = cfg.depsDrv.public;
meta = utils.getMeta pname version;

View File

@ -1,12 +1,12 @@
{
# args
drvs,
name,
depsDrv,
mainDrv,
# nixpkgs
lib,
libiconv,
mkShell,
stdenv,
cargo,
...
}: let
@ -72,7 +72,7 @@
)
{}
envs;
_shellEnv = combineEnvs (l.map getEnvs drvs);
_shellEnv = combineEnvs (l.map getEnvs [depsDrv mainDrv]);
shellEnv =
_shellEnv
// {
@ -81,4 +81,4 @@
nativeBuildInputs = _shellEnv.nativeBuildInputs ++ [cargo];
};
in
(mkShell.override {stdenv = (l.head drvs).config.mkDerivation.stdenv or stdenv;}) shellEnv
(mkShell.override {stdenv = mainDrv.out.stdenv;}) shellEnv