!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

209 Members
59 Servers

Load older messages


SenderMessageTime
25 Oct 2023
@ThorHop:matrix.org@ThorHop:matrix.orgor EACCESS: permission denied, mkdir '/nix/store/blablabla-package-npm-deps/_libvips'13:56:17
@lily:lily.flowersLily Fosteroh i guess it may return a spurious perm error when the dep fails to build. it's not anything to do with root access though and the core problem is the build failure13:56:25
@lily:lily.flowersLily Foster
In reply to @ThorHop:matrix.org
or EACCESS: permission denied, mkdir '/nix/store/blablabla-package-npm-deps/_libvips'
you can makeCacheWritable = true on the buildNpmPackage if it needs to write to the cache
13:56:50
@lily:lily.flowersLily Fosterit's never going to be able to write to a nix store path. they're read-only even for root13:57:09
@lily:lily.flowersLily Fosterexcept for the outputs/$out for the current derivation, of course13:57:29
@ThorHop:matrix.org@ThorHop:matrix.org Great! one step further. Now I'm getting the error "npm ERR! sharp: Installation error: getaddrinfo EAI_AGAIN github.com"... not sure if that's because I'm using nixos-rebuild --target-host.. works fine locally ^^; 13:59:26
@lily:lily.flowersLily Fosterokay yeah it's trying to download sharp instead of build it14:00:04
@lily:lily.flowersLily Foster you have nativeBuildInputs = [ python3 pkg-config ]; buildInputs = [ vips ]; in your buildNpmPackage call? 14:00:43
@ThorHop:matrix.org@ThorHop:matrix.orgwith pkgs;14:01:54
@ThorHop:matrix.org@ThorHop:matrix.orgbut yes14:02:06
@lily:lily.flowersLily Fostercan you share your whole derivation then?14:02:21
@ThorHop:matrix.org@ThorHop:matrix.org
{ pkgs, buildNpmPackage, lib, pkg-config, ... }:

buildNpmPackage {
  name = "gjenge-innleder";
  src = ./.;
  npmDepsHash = "sha256-0Xl7/rSVeUVXczy6fjB5tM9l3d2i38JbUx04UZvwFok=";

  nativeBuildInputs = with pkgs; [python3 pkg-config];
  buildInputs = with pkgs; [vips];
  makeCacheWritable = true;

  installPhase = ''
    mkdir -p $out/srv/htdoc/www
    cp -f -R dist/* $out/srv/htdoc/www
  '';
}
14:02:56
@ThorHop:matrix.org@ThorHop:matrix.orgehr... that last installPhase needs updating ^^;14:03:21
@lily:lily.flowersLily Fostercan you share your package.json and package-lock.json too? Or maybe the repo if it's public?14:03:23
@lily:lily.flowersLily Fosterjust so i can poke14:04:01
@ThorHop:matrix.org@ThorHop:matrix.orgSure ^^; haven't released it on git, so bear with the codespam:14:04:15
@ThorHop:matrix.org@ThorHop:matrix.org

Package.json:

{
  "name": "innleder",
  "type": "module",
  "version": "0.0.1",
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "astro preview",
    "astro": "astro"
  },
  "dependencies": {
    "@astrojs/tailwind": "^5.0.2",
    "astro": "^3.2.4",
    "tailwindcss": "^3.3.3"
  }
}
14:04:26
@ThorHop:matrix.org@ThorHop:matrix.org That's a lot of cruft -.-; 14:05:14
@ThorHop:matrix.org@ThorHop:matrix.orgWondering if there's a smarter way to package static nodejs files for NixOS than pulling in the entire nodejs build stack, but the concept of having both system packaging and nodejs packaging tested in the same process does appeal to me.14:05:44
@ThorHop:matrix.org@ThorHop:matrix.orgI mean it is kinda redonculous since I only want to distribute the static files as a package so I can refer to a store path in nix configs.14:07:08
@lily:lily.flowersLily Foster
In reply to @ThorHop:matrix.org

Package.json:

{
  "name": "innleder",
  "type": "module",
  "version": "0.0.1",
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "astro preview",
    "astro": "astro"
  },
  "dependencies": {
    "@astrojs/tailwind": "^5.0.2",
    "astro": "^3.2.4",
    "tailwindcss": "^3.3.3"
  }
}
Lockfile too?
14:08:58
@lily:lily.flowersLily Fosteror if you just want to dm a tarball so i can build that works. whatever is easiest for you14:09:22
@lily:lily.flowersLily Foster also one day we'll make it so you don't need npmDepsHash for same-repo derivations... it's on the list and will function similarly to importCargoLock from the rust tooling 14:10:02
@ThorHop:matrix.org@ThorHop:matrix.orgyey ^^14:10:23
27 Oct 2023
@federicodschonborn:matrix.orgFederico Damián Schonborn changed their profile picture.01:24:02
@emma:conduit.rory.gayEmma [it/its] ⚡️ joined the room.21:58:15
31 Oct 2023
@emma:conduit.rory.gayEmma [it/its] ⚡️question, how does one set up a reference to a package lock without using import-from-derivation (which isnt allowed in nixpkgs)?10:29:06
@lily:lily.flowersLily Foster
In reply to @emma:conduit.rory.gay
question, how does one set up a reference to a package lock without using import-from-derivation (which isnt allowed in nixpkgs)?
what kind of reference?
10:36:09
@emma:conduit.rory.gayEmma [it/its] ⚡️ https://github.com/NixOS/nixpkgs/pull/222939/files#diff-cc2f60d50c60395c8a53b2140e8e18eaadce9e455dc5f9ed0ae09a38fba24a95R31-R37 10:39:01
@lily:lily.flowersLily Fosteroh this is mkYarnPackage10:39:37

Show newer messages


Back to Room ListRoom Version: 6