depot/third_party/nixpkgs/pkgs/servers/mastodon/yarn.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

37 lines
706 B
Nix

{
stdenvNoCC,
yarn-berry,
cacert,
version,
src,
hash,
}:
stdenvNoCC.mkDerivation {
pname = "yarn-deps";
inherit version src;
nativeBuildInputs = [
yarn-berry
];
dontInstall = true;
NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildPhase = ''
export HOME=$(mktemp -d)
export YARN_ENABLE_TELEMETRY=0
yarn config set --json supportedArchitectures.os '[ "linux" ]'
yarn config set --json supportedArchitectures.cpu '[ "arm64", "x64", "ia32" ]'
cache="$(yarn config get cacheFolder)"
yarn install --immutable --mode skip-build
mkdir -p $out
cp -r $cache/* $out/
'';
outputHash = hash;
outputHashMode = "recursive";
}