Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
54 lines
840 B
Nix
54 lines
840 B
Nix
{
|
|
pname,
|
|
version,
|
|
src,
|
|
sourceDir,
|
|
yarnLock ? null,
|
|
hash,
|
|
extraFiles ? "",
|
|
meta,
|
|
|
|
fetchYarnDeps,
|
|
lib,
|
|
nodejs_22,
|
|
stdenvNoCC,
|
|
yarnBuildHook,
|
|
yarnConfigHook,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
inherit
|
|
pname
|
|
version
|
|
src
|
|
meta
|
|
;
|
|
sourceRoot = "${finalAttrs.src.name}/${sourceDir}";
|
|
|
|
yarnOfflineCache = fetchYarnDeps {
|
|
yarnLock = if yarnLock != null then yarnLock else "${finalAttrs.src}/${sourceDir}/yarn.lock";
|
|
inherit hash;
|
|
};
|
|
|
|
postPatch = lib.optionalString (yarnLock != null) ''
|
|
cp ${yarnLock} ./yarn.lock
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
nodejs_22
|
|
yarnBuildHook
|
|
yarnConfigHook
|
|
];
|
|
|
|
BUILD_VERSION = finalAttrs.version;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
cp -r dist/* ${extraFiles} $out
|
|
|
|
runHook postInstall
|
|
'';
|
|
})
|