!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

209 Members
59 Servers

Load older messages


SenderMessageTime
23 Nov 2023
@adis:blad.is@adis:blad.is
In reply to @whentze:matrix.org
the src/sourceRoot/npmRoot/packageRoot situation is quite confusing to me. no combination I've tried seems to work.
Yeah.. Perhaphs I should rename packageRoot -> npmRoot
00:57:44
@adis:blad.is@adis:blad.isThey're the same thing00:57:47
@adis:blad.is@adis:blad.isIt just felt more symmetric with package/packageJson/packageRoot00:58:09
@adis:blad.is@adis:blad.is
In reply to @hexa:lossy.network
the reason I'm asking is mjolnir/draupnir, who both use yarn v1 lock files right now and are critical for the moderation team
I'm probably missing something, but is there a reason upstream hasn't switched?
Could we ask them to?
01:00:07
@whentze:matrix.orgWanja Hentze
In reply to @adis:blad.is
Is this something that would be possible to add to fetchurl or a custom fetcher?
yes
01:01:00
@hexa:lossy.networkhexa
In reply to @adis:blad.is
I'm probably missing something, but is there a reason upstream hasn't switched?
Could we ask them to?
switching to v2 locks would be problematic, as we lack the tooling to package them rn
01:01:20
@hexa:lossy.networkhexawe don't want them to switch at this time 🙂01:01:30
@whentze:matrix.orgWanja Hentze
In reply to @adis:blad.is
They're the same thing
but the nix file expects packageRoot whereas the hook excepts npmRoot
01:01:36
@adis:blad.is@adis:blad.isAh, sorry for the misunderstanding =)01:01:42
@hexa:lossy.networkhexano worries 🙂 01:01:50
@whentze:matrix.orgWanja Hentze* In reply to @adis:blad.is They're the same thing but the nix file expects packageRoot whereas the hook expects npmRoot01:01:55
@whentze:matrix.orgWanja Hentzeit seems to work if I pass the same value to both, but as a string to npmRoot and a path to packageRoot01:04:33
@whentze:matrix.orgWanja HentzeI tried a bunch of combinations before arriving at this one01:05:00
@adis:blad.is@adis:blad.isThat's expected, though perhaps not entirely clear.01:07:46
@ThorHop:matrix.org@ThorHop:matrix.org Scwooly! So I want to get the astrojs language-server running through Kate LSP, but it isn't available in nixpkgs. What would be the easiest way to get a nodejs package in path? Is there a way to make global installs (i.e npm i -g) to install into a user path? Would it be better to just copy-paste another language-server nix definition? 17:22:34
@marie:marie.cologneMariethe astro language server is in nixpkgs: nodePackages."@astrojs/language-server"17:28:52
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (flaky frank) to hopland (evil entrepeneur).17:30:24
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (evil entrepeneur) to hopland (nixpkgs-rolling when).18:25:13
@ThorHop:matrix.org@ThorHop:matrix.org
In reply to @marie:marie.cologne
the astro language server is in nixpkgs: nodePackages."@astrojs/language-server"
Thanks :D didn't know that. Also, had to remove with pkgs.nodePackages; to get it to work :/ so every line has pkgs.nodePackages now ^^; Dangit! And I got my nix files all nice and clean. But it's installed, now I just need to get it working. Again: Thanks! ^^
19:46:55
24 Nov 2023
@ambroisie:belanyi.fr@ambroisie:belanyi.fr

Hey 👋
Anybody happen to have fixed this issue before:

Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
18:35:55
@ambroisie:belanyi.fr@ambroisie:belanyi.fr (In #267320 for reference) 18:36:06
@ambroisie:belanyi.fr@ambroisie:belanyi.fr It does appear in the yarn.lock, but does seem to be absent from /<<NIX>>/woodpecker-ci-modules-2.0.0/node_modules/ 18:42:54
26 Nov 2023
@sandro:supersandro.deSandro 🐧Try the new node builder that uses npm directly if that isn't already being used14:44:23
27 Nov 2023
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (nixpkgs-rolling when) to hopland (valorent vicky).14:31:34
29 Nov 2023
@keiichi:matrix.org@keiichi:matrix.org I have pkg = pkgs.buildNpmPackage and I would like to create a nix-shell with everything necessary to develop on pkg. I've tried a mkShell { buildInputs= [ pkg.inputDerivation ]; } but then I dont get npm or typescript. Is there a better way ? 11:15:43
1 Dec 2023
@tensor5:matrix.orgNicola Squartini joined the room.14:38:39
@tensor5:matrix.orgNicola Squartini

Can someone help with this

mkYarnPackage {
  src = fetchFromGitHub {
    owner = "salesforcecli";
    repo = "cli";
    rev = "2.17.14";
    hash = "sha256-lliHmc/LJCEkZcxBdnSAqpYpnz7R/g6Q2Oi7hIB04B4=";
  };

  buildPhase = ''
    runHook preBuild
    yarn --offline build
    runHook postBuild
  '';

  postBuild = "npm prune --omit=dev";

  doDist = false;
}

the problem I'm trying to solve is pruning devDependencies

14:41:29
@kranzes:matrix.org@kranzes:matrix.orgWhy are you modifying the buildPhase14:42:38
@tensor5:matrix.orgNicola Squartini

Why are you modifying the buildPhase

if I remove that

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/nix/store/45wvk1m5j03v8la99fw7pilyh79yyvaf-salesforce-cli-2.17.14/libexec/@salesforce/cli/deps/@salesforce/cli/dist/flags.js' imported from /nix/store/45wvk1m5j03v8la99fw7pilyh79yyvaf-salesforce-cli-2.17.14/libexec/@salesforce/cli/deps/@salesforce/cli/bin/run.js

mkYarnPackage doesn't have a default build phase

14:47:51
@lily:lily.flowersLily Foster
In reply to @tensor5:matrix.org

Can someone help with this

mkYarnPackage {
  src = fetchFromGitHub {
    owner = "salesforcecli";
    repo = "cli";
    rev = "2.17.14";
    hash = "sha256-lliHmc/LJCEkZcxBdnSAqpYpnz7R/g6Q2Oi7hIB04B4=";
  };

  buildPhase = ''
    runHook preBuild
    yarn --offline build
    runHook postBuild
  '';

  postBuild = "npm prune --omit=dev";

  doDist = false;
}

the problem I'm trying to solve is pruning devDependencies

just use yarn install --offline --frozen-lockfile --ignore-engines rather than trying to yarn build and then using npm
16:06:03

Show newer messages


Back to Room ListRoom Version: 6