| 19 May 2023 |
Ambroisie | Ça se fait assez bien en général buildNpmPackage et mkYarnPackage pour yarn | 17:09:45 |
Ambroisie | Même si j'ai déjà du faire des bêtises à cause de problèmes dans le deuxième, dans le passé (voir ma PR initiale de tandoor-recipes) | 17:10:21 |
Bruno Adele | https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/applications/misc/terminal-stocks/default.nix#L20 | 17:10:59 |
Bruno Adele | Ce modèle me semble bien non ? | 17:11:18 |
Ambroisie | Yup, c'est assez simple d'utilisation normalement | 17:15:23 |
Ambroisie | Si y'a des problèmes, je pourrai éventuellement jeter un œil à un WIP ;) | 17:15:55 |
Bruno Adele | En fait je me suis fais avoir, j'ai cherché depuis nix package search par exemple le paquet peerflix ca me retourné ici => https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/node-packages/node-packages.nix#L132799 | 17:16:56 |
Bruno Adele | Mais en effet comme la dit raitobezarius Ca semble aussi simple que buildGoModule. Je vous tiens au courant de mon avancé, merci Ambroisie | 17:17:42 |
Ambroisie | No problem | 17:17:57 |
raitobezarius | In reply to @badele:matrix.org
j'ai bien vu buildNpmPackage mais c'est les nombreuses dépendances qui me font peur, node2nix m'a semble t'il sortir 45 dépendences, j'ai vérifié avec la commande suivante
cat node-packages.nix | grep '"@' | wc -l
45
Note: Je précise, je n'ai jamais fait de node
bienvenue en enfer | 17:18:00 |
raitobezarius | Node est comme ça hélas :) | 17:18:11 |
raitobezarius | une simple function est un paquet dans cet ecosystème bordel | 17:18:24 |
raitobezarius | sans parler que NPM casse tout à chaque release | 17:18:37 |
Ambroisie | Ça encore, bien que ça soit un enfer, ça peut être manageable | 17:18:56 |
Ambroisie | Ce qui rend fou c'est que y'a pas un seul package manager qui fasse tout comme il faut | 17:19:12 |
Ambroisie | Et ils semblent en inventer un nouveau tout les 6 mois (y'a que Python qui atteint un même niveau) 🙃 | 17:19:48 |
Bruno Adele |  Download 2023-05-19_19-27.png | 17:28:13 |
Bruno Adele | Les embrouilles commencent :) | 17:28:20 |
Bruno Adele | { lib, buildNpmPackage, fetchFromGitHub, nix-update-script }:
buildNpmPackage rec {
pname = "tetra-kit-player";
version = "2023-05-19";
src = fetchFromGitHub {
owner = "sonictruth";
repo = pname;
rev = "ea258fcfeb0ff43bf1d8911d3a7c7c6326e11750";
sha256 = "sha256-3TjbVv3MEpKUITPxB1xvTTGLAq7hbOSJzu486AVkzAM=";
};
# prefetch-npm-deps package-lock.json
npmDepsHash = "sha256-DWjzQF55dDUOFqPxJIwuWIgS2mQqWhQ6CuAUVYFqTUo=";
dontNpmBuild = true;
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "TKP is web application that streams events and files produced by tetra kit.";
homepage = "https://github.com/sonictruth/tetra-kit-player";
license = licenses.isc;
};
}
Mon package
| 17:29:02 |
Bruno Adele | * { lib, buildNpmPackage, fetchFromGitHub, nix-update-script }:
buildNpmPackage rec {
pname = "tetra-kit-player";
version = "2023-05-19";
src = fetchFromGitHub {
owner = "sonictruth";
repo = pname;
rev = "ea258fcfeb0ff43bf1d8911d3a7c7c6326e11750";
sha256 = "sha256-3TjbVv3MEpKUITPxB1xvTTGLAq7hbOSJzu486AVkzAM=";
};
# prefetch-npm-deps package-lock.json
npmDepsHash = "sha256-DWjzQF55dDUOFqPxJIwuWIgS2mQqWhQ6CuAUVYFqTUo=";
dontNpmBuild = true;
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "TKP is web application that streams events and files produced by tetra kit.";
homepage = "https://github.com/sonictruth/tetra-kit-player";
license = licenses.isc;
};
}
Mon package, y'a 2 ou 3 options, que je vérifierais après (je pense que certaines ne sont pas nécéssaires
| 17:29:43 |
raitobezarius | c'est un vieux package-lock | 17:35:36 |
raitobezarius | je sais plus si on peut filer nous même le supplemental data maintenant | 17:35:54 |
raitobezarius | sinon tu peux filer ton propre package-lock.json en le regen | 17:36:01 |
Bruno Adele | r)Tu as la commande pour le regen ? (si tu connais, sinon je vais cherche | 17:36:27 |
Bruno Adele | * Tu as la commande pour le regen ? (si tu connais, sinon je vais chercher) | 17:36:38 |
raitobezarius | rm package-lock.json; npm install avec un npm récent? | 17:36:45 |
Bruno Adele |  Download 2023-05-19_19-40.png | 17:40:59 |
Bruno Adele | Hum, ca fait beaucoup de deprecated | 17:41:00 |
raitobezarius | :) | 17:43:33 |
Bruno Adele | raitobezarius: Visiblement il faut utiliser ceci
postPatch = ''
cp ${./package-lock.json} ./package-lock.json
'';
Je vais tester
| 17:52:18 |