I try to build cline command line package with the following cline/default.nix file:
{
lib,
fetchFromGitHub,
buildNpmPackage,
...
}:
let
# Récupération du dépôt GitHub avec fetchFromGitHub
cline-src = fetchFromGitHub {
owner = "cline";
repo = "cline";
rev = "cli-build-a03642b"; # Tag ou commit spécifique
sha256 = "U8P654K0Sy4otcb5O6z1tXpp6gNz/1CUhGITLvL6dIA="; # Remplacez par le vrai hash SHA256
};
in
buildNpmPackage rec {
pname = "cline";
version = "2.0.5-a03642b";
src = cline-src;
npmDepsHash = "sha256-lEwazA23OceBVp+qt0MCfSCm5bDNXfyZIU+ibFQcyD8=";
npmPackFlags = [ "--ignore-scripts" ];
meta = with lib; {
description = "Package NixOS pour l'outil cline, construit à partir de la release cli-build-a03642b.";
homepage = "https://github.com/cline/cline";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}
I failed with the following error:
building '/nix/store/iy6ywfqkx99brvdg3yly0dj8f1b2v3nd-cline-2.0.5-a03642b.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/pbgjcdmn18i9d6wgh2p6ma9klgg1j8g9-source
source root is source
Running phase: patchPhase
Executing npmConfigHook
Configuring npm
Validating consistency between /build/source/package-lock.json and /nix/store/kjkqrj3558nsanxvfspjzlwayisky4vk-cline-2.0.5-a03642b-npm-deps/package-lock.json
Setting npm_config_cache to /nix/store/kjkqrj3558nsanxvfspjzlwayisky4vk-cline-2.0.5-a03642b-npm-deps
Installing dependencies
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: 'posthog-node@5.24.10',
npm warn EBADENGINE required: { node: '^20.20.0 || >=22.22.0' },
npm warn EBADENGINE current: { node: 'v22.18.0', npm: '10.9.3' }
npm warn EBADENGINE }
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated whatwg-encoding@3.1.1: Use @exodus/bytes instead for a more spec-conformant and faster implementation
npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@8.1.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated gauge@5.0.2: This package is no longer supported.
npm warn deprecated fstream@1.0.12: This package is no longer supported.
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm warn deprecated glob@11.1.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm error code ENOTCACHED
npm error request to https://registry.npmjs.org/dotenv failed: cache mode is 'only-if-cached' but no cached response is available.
npm error Log files were not written due to an error writing to the directory: /nix/store/kjkqrj3558nsanxvfspjzlwayisky4vk-cline-2.0.5-a03642b-npm-deps/_logs
npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
ERROR: npm failed to install dependencies
Here are a few things you can try, depending on the error:
1. Set `makeCacheWritable = true`
Note that this won't help if npm is complaining about not being able to write to the logs directory -- look above that for the actual error.
2. Set `npmFlags = [ "--legacy-peer-deps" ]`
error: builder for '/nix/store/iy6ywfqkx99brvdg3yly0dj8f1b2v3nd-cline-2.0.5-a03642b.drv' failed with exit code 1
I’m building package from my NixOS configuration on WSL-NixOS 25.05
Does anybody have idea what’s wrong or investigation path ?
PS. It is my first post here, sorry if I forget some environment details or post in wrong channel.