nixpkgs/pkgs/servers/meguca/default.nix

53 lines
1.6 KiB
Nix
Raw Normal View History

2019-03-23 07:17:52 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, cmake, ffmpeg-full
, ghostscript, graphicsmagick, quicktemplate, go-bindata, easyjson
, nodePackages, emscripten, opencv, statik }:
2018-05-18 01:56:58 +02:00
2019-08-13 23:52:01 +02:00
buildGoPackage {
pname = "meguca-unstable";
2019-03-23 07:17:52 +01:00
version = "2019-03-12";
2018-05-18 01:56:58 +02:00
goPackagePath = "github.com/bakape/meguca";
goDeps = ./server_deps.nix;
2018-08-03 17:43:28 +02:00
src = fetchFromGitHub {
owner = "bakape";
repo = "meguca";
2019-03-23 07:17:52 +01:00
rev = "21b08de09b38918061c5cd0bbd0dc9bcc1280525";
sha256 = "1nb3bf1bscbdma83sp9fbgvmxxlxh21j9h80wakfn85sndcrws5i";
2018-05-18 01:56:58 +02:00
fetchSubmodules = true;
};
2018-06-21 22:38:17 +02:00
enableParallelBuilding = true;
2020-03-18 00:23:32 +01:00
nativeBuildInputs = [ pkgconfig cmake go-bindata ];
2019-03-23 07:17:52 +01:00
buildInputs = [
2020-03-18 00:23:32 +01:00
ffmpeg-full graphicsmagick ghostscript quicktemplate
2019-03-23 07:17:52 +01:00
easyjson emscripten opencv statik
];
2018-06-21 22:38:17 +02:00
2018-06-10 05:49:27 +02:00
buildPhase = ''
2018-08-03 17:43:28 +02:00
export HOME=`pwd`
2019-03-23 07:17:52 +01:00
cd go/src/github.com/bakape/meguca
2018-05-18 01:56:58 +02:00
ln -sf ${nodePackages.meguca}/lib/node_modules/meguca/node_modules
sed -i "/npm install --progress false --depth 0/d" Makefile
2019-03-23 07:17:52 +01:00
make -j $NIX_BUILD_CORES generate all
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
make -j $NIX_BUILD_CORES wasm
2018-05-18 01:56:58 +02:00
'';
installPhase = ''
mkdir -p $out/bin $out/share/meguca
cp meguca $out/bin
cp -r www $out/share/meguca
2018-05-18 01:56:58 +02:00
'';
meta = with stdenv.lib; {
homepage = "https://github.com/bakape/meguca";
2018-06-21 22:38:17 +02:00
description = "High performance anonymous realtime imageboard";
2018-05-18 01:56:58 +02:00
license = licenses.agpl3Plus;
maintainers = with maintainers; [ chiiruno ];
platforms = platforms.all;
2019-08-21 18:31:04 +02:00
broken = true; # Broken on Hydra since 2019-04-18:
# https://hydra.nixos.org/build/98885902
2018-05-18 01:56:58 +02:00
};
}