11 stdenv.mkDerivation (finalAttrs: {
13 version = "0-unstable-2024-06-30";
15 src = fetchFromGitHub {
18 rev = "5c875eb048e96543f1ec711fae522ace5e4a836c";
19 hash = "sha256-dlf4X+2W2GfL2E46ZM35PqpcoKHoZ4fhroOCLpye1D0=";
24 substituteInPlace ./src/updater/moduleUpdater.js \
25 --replace \'unzip\' \'${unzip}/bin/unzip\'
26 # Remove auto-update feature
27 echo "module.exports = async () => log('AsarUpdate', 'Removed');" > ./src/asarUpdate.js
33 bash scripts/injectPolyfills.sh
34 substituteInPlace src/index.js --replace 'nightly' '${finalAttrs.version}'
35 ${nodejs}/bin/node scripts/strip.js
36 ${asar}/bin/asar pack src app.asar
51 passthru.updateScript = unstableGitUpdater {
52 # Only has a "nightly" tag (untaged version 0.2 is latest) see https://github.com/GooseMod/OpenAsar/commit/8f79dcef9b1f7732421235a392f06e5bd7382659
53 hardcodeZeroVersion = true;
57 description = "Open-source alternative of Discord desktop's \"app.asar\"";
58 homepage = "https://openasar.dev";
59 license = licenses.agpl3Only;
60 maintainers = with maintainers; [
64 platforms = nodejs.meta.platforms;