3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #41823 from Chiiruno/dev/meguca

meguca: 2018-05-26 -> 2018-06-11
This commit is contained in:
Jörg Thalheim 2018-07-02 15:35:42 +01:00 committed by GitHub
commit 8cf4a4725c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 315 additions and 289 deletions

View file

@ -104,15 +104,16 @@ in
preStart = ''
# Ensure folder exists and links are correct or create them
mkdir -p ${cfg.baseDir}
chmod 750 ${cfg.baseDir}
ln -sf ${pkgs.meguca}/share/meguca/www ${cfg.baseDir}
# Ensure the database is correct or create it
${pkgs.sudo}/bin/sudo -u ${postgres.superUser} ${postgres.package}/bin/createuser \
-SDR meguca || true
${pkgs.sudo}/bin/sudo -u ${postgres.superUser} ${postgres.package}/bin/psql \
-c "ALTER ROLE meguca WITH PASSWORD '$(cat ${cfg.passwordFile})';" || true
${pkgs.sudo}/bin/sudo -u ${postgres.superUser} ${postgres.package}/bin/createdb \
-T template0 -E UTF8 -O meguca meguca || true
${pkgs.sudo}/bin/sudo -u meguca ${postgres.package}/bin/psql \
-c "ALTER ROLE meguca WITH PASSWORD '$(cat ${cfg.passwordFile})';" || true
'';
script = ''

File diff suppressed because it is too large Load diff

View file

