!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

205 Members
59 Servers

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


SenderMessageTime
9 Aug 2023
@countoren:matrix.orgcountorenor non strightforawd at least23:31:29
@lily:lily.flowersLily Foster Which can be done, but there's no concept of "replacing" specifically in buildNpmPackage (since you'd just be patching the upstream files before buildNpmPackage even sees it) 23:31:51
@lily:lily.flowersLily Foster (I mean similar would be true of node2nix as well) 23:31:59
@lily:lily.flowersLily Foster * If they need to be replaced then the package.json and/or package-lock.json files need to be patched 23:32:20
@lily:lily.flowersLily Foster * If they need to be replaced then the package-lock.json and possibly package.json files need to be patched 23:32:34
@countoren:matrix.orgcountorenyes, but it will be easier to store and compose the tars like what I did with node2nix23:33:01
@countoren:matrix.orgcountorenin nix expressions23:33:05
@countoren:matrix.orgcountorennpm pack to get the private tars23:33:21
@countoren:matrix.orgcountorenand then just replace them in sources of node2nix23:33:32
@countoren:matrix.orgcountorenbut I guess there should be a way to do it in the package-lock23:34:04
@lily:lily.flowersLily Foster Like editing the .nix file output of running node2nix? 23:34:08
@countoren:matrix.orgcountorenyes23:34:17
@countoren:matrix.orgcountorenno23:34:22
@countoren:matrix.orgcountorensorry23:34:24
@lily:lily.flowersLily FosterApologies, I'm still having trouble grasping what exactly it is you are attempting here 😅23:34:47
@countoren:matrix.orgcountorenI didnt edit the genereated one I added those when composing them in the flake23:34:59
@countoren:matrix.orgcountoren:) nvm i think if the token will work there is a good chance that it will solve my problem23:35:31
@countoren:matrix.orgcountoren

but as a reference this is my composed node2nix:

    globalBuildInputsSet = import ./server/supplement.nix {
		inherit nodeEnv;
		inherit (pkgs) stdenv lib nix-gitignore fetchurl fetchgit;
	};
    globalBuildInputs = pkgs.lib.attrValues globalBuildInputsSet;
	nodeEnv = import ./server/node-env.nix {
	  nodejs = nodejs13;
	  inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
	  inherit pkgs;
	  libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
	};
	client = (import ./server/node-packages.nix {
	    inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
	    inherit globalBuildInputs nodeEnv;
        sourcesOverride = srcs:
        srcs // {
          "@fortawesome/pro-light-svg-icons-5.14.0" = srcs."@fortawesome/pro-light-svg-icons-5.14.0" // {
        	  src = ./server/fortawesome-pro-light-svg-icons-5.14.0.tgz;
          };
          "@fortawesome/pro-solid-svg-icons-5.14.0" = srcs."@fortawesome/pro-solid-svg-icons-5.14.0" // {
        	  src = ./server/fortawesome-pro-solid-svg-icons-5.14.0.tgz;
          };
          "@fortawesome/fontawesome-common-types-0.2.30" = srcs."@fortawesome/fontawesome-common-types-0.2.30" // {
        	  src = ./server/fortawesome-fontawesome-common-types-0.2.30.tgz;
          };
          "@fortawesome/fontawesome-svg-core-1.2.30" = srcs."@fortawesome/fontawesome-svg-core-1.2.30" // {
        	  src = ./server/fortawesome-fontawesome-svg-core-1.2.30.tgz;
          };
          "@fortawesome/angular-fontawesome-0.5.0" = srcs."@fortawesome/angular-fontawesome-0.5.0" // {
        	  src = ./server/fortawesome-angular-fontawesome-0.5.0.tgz;
          };
        };
       });
23:36:32
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
:) nvm i think if the token will work there is a good chance that it will solve my problem
Alright, let me know and I'll send a PR so we can get it into nixpkgs. Keep in mind buildNpmPackage/fetchNpmDeps needs a FOD hash for now separate from the package-lock.json (but one day we want a importNpmLockfile kinda like what Rust has with importCargoLock which would avoid the need for that FOD hash in most scenarios)
23:37:09
@countoren:matrix.orgcountorenwhat is FOD ? first time seeing this abrv :)23:38:30

Show newer messages


Back to Room ListRoom Version: 6