diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index f229453faa7b..f4198f10b115 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9368,6 +9368,12 @@ githubId = 471835; name = "Giorgio Gallo"; }; + gipphe = { + email = "gipphe@gmail.com"; + github = "Gipphe"; + githubId = 2266817; + name = "Victor Nascimento Bakke"; + }; GirardR1006 = { email = "julien.girard2@cea.fr"; github = "GirardR1006"; diff --git a/pkgs/by-name/jd/jdenticon-cli/package.nix b/pkgs/by-name/jd/jdenticon-cli/package.nix new file mode 100644 index 000000000000..bc91523e6f6d --- /dev/null +++ b/pkgs/by-name/jd/jdenticon-cli/package.nix @@ -0,0 +1,52 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, + nodejs, + makeWrapper, + versionCheckHook, + nix-update-script, +}: +buildNpmPackage (finalAttrs: { + pname = "jdenticon-cli"; + version = "3.3.0"; + src = fetchFromGitHub { + owner = "dmester"; + repo = "jdenticon"; + tag = finalAttrs.version; + hash = "sha256-uOPNsfEreC7F+Y0WWmudZSPnGxqarna0JPOwQyK6LiQ="; + }; + npmDepsHash = "sha256-LXwvb088oHmA57EryfYtKi0L/9sB+yyUr/K/qGA1W9k="; + + nativeBuildInputs = [ + makeWrapper + nodejs + ]; + + installPhase = '' + runHook preInstall + + install -D bin/jdenticon.js "$out/lib/jdenticon/bin/jdenticon.js" + install -D dist/jdenticon-node.js "$out/lib/jdenticon/dist/jdenticon-node.js" + install -d "$out/lib/jdenticon/node_modules" + cp -r node_modules/canvas-renderer "$out/lib/jdenticon/node_modules" + makeWrapper "${lib.getExe nodejs}" "$out/bin/jdenticon" \ + --add-flags "$out/lib/jdenticon/bin/jdenticon.js" + + runHook postInstall + ''; + + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + changelog = "https://github.com/dmester/jdenticon/releases/tag/${finalAttrs.version}"; + description = "JavaScript library for generating highly recognizable identicons using HTML5 canvas or SVG."; + homepage = "https://jdenticon.com/"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.gipphe ]; + mainProgram = "jdenticon"; + }; +})