flake.nix: use finalPackage instead of passing it manually

This commit is contained in:
Someone Serge 2023-12-24 18:15:25 +00:00
parent 8364cf4d0b
commit 0607e24ec2
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4
2 changed files with 6 additions and 6 deletions

View file

@ -2,9 +2,7 @@
concatMapAttrs
(name: package: {
${name} = package.passthru.shell.overrideAttrs (prevAttrs: { inputsFrom = [ package ]; });
${name + "-extra"} = package.passthru.shell-extra.overrideAttrs (
prevAttrs: { inputsFrom = [ package ]; }
);
${name} = package.passthru.shell;
${name + "-extra"} = package.passthru.shell-extra;
})
packages

View file

@ -91,7 +91,7 @@ let
];
in
effectiveStdenv.mkDerivation {
effectiveStdenv.mkDerivation (finalAttrs: {
name = "llama.cpp";
src = ../../.;
meta = {
@ -171,12 +171,14 @@ effectiveStdenv.mkDerivation {
name = "default${descriptionSuffix}";
description = "contains numpy and sentencepiece";
buildInputs = [ llama-python ];
inputsFrom = [ finalAttrs.finalPackage ];
};
shell-extra = mkShell {
name = "extra${descriptionSuffix}";
description = "contains numpy, sentencepiece, torchWithoutCuda, and transformers";
buildInputs = [ llama-python-extra ];
inputsFrom = [ finalAttrs.finalPackage ];
};
};
}
})