nixpkgs/pkgs/servers/meguca/default.nix

53 lines
1.6 KiB
Nix
Raw Normal View History

2018-06-27 09:31:23 +03:00
{ stdenv, buildGoPackage, fetchgit, pkgconfig, cmake, libcxx, libcxxabi
, ffmpeg-full, graphicsmagick, ghostscript, quicktemplate, go-bindata, easyjson
, nodePackages, emscripten }:
2018-05-18 02:56:58 +03:00
buildGoPackage rec {
name = "meguca-unstable-${version}";
2018-07-01 04:10:28 +03:00
version = "2018-07-01";
rev = "80db8298b6546c93944251c17fe03371e521671f";
2018-05-18 02:56:58 +03:00
goPackagePath = "github.com/bakape/meguca";
goDeps = ./server_deps.nix;
src = fetchgit {
inherit rev;
url = "https://github.com/bakape/meguca";
2018-07-01 04:10:28 +03:00
sha256 = "1yix0kxsjm9f3zw9jx2nb3pl8pbqjfhbvbrz42m1h20b1h02s5ml";
2018-05-18 02:56:58 +03:00
fetchSubmodules = true;
};
2018-06-21 23:38:17 +03:00
enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [
ffmpeg-full graphicsmagick ghostscript quicktemplate go-bindata easyjson
2018-06-27 09:31:23 +03:00
emscripten
] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxx libcxxabi ];
2018-06-21 23:38:17 +03:00
2018-06-10 06:49:27 +03:00
buildPhase = ''
2018-05-18 02:56:58 +03:00
export HOME=$PWD
2018-06-10 06:49:27 +03:00
export GOPATH=$GOPATH:$HOME/go/src/github.com/bakape/meguca/go
cd $HOME/go/src/github.com/bakape/meguca
2018-05-18 02:56:58 +03: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";
2018-06-21 23:38:17 +03:00
description = "High performance anonymous realtime imageboard";
2018-05-18 02:56:58 +03:00
license = licenses.agpl3Plus;
maintainers = with maintainers; [ chiiruno ];
platforms = platforms.all;
};
}