mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
9833d56c24
Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken Tool is still WIP but this is one of the first results. I manually audited the results and removed some results that were not valid. Note that some of these packages maybe should have more constrained platforms set instead of broken set, but I think not being perfectly correct is better than just keep trying to build all these things and never succeeding. Some observations: - Some darwin builds require XCode tools - aarch64-linux builds sometimes suffer from using gcc9 - gcc9 is getting older and misses some new libraries/features - Sometimes tools try to do system detection or expect some explicit settings for platforms that are not x86_64-linux
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{ stdenv, fetchFromGitLab, pkgs, lib, nodejs-14_x, pkg-config
|
|
, libjpeg, pixman, cairo, pango, which, postgresql }:
|
|
|
|
let
|
|
nodejs = nodejs-14_x;
|
|
|
|
version = "0.1.1";
|
|
|
|
src = fetchFromGitLab {
|
|
group = "mx-puppet";
|
|
owner = "discord";
|
|
repo = "mx-puppet-discord";
|
|
rev = "v${version}";
|
|
hash = "sha256-ZhyjUt6Bz/0R4+Lq/IoY9rNjdwVE2qp4ZQLc684+T/0=";
|
|
};
|
|
|
|
myNodePackages = import ./node-composition.nix {
|
|
inherit pkgs nodejs;
|
|
inherit (stdenv.hostPlatform) system;
|
|
};
|
|
|
|
in myNodePackages.package.override {
|
|
inherit version src;
|
|
|
|
nativeBuildInputs = [ nodejs.pkgs.node-pre-gyp nodejs.pkgs.node-gyp-build pkg-config which ];
|
|
buildInputs = [ libjpeg pixman cairo pango postgresql ];
|
|
|
|
postRebuild = ''
|
|
# Build typescript stuff
|
|
npm run build
|
|
'';
|
|
|
|
postInstall = ''
|
|
# Make an executable to run the server
|
|
mkdir -p $out/bin
|
|
cat <<EOF > $out/bin/mx-puppet-discord
|
|
#!/bin/sh
|
|
exec ${nodejs}/bin/node $out/lib/node_modules/@mx-puppet/discord/build/index.js "\$@"
|
|
EOF
|
|
chmod +x $out/bin/mx-puppet-discord
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A discord puppeting bridge for matrix";
|
|
license = licenses.asl20;
|
|
homepage = "https://gitlab.com/mx-puppet/discord/mx-puppet-discord";
|
|
maintainers = with maintainers; [ expipiplus1 ];
|
|
platforms = platforms.unix;
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
broken = stdenv.isDarwin && stdenv.isAarch64;
|
|
};
|
|
}
|