| 25 Oct 2023 |
Lily Foster | except for the outputs/$out for the current derivation, of course | 13:57:29 |
@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 Foster | okay yeah it's trying to download sharp instead of build it | 14:00:04 |
Lily Foster | you have nativeBuildInputs = [ python3 pkg-config ]; buildInputs = [ vips ]; in your buildNpmPackage call? | 14:00:43 |
@ThorHop:matrix.org | with pkgs; | 14:01:54 |
@ThorHop:matrix.org | but yes | 14:02:06 |
Lily Foster | can you share your whole derivation then? | 14:02:21 |
@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 | ehr... that last installPhase needs updating ^^; | 14:03:21 |
Lily Foster | can you share your package.json and package-lock.json too? Or maybe the repo if it's public? | 14:03:23 |
Lily Foster | just so i can poke | 14:04:01 |
@ThorHop:matrix.org | Sure ^^; haven't released it on git, so bear with the codespam: | 14:04:15 |
@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 | That's a lot of cruft -.-; | 14:05:14 |
@ThorHop:matrix.org | Wondering 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 | I 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 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 Foster | or if you just want to dm a tarball so i can build that works. whatever is easiest for you | 14:09:22 |
Lily 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 | yey ^^ | 14:10:23 |
| 27 Oct 2023 |
| Federico Damián Schonborn changed their profile picture. | 01:24:02 |
| Emma [it/its] ⚡️ joined the room. | 21:58:15 |
| 31 Oct 2023 |
Emma [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 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 [it/its] ⚡️ | https://github.com/NixOS/nixpkgs/pull/222939/files#diff-cc2f60d50c60395c8a53b2140e8e18eaadce9e455dc5f9ed0ae09a38fba24a95R31-R37 | 10:39:01 |
Lily Foster | oh this is mkYarnPackage | 10:39:37 |
Lily Foster | You gotta copy the package.json into nixpkgs | 10:39:46 |
Lily Foster | it's dumb | 10:39:50 |
Emma [it/its] ⚡️ | theres no way around that? | 10:40:01 |
Lily Foster | not really without patching yarn2nix (which i started to do, but i guess i never finished and PR'd it) | 10:40:38 |