-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251705 from dotlambda/asar-buildNpmPackage
asar: use buildNpmPackage
- Loading branch information
Showing
16 changed files
with
134 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ lib | ||
, mkYarnPackage | ||
, fetchFromGitHub | ||
, fetchYarnDeps | ||
}: | ||
|
||
mkYarnPackage rec { | ||
pname = "asar"; | ||
version = "3.2.4"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "electron"; | ||
repo = "asar"; | ||
rev = "v${version}"; | ||
hash = "sha256-12FP8VRDo1PQ+tiN4zhzkcfAx9zFs/0MU03t/vFo074="; | ||
}; | ||
|
||
packageJSON = ./package.json; | ||
|
||
offlineCache = fetchYarnDeps { | ||
yarnLock = "${src}/yarn.lock"; | ||
hash = "sha256-/fV3hd98pl46+fgmiMH9sDQrrZgdLY1oF9c3TaIxRSg="; | ||
}; | ||
|
||
doDist = false; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p "$out/lib/node_modules" | ||
mv deps/@electron "$out/lib/node_modules" | ||
rm "$out/lib/node_modules/@electron/asar/node_modules" | ||
mv node_modules "$out/lib/node_modules/@electron/asar" | ||
mkdir "$out/bin" | ||
ln -s "$out/lib/node_modules/@electron/asar/bin/asar.js" "$out/bin/asar" | ||
runHook postInstall | ||
''; | ||
|
||
meta = { | ||
description = "Simple extensive tar-like archive format with indexing"; | ||
homepage = "https://github.com/electron/asar"; | ||
license = lib.licenses.mit; | ||
mainProgram = "asar"; | ||
maintainers = with lib.maintainers; [ xvapx ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "@electron/asar", | ||
"description": "Creating Electron app packages", | ||
"version": "0.0.0-development", | ||
"main": "./lib/asar.js", | ||
"types": "./lib/index.d.ts", | ||
"bin": { | ||
"asar": "./bin/asar.js" | ||
}, | ||
"files": [ | ||
"bin", | ||
"lib", | ||
"lib/index.d.ts" | ||
], | ||
"engines": { | ||
"node": ">=10.12.0" | ||
}, | ||
"license": "MIT", | ||
"homepage": "https://github.com/electron/asar", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/electron/asar.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/electron/asar/issues" | ||
}, | ||
"scripts": { | ||
"mocha": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec", | ||
"test": "npm run lint && npm run mocha", | ||
"lint": "tsd && standard", | ||
"standard": "standard", | ||
"tsd": "tsd" | ||
}, | ||
"standard": { | ||
"env": { | ||
"mocha": true | ||
}, | ||
"globals": [ | ||
"BigInt" | ||
] | ||
}, | ||
"tsd": { | ||
"directory": "test" | ||
}, | ||
"dependencies": { | ||
"chromium-pickle-js": "^0.2.0", | ||
"commander": "^5.0.0", | ||
"glob": "^7.1.6", | ||
"minimatch": "^3.0.4" | ||
}, | ||
"devDependencies": { | ||
"@continuous-auth/semantic-release-npm": "^3.0.0", | ||
"electron": "^22.0.0", | ||
"electron-mocha": "^11.0.2", | ||
"lodash": "^4.17.15", | ||
"mocha": "^10.1.0", | ||
"rimraf": "^3.0.2", | ||
"standard": "^14.3.3", | ||
"tsd": "^0.25.0", | ||
"xvfb-maybe": "^0.2.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters