models-dev: refactor package.nix to use let-in for better readability
This commit is contained in:
@@ -6,19 +6,19 @@
|
||||
nix-update-script,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
let
|
||||
pname = "models-dev";
|
||||
version = "0-unstable-2025-11-17";
|
||||
version = "0-unstable-2025-11-20";
|
||||
src = fetchFromGitHub {
|
||||
owner = "sst";
|
||||
repo = "models.dev";
|
||||
rev = "0cb3e3498ba712bd31528926d2efdd26e925267b";
|
||||
hash = "sha256-ICMR59DaqriZZmO7260iuyMjuIRJ9AYtWlzVZY0KFXw=";
|
||||
rev = "5389818cb714afeeca30ceef3c012498bba7f709";
|
||||
hash = "sha256-ld/bWHJPGoDO7lyXnmGCzSt1f3A/JA8azJcj0C5HT8E=";
|
||||
};
|
||||
|
||||
node_modules = stdenvNoCC.mkDerivation {
|
||||
pname = "models-dev-node_modules";
|
||||
inherit (finalAttrs) version src;
|
||||
pname = "${pname}-node_modules";
|
||||
inherit version src;
|
||||
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
|
||||
"GIT_PROXY_COMMAND"
|
||||
@@ -69,13 +69,21 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
};
|
||||
in
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
inherit
|
||||
pname
|
||||
version
|
||||
src
|
||||
node_modules
|
||||
;
|
||||
|
||||
nativeBuildInputs = [ bun ];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
cp -R ${finalAttrs.node_modules}/. .
|
||||
cp -R ${node_modules}/. .
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user