| 18 Sep 2025 |
Marie | no, buildNpmPackage already uses that | 09:44:58 |
mmkaram | ahhh okay | 09:44:59 |
mmkaram | should I put a comment or something explaing why I did that or is it implied | 09:45:11 |
mmkaram | * should I put a comment or something explaining why I did that or is it implied | 09:45:16 |
Marie | comment is a good idea | 09:45:33 |
mmkaram | thank you for your help so far Marie! | 09:45:53 |
mmkaram | I got the new package-lock.json but I'm still getting that error:
> npm error code ENOTCACHED
> npm error request to https://registry.npmjs.org/universal-user-agent failed: cache mode is 'only-if-cached' but no cached response is available.
> npm error A complete log of this run can be found in: /build/cache/_logs/2025-09-18T10_22_07_289Z-debug-0.log
>
with my package.nix:
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "prisma-language-server";
version = "6.16.2";
src = fetchFromGitHub {
owner = "prisma";
repo = "language-tools";
tag = "${finalAttrs.version}";
hash = "sha256-UZP0pLcbMeaYI0ytOJ68l/ZEC9dBhohJZyTU99p+1QM=";
};
npmPackFlags = [ "--ignore-scripts" ];
makeCacheWritable = true;
# The original lockfile from the upstream source is broken,
# so we need to use a rebuilt version of the package-lock file.
postPatch = ''
cp ${./package-lock.json} package-lock.json
'';
npmDepsHash = "sha256-QMxu2AWGRQ2semp6BmOQbM7Pw/pS0mgx0P0hr60SjPs=";
NODE_OPTIONS = "--openssl-legacy-provider";
meta = {
description = "";
homepage = "https://github.com/prisma/language-tools#readme";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ mmkaram ];
};
})
| 10:23:07 |
Marie | did you update npmDepsHash? | 10:38:01 |
mmkaram | yep | 10:38:57 |
Marie | but it's the same as here, no? | 10:39:45 |
mmkaram | old one is QMxu
new one is XouMk | 10:40:23 |
mmkaram | oh worry I pasted the old version | 10:40:38 |
mmkaram | the version in my editor has the new one that's mb | 10:40:44 |
mmkaram | * oh sorry I pasted the old version | 10:40:50 |
mmkaram | also the error I get when the hash is wrong looks like this:
patching script interpreter paths in /nix/store/p2h78fcx52hwp92aj93p42zfgjf0q4ip-prisma-language-server-6.16.2-npm-deps
error: hash mismatch in fixed-output derivation '/nix/store/70y5ydbl5i3iil4zxl6dcgalr0wlx56r-prisma-language-server-6.16.2-npm-deps.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-XouMkRE1QQvr7keIF7q1jkCE21/O9jyRfbmqm820yas=
as opposed to the ENOTCACHED error I was talking about above
| 10:41:49 |
mmkaram | this is what I have so far:
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "prisma-language-server";
version = "6.16.2";
src = fetchFromGitHub {
owner = "prisma";
repo = "language-tools";
tag = "${finalAttrs.version}";
hash = "sha256-UZP0pLcbMeaYI0ytOJ68l/ZEC9dBhohJZyTU99p+1QM=";
};
# npmPackFlags = [ "--ignore-scripts" ];
# The original lockfile from the upstream source is broken,
# so we need to use a rebuilt version of the package-lock file.
postPatch = ''
cp ${./package-lock.json} package-lock.json
'';
npmDepsHash = "sha256-XouMkRE1QQvr7keIF7q1jkCE21/O9jyRfbmqm820yas=";
# NODE_OPTIONS = "--openssl-legacy-provider";
meta = {
description = "";
homepage = "https://github.com/prisma/language-tools#readme";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ mmkaram ];
};
})
| 10:42:02 |
Marie | I'm not sure why it doesn't like it | 10:44:00 |
mmkaram | maybe the package-lock is broken | 10:44:15 |
Marie | And I don't have the time right now to investigate, sorry :/ | 10:44:21 |
mmkaram | all good thank you for the help marie | 10:44:35 |
mmkaram | I fixed it! PR is live but even if I messed something up I'm still happy I'll just integrate it into my config:
https://github.com/NixOS/nixpkgs/pull/444038 | 14:35:14 |
| 19 Sep 2025 |
| bl1nk changed their profile picture. | 15:22:21 |
| bl1nk changed their profile picture. | 15:24:49 |
| mkg20001 changed their profile picture. | 17:21:36 |
Tomodachi94 (they/them) | In case you missed it on GitHub: this is queued to be merged. It will start trickling into channels soon (https://nixpk.gs is helpful for tracking that progression) | 23:27:53 |
| 23 Sep 2025 |
| kenji changed their display name from a-kenji to kenji. | 10:41:13 |
| Albert Larsan joined the room. | 11:34:42 |
Albert Larsan | Hello!
I'm packaging a cli tool that is managed using lerna. How do I make it fit the buildNodePackage ? (also the upstream doesn't provide a lock file) | 11:59:36 |
Albert Larsan | (it uses lerna v3 btw) | 12:01:42 |
Albert Larsan | I bypassed the issue by using the pre-built package on NPM. | 13:22:23 |