1 { stdenv, fetchFromGitLab, pkgs, lib, nodejs_18, pkg-config
2 , libjpeg, pixman, cairo, pango, which, postgresql }:
9 src = fetchFromGitLab {
12 repo = "mx-puppet-discord";
14 hash = "sha256-ZhyjUt6Bz/0R4+Lq/IoY9rNjdwVE2qp4ZQLc684+T/0=";
17 myNodePackages = import ./node-composition.nix {
19 inherit (stdenv.hostPlatform) system;
22 in myNodePackages.package.override {
25 nativeBuildInputs = [ nodejs.pkgs.node-pre-gyp nodejs.pkgs.node-gyp-build pkg-config which ];
26 buildInputs = [ libjpeg pixman cairo pango postgresql ];
29 # Build typescript stuff
34 # Make an executable to run the server
36 cat <<EOF > $out/bin/mx-puppet-discord
38 exec ${nodejs}/bin/node $out/lib/node_modules/@mx-puppet/discord/build/index.js "\$@"
40 chmod +x $out/bin/mx-puppet-discord
44 description = "Discord puppeting bridge for matrix";
45 license = licenses.asl20;
46 homepage = "https://gitlab.com/mx-puppet/discord/mx-puppet-discord";
47 maintainers = with maintainers; [ expipiplus1 ];
48 platforms = platforms.unix;
49 # never built on aarch64-darwin since first introduction in nixpkgs
50 broken = stdenv.isDarwin && stdenv.isAarch64;
51 mainProgram = "mx-puppet-discord";