From da2830885ff44944b3ba96c9f0f43e427e586ac3 Mon Sep 17 00:00:00 2001 From: Albert Chae Date: Wed, 10 Apr 2024 18:23:39 -0700 Subject: [PATCH] builds --- pkgs/atomic-browser/default.nix | 17 +++++++++++++++-- pkgs/default.nix | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pkgs/atomic-browser/default.nix b/pkgs/atomic-browser/default.nix index 10363f8d..c42c8c23 100644 --- a/pkgs/atomic-browser/default.nix +++ b/pkgs/atomic-browser/default.nix @@ -3,6 +3,7 @@ fetchFromGitHub, lib, mkPnpmPackage, + nodePackages, fetchPnpmDeps, pnpmConfigHook, }: let @@ -26,10 +27,22 @@ stdenv.mkDerivation rec { src = "${monorepoSrc}/browser"; pnpmDeps = fetchPnpmDeps { inherit src pname; - hash = ""; + hash = "sha256-sXXEgMBKImeGIYrFw17Uie6qTylKrJ9MNm8WJFRAi1A="; }; - nativeBuildInputs = [ pnpmConfigHook ]; + nativeBuildInputs = [ + pnpmConfigHook + nodePackages.pnpm + ]; + + postBuild = '' + pnpm build + ''; + + installPhase = '' + cp -R ./data-browser/dist/ $out/ + ''; + # These 2 options are needed to work with pnpm workspaces, which atomic-browser is using # https://github.com/nzbr/pnpm2nix-nzbr/issues/29#issuecomment-1918811838 diff --git a/pkgs/default.nix b/pkgs/default.nix index aade196f..fda24fe7 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -35,8 +35,8 @@ ; - inherit (callPackage ./pkgs/build-support/node/fetch-pnpm-deps { }) fetchPnpmDeps; - inherit (callPackage ./pkgs/build-support/node/fetch-pnpm-deps { }) pnpmConfigHook; + inherit (callPackage ./build-support/node/fetch-pnpm-deps { }) fetchPnpmDeps; + inherit (callPackage ./build-support/node/fetch-pnpm-deps { }) pnpmConfigHook; atomic-browser = callPackage ./atomic-browser {}; }; in