tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
jdenticon-cli: init at 3.3.0
Victor Nascimento Bakke
6 months ago
c221fb1b
09899697
+52
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
jd
jdenticon-cli
package.nix
+52
pkgs/by-name/jd/jdenticon-cli/package.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
buildNpmPackage,
4
4
+
fetchFromGitHub,
5
5
+
nodejs,
6
6
+
makeWrapper,
7
7
+
versionCheckHook,
8
8
+
nix-update-script,
9
9
+
}:
10
10
+
buildNpmPackage (finalAttrs: {
11
11
+
pname = "jdenticon-cli";
12
12
+
version = "3.3.0";
13
13
+
src = fetchFromGitHub {
14
14
+
owner = "dmester";
15
15
+
repo = "jdenticon";
16
16
+
tag = finalAttrs.version;
17
17
+
hash = "sha256-uOPNsfEreC7F+Y0WWmudZSPnGxqarna0JPOwQyK6LiQ=";
18
18
+
};
19
19
+
npmDepsHash = "sha256-LXwvb088oHmA57EryfYtKi0L/9sB+yyUr/K/qGA1W9k=";
20
20
+
21
21
+
nativeBuildInputs = [
22
22
+
makeWrapper
23
23
+
nodejs
24
24
+
];
25
25
+
26
26
+
installPhase = ''
27
27
+
runHook preInstall
28
28
+
29
29
+
install -D bin/jdenticon.js "$out/lib/jdenticon/bin/jdenticon.js"
30
30
+
install -D dist/jdenticon-node.js "$out/lib/jdenticon/dist/jdenticon-node.js"
31
31
+
install -d "$out/lib/jdenticon/node_modules"
32
32
+
cp -r node_modules/canvas-renderer "$out/lib/jdenticon/node_modules"
33
33
+
makeWrapper "${lib.getExe nodejs}" "$out/bin/jdenticon" \
34
34
+
--add-flags "$out/lib/jdenticon/bin/jdenticon.js"
35
35
+
36
36
+
runHook postInstall
37
37
+
'';
38
38
+
39
39
+
doInstallCheck = true;
40
40
+
nativeInstallCheckInputs = [ versionCheckHook ];
41
41
+
42
42
+
passthru.updateScript = nix-update-script { };
43
43
+
44
44
+
meta = {
45
45
+
changelog = "https://github.com/dmester/jdenticon/releases/tag/${finalAttrs.version}";
46
46
+
description = "JavaScript library for generating highly recognizable identicons using HTML5 canvas or SVG.";
47
47
+
homepage = "https://jdenticon.com/";
48
48
+
license = lib.licenses.mit;
49
49
+
maintainers = [ lib.maintainers.gipphe ];
50
50
+
mainProgram = "jdenticon";
51
51
+
};
52
52
+
})