8 , matrix-sdk-crypto-nodejs
15 pname = "matrix-appservice-irc";
18 src = fetchFromGitHub {
21 rev = "refs/tags/${version}";
22 hash = "sha256-Uq1sd1ZXv1JGjvCXHxBsNKvmdjMf4y4MVlOnCas4u/w=";
25 yarnOfflineCache = fetchYarnDeps {
26 name = "${pname}-${version}-offline-cache";
27 yarnLock = "${src}/yarn.lock";
28 hash = "sha256-PObpXC8VIdsqhOZLLeHdS9mvXnjNQOrs2vlTeK5keRw=";
33 inherit pname version src yarnOfflineCache;
41 nodejs.pkgs.node-gyp-build
47 export HOME=$(mktemp -d)
48 yarn config --offline set yarn-offline-mirror "$yarnOfflineCache"
49 fixup-yarn-lock yarn.lock
50 yarn install --frozen-lockfile --offline --no-progress --non-interactive --ignore-scripts
51 patchShebangs node_modules/ bin/
69 cp app.js config.schema.yml $out
70 cp -r bin lib public $out
72 # prune dependencies to production only
73 yarn install --frozen-lockfile --offline --no-progress --non-interactive --ignore-scripts --production
74 cp -r node_modules $out
76 # replace matrix-sdk-crypto-nodejs with nixos package
77 rm -rv $out/node_modules/@matrix-org/matrix-sdk-crypto-nodejs
78 ln -sv ${matrix-sdk-crypto-nodejs}/lib/node_modules/@matrix-org/matrix-sdk-crypto-nodejs $out/node_modules/@matrix-org/
83 passthru.tests.matrix-appservice-irc = nixosTests.matrix-appservice-irc;
84 passthru.updateScript = nix-update-script { };
87 changelog = "https://github.com/matrix-org/matrix-appservice-irc/releases/tag/${version}";
88 description = "Node.js IRC bridge for Matrix";
89 mainProgram = "matrix-appservice-irc";
90 maintainers = with maintainers; [ rhysmdnz ];
91 homepage = "https://github.com/matrix-org/matrix-appservice-irc";
92 license = licenses.asl20;
93 platforms = platforms.linux;