@ -49,13 +49,13 @@ let
sha1 = "cbc4b9a68981bf0b501ccd06a9058acd65309bf7";
};
};
"@types/node-10.5.0" = {
"@types/node-10.5.1" = {
name = "_at_types_slash_node";
packageName = "@types/node";
version = "10.5.0";
version = "10.5.1";
src = fetchurl {
url = "https://registry.npmjs.org/@types/node/-/node-10.5.0.tgz";
sha512 = "baXPuqA7EVcBUpA5so2K26DTzk7NCWBc9xrPMu9PbUMwgusJRm9zJBPhiDmJVEcnTQ3aOxUZeuFHpd9qMYDNRg==";
url = "https://registry.npmjs.org/@types/node/-/node-10.5.1.tgz";
sha512 = "AFLl1IALIuyt6oK4AYZsgWVJ/5rnyzQWud7IebaZWWV3YmgtPZkQmYio9R5Ze/2pdd7XfqF5bP+hWS11mAKoOQ==";
};
};
"@types/superagent-3.5.6" = {
@ -571,13 +571,13 @@ let
sha1 = "1101e9544f4a76b1bc3b26d452ca96d7a35e7978";
};
};
"bcrypt-pbkdf-1.0.1" = {
"bcrypt-pbkdf-1.0.2" = {
name = "bcrypt-pbkdf";
packageName = "bcrypt-pbkdf";
version = "1.0.1";
version = "1.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz";
sha1 = "63bc5dcb61331b92bc05fd528953c33462a06f8d";
url = "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz";
sha1 = "a4301d389b6a43f9b67ff3ca11a3f6637e360e9e";
};
};
"bencode-1.0.0" = {
@ -1291,6 +1291,15 @@ let
sha512 = "VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==";
};
};
"commander-2.16.0" = {
name = "commander";
packageName = "commander";
version = "2.16.0";
src = fetchurl {
url = "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz";
sha512 = "sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==";
};
};
"commander-2.3.0" = {
name = "commander";
packageName = "commander";
@ -7420,13 +7429,13 @@ let
sha512 = "FSs76hQZsSsdI4YeePxb5SQoWmHxDRznImGiAN905O1svyHvcoQ3hYptu3Y9hPxRHeB3lHzJR5KRZy0Byj7qqg==";
};
};
"uuid-3.3.0" = {
"uuid-3.3.2" = {
name = "uuid";
packageName = "uuid";
version = "3.3.0";
version = "3.3.2";
src = fetchurl {
url = "https://registry.npmjs.org/uuid/-/uuid-3.3.0.tgz";
sha512 = "ijO9N2xY/YaOqQ5yz5c4sy2ZjWmA6AR6zASb/gdpeKZ8+948CxwfMW9RrKVk5may6ev8c0/Xguu32e2Llelpqw==";
url = "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz";
sha512 = "yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==";
};
};
"valid-url-1.0.9" = {
@ -7768,7 +7777,7 @@ in
sources."@cycle/isolate-3.3.0"
sources."@cycle/run-3.4.0"
sources."@cycle/time-0.10.1"
sources."@types/node-10.5.0"
sources."@types/node-10.5.1"
sources."@types/superagent-3.5.6"
sources."ansi-escapes-3.1.0"
sources."ansi-regex-2.1.1"
@ -7933,7 +7942,7 @@ in
sources."aws-sign2-0.7.0"
sources."aws4-1.7.0"
sources."balanced-match-1.0.0"
sources."bcrypt-pbkdf-1.0.1"
sources."bcrypt-pbkdf-1.0.2"
sources."bencode-1.0.0"
(sources."bitfield-rle-2.1.0" // {
dependencies = [
@ -8284,7 +8293,7 @@ in
sources."util-deprecate-1.0.2"
sources."utile-0.3.0"
sources."utp-native-1.7.1"
sources."uuid-3.3.0"
sources."uuid-3.3.2"
sources."varint-3.0.1"
sources."verror-1.10.0"
(sources."winston-2.1.1" // {
@ -8426,7 +8435,7 @@ in
sources."aws-sign2-0.6.0"
sources."aws4-1.7.0"
sources."balanced-match-1.0.0"
sources."bcrypt-pbkdf-1.0.1"
sources."bcrypt-pbkdf-1.0.2"
sources."block-stream-0.0.9"
sources."boom-2.10.1"
sources."brace-expansion-1.1.11"
@ -8525,7 +8534,7 @@ in
sources."tunnel-agent-0.6.0"
sources."tweetnacl-0.14.5"
sources."util-deprecate-1.0.2"
sources."uuid-3.3.0"
sources."uuid-3.3.2"
(sources."verror-1.10.0" // {
dependencies = [
sources."assert-plus-1.0.0"
@ -8651,10 +8660,10 @@ in
pnpm = nodeEnv.buildNodePackage {
name = "pnpm";
packageName = "pnpm";
version = "2.7.0";
version = "2.9.0";
src = fetchurl {
url = "https://registry.npmjs.org/pnpm/-/pnpm-2.7.0.tgz";
sha1 = "cfaf3889c04125abfa20117358d7bcec72902faf";
url = "https://registry.npmjs.org/pnpm/-/pnpm-2.9.0.tgz";
sha1 = "1c2f5ade46b87cc3b1f3b7c66eeb7b0f4df4d968";
};
buildInputs = globalBuildInputs;
meta = {
@ -8757,7 +8766,7 @@ in
sources."aws4-1.7.0"
sources."balanced-match-1.0.0"
sources."base64-js-0.0.8"
sources."bcrypt-pbkdf-1.0.1"
sources."bcrypt-pbkdf-1.0.2"
sources."bl-1.2.2"
sources."bluebird-3.5.1"
sources."brace-expansion-1.1.11"
@ -8791,7 +8800,7 @@ in
sources."color-convert-1.9.2"
sources."color-name-1.1.1"
sources."combined-stream-1.0.6"
sources."commander-2.15.1"
sources."commander-2.16.0"
sources."concat-map-0.0.1"
sources."config-chain-1.1.11"
sources."consolidate-0.14.5"
@ -9002,7 +9011,7 @@ in
sources."url-to-options-1.0.1"
sources."user-home-2.0.0"
sources."util-deprecate-1.0.2"
sources."uuid-3.3.0"
sources."uuid-3.3.2"
sources."validate-npm-package-name-3.0.0"
sources."verror-1.10.0"
sources."ware-1.3.0"
@ -9137,7 +9146,7 @@ in
sources."color-convert-1.9.2"
sources."color-name-1.1.1"
sources."combined-stream-1.0.6"
sources."commander-2.15.1"
sources."commander-2.16.0"
sources."component-emitter-1.2.1"
sources."concat-map-0.0.1"
sources."concat-stream-1.6.2"

View file

@ -3,15 +3,15 @@
buildGoPackage rec {
name = "easyjson-unstable-${version}";
version = "2018-03-23";
rev = "8b799c424f57fa123fc63a99d6383bc6e4c02578";
version = "2018-06-06";
rev = "3fdea8d05856a0c8df22ed4bc71b3219245e4485";
goPackagePath = "github.com/mailru/easyjson";
src = fetchgit {
inherit rev;
url = "https://github.com/mailru/easyjson";
sha256 = "15ba6drfmw98lzw5qjh3ijcxh9iz9rcp3hid169yfd08l06z05w0";
sha256 = "0g3crph77yhv4ipdnwqc32z4cp87ahi4ikad5kyy6q4znnxliz74";
};
goDeps = ./deps.nix;

View file

@ -1,35 +1,40 @@
{ stdenv, buildGoPackage, fetchgit, pkgconfig, ffmpeg-full, graphicsmagick, ghostscript, quicktemplate,
go-bindata, easyjson, nodePackages, cmake, emscripten }:
{ stdenv, buildGoPackage, fetchgit, pkgconfig, cmake, ffmpeg-full, ghostscript
, graphicsmagick, quicktemplate, go-bindata, easyjson, nodePackages, emscripten }:
buildGoPackage rec {
name = "meguca-unstable-${version}";
version = "2018-05-26";
rev = "9f3d902fb899dbc874c1a91298d86fda7da59b1e";
version = "2018-07-01";
rev = "80db8298b6546c93944251c17fe03371e521671f";
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";
sha256 = "0qblllf23pxcwi5fhaq8xc77iawll7v7xpk2mf9ngks3h8p7gddq";
sha256 = "1yix0kxsjm9f3zw9jx2nb3pl8pbqjfhbvbrz42m1h20b1h02s5ml";
fetchSubmodules = true;
};
configurePhase = ''
enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [
ffmpeg-full graphicsmagick ghostscript quicktemplate go-bindata easyjson
emscripten
];
buildPhase = ''
export HOME=$PWD
export GOPATH=$GOPATH:$HOME/go
export GOPATH=$GOPATH:$HOME/go/src/github.com/bakape/meguca/go
cd $HOME/go/src/github.com/bakape/meguca
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
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
'';
installPhase = ''
@ -40,7 +45,7 @@ buildGoPackage rec {
meta = with stdenv.lib; {
homepage = "https://github.com/bakape/meguca";
description = "Anonymous realtime imageboard focused on high performance, free speech and transparent moderation";
description = "High performance anonymous realtime imageboard";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ chiiruno ];
platforms = platforms.all;

View file

@ -1,12 +1,21 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
[
{
goPackagePath = "github.com/ErikDubbelboer/gspt";
fetch = {
type = "git";
url = "https://github.com/ErikDubbelboer/gspt";
rev = "08ed213262b5bb2cf6ccb0baa71c6b201d353e63";
sha256 = "1vdgvwjagk1n4mwvpil59idgg7ibdj6frk9mz8c2ckbmxsfpp8rq";
};
}
{
goPackagePath = "github.com/Masterminds/squirrel";
fetch = {
type = "git";
url = "https://github.com/Masterminds/squirrel";
rev = "40ef4f86bf59a996c348a9f56ddb4c4d3d49a6df";
sha256 = "1zdv8hds2skqz9xrybf1pw5hfxzd27c35fsrfq11ryif1wxwbkyp";
rev = "b127ed9be03443fe3c0877e391130e3dd3f3107a";
sha256 = "04vgwm5g5486188656hiw1x56mrkv27s5g2s8mc1lz7z1ig5g5bg";
};
}
{
@ -27,6 +36,15 @@
sha256 = "0maqk0rwp39kcc64w4mfkgcvn2q76hqwziwc3g7ckc1qpwxql5z3";
};
}
{
goPackagePath = "github.com/badoux/goscraper";
fetch = {
type = "git";
url = "https://github.com/badoux/goscraper";
rev = "0213ced7087832e81e8892e8d044150cfc153856";
sha256 = "0bw5g6h0hypd38z8gfbh40pbw824n4qhk3c0kasw6gn4darx972w";
};
}
{
goPackagePath = "github.com/bakape/mnemonics";
fetch = {
@ -41,8 +59,8 @@
fetch = {
type = "git";
url = "https://github.com/bakape/thumbnailer";
rev = "5b92eb4c4500fd8e004e4cc9eeb2038961e2004f";
sha256 = "0z9myzp6rjyylh91ibd1nfpz7za1gxg4n3pnn7sw54i9zyws1l4x";
rev = "fa88f595f3882773bc425b382eee71e3e2fa1291";
sha256 = "19xfn8aj1nhh5dj93hskzrhaa07sayd8agmz1vkkh6varqrldanf";
};
}
{
@ -95,8 +113,8 @@
fetch = {
type = "git";
url = "https://github.com/go-playground/log";
rev = "91a5908e654f9fc444a71ea3c51c72cb5c6c2442";
sha256 = "0p67j453pi7ffv3axl5g97qadx8lj22vsi5xrzqrr3v6mj8b0lbm";
rev = "736ecb55f80c7121af3754a7ea62e96733451fe1";
sha256 = "1gr2658m8nwswiybnz5i54d4gzwx4nk79gnh7j5fj1rcmbxdkkjh";
};
}
{
@ -113,8 +131,8 @@
fetch = {
type = "git";
url = "https://github.com/gorilla/websocket";
rev = "21ab95fa12b9bdd8fecf5fa3586aad941cc98785";
sha256 = "1ygg6cr84461d6k3nzbja0dxhcgf5zvry2w10f6i7291ghrcwhyy";
rev = "5ed622c449da6d44c3c8329331ff47a9e5844f71";
sha256 = "1yhcwraijdk6lx7f6m9p6i1b3zfh2hq80l1nfpnckfn10gh72aw7";
};
}
{
@ -158,8 +176,8 @@
fetch = {
type = "git";
url = "https://github.com/mailru/easyjson";
rev = "8b799c424f57fa123fc63a99d6383bc6e4c02578";
sha256 = "15ba6drfmw98lzw5qjh3ijcxh9iz9rcp3hid169yfd08l06z05w0";
rev = "3fdea8d05856a0c8df22ed4bc71b3219245e4485";
sha256 = "0g3crph77yhv4ipdnwqc32z4cp87ahi4ikad5kyy6q4znnxliz74";
};
}
{
@ -185,8 +203,8 @@
fetch = {
type = "git";
url = "https://github.com/sevlyar/go-daemon";
rev = "45a2ba1b7c6710a044163fa109bf08d060bc3afa";
sha256 = "1fd8cwljgbxsm3w38pii0n02zg8s53x7j08w784csj3sfzq7rbv4";
rev = "f9261e73885de99b1647d68bedadf2b9a99ad11f";
sha256 = "1c4h85a3qfdkd61k8ipk1ffi3sdflq4wqp6d6h43zrca528m9ddc";
};
}
{
@ -221,8 +239,17 @@
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "a3beeb748656e13e54256fd2cde19e058f41f60f";
sha256 = "0h0a1v2g3hf0dlfjfiv76vfvvy7r9sdhjyqc2snvh9dczm2k5zki";
rev = "a49355c7e3f8fe157a85be2f77e6e269a0f89602";
sha256 = "020q1laxjx5kcmnqy4wmdb63zhb0lyq6wpy40axhswzg2nd21s44";
};
}
{
goPackagePath = "golang.org/x/net";
fetch = {
type = "git";
url = "https://go.googlesource.com/net";
rev = "4cb1c02c05b0e749b0365f61ae859a8e0cfceed9";
sha256 = "05xdcj0pn245y3gpy9p5iamx09424zqwh1w34gwwn5kh51ybgv7k";
};
}
{
@ -230,8 +257,8 @@
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "c11f84a56e43e20a78cee75a7c034031ecf57d1f";
sha256 = "1fn1wwr94v6ca1zcbsrs5v79s95pajdjqzz9rm9lxkgcvv1rl189";
rev = "7138fd3d9dc8335c567ca206f4333fb75eb05d56";
sha256 = "09xgxk0d9b88m18sriy4f2l6qavicznxkgsbvjyv56x24r4kmiq0";
};
}
{
@ -239,8 +266,8 @@
fetch = {
type = "git";
url = "https://go.googlesource.com/text";
rev = "5c1cf69b5978e5a34c5f9ba09a83e56acc4b7877";
sha256 = "03br8p1sb1ffr02l8hyrgcyib7ms0z06wy3v4r1dj2l6q4ghwzfs";
rev = "c0fe8dde8a10c9b32154bd9bdf080b8b3d635127";
sha256 = "0zi15k236nmqrlpfy3hgnxnh3f0n1aag0h6gs41xlxdkr9lpmnsz";
};
}
{