!vxTmkuJzhGPsMdkAOc:transformierende-gesellschaft.org

NixOS Matrix Subsystem

150 Members
Coordination and discussion about the matrix subsystem in NixOS - https://wiki.nixos.org/wiki/Matrix74 Servers

Load older messages


SenderMessageTime
29 Sep 2022
@kity:kity.wtfproblems joined the room.17:00:36
@magnetophon:matrix.org@magnetophon:matrix.org left the room.18:40:05
@sandro:supersandro.deSandro 🐧
In reply to @dandellion:dodsorf.as
Sandro 🐧: Did you resolve https://github.com/NixOS/nixpkgs/pull/190950#issuecomment-1261473229 ? I'm getting the same message
I've unset NODE_OPTIONS in my hook for the node command run there. I think any node program running in the env after setting NODE_OPTIONS breaks but didn't deeply test this.
21:52:16
30 Sep 2022
@winterqt:nixos.devWinter (she/her)
In reply to @sandro:supersandro.de
I've unset NODE_OPTIONS in my hook for the node command run there. I think any node program running in the env after setting NODE_OPTIONS breaks but didn't deeply test this.
what hook, what do you mean? were you modifying the package in some way or something?
03:14:54
@winterqt:nixos.devWinter (she/her)curious ^^03:14:58
@sandro:supersandro.deSandro 🐧
In reply to @winterqt:nixos.dev
what hook, what do you mean? were you modifying the package in some way or something?
yes, I am precompressing web assets with brotli and zstd
12:19:27
@sandro:supersandro.deSandro 🐧
In reply to @winterqt:nixos.dev
what hook, what do you mean? were you modifying the package in some way or something?
* yes a custom hook, I am precompressing web assets with brotli and zstd
12:19:33
@winterqt:nixos.devWinter (she/her)

ah

can i see it (the old version at least)/get steps to reproduce your issue? want to debug why that's happening :)

12:20:39
@sandro:supersandro.deSandro 🐧

Add that to nativeBuildInputs of packages and then svgo should complain when NODE_OPTIONS is set.

  compress-website = callPackage
    ({ }: makeSetupHook
      {
        name = "compress-website";
        deps = [ nodePackages.svgo ];
      } ./compress-website.sh)
    { };
fixupOutputHooks+=('compressWebsite "$prefix"')

compressWebsite() {
  time svgo "$1"
}
12:32:12
@winterqt:nixos.devWinter (she/her)
In reply to @sandro:supersandro.de

Add that to nativeBuildInputs of packages and then svgo should complain when NODE_OPTIONS is set.

  compress-website = callPackage
    ({ }: makeSetupHook
      {
        name = "compress-website";
        deps = [ nodePackages.svgo ];
      } ./compress-website.sh)
    { };
fixupOutputHooks+=('compressWebsite "$prefix"')

