tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
asar: remove mkYarnPackage usage
TomaSajt
1 year ago
f6d7ec1f
90c106c6
+13
-84
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
as
asar
package.json
package.nix
-62
pkgs/by-name/as/asar/package.json
···
1
1
-
{
2
2
-
"name": "@electron/asar",
3
3
-
"description": "Creating Electron app packages",
4
4
-
"version": "0.0.0-development",
5
5
-
"main": "./lib/asar.js",
6
6
-
"types": "./lib/index.d.ts",
7
7
-
"bin": {
8
8
-
"asar": "./bin/asar.js"
9
9
-
},
10
10
-
"files": [
11
11
-
"bin",
12
12
-
"lib",
13
13
-
"lib/index.d.ts"
14
14
-
],
15
15
-
"engines": {
16
16
-
"node": ">=10.12.0"
17
17
-
},
18
18
-
"license": "MIT",
19
19
-
"homepage": "https://github.com/electron/asar",
20
20
-
"repository": {
21
21
-
"type": "git",
22
22
-
"url": "https://github.com/electron/asar.git"
23
23
-
},
24
24
-
"bugs": {
25
25
-
"url": "https://github.com/electron/asar/issues"
26
26
-
},
27
27
-
"scripts": {
28
28
-
"mocha": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec",
29
29
-
"test": "npm run lint && npm run mocha",
30
30
-
"lint": "tsd && standard",
31
31
-
"standard": "standard",
32
32
-
"tsd": "tsd"
33
33
-
},
34
34
-
"standard": {
35
35
-
"env": {
36
36
-
"mocha": true
37
37
-
},
38
38
-
"globals": [
39
39
-
"BigInt"
40
40
-
]
41
41
-
},
42
42
-
"tsd": {
43
43
-
"directory": "test"
44
44
-
},
45
45
-
"dependencies": {
46
46
-
"chromium-pickle-js": "^0.2.0",
47
47
-
"commander": "^5.0.0",
48
48
-
"glob": "^7.1.6",
49
49
-
"minimatch": "^3.0.4"
50
50
-
},
51
51
-
"devDependencies": {
52
52
-
"@continuous-auth/semantic-release-npm": "^3.0.0",
53
53
-
"electron": "^22.0.0",
54
54
-
"electron-mocha": "^11.0.2",
55
55
-
"lodash": "^4.17.15",
56
56
-
"mocha": "^10.1.0",
57
57
-
"rimraf": "^3.0.2",
58
58
-
"standard": "^14.3.3",
59
59
-
"tsd": "^0.25.0",
60
60
-
"xvfb-maybe": "^0.2.1"
61
61
-
}
62
62
-
}
+13
-22
pkgs/by-name/as/asar/package.nix
···
1
1
{
2
2
lib,
3
3
-
mkYarnPackage,
3
3
+
stdenv,
4
4
fetchFromGitHub,
5
5
fetchYarnDeps,
6
6
+
yarnConfigHook,
7
7
+
yarnInstallHook,
8
8
+
nodejs,
6
9
}:
7
10
8
8
-
mkYarnPackage rec {
11
11
+
stdenv.mkDerivation (finalAttrs: {
9
12
pname = "asar";
10
13
version = "3.2.4";
11
14
12
15
src = fetchFromGitHub {
13
16
owner = "electron";
14
17
repo = "asar";
15
15
-
rev = "v${version}";
18
18
+
tag = "v${finalAttrs.version}";
16
19
hash = "sha256-12FP8VRDo1PQ+tiN4zhzkcfAx9zFs/0MU03t/vFo074=";
17
20
};
18
21
19
19
-
packageJSON = ./package.json;
20
20
-
21
22
offlineCache = fetchYarnDeps {
22
22
-
yarnLock = "${src}/yarn.lock";
23
23
+
yarnLock = "${finalAttrs.src}/yarn.lock";
23
24
hash = "sha256-/fV3hd98pl46+fgmiMH9sDQrrZgdLY1oF9c3TaIxRSg=";
24
25
};
25
26
26
26
-
doDist = false;
27
27
-
28
28
-
installPhase = ''
29
29
-
runHook preInstall
30
30
-
31
31
-
mkdir -p "$out/lib/node_modules"
32
32
-
mv deps/@electron "$out/lib/node_modules"
33
33
-
rm "$out/lib/node_modules/@electron/asar/node_modules"
34
34
-
mv node_modules "$out/lib/node_modules/@electron/asar"
35
35
-
36
36
-
mkdir "$out/bin"
37
37
-
ln -s "$out/lib/node_modules/@electron/asar/bin/asar.js" "$out/bin/asar"
38
38
-
39
39
-
runHook postInstall
40
40
-
'';
27
27
+
nativeBuildInputs = [
28
28
+
yarnConfigHook
29
29
+
yarnInstallHook
30
30
+
nodejs
31
31
+
];
41
32
42
33
meta = {
43
34
description = "Simple extensive tar-like archive format with indexing";
···
46
37
mainProgram = "asar";
47
38
maintainers = with lib.maintainers; [ xvapx ];
48
39
};
49
49
-
}
40
40
+
})