From 0607e24ec22caa316648015f6831c41619ffe9a0 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Sun, 24 Dec 2023 18:15:25 +0000 Subject: [PATCH] flake.nix: use finalPackage instead of passing it manually --- .devops/nix/devshells.nix | 6 ++---- .devops/nix/package.nix | 6 ++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.devops/nix/devshells.nix b/.devops/nix/devshells.nix index f8d541f30..afaaa2644 100644 --- a/.devops/nix/devshells.nix +++ b/.devops/nix/devshells.nix @@ -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 diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix index 460a32e47..bd2dbf4b2 100644 --- a/.devops/nix/package.nix +++ b/.devops/nix/package.nix @@ -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 ]; }; }; -} +})