compressWebsite() {
  time svgo "$1"
}
i'll take a look, thanks.
12:33:04
@winterqt:nixos.devWinter (she/her)Dendrite 0.10.0 is out.12:33:09
@winterqt:nixos.devWinter (she/her)Adds support for full text search -- will require updates to the module to add the options for this.12:33:29
@winterqt:nixos.devWinter (she/her)I can do the update in a few hours, if nobody else does by then.12:33:44
@winterqt:nixos.devWinter (she/her) also wait Sandro 🐧 what were you setting NODE_OPTIONS to? that's not in the version of the hoon you sent, so i don't think it'll reproduce this issue 12:34:23
@winterqt:nixos.devWinter (she/her)(i don't see what you'd be setting it to)12:36:43
@dandellion:dodsorf.asDandellionI was getting it by setting the node option in an overrideatttrs configurephase12:37:16
@winterqt:nixos.devWinter (she/her)what are you setting node_options to12:37:32
@winterqt:nixos.devWinter (she/her)(plus i don't see why svgo would complain about node_options now if it worked before, sandro -- did you only recently add the node_options setting?)12:40:02
@dandellion:dodsorf.asDandellionhttps://github.com/NixOS/nixpkgs/blob/8039b055f8ef0693724a9909145f3daf5d762da5/pkgs/applications/networking/instant-messengers/element/element-web.nix#L4912:41:40
@winterqt:nixos.devWinter (she/her)

Dandellion: https://github.com/nodejs/node/blob/2849283c4cebbfbf523cc24303941dc36df9332f/src/node_options.cc#L924

so it is allowed in NODE_OPTIONS, which is evident by the package building.

what was your overlay? how can i reproduce this?

12:46:43
@winterqt:nixos.devWinter (she/her)i'm confused, that option has always been allowed to be set in NODE_OPTIONS, which is evident by it working in element-web12:48:32
@winterqt:nixos.devWinter (she/her)so yes i'd appreciate a reproducible example :)12:49:12
@winterqt:nixos.devWinter (she/her)i have like, one theory that would explain it, hm12:50:03
@dandellion:dodsorf.asDandellion It seems it was me using pkgs.fixup_yarn_lock rather than pkgs.unstable.fixup_yarn_lock 13:01:20
@winterqt:nixos.devWinter (she/her)Is it possible for you send a reproducible example? Just want to see if my theory is correct.13:02:56
@dandellion:dodsorf.asDandellion
configurePhase = ''
        runHook preConfigure
        export HOME=$PWD/tmp
        export NODE_OPTIONS=--openssl-legacy-provider
        mkdir -p $HOME
        ${pkgs.fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock
        yarn config --offline set yarn-offline-mirror $offlineCache
        yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
        patchShebangs node_modules
        # Replace with my matrix-react-sdk
        rm -rf node_modules/matrix-react-sdk
        ln -s ${matrix-react-sdk} node_modules/matrix-react-sdk
        runHook postConfigure
      '';

based on summerevans stuff

13:05:23
@dandellion:dodsorf.asDandellion

with matrix-react-sdk being a callPackaged:

{ lib
, stdenv
, fetchpatch
, fetchFromGitHub
, fetchYarnDeps
, writeText
, jq
, yarn
, fixup_yarn_lock
, nodejs
}: stdenv.mkDerivation rec {
  pname = "matrix-react-sdk";
  version = "3.57.0";

  src = fetchFromGitHub {
    owner = "matrix-org";
    repo = "matrix-react-sdk";
    rev = "v${version}";
    sha256 = "sha256-duwjxaS4dKn/GbgykqLdQAjXeBG8kt5dhGa+O9iJacg=";
  };

  offlineCache = fetchYarnDeps {
    yarnLock = src + "/yarn.lock";
    sha256 = "sha256-Y/0hyLO78e4KGMfoCRy6bF7tU6rn6LwEcDt5afWTR6U=";
  };

  patches = [
    # All of my patches to matrix-react-sdk
    (fetchpatch {
      url = "https://github.com/sumnerevans/matrix-react-sdk/commit/ed00c00901c1741042162924bba5e800eee71402.patch";
      sha256 = "sha256-YNXRGlTDhYdIeciVRNkERqg366OYVgUaQWFAY9aP1p4=";
    })
  ];

  nativeBuildInputs = [ yarn fixup_yarn_lock jq nodejs ];

  configurePhase = ''
    runHook preConfigure

    export HOME=$PWD/tmp
    mkdir -p $HOME

    fixup_yarn_lock yarn.lock
    yarn config --offline set yarn-offline-mirror $offlineCache
    yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
    patchShebangs node_modules

    runHook postConfigure
  '';

  buildPhase = ''
    runHook preBuild
    node_modules/.bin/babel -d lib --verbose --extensions \".ts,.js,.tsx\" src
    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall
    cp -R . $out
    runHook postInstall
  '';
}
13:07:04
@sandro:supersandro.deSandro 🐧
In reply to @winterqt:nixos.dev
also wait Sandro 🐧 what were you setting NODE_OPTIONS to? that's not in the version of the hoon you sent, so i don't think it'll reproduce this issue
The crash was in element where it is set to NODE_OPTIONS=--openssl-legacy-provider https://github.com/NixOS/nixpkgs/commit/2e3e0081e5e843599aaa8f7128d2a139bda7dbca
13:07:10
@dandellion:dodsorf.asDandellionit is probably just stable node being a different version than unstable node13:09:01
@winterqt:nixos.devWinter (she/her)
In reply to @sandro:supersandro.de
The crash was in element where it is set to NODE_OPTIONS=--openssl-legacy-provider https://github.com/NixOS/nixpkgs/commit/2e3e0081e5e843599aaa8f7128d2a139bda7dbca
Oh so did you fix it by unsetting it?
13:09:22

Show newer messages


Back to Room ListRoom Version: 4