2018-05-21 02:15:23 +02:00
|
|
|
{ stdenv, buildGoPackage, fetchgit, pkgconfig, ffmpeg-full, graphicsmagick, ghostscript, quicktemplate,
|
|
|
|
go-bindata, easyjson, nodePackages, cmake, emscripten }:
|
2018-05-18 01:56:58 +02:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "meguca-unstable-${version}";
|
2018-06-11 19:48:06 +02:00
|
|
|
version = "2018-06-11";
|
|
|
|
rev = "0c10e89fade68da414a574b5b0fa2f0dba432ea8";
|
2018-05-18 01:56:58 +02:00
|
|
|
goPackagePath = "github.com/bakape/meguca";
|
|
|
|
goDeps = ./server_deps.nix;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
nativeBuildInputs = [ pkgconfig cmake ];
|
|
|
|
buildInputs = [ ffmpeg-full graphicsmagick ghostscript quicktemplate go-bindata easyjson emscripten ];
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
inherit rev;
|
|
|
|
url = "https://github.com/bakape/meguca";
|
2018-06-11 19:48:06 +02:00
|
|
|
sha256 = "1nw0hfa0ikbk8d5rsj3fbdwhzwnxjqkw8ypswd0hyw8nwsaxyyq8";
|
2018-05-18 01:56:58 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2018-06-10 05:49:27 +02:00
|
|
|
buildPhase = ''
|
2018-05-18 01:56:58 +02:00
|
|
|
export HOME=$PWD
|
2018-06-10 05:49:27 +02:00
|
|
|
export GOPATH=$GOPATH:$HOME/go/src/github.com/bakape/meguca/go
|
|
|
|
cd $HOME/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
|
|
|
|
make generate_clean
|
|
|
|
go generate meguca/...
|
|
|
|
go build -p $NIX_BUILD_CORES meguca
|
|
|
|
make -j $NIX_BUILD_CORES client wasm
|
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
|
|
|
description = "Anonymous realtime imageboard focused on high performance, free speech and transparent moderation";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
maintainers = with maintainers; [ chiiruno ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|