nixpkgs/pkgs/servers/meguca/default.nix

50 lines
1.6 KiB
Nix
Raw Normal View History

2018-08-03 17:43:28 +02:00
{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, cmake, ffmpeg-full, ghostscript
, graphicsmagick, quicktemplate, go-bindata, easyjson, nodePackages, emscripten }:
2018-05-18 01:56:58 +02:00
buildGoPackage rec {
name = "meguca-unstable-${version}";
2018-08-16 05:22:11 +02:00
version = "2018-08-13";
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";
2018-08-16 05:22:11 +02:00
rev = "f8b54370ba74b90f2814e6b42ac003a51fe02ce9";
sha256 = "1036qlvvz0la3fp514kw5qrplm1zsh23ywn2drigniacmqz4m7dv";
2018-05-18 01:56:58 +02:00
fetchSubmodules = true;
};
2018-06-21 22:38:17 +02:00
enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig cmake ];
2018-08-03 17:43:28 +02:00
buildInputs = [ ffmpeg-full graphicsmagick ghostscript quicktemplate go-bindata easyjson emscripten ];
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`
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 -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-18 01:56:58 +02: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 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;
};
}