2018-08-03 15:43:28 +00:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, cmake, ffmpeg-full, ghostscript
|
2018-12-06 17:45:45 +00:00
|
|
|
, graphicsmagick, quicktemplate, go-bindata, easyjson, nodePackages, emscripten, opencv }:
|
2018-05-17 23:56:58 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "meguca-unstable-${version}";
|
2018-12-06 17:45:45 +00:00
|
|
|
version = "2018-12-06";
|
2018-05-17 23:56:58 +00:00
|
|
|
goPackagePath = "github.com/bakape/meguca";
|
|
|
|
goDeps = ./server_deps.nix;
|
|
|
|
|
2018-08-03 15:43:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bakape";
|
|
|
|
repo = "meguca";
|
2018-12-06 17:45:45 +00:00
|
|
|
rev = "300b007cab238838f813faa9aad6abb3f22ad4d2";
|
|
|
|
sha256 = "1rvnvhkm8l7h9rvw9vr8pm1qrr3zz5x7vayaw0caqx99xlyp93r9";
|
2018-05-17 23:56:58 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2018-06-21 20:38:17 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
nativeBuildInputs = [ pkgconfig cmake ];
|
2018-12-06 17:45:45 +00:00
|
|
|
buildInputs = [ ffmpeg-full graphicsmagick ghostscript quicktemplate go-bindata easyjson emscripten opencv ];
|
2018-06-21 20:38:17 +00:00
|
|
|
|
2018-06-10 03:49:27 +00:00
|
|
|
buildPhase = ''
|
2018-08-03 15:43:28 +00:00
|
|
|
export HOME=`pwd`
|
2018-12-06 17:45:45 +00:00
|
|
|
export GOPATH=$GOPATH:$HOME/go/src/github.com/bakape/meguca/server
|
2018-06-10 03:49:27 +00:00
|
|
|
cd $HOME/go/src/github.com/bakape/meguca
|
2018-05-17 23:56:58 +00:00
|
|
|
ln -sf ${nodePackages.meguca}/lib/node_modules/meguca/node_modules
|
|
|
|
sed -i "/npm install --progress false --depth 0/d" Makefile
|
|
|
|
make generate_clean
|
|
|
|
go generate meguca/...
|
2018-07-02 10:43:57 +00:00
|
|
|
go build -v -p $NIX_BUILD_CORES meguca
|
|
|
|
make -j $NIX_BUILD_CORES client
|
|
|
|
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
|
|
|
make -j $NIX_BUILD_CORES wasm
|
2018-05-17 23:56:58 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $bin/bin $bin/share/meguca
|
|
|
|
cp meguca $bin/bin
|
|
|
|
cp -r www $bin/share/meguca
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/bakape/meguca";
|
2018-06-21 20:38:17 +00:00
|
|
|
description = "High performance anonymous realtime imageboard";
|
2018-05-17 23:56:58 +00:00
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
maintainers = with maintainers; [ chiiruno ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|