!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

202 Members
58 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
13 Jan 2025
@xiaoxiangmoe:matrix.org🐰 xiaoxiangmoeIs there anyway to add cacert for pnpm.fetchDeps in macOS?14:41:32
@lily:lily.flowersLily Foster
In reply to @xiaoxiangmoe:matrix.org
Is there anyway to add cacert for pnpm.fetchDeps in macOS?
nativeBuildInputs in the pnpm.fetchDeps?
14:42:15
@lily:lily.flowersLily Foster(i'd be surprised though if that fetcher was made so uncarefully to not handle cert stuff like other fechers (e.g. npm) do)14:43:11
@xiaoxiangmoe:matrix.org🐰 xiaoxiangmoe

But this also not working

 WARN  GET https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz error (UNABLE_TO_GET_ISSUER_CERT_LOCALLY). Will retry in 1 minute. 1 retries left.
14:43:30
15 Jan 2025
@rosssmyth:matrix.org@rosssmyth:matrix.org

After setting up my aforementioned pnpm build, I am now wondering why the devshell and build derivations behave differently. My outputs look like this:

      devShells.default = pkgs.mkShellNoCC {
        inherit pnpmDeps cargoDeps;
        inputsFrom = [ self.packages.${system}.default ];
      };

      packages.default = pkgs.stdenvNoCC.mkDerivation (finalAttrs: {
        inherit pnpmDeps cargoDeps pname version;
        src = gitignoreSource ./.;
        strict = true;
        doCheck = false;
        nativeBuildInputs = with pkgs; [
          wasm-bindgen-cli
          nodejs
          nodejs.pkgs.pnpm.configHook
          pkgs.rustPlatform.cargoSetupHook
          wrappedWasmPack
          (rust-bin.stable.latest.default.override {targets = ["wasm32-unknown-unknown"];})
        ];

        buildPhase = ''
          pnpm build
        '';
        installPhase = ''
          mv dist/ $out
        '';
      });

The packaging derivation works exactly how I want it. But the devshell does not. Specifically, while in the packaging derivation all the dependencies are installed and then all I need to do is run "pnpm build" in the build phase as shown. But in the dev shell when I execute "pnpm build" pnpm complains that I need to install the dependencies still.

Is there something I am missing? Is mkshell different from mkderivation in a way that prevents this? Obviously it is impure, but I'd like to confine the dependencies in the store as much as I can.

02:58:12
@winter:catgirl.cloudWinterit does not have the config hook.03:12:47
@winter:catgirl.cloudWinter*run03:13:18
@winter:catgirl.cloudWinterthose setup hooks do not run when in a devshell03:13:37
@rosssmyth:matrix.org@rosssmyth:matrix.orgπŸ˜”03:26:03
@rosssmyth:matrix.org@rosssmyth:matrix.orgIt does download them somewhere to my store. It's just not setup so that pnpm can see the dependencies 03:26:40
@winter:catgirl.cloudWinteryou can set that up with a shell hook03:39:57
@rosssmyth:matrix.org@rosssmyth:matrix.orggood idea 03:41:34
@rosssmyth:matrix.org@rosssmyth:matrix.orgThat does work03:41:43
@ss:someonex.netSomeoneSerge (matrix works sometimes) changed their display name from SomeoneSerge (utc+3) to SomeoneSerge.19:02:28

Show newer messages


Back to Room ListRoom Version: 6