diff --git a/default.nix b/default.nix index 80d75f4f..a7f4d37b 100644 --- a/default.nix +++ b/default.nix @@ -18,27 +18,31 @@ pkgs.buildGoModule rec { src = ./.; subPackages = []; version = "0.0.11"; - vendorHash = "sha256-zXjryPAJYpc80cqYtrcp//i6OQi5V5QwhaKQYYfrlL8="; + vendorHash = "sha256-6g2gk7AyRmoqYfqwsTbzc5u5IKzlNFHjD3TeYXnf1zA="; buildInputs = [ pkgs.proj ]; + + # Only inclue pkg-config here - it's needed for both phases nativeBuildInputs = [ pkgs.pkg-config - pkgs.pnpm.configHook pkgs.nodejs + pkgs.pnpm.configHook ]; + # Override the go modules derivation to expclude pnpm stuff + overrideModAttrs = (_: { + preBuild = ""; # Don't run pnpm stuff during go modules fetch + }); + pnpmDeps = pkgs.pnpm.fetchDeps { + inherit pname src version; fetcherVersion = 2; hash = "sha256-UvE49UmVw8zVFHywxRWyzL0EiZvuZjmm9hA1U98o2sA="; - pname = "nidus-sync-frontend"; - src = ./.; - version = "0.0.11"; }; preBuild = '' -# Setup node_modules from pnpm dependencies -export HOME=$(mktemp -d) -pnpm config set store-dir $HOME/.pnpm-store +# Add pnpm and nodejs to PATH for this phase only +pnpm install --offline --frozen-lockfile --ignore-scripts # Icon generation mkdir -p "./ts/gen"