1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 15:41:40 +00:00
nixpkgs/pkgs/servers/meguca/default.nix

49 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, buildGoPackage, fetchgit, pkgconfig, ffmpeg-full, graphicsmagick, ghostscript, quicktemplate,
go-bindata, easyjson, nodePackages, cmake, emscripten }:
2018-05-18 00:56:58 +01:00
buildGoPackage rec {
name = "meguca-unstable-${version}";
2018-05-26 13:24:35 +01:00
version = "2018-05-26";
rev = "9f3d902fb899dbc874c1a91298d86fda7da59b1e";
2018-05-18 00:56:58 +01: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-05-26 13:24:35 +01:00
sha256 = "0qblllf23pxcwi5fhaq8xc77iawll7v7xpk2mf9ngks3h8p7gddq";
2018-05-18 00:56:58 +01:00
fetchSubmodules = true;
};
configurePhase = ''
export HOME=$PWD
export GOPATH=$GOPATH:$HOME/go
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/...
'';
buildPhase = ''
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;
};
}