uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{ buildDotnetModule, lib, fetchFromGitHub, dotnetCorePackages }:
buildDotnetModule rec {
pname = "BaGet";
version = "0.4.0-preview2";
src = fetchFromGitHub {
owner = "loic-sharma";
repo = pname;
rev = "v${version}";
sha256 = "S/3CjXB/fBDzxLuQBQB3CKgEkmzUA8ZzzvzXLN8hfBU=";
};
projectFile = "src/BaGet/BaGet.csproj";
nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_3_1;
dotnet-runtime = dotnetCorePackages.aspnetcore_3_1;
passthru.updateScript = ./updater.sh;
meta = with lib; {
description = "A lightweight NuGet and symbol server";
license = licenses.mit;
homepage = "https://loic-sharma.github.io/BaGet/";
platforms = platforms.all;
maintainers = [ maintainers.abbradar ];
};
}

396
pkgs/servers/web-apps/baget/deps.nix generated Normal file
View file

@ -0,0 +1,396 @@
{ fetchNuGet }: [
(fetchNuGet { pname = "Aliyun.OSS.SDK.NetCore"; version = "2.9.1"; sha256 = "0j07j6cr0lqmmdwgz5alxlq5ifa5vzb58r1rqkgvf49nirz6jhfs"; })
(fetchNuGet { pname = "AWSSDK.Core"; version = "3.3.104.22"; sha256 = "1930axxsbiahv0rrav34zj355fwxx4nzbvd93sp5g94z6pdh0438"; })
(fetchNuGet { pname = "AWSSDK.S3"; version = "3.3.110.20"; sha256 = "0i8vcyxmszhsdm73fvg17yx6hfslml3y1sw0cd1lzv10avqfb7v9"; })
(fetchNuGet { pname = "AWSSDK.SecurityToken"; version = "3.3.104.27"; sha256 = "13ywh3d8fc8ndyg40yh386fw54s1w4sw9qqbjvmh40nb20s4wwrv"; })
(fetchNuGet { pname = "Google.Api.Gax"; version = "2.5.0"; sha256 = "0q6pi53px998i3gdndla8v0zqdpyi9gnsy9mdcfpkrg09vfbdsl9"; })
(fetchNuGet { pname = "Google.Api.Gax.Rest"; version = "2.5.0"; sha256 = "1zkjl5zh6qwdz4qmnxnk5877pas638i2qi25znilhqqf3mrkp0rp"; })
(fetchNuGet { pname = "Google.Apis"; version = "1.35.1"; sha256 = "1022l8m7v9f3rkjc9l11mkzwsbmqx9sk5f4aym035vn9hdr16d49"; })
(fetchNuGet { pname = "Google.Apis.Auth"; version = "1.35.1"; sha256 = "1qdnd1nq9bfgyljmiww91pfi0iz1n29rz2dlizhxcijqya2ldha3"; })
(fetchNuGet { pname = "Google.Apis.Core"; version = "1.35.1"; sha256 = "01dfw2kxknlc5pm7x1q88lv9j979509lkkgvlffjry5bawsxsja4"; })
(fetchNuGet { pname = "Google.Apis.Storage.v1"; version = "1.35.1.1266"; sha256 = "16wmqv0nqw8s0cmv2zmjd8raz2swygqn9jqg18ja1bfaz88r5c3l"; })
(fetchNuGet { pname = "Google.Cloud.Storage.V1"; version = "2.2.1"; sha256 = "0jpzca4xs82p3yyni8c1chq2pzzvmpf3j25ch0wj1w2ha36r9acj"; })
(fetchNuGet { pname = "Humanizer"; version = "2.11.10"; sha256 = "057pqzvdxsbpnnc5f1xkqg7j3ywp68ggia3w74fgqp0158dm6rdk"; })
(fetchNuGet { pname = "Humanizer.Core"; version = "2.11.10"; sha256 = "0z7kmd5rh1sb6izq0vssk6c2p63n00xglk45s7ga9z18z9aaskxv"; })
(fetchNuGet { pname = "Humanizer.Core.af"; version = "2.11.10"; sha256 = "18fiixfvjwn8m1i8z2cz4aqykzylvfdqmmpwc2zcd8sr1a2xm86z"; })
(fetchNuGet { pname = "Humanizer.Core.ar"; version = "2.11.10"; sha256 = "009fpm4jd325izm82ipipsvlwd31824gvskda68bdwi4yqmycz4p"; })
(fetchNuGet { pname = "Humanizer.Core.az"; version = "2.11.10"; sha256 = "144b9diwprabxwgi5a98k5iy95ajq4p7356phdqi2lhzwbz7b6a9"; })
(fetchNuGet { pname = "Humanizer.Core.bg"; version = "2.11.10"; sha256 = "1b9y40gvq2kwnj5wa40f8cbywv79jkajcwknagrgr27sykpfadl2"; })
(fetchNuGet { pname = "Humanizer.Core.bn-BD"; version = "2.11.10"; sha256 = "18pn4jcp36ygcx283l3fi9bs5d7q1a384b72a10g5kl0qckn88ay"; })
(fetchNuGet { pname = "Humanizer.Core.cs"; version = "2.11.10"; sha256 = "03crw1lnzp32v2kcdmllkrsqh07r4ggw9gyc96qw7cv0nk5ch1h8"; })
(fetchNuGet { pname = "Humanizer.Core.da"; version = "2.11.10"; sha256 = "0glby12zra3y3yiq4cwq1m6wjcjl8f21v8ghi6s20r48glm8vzy9"; })
(fetchNuGet { pname = "Humanizer.Core.de"; version = "2.11.10"; sha256 = "0a35xrm1f9p74x0fkr52bw9sd54vdy9d5rnvf565yh8ww43xfk7b"; })
(fetchNuGet { pname = "Humanizer.Core.el"; version = "2.11.10"; sha256 = "0bhwwdx5vc48zikdsbrkghdhwahxxc2lkff0yaa5nxhbhasl84h8"; })
(fetchNuGet { pname = "Humanizer.Core.es"; version = "2.11.10"; sha256 = "07bw07qy8nyzlgxl7l2lxv9f78qmkfppgzx7iyq5ikrcnpvc7i9q"; })
(fetchNuGet { pname = "Humanizer.Core.fa"; version = "2.11.10"; sha256 = "00d4hc1pfmhfkc5wmx9p7i00lgi4r0k6wfcns9kl1syjxv3bs5f2"; })
(fetchNuGet { pname = "Humanizer.Core.fi-FI"; version = "2.11.10"; sha256 = "0z4is7pl5jpi4pfdvd2zvx5mp00bj26d9l9ksqyc0liax8nfzyik"; })
(fetchNuGet { pname = "Humanizer.Core.fr"; version = "2.11.10"; sha256 = "0sybpg6kbbhrnk7gxcdk7ppan89lsfqsdssrg4i1dm8w48wgicap"; })
(fetchNuGet { pname = "Humanizer.Core.fr-BE"; version = "2.11.10"; sha256 = "1s25c86nl9wpsn6fydzwv4rfmdx5sm0vgyd7xhw5344k20gazvhv"; })
(fetchNuGet { pname = "Humanizer.Core.he"; version = "2.11.10"; sha256 = "1nx61qkjd6p9r36dmnm4942khyv35fpdqmb2w69gz6463g4d7z29"; })
(fetchNuGet { pname = "Humanizer.Core.hr"; version = "2.11.10"; sha256 = "02jhcyj72prkqsjxyilv04drm0bknqjh2r893jlbsfi9vjg2zay3"; })
(fetchNuGet { pname = "Humanizer.Core.hu"; version = "2.11.10"; sha256 = "0yb6ly4s1wdyaf96h2dvifqyb575aid6irwl3qx8gcvrs0xpcxdp"; })
(fetchNuGet { pname = "Humanizer.Core.hy"; version = "2.11.10"; sha256 = "0b7vaqldn7ca3xi4gkvkhjk900kw2zwb0m0d20bg45a83zdlx79c"; })
(fetchNuGet { pname = "Humanizer.Core.id"; version = "2.11.10"; sha256 = "1yqxirknwga4j18k7ixwgqxlv20479afanhariy3c5mkwvglsr9b"; })
(fetchNuGet { pname = "Humanizer.Core.it"; version = "2.11.10"; sha256 = "1skwgj5a6kkx3pm9w4f29psch69h1knmwbkdydlmx13h452p1w4l"; })
(fetchNuGet { pname = "Humanizer.Core.ja"; version = "2.11.10"; sha256 = "1wpc3yz9v611dqbw8j5yimk8dpz0rvpnls4rmlnp1m47gavpj8x4"; })
(fetchNuGet { pname = "Humanizer.Core.ko-KR"; version = "2.11.10"; sha256 = "1df0kd7vwdc3inxfkb3wsl1aw3d6vbab99dzh08p4m04g7i2c1a9"; })
(fetchNuGet { pname = "Humanizer.Core.ku"; version = "2.11.10"; sha256 = "17b66xfgwjr0sffx0hw4c6l90h43z7ffylrs26hgav0n110q2nwg"; })
(fetchNuGet { pname = "Humanizer.Core.lv"; version = "2.11.10"; sha256 = "0czxx4b9g0w7agykdl82wds09zasa9y58dmgjm925amlfz4wkyzs"; })
(fetchNuGet { pname = "Humanizer.Core.ms-MY"; version = "2.11.10"; sha256 = "0kix95nbw94fx0dziyz80y59i7ii7d21b63f7f94niarljjq36i3"; })
(fetchNuGet { pname = "Humanizer.Core.mt"; version = "2.11.10"; sha256 = "1rwy6m22pq65gxn86xlr9lv818fp5kb0wz98zxxfljc2iviw1f4p"; })
(fetchNuGet { pname = "Humanizer.Core.nb"; version = "2.11.10"; sha256 = "0ra2cl0avvv4sylha7z76jxnb4pdiqfbpr5m477snr04dsjxd9q9"; })
(fetchNuGet { pname = "Humanizer.Core.nb-NO"; version = "2.11.10"; sha256 = "1qszib03pvmjkrg8za7jjd2vzrs9p4fn2rmy82abnzldkhvifipq"; })
(fetchNuGet { pname = "Humanizer.Core.nl"; version = "2.11.10"; sha256 = "1i9bvy0i2yyasl9mgxiiwrkmfpm2c53d3wwdp9270r6120sxyy63"; })
(fetchNuGet { pname = "Humanizer.Core.pl"; version = "2.11.10"; sha256 = "0kggh4wgcic7wzgxy548n6w61schss2ccf9kz8alqshfi42xifby"; })
(fetchNuGet { pname = "Humanizer.Core.pt"; version = "2.11.10"; sha256 = "09j90s8x1lpvhfiy3syfnj8slkgcacf3xjy3pnkgxa6g4mi4f4bd"; })
(fetchNuGet { pname = "Humanizer.Core.ro"; version = "2.11.10"; sha256 = "1jgidmqfly91v1k22gn687mfql5bz7gjzp1aapi93vq5x635qssy"; })
(fetchNuGet { pname = "Humanizer.Core.ru"; version = "2.11.10"; sha256 = "13mmlh0ibxfyc85xrz3vx4mcg56mkzqql184iwdryq94p0g5ahil"; })
(fetchNuGet { pname = "Humanizer.Core.sk"; version = "2.11.10"; sha256 = "04ja06y5jaz1jwkwn117wx9cib04gpbi0vysn58a8sd5jrxmxai5"; })
(fetchNuGet { pname = "Humanizer.Core.sl"; version = "2.11.10"; sha256 = "05hxk9v3a7fn7s4g9jp5zxk2z6a33b9fkavyb1hjqnl2i37q2wja"; })
(fetchNuGet { pname = "Humanizer.Core.sr"; version = "2.11.10"; sha256 = "0x6l2msimrx72iywa1g0rqklgy209sdwg0r77i2lz0s1rvk5klm5"; })
(fetchNuGet { pname = "Humanizer.Core.sr-Latn"; version = "2.11.10"; sha256 = "01hdyn7mmbyy7f3aglawgnsj3nblcdpqjgzdcvniy73l536mira0"; })
(fetchNuGet { pname = "Humanizer.Core.sv"; version = "2.11.10"; sha256 = "0cbgchivw3d5ndib1zmgzmnymhyvfh9g9f0hijc860g5vaa9fkvh"; })
(fetchNuGet { pname = "Humanizer.Core.th-TH"; version = "2.11.10"; sha256 = "1v7f9x3b04iwhz9lb3ir8az8128nvcw1gi4park5zh3fg0f3mni0"; })
(fetchNuGet { pname = "Humanizer.Core.tr"; version = "2.11.10"; sha256 = "02c4ky0dskxkdrkc7vy8yzmvwjr1wqll1kzx0k21afhlx8xynjd4"; })
(fetchNuGet { pname = "Humanizer.Core.uk"; version = "2.11.10"; sha256 = "0900ilhwj8yvhyzpg1pjr7f5vrl62wp8dsnhk4c2igs20qvnv079"; })
(fetchNuGet { pname = "Humanizer.Core.uz-Cyrl-UZ"; version = "2.11.10"; sha256 = "09b7p2m8y49j49ckrmx2difgyj6y7fm2mwca093j8psxclsykcyr"; })
(fetchNuGet { pname = "Humanizer.Core.uz-Latn-UZ"; version = "2.11.10"; sha256 = "029kvkawqhlln52vpjpvr52dhr18ylk01cgsj2z8lxnqaka0q9hk"; })
(fetchNuGet { pname = "Humanizer.Core.vi"; version = "2.11.10"; sha256 = "0q4d47plsj956ivn82qwyidfxppjr9dp13m8c66aamrvhy4q8ny5"; })
(fetchNuGet { pname = "Humanizer.Core.zh-CN"; version = "2.11.10"; sha256 = "01dy5kf6ai8id77px92ji4kcxjc8haj39ivv55xy1afcg3qiy7mh"; })
(fetchNuGet { pname = "Humanizer.Core.zh-Hans"; version = "2.11.10"; sha256 = "16gcxgw2g6gck3nc2hxzlkbsg7wkfaqsjl87kasibxxh47zdqqv2"; })
(fetchNuGet { pname = "Humanizer.Core.zh-Hant"; version = "2.11.10"; sha256 = "1rjg2xvkwjjw3c7z9mdjjvbnl9lcvvhh4fr7l61rla2ynzdk46cj"; })
(fetchNuGet { pname = "Markdig"; version = "0.26.0"; sha256 = "1pg0yica8h1c2kx10pqzc5iclmlfll5wbw1bxa8l251w1qnfglv2"; })
(fetchNuGet { pname = "McMaster.Extensions.CommandLineUtils"; version = "2.5.0"; sha256 = "010vqyg5mb3cjzxznawxz7wvidj1yv664xgz93vf1zrww5vz6aal"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.Mvc.Razor.Extensions"; version = "3.1.18"; sha256 = "0s168gac3g8666pllnmjdbq1v981qgc1wqypyl6pp92jvzvkndp6"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"; version = "3.1.18"; sha256 = "0069qv17rapqhp2hjzzqim5zxb6clmr9bj4vmfd2pm4byp215flj"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.Razor.Language"; version = "3.1.18"; sha256 = "0rm6a5hsj4d2a1nlzfb34bm5z7wr826zg25xfbg51a3zvbgva9m7"; })
(fetchNuGet { pname = "Microsoft.Azure.Cosmos.Table"; version = "1.0.0"; sha256 = "0ms3nkifj3j7i1h6bxw49fha2iamxdxkzi51q37n0czcszx36apg"; })
(fetchNuGet { pname = "Microsoft.Azure.DocumentDB.Core"; version = "2.1.3"; sha256 = "017jq5a5ba4wmrrfr7daa07asnjl8xgvncgxlcyy83mln0xm67a5"; })
(fetchNuGet { pname = "Microsoft.Azure.KeyVault.Core"; version = "2.0.4"; sha256 = "0rv7z989zxk5myqd4n2a9ccxx9jr4jb3fslc6b4w3p0570af60hn"; })
(fetchNuGet { pname = "Microsoft.Azure.Search"; version = "5.0.1"; sha256 = "1xpwgcwahflrq5qa2acn0y5x1660qlh5iy0xmn6bisf9pbs6g7hr"; })
(fetchNuGet { pname = "Microsoft.Azure.Search.Common"; version = "5.0.1"; sha256 = "1ybbvm3iyi7r6v6j19jb16lqlq3am51wg68mzk3jdflk5czn28p7"; })
(fetchNuGet { pname = "Microsoft.Azure.Search.Data"; version = "5.0.1"; sha256 = "05skk65y8miwjzwvrr5br94byqipygi3mccl9x5wzbxqdhma7chq"; })
(fetchNuGet { pname = "Microsoft.Azure.Search.Service"; version = "5.0.1"; sha256 = "00767bbdi1zxb3vvw8k4666iv7wfb3fyxcligrin04qn9spjd2h7"; })
(fetchNuGet { pname = "Microsoft.Azure.Storage.Blob"; version = "9.4.1"; sha256 = "11273cf1a6rir6z016sa8r8jmrxc66zyhicciyyzanph6jwdfbf6"; })
(fetchNuGet { pname = "Microsoft.Azure.Storage.Common"; version = "9.4.1"; sha256 = "0kwrsfw0g8bciy53qrmgff8b8ik8wgn92szx0hdnvaqnv5dphsij"; })
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "1.0.0"; sha256 = "00dx5armvkqjxvkldz3invdlck9nj7w21dlsr2aqp1rqbyrbsbbh"; })
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "1.1.0"; sha256 = "1dq5yw7cy6s42193yl4iqscfw5vzkjkgv0zyy32scr4jza6ni1a1"; })
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "1.1.1"; sha256 = "0a1ahssqds2ympr7s4xcxv5y8jgxs7ahd6ah6fbgglj4rki1f1vw"; })
(fetchNuGet { pname = "Microsoft.Bcl.HashCode"; version = "1.1.0"; sha256 = "1ggsadahlp76zcn1plapszd5v5ja8rh479fwrahqd3knql4dfnr0"; })
(fetchNuGet { pname = "Microsoft.Bcl.HashCode"; version = "1.1.1"; sha256 = "0xwfph92p92d8hgrdiaka4cazqsjpg4ywfxfx6qbk3939f29kzl0"; })
(fetchNuGet { pname = "Microsoft.Build.Tasks.Git"; version = "1.0.0"; sha256 = "0avwja8vk56f2kr2pmrqx3h60bnwbs7ds062lhvhcxv87m5yfqnj"; })
(fetchNuGet { pname = "Microsoft.CodeAnalysis.Analyzers"; version = "2.9.3"; sha256 = "1kskwc9gyd2sx3zwx52qwfsl7s0xhaclmlnxvjsb4jgvpydv3xii"; })
(fetchNuGet { pname = "Microsoft.CodeAnalysis.Common"; version = "3.3.0"; sha256 = "1vwhsp3pjgcfnpapkps9a3z9n2ryiv5bbhzycfljngj5grj63rg2"; })
(fetchNuGet { pname = "Microsoft.CodeAnalysis.CSharp"; version = "3.3.0"; sha256 = "09nmd5h1r2q0dwp1dfpn4anvs8sfi3rwcgpcv28lrhky8vc51424"; })
(fetchNuGet { pname = "Microsoft.CodeAnalysis.Razor"; version = "3.1.18"; sha256 = "1fa10n15mifbwq2yilpkmag6apaix1nxb643306a4cmcjvr9nvp1"; })
(fetchNuGet { pname = "Microsoft.CSharp"; version = "4.0.1"; sha256 = "0zxc0apx1gcx361jlq8smc9pfdgmyjh6hpka8dypc9w23nlsh6yj"; })
(fetchNuGet { pname = "Microsoft.CSharp"; version = "4.3.0"; sha256 = "0gw297dgkh0al1zxvgvncqs0j15lsna9l1wpqas4rflmys440xvb"; })
(fetchNuGet { pname = "Microsoft.CSharp"; version = "4.5.0"; sha256 = "01i28nvzccxbqmiz217fxs6hnjwmd5fafs37rd49a6qp53y6623l"; })
(fetchNuGet { pname = "Microsoft.CSharp"; version = "4.7.0"; sha256 = "0gd67zlw554j098kabg887b5a6pq9kzavpa3jjy5w53ccjzjfy8j"; })
(fetchNuGet { pname = "Microsoft.Data.SqlClient"; version = "1.1.3"; sha256 = "18mfc77xbi84iga9zrh227hl3jv7p0mbarxvz4qrws0fknsbx4r9"; })
(fetchNuGet { pname = "Microsoft.Data.Sqlite.Core"; version = "3.1.18"; sha256 = "1vh9jjpgqr33kyp72n7k6xkqsd0q978p84lf54rm50krlkx31q0h"; })
(fetchNuGet { pname = "Microsoft.DotNet.PlatformAbstractions"; version = "3.1.6"; sha256 = "0b9myd7gqbpaw9pkd2bx45jhik9mwj0f1ss57sk2cxmag2lkdws5"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore"; version = "3.1.0"; sha256 = "1l12lsk1xfrv5pjnm0b9w9kncgdh0pcjcbxl4zrsg82s7bs7dhda"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore"; version = "3.1.18"; sha256 = "1y3g71d2i3azsnb995379rspchhbr1ivi1b1kfm0gx8swrp1j1wy"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore"; version = "3.1.1"; sha256 = "1ymnxrd79fx4q3aq0d7m8dpx4gyqkbjm960knm4yd3889mlxkish"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Abstractions"; version = "3.1.0"; sha256 = "1bd6hilnwp47z3l14qspdxi5f5nhv6rivarc6w8wil425bq0h3pd"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Abstractions"; version = "3.1.18"; sha256 = "0d00d6wx2mm5bav39bjsikjq0sx6qmp183dbwimfda7wav2bwya8"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Abstractions"; version = "3.1.1"; sha256 = "0ddjfxp7k5jgk1fmzjcfxiijcf59mpi5y9lvcr7ly7dhkpx2gsg8"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Analyzers"; version = "3.1.0"; sha256 = "1pjn4wwhxgsiap7byld114kx6m0nm6696r8drspqic7lskm4y305"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Analyzers"; version = "3.1.18"; sha256 = "10h1w3lv3gxcf24hhy5av4fvdjxdm2iimzp7kz9zh9cm1jg5n0vl"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Analyzers"; version = "3.1.1"; sha256 = "0vh2i1wc8514wa5brspn53sa2l034cpjswsvi0d84dnb04aw3b4b"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Design"; version = "3.1.18"; sha256 = "0vfn4kni1sgcw8js60gc4cs3g6chfw1mar2jz07bvgjv8wxlv7qw"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Relational"; version = "3.1.0"; sha256 = "0javqw6c27ppcysigjvcjcw3mk0gg1pv2pmwfpvvryr1pb4a9n55"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Relational"; version = "3.1.18"; sha256 = "0mlq9gmxrmix68mdh0lv803cx15lzrhs5d9622vj8wwdlngg3xdx"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Relational"; version = "3.1.1"; sha256 = "1qzw1rd5isa45xbyyq9vg2p04rnbfb2dinfllaaf7qaxy7mhxv65"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Sqlite"; version = "3.1.18"; sha256 = "0fs2900masv6j7j8n4kc05n2g55k7cgkhfkp5vb9pn7s2aw90kzi"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Sqlite.Core"; version = "3.1.18"; sha256 = "1m6v8g8jacrsfdl3i5q82g3k9y4wb2r3fh739ih66nlv9jbb81q6"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.SqlServer"; version = "3.1.18"; sha256 = "08slvfh5p06rwr1n93x44ka54f5qcnkc5b0qig887dxy4yl3kiwk"; })
(fetchNuGet { pname = "Microsoft.Extensions.Caching.Abstractions"; version = "3.1.0"; sha256 = "0j5m2a48rwyzzvbz0hpr2md35iv78b86zyqjnrjq0y4vb7sairc0"; })
(fetchNuGet { pname = "Microsoft.Extensions.Caching.Abstractions"; version = "3.1.18"; sha256 = "0qb3csiz02mh85x1yv0wh6x0c4c9d7kml5nhs9n6z0mykpfybqpc"; })
(fetchNuGet { pname = "Microsoft.Extensions.Caching.Abstractions"; version = "3.1.1"; sha256 = "1m303nrhcjydw8ij3fmf1w8zxpli84l6k1d4ml56yrpc1n6zxmjq"; })
(fetchNuGet { pname = "Microsoft.Extensions.Caching.Memory"; version = "3.1.0"; sha256 = "1hi61647apn25kqjcb37nqafp8fikymdrk43j3kxjbwwwx507jy1"; })
(fetchNuGet { pname = "Microsoft.Extensions.Caching.Memory"; version = "3.1.18"; sha256 = "0fdnk16nas3gdkcjqiq3h0rkqv6ajvbp7lvrssa21av258wnvm3w"; })
(fetchNuGet { pname = "Microsoft.Extensions.Caching.Memory"; version = "3.1.1"; sha256 = "0nyq1iwjql9w2w83sjimsry8chl53372rbvq9jwng3mdzv9qzni4"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration"; version = "3.1.0"; sha256 = "1rszgz0rd5kvib5fscz6ss3pkxyjwqy0xpd4f2ypgzf5z5g5d398"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration"; version = "3.1.18"; sha256 = "0fpvm1h9n0vib4fwvvify2zkc8yzgg8p2qbqrqlp5fd3ppqivjqh"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration"; version = "3.1.1"; sha256 = "1dmhci4qlwqmfgya02yi02xzv31v8g45mq1c4ffigs8jq8qn4f77"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration.Abstractions"; version = "3.1.0"; sha256 = "1f7h52kamljglx5k08ccryilvk6d6cvr9c26lcb6b2c091znzk0q"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration.Abstractions"; version = "3.1.18"; sha256 = "1aycn9rwfygdaw5wnb68ql96sb6midm6mj4742dcl9ibkrgks43w"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration.Abstractions"; version = "3.1.1"; sha256 = "1a1bixlm8wxf2fsr67qdm7k6p441sx2sfjpcjd3rm5df2v2y9zbv"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration.Binder"; version = "3.1.0"; sha256 = "13jj7jxihiswmhmql7r5jydbca4x5qj6h7zq10z17gagys6dc7pw"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration.Binder"; version = "3.1.18"; sha256 = "1bxcqfh75xypiqq2ljf1rwy7yq58a07g9g12jnlh4x7xba9xd4j0"; })
(fetchNuGet { pname = "Microsoft.Extensions.Configuration.Binder"; version = "3.1.1"; sha256 = "1brd1cxhkp5cg2wfkjkkyyvkzi4mdzyjafq94rbndzcxn9gxvz39"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection"; version = "3.1.0"; sha256 = "1xc61dy07bn2q73mx1z3ylrw80xpa682qjby13gklnqq636a3gab"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection"; version = "3.1.18"; sha256 = "0r8fs4pax5pyfny3ppav4v4by3l7r0xpkax9gvq91w3pzvlfvriz"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection"; version = "3.1.1"; sha256 = "01x8a8djyxcqv3fhp1q647b9y720xbbp1922vw9by4zh8f0lzs2w"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection.Abstractions"; version = "3.1.0"; sha256 = "1pvms778xkyv1a3gfwrxnh8ja769cxi416n7pcidn9wvg15ifvbh"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection.Abstractions"; version = "3.1.18"; sha256 = "0kvxyhhs5k7xx51ihc8hppbzpcn34bdzmnp42gy2m359wl3iq0c3"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection.Abstractions"; version = "3.1.1"; sha256 = "1k6k6h00p9hpr9jjq5vy4zwn9ggzldzm97gwjil6hpr3kxawb37n"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyModel"; version = "3.1.6"; sha256 = "13m2na8a5mglbbjjp0dxb8ifkf23grkyk1g8585mr7v6cbj098ac"; })
(fetchNuGet { pname = "Microsoft.Extensions.Logging"; version = "3.1.0"; sha256 = "1d3yhqj1rav7vswm747j7w8fh8paybji4rz941hhlq4b12mfqfh4"; })
(fetchNuGet { pname = "Microsoft.Extensions.Logging"; version = "3.1.18"; sha256 = "0llw82p6crp0329n3rsyrqka21c3dqyjk8lbk25y5848vzi0bzbv"; })
(fetchNuGet { pname = "Microsoft.Extensions.Logging"; version = "3.1.1"; sha256 = "1y78bn463mrl8vy7iwafrmq4x0vg4pqjd3xaiznfg9lpxjgjl9j3"; })
(fetchNuGet { pname = "Microsoft.Extensions.Logging.Abstractions"; version = "3.1.0"; sha256 = "1zyalrcksszmn9r5xjnirfh7847axncgzxkk3k5srbvlcch8fw8g"; })
(fetchNuGet { pname = "Microsoft.Extensions.Logging.Abstractions"; version = "3.1.18"; sha256 = "0pq1kw77zz9ygcdw87wxd1rkcij084jj1cgp6p4b8zpl0a73ba6b"; })
(fetchNuGet { pname = "Microsoft.Extensions.Logging.Abstractions"; version = "3.1.1"; sha256 = "0pyk6g2qs1lrjhj1qz4bqbqpbmbgqlah1b6ynlvv5bdsrb7157zf"; })
(fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "3.1.0"; sha256 = "0akccwhpn93a4qrssyb3rszdsp3j4p9hlxbsb7yhqb78xydaqhyh"; })
(fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "3.1.18"; sha256 = "0iv79m9grl28b5zcng14v5nrgic3rgy74ws9l92fw2f194qbdy6h"; })
(fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "3.1.1"; sha256 = "15iik4hqm5ywzv9lvlfqk6d7drgdm87h6x9gliy9ks6snyhbnpb3"; })
(fetchNuGet { pname = "Microsoft.Extensions.Options.ConfigurationExtensions"; version = "3.1.18"; sha256 = "0id3s26s7grlzfvqmknz3ir7agns680ad8d0kv6mr9dfrqj6ca1l"; })
(fetchNuGet { pname = "Microsoft.Extensions.PlatformAbstractions"; version = "1.1.0"; sha256 = "0r4j8v2vvp3kalvb11ny9cvpls3nrvqj0c81rxbkh99ynd2dbscp"; })
(fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "3.1.0"; sha256 = "1w1y22njywwysi8qjnj4m83qhbq0jr4mmjib0hfawz6cwamh7xrb"; })
(fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "3.1.18"; sha256 = "1xcwb09acn6w3jv3s0bp0f7q9vq3rzp7cg2jhbn3a9h9pzk8haa2"; })
(fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "3.1.1"; sha256 = "07rkb1xl7y59qjg9j3bms0fi09gmjrf9f4ipckxlx64k8ciilw9f"; })
(fetchNuGet { pname = "Microsoft.Identity.Client"; version = "3.0.8"; sha256 = "0g7j08fqk8svch31jg0vg32chgmxgbsin0i85whsd42hkjd4l8lg"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.JsonWebTokens"; version = "5.5.0"; sha256 = "0ahkybdfiwnj5h25j5x2dylz3wfg2194cgqmsiqkaz93gbqibyw0"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.Logging"; version = "5.5.0"; sha256 = "1a3bvzaas5d653l0yphl95xclj4yvdz5v08g0psj9i137yncn639"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.Protocols"; version = "5.5.0"; sha256 = "029i1fz9y5gzrh68364ga1wm7gmk4h58lkdp5g77rsxa24rhshpl"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.Protocols.OpenIdConnect"; version = "5.5.0"; sha256 = "0hxh6j4z1ha7r0pnh9lnnx54h6s3lkj0dv99n2h5pcsk0pbx91kf"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.Tokens"; version = "5.5.0"; sha256 = "1ixdbn6ia6df4qqg89ihcmjz5jjnp9jjcdjifqzaccy37bvxk8dj"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "2.0.0"; sha256 = "1fk2fk2639i7nzy58m9dvpdnzql4vb8yl8vr19r2fp8lmj9w2jr0"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "2.1.2"; sha256 = "1507hnpr9my3z4w1r6xk5n0s1j3y6a2c2cnynj76za7cphxi1141"; })
(fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; })
(fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; })
(fetchNuGet { pname = "Microsoft.OData.Core"; version = "7.5.0"; sha256 = "0xl3pl7433w2qdcdqnizmwpzavsbip5fv2izw583b99zbyhjxzmx"; })
(fetchNuGet { pname = "Microsoft.OData.Edm"; version = "7.5.0"; sha256 = "1xsab22g60q04dscnvswzhjig5ydly37kq205dsk4jm4b1df9dip"; })
(fetchNuGet { pname = "Microsoft.Rest.ClientRuntime"; version = "2.3.11"; sha256 = "0iqxxyiyi057c92nlf2aiva59c13bhg93w2gp0qh0777gb750hbx"; })
(fetchNuGet { pname = "Microsoft.Rest.ClientRuntime.Azure"; version = "3.3.12"; sha256 = "01r0swv029wwxn1h4paqlyc4chmqg04wi2h0h74bh7lcgjsm9qb1"; })
(fetchNuGet { pname = "Microsoft.SourceLink.Common"; version = "1.0.0"; sha256 = "1zxkpx01zdv17c39iiy8fx25ran89n14qwddh1f140v1s4dn8z9c"; })
(fetchNuGet { pname = "Microsoft.SourceLink.GitHub"; version = "1.0.0"; sha256 = "029ixyaqn48cjza87m5qf0g1ynyhlm6irgbx1n09src9g666yhpd"; })
(fetchNuGet { pname = "Microsoft.Spatial"; version = "7.2.0"; sha256 = "15a2lv7305729mdffh6r2qff5c1dk9b0w5a60kclw1a580vipzk2"; })
(fetchNuGet { pname = "Microsoft.Spatial"; version = "7.5.0"; sha256 = "1zxjy5f4bksgf0ilgrqhxpy5g1nzbz54pcp9dx0smvc9yqlacy97"; })
(fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.0.1"; sha256 = "1n8ap0cmljbqskxpf8fjzn7kh1vvlndsa75k01qig26mbw97k2q7"; })
(fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; })
(fetchNuGet { pname = "Microsoft.Win32.Registry"; version = "4.5.0"; sha256 = "1zapbz161ji8h82xiajgriq6zgzmb1f3ar517p2h63plhsq5gh2q"; })
(fetchNuGet { pname = "MySqlConnector"; version = "0.61.0"; sha256 = "0b0mc41dsih4p1ky3kcmibsz4bw14w439nraq5732wjfkq2sqdxg"; })
(fetchNuGet { pname = "NETStandard.Library"; version = "2.0.3"; sha256 = "1fn9fxppfcg4jgypp2pmrpr6awl3qz1xmnri0cygpkwvyx27df1y"; })
(fetchNuGet { pname = "Newtonsoft.Json"; version = "10.0.1"; sha256 = "15ncqic3p2rzs8q8ppi0irl2miq75kilw4lh8yfgjq96id0ds3hv"; })
(fetchNuGet { pname = "Newtonsoft.Json"; version = "10.0.2"; sha256 = "03zb1k50mgzvznp9sfv371fdvx82bqpgq99dj61paan8a30prj6y"; })
(fetchNuGet { pname = "Newtonsoft.Json"; version = "11.0.2"; sha256 = "1784xi44f4k8v1fr696hsccmwpy94bz7kixxqlri98zhcxn406b2"; })
(fetchNuGet { pname = "Newtonsoft.Json"; version = "9.0.1"; sha256 = "0mcy0i7pnfpqm4pcaiyzzji4g0c8i3a5gjz28rrr28110np8304r"; })
(fetchNuGet { pname = "Npgsql"; version = "4.1.3"; sha256 = "08515af6g0d8v1d2r493xdxc74y1bg8ngbhck0wq4jhh109ndg97"; })
(fetchNuGet { pname = "Npgsql.EntityFrameworkCore.PostgreSQL"; version = "3.1.1.2"; sha256 = "0ng4cyzmbh1x8jshx55x3h5azif4zb3v4d3n3sxkqavbq8j2phhs"; })
(fetchNuGet { pname = "NuGet.Common"; version = "5.10.0"; sha256 = "0qy6blgppgvxpfcricmvva3qzddk18dza5vy851jrbqshvf9g7kx"; })
(fetchNuGet { pname = "NuGet.Configuration"; version = "5.10.0"; sha256 = "0xb1n94lrwa6k83i9xcsq68202086p2gj74gzlbhlvb8c2pw6lbb"; })
(fetchNuGet { pname = "NuGet.Frameworks"; version = "5.10.0"; sha256 = "0gb6n8rg2jpjp52icgpb3wjdfs3qllh5vbcz8hbcix3l7dncy3v2"; })
(fetchNuGet { pname = "NuGet.Packaging"; version = "5.10.0"; sha256 = "11g0v061axhp0nisclq5cm2mc92d69z92giz9l40ih478c5nishw"; })
(fetchNuGet { pname = "NuGet.Protocol"; version = "5.10.0"; sha256 = "0cs9qp169zx6g2w5bzrlhxv0q1i8mb8dxlb2nkiq7pkvah86rxkc"; })
(fetchNuGet { pname = "NuGet.Versioning"; version = "5.10.0"; sha256 = "10vvw6vjpx0c26rlxh7dnpyp4prahn25717ccd8bzkjmyzhm90cs"; })
(fetchNuGet { pname = "Pomelo.EntityFrameworkCore.MySql"; version = "3.1.0"; sha256 = "0a8ysdwsa0kds5zbfmcdnk8imaqf2hisjms951h1smnlnii9kyds"; })
(fetchNuGet { pname = "Pomelo.JsonObject"; version = "2.2.1"; sha256 = "1w6s9wjbsyvq8cnqknkdzm9chnv0g5gcsrq5i94zp6br9vg7c627"; })
(fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d"; })
(fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0rwpqngkqiapqc5c2cpkj7idhngrgss5qpnqg0yh40mbyflcxf8i"; })
(fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59"; })
(fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1n06gxwlinhs0w7s8a94r1q3lwqzvynxwd3mp10ws9bg6gck8n4r"; })
(fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa"; })
(fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0404wqrc7f2yc0wxv71y3nnybvqx8v4j9d47hlscxy759a525mc3"; })
(fetchNuGet { pname = "runtime.native.System"; version = "4.0.0"; sha256 = "1ppk69xk59ggacj9n7g6fyxvzmk1g5p4fkijm0d7xqfkig98qrkf"; })
(fetchNuGet { pname = "runtime.native.System"; version = "4.3.0"; sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; })
(fetchNuGet { pname = "runtime.native.System.Data.SqlClient.sni"; version = "4.4.0"; sha256 = "15wnpyy506q3vyk1yzdjjf49zpdynr7ghh0x5fbz4pcc1if0p9ky"; })
(fetchNuGet { pname = "runtime.native.System.Net.Http"; version = "4.0.1"; sha256 = "1hgv2bmbaskx77v8glh7waxws973jn4ah35zysnkxmf0196sfxg6"; })
(fetchNuGet { pname = "runtime.native.System.Net.Http"; version = "4.3.0"; sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk"; })
(fetchNuGet { pname = "runtime.native.System.Net.Security"; version = "4.3.0"; sha256 = "0dnqjhw445ay3chpia9p6vy4w2j6s9vy3hxszqvdanpvvyaxijr3"; })
(fetchNuGet { pname = "runtime.native.System.Security.Cryptography"; version = "4.0.0"; sha256 = "0k57aa2c3b10wl3hfqbgrl7xq7g8hh3a3ir44b31dn5p61iiw3z9"; })
(fetchNuGet { pname = "runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q"; })
(fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97"; })
(fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0zy5r25jppz48i2bkg8b9lfig24xixg6nm3xyr1379zdnqnpm8f6"; })
(fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3"; })
(fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "096ch4n4s8k82xga80lfmpimpzahd2ip1mgwdqgar0ywbbl6x438"; })
(fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf"; })
(fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1dm8fifl7rf1gy7lnwln78ch4rw54g0pl5g1c189vawavll7p6rj"; })
(fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi"; })
(fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3"; })
(fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1m9z1k9kzva9n9kwinqxl97x2vgl79qhqjlv17k9s2ymcyv2bwr6"; })
(fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn"; })
(fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1cpx56mcfxz7cpn57wvj18sjisvzq8b5vd9rw16ihd2i6mcp3wa1"; })
(fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3"; })
(fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "15gsm1a8jdmgmf8j5v1slfz8ks124nfdhk2vxs2rw3asrxalg8hi"; })
(fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy"; })
(fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0q0n5q1r1wnqmr5i5idsrd9ywl33k0js4pngkwq9p368mbxp8x1w"; })
(fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5"; })
(fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1x0g58pbpjrmj2x2qw17rdwwnrcl0wvim2hdwz48lixvwvp22n9c"; })
(fetchNuGet { pname = "runtime.win-arm64.runtime.native.System.Data.SqlClient.sni"; version = "4.4.0"; sha256 = "07byf1iyqb7jkb17sp0mmjk46fwq6fx8mlpzywxl7qk09sma44gk"; })
(fetchNuGet { pname = "runtime.win-x64.runtime.native.System.Data.SqlClient.sni"; version = "4.4.0"; sha256 = "0167s4mpq8bzk3y11pylnynzjr2nc84w96al9x4l8yrf34ccm18y"; })
(fetchNuGet { pname = "runtime.win-x86.runtime.native.System.Data.SqlClient.sni"; version = "4.4.0"; sha256 = "0k3rkfrlm9jjz56dra61jgxinb8zsqlqzik2sjwz7f8v6z6ddycc"; })
(fetchNuGet { pname = "SQLitePCLRaw.bundle_e_sqlite3"; version = "2.0.2"; sha256 = "00p7n7ndmmh45fhhd3clb11igpzklm1n7r50sdrgnbi5yifv1lxl"; })
(fetchNuGet { pname = "SQLitePCLRaw.core"; version = "2.0.2"; sha256 = "11mnbnsiirpgmilskqh1issvgzgg08ndq3p3nkrw73hyqr7kl958"; })
(fetchNuGet { pname = "SQLitePCLRaw.lib.e_sqlite3"; version = "2.0.2"; sha256 = "0967w6r6n94hj0fma3kidb9fx1m2p3fgrw6gpsy6q6jbb33qw6vj"; })
(fetchNuGet { pname = "SQLitePCLRaw.provider.dynamic_cdecl"; version = "2.0.2"; sha256 = "1lzs8yfjygrwfm3hjmkhnbnpsjzq53ijwx9whmii2r9kjg2a46if"; })
(fetchNuGet { pname = "SQLitePCLRaw.provider.e_sqlite3"; version = "2.0.2"; sha256 = "0ak8jlkva1mnmvyvwhk9zmc4c5b08n4a7l8g9g5mj3ly161hfzm6"; })
(fetchNuGet { pname = "System.Buffers"; version = "4.4.0"; sha256 = "183f8063w8zqn99pv0ni0nnwh7fgx46qzxamwnans55hhs2l0g19"; })
(fetchNuGet { pname = "System.Buffers"; version = "4.5.0"; sha256 = "1ywfqn4md6g3iilpxjn5dsr0f5lx6z0yvhqp4pgjcamygg73cz2c"; })
(fetchNuGet { pname = "System.Buffers"; version = "4.5.1"; sha256 = "04kb1mdrlcixj9zh1xdi5as0k0qi8byr5mi3p3jcxx72qz93s2y3"; })
(fetchNuGet { pname = "System.Collections"; version = "4.0.11"; sha256 = "1ga40f5lrwldiyw6vy67d0sg7jd7ww6kgwbksm19wrvq9hr0bsm6"; })
(fetchNuGet { pname = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; })
(fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.0.12"; sha256 = "07y08kvrzpak873pmyxs129g1ch8l27zmg51pcyj2jvq03n0r0fc"; })
(fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.3.0"; sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; })
(fetchNuGet { pname = "System.Collections.Immutable"; version = "1.5.0"; sha256 = "1d5gjn5afnrf461jlxzawcvihz195gayqpcfbv6dd7pxa9ialn06"; })
(fetchNuGet { pname = "System.Collections.Immutable"; version = "1.7.0"; sha256 = "1gik4sn9jsi1wcy1pyyp0r4sn2g17cwrsh24b2d52vif8p2h24zx"; })
(fetchNuGet { pname = "System.Collections.Immutable"; version = "1.7.1"; sha256 = "1nh4nlxfc7lbnbl86wwk1a3jwl6myz5j6hvgh5sp4krim9901hsq"; })
(fetchNuGet { pname = "System.Collections.NonGeneric"; version = "4.0.1"; sha256 = "19994r5y5bpdhj7di6w047apvil8lh06lh2c2yv9zc4fc5g9bl4d"; })
(fetchNuGet { pname = "System.Collections.NonGeneric"; version = "4.3.0"; sha256 = "07q3k0hf3mrcjzwj8fwk6gv3n51cb513w4mgkfxzm3i37sc9kz7k"; })
(fetchNuGet { pname = "System.Collections.Specialized"; version = "4.0.1"; sha256 = "1wbv7y686p5x169rnaim7sln67ivmv6r57falrnx8aap9y33mam9"; })
(fetchNuGet { pname = "System.Collections.Specialized"; version = "4.3.0"; sha256 = "1sdwkma4f6j85m3dpb53v9vcgd0zyc9jb33f8g63byvijcj39n20"; })
(fetchNuGet { pname = "System.ComponentModel"; version = "4.3.0"; sha256 = "0986b10ww3nshy30x9sjyzm0jx339dkjxjj3401r3q0f6fx2wkcb"; })
(fetchNuGet { pname = "System.ComponentModel.Annotations"; version = "4.7.0"; sha256 = "06x1m46ddxj0ng28d7gry9gjkqdg2kp89jyf480g5gznyybbs49z"; })
(fetchNuGet { pname = "System.ComponentModel.Primitives"; version = "4.3.0"; sha256 = "1svfmcmgs0w0z9xdw2f2ps05rdxmkxxhf0l17xk9l1l8xfahkqr0"; })
(fetchNuGet { pname = "System.ComponentModel.TypeConverter"; version = "4.3.0"; sha256 = "17ng0p7v3nbrg3kycz10aqrrlw4lz9hzhws09pfh8gkwicyy481x"; })
(fetchNuGet { pname = "System.Configuration.ConfigurationManager"; version = "4.5.0"; sha256 = "1frpy24mn6q7hgwayj98kkx89z861f5dmia4j6zc0a2ydgx8x02c"; })
(fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.0.11"; sha256 = "0gmjghrqmlgzxivd2xl50ncbglb7ljzb66rlx8ws6dv8jm0d5siz"; })
(fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; })
(fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.0.0"; sha256 = "1n6c3fbz7v8d3pn77h4v5wvsfrfg7v1c57lg3nff3cjyh597v23m"; })
(fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.3.0"; sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq"; })
(fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.5.0"; sha256 = "1y8m0p3127nak5yspapfnz25qc9x53gqpvwr3hdpsvrcd2r1pgyj"; })
(fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.7.0"; sha256 = "0cr0v5dz8l5ackxv6b772fjcyj2nimqmrmzanjs4cw2668v568n1"; })
(fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.7.1"; sha256 = "1mivaifniyrqwlnvzsfaxzrh2sd981bwzs3cbvs5wi7jjzbcqr4p"; })
(fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.0.1"; sha256 = "19cknvg07yhakcvpxg3cxa0bwadplin6kyxd8mpjjpwnp56nl85x"; })
(fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.3.0"; sha256 = "0in3pic3s2ddyibi8cvgl102zmvp9r9mchh82ns9f0ms4basylw1"; })
(fetchNuGet { pname = "System.Diagnostics.TraceSource"; version = "4.0.0"; sha256 = "1mc7r72xznczzf6mz62dm8xhdi14if1h8qgx353xvhz89qyxsa3h"; })
(fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.1.0"; sha256 = "1d2r76v1x610x61ahfpigda89gd13qydz6vbwzhpqlyvq8jj6394"; })
(fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; })
(fetchNuGet { pname = "System.Dynamic.Runtime"; version = "4.0.11"; sha256 = "1pla2dx8gkidf7xkciig6nifdsb494axjvzvann8g2lp3dbqasm9"; })
(fetchNuGet { pname = "System.Dynamic.Runtime"; version = "4.3.0"; sha256 = "1d951hrvrpndk7insiag80qxjbf2y0y39y8h5hnq9612ws661glk"; })
(fetchNuGet { pname = "System.Formats.Asn1"; version = "5.0.0"; sha256 = "1axc8z0839yvqi2cb63l73l6d9j6wd20lsbdymwddz9hvrsgfwpn"; })
(fetchNuGet { pname = "System.Globalization"; version = "4.0.11"; sha256 = "070c5jbas2v7smm660zaf1gh0489xanjqymkvafcs4f8cdrs1d5d"; })
(fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; })
(fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.0.1"; sha256 = "0bv0alrm2ck2zk3rz25lfyk9h42f3ywq77mx1syl6vvyncnpg4qh"; })
(fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; })
(fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.0.1"; sha256 = "0hjhdb5ri8z9l93bw04s7ynwrjrhx2n0p34sf33a9hl9phz69fyc"; })
(fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.3.0"; sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls"; })
(fetchNuGet { pname = "System.IdentityModel.Tokens.Jwt"; version = "5.5.0"; sha256 = "0p6ybl5ik2glwcfhiqlqdggl0qd6027kdxaqy5xmp7qq055qiq6k"; })
(fetchNuGet { pname = "System.Interactive.Async"; version = "3.1.1"; sha256 = "03iq20gq0n2b2sdzs5jhxf46nzkfgvzip6q5248vka2rcvn1yanh"; })
(fetchNuGet { pname = "System.IO"; version = "4.1.0"; sha256 = "1g0yb8p11vfd0kbkyzlfsbsp5z44lwsvyc0h3dpw6vqnbi035ajp"; })
(fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; })
(fetchNuGet { pname = "System.IO.FileSystem"; version = "4.0.1"; sha256 = "0kgfpw6w4djqra3w5crrg8xivbanh1w9dh3qapb28q060wb9flp1"; })
(fetchNuGet { pname = "System.IO.FileSystem"; version = "4.3.0"; sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; })
(fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.0.1"; sha256 = "1s0mniajj3lvbyf7vfb5shp4ink5yibsx945k6lvxa96r8la1612"; })
(fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; })
(fetchNuGet { pname = "System.Linq"; version = "4.1.0"; sha256 = "1ppg83svb39hj4hpp5k7kcryzrf3sfnm08vxd5sm2drrijsla2k5"; })
(fetchNuGet { pname = "System.Linq"; version = "4.3.0"; sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; })
(fetchNuGet { pname = "System.Linq.Expressions"; version = "4.1.0"; sha256 = "1gpdxl6ip06cnab7n3zlcg6mqp7kknf73s8wjinzi4p0apw82fpg"; })
(fetchNuGet { pname = "System.Linq.Expressions"; version = "4.3.0"; sha256 = "0ky2nrcvh70rqq88m9a5yqabsl4fyd17bpr63iy2mbivjs2nyypv"; })
(fetchNuGet { pname = "System.Linq.Queryable"; version = "4.0.1"; sha256 = "11jn9k34g245yyf260gr3ldzvaqa9477w2c5nhb1p8vjx4xm3qaw"; })
(fetchNuGet { pname = "System.Memory"; version = "4.5.0"; sha256 = "1layqpcx1q4l805fdnj2dfqp6ncx2z42ca06rgsr6ikq4jjgbv30"; })
(fetchNuGet { pname = "System.Memory"; version = "4.5.1"; sha256 = "0f07d7hny38lq9w69wx4lxkn4wszrqf9m9js6fh9is645csm167c"; })
(fetchNuGet { pname = "System.Memory"; version = "4.5.2"; sha256 = "1g24dwqfcmf4gpbgbhaw1j49xmpsz389l6bw2xxbsmnzvsf860ld"; })
(fetchNuGet { pname = "System.Memory"; version = "4.5.3"; sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a"; })
(fetchNuGet { pname = "System.Memory"; version = "4.5.4"; sha256 = "14gbbs22mcxwggn0fcfs1b062521azb9fbb7c113x0mq6dzq9h6y"; })
(fetchNuGet { pname = "System.Net.Http"; version = "4.1.0"; sha256 = "1i5rqij1icg05j8rrkw4gd4pgia1978mqhjzhsjg69lvwcdfg8yb"; })
(fetchNuGet { pname = "System.Net.Http"; version = "4.3.0"; sha256 = "1i4gc757xqrzflbk7kc5ksn20kwwfjhw9w7pgdkn19y3cgnl302j"; })
(fetchNuGet { pname = "System.Net.NameResolution"; version = "4.0.0"; sha256 = "0dj3pvpv069nyia28gkl4a0fb7q33hbxz2dg25qvpah3l7pbl0qh"; })
(fetchNuGet { pname = "System.Net.NameResolution"; version = "4.3.0"; sha256 = "15r75pwc0rm3vvwsn8rvm2krf929mjfwliv0mpicjnii24470rkq"; })
(fetchNuGet { pname = "System.Net.NetworkInformation"; version = "4.1.0"; sha256 = "17ia8gyr0aq76z9cv37yjmpna7nx30xfppw0lifvi9s2q3yjspd2"; })
(fetchNuGet { pname = "System.Net.Primitives"; version = "4.0.11"; sha256 = "10xzzaynkzkakp7jai1ik3r805zrqjxiz7vcagchyxs2v26a516r"; })
(fetchNuGet { pname = "System.Net.Primitives"; version = "4.3.0"; sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii"; })
(fetchNuGet { pname = "System.Net.Requests"; version = "4.0.11"; sha256 = "13mka55sa6dg6nw4zdrih44gnp8hnj5azynz47ljsh2791lz3d9h"; })
(fetchNuGet { pname = "System.Net.Security"; version = "4.3.2"; sha256 = "1aw1ca1vssqrillrh4qkarx0lxwc8wcaqdkfdima8376wb98j2q8"; })
(fetchNuGet { pname = "System.Net.Sockets"; version = "4.1.0"; sha256 = "1385fvh8h29da5hh58jm1v78fzi9fi5vj93vhlm2kvqpfahvpqls"; })
(fetchNuGet { pname = "System.Net.WebHeaderCollection"; version = "4.0.1"; sha256 = "10bxpxj80c4z00z3ksrfswspq9qqsw8jwxcbzvymzycb97m9b55q"; })
(fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.4.0"; sha256 = "0rdvma399070b0i46c4qq1h2yvjj3k013sqzkilz4bz5cwmx1rba"; })
(fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.5.0"; sha256 = "1kzrj37yzawf1b19jq0253rcs8hsq1l2q8g69d7ipnhzb0h97m59"; })
(fetchNuGet { pname = "System.ObjectModel"; version = "4.0.12"; sha256 = "1sybkfi60a4588xn34nd9a58png36i0xr4y4v4kqpg8wlvy5krrj"; })
(fetchNuGet { pname = "System.ObjectModel"; version = "4.3.0"; sha256 = "191p63zy5rpqx7dnrb3h7prvgixmk168fhvvkkvhlazncf8r3nc2"; })
(fetchNuGet { pname = "System.Private.DataContractSerialization"; version = "4.3.0"; sha256 = "06fjipqvjp559rrm825x6pll8gimdj9x1n3larigh5hsm584gndw"; })
(fetchNuGet { pname = "System.Reflection"; version = "4.1.0"; sha256 = "1js89429pfw79mxvbzp8p3q93il6rdff332hddhzi5wqglc4gml9"; })
(fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; })
(fetchNuGet { pname = "System.Reflection.Emit"; version = "4.0.1"; sha256 = "0ydqcsvh6smi41gyaakglnv252625hf29f7kywy2c70nhii2ylqp"; })
(fetchNuGet { pname = "System.Reflection.Emit"; version = "4.3.0"; sha256 = "11f8y3qfysfcrscjpjym9msk7lsfxkk4fmz9qq95kn3jd0769f74"; })
(fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.0.1"; sha256 = "1pcd2ig6bg144y10w7yxgc9d22r7c7ww7qn1frdfwgxr24j9wvv0"; })
(fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.3.0"; sha256 = "0w1n67glpv8241vnpz1kl14sy7zlnw414aqwj4hcx5nd86f6994q"; })
(fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.0.1"; sha256 = "1s4b043zdbx9k39lfhvsk68msv1nxbidhkq6nbm27q7sf8xcsnxr"; })
(fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.3.0"; sha256 = "0ql7lcakycrvzgi9kxz1b3lljd990az1x6c4jsiwcacrvimpib5c"; })
(fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.0.1"; sha256 = "0m7wqwq0zqq9gbpiqvgk3sr92cbrw7cp3xn53xvw7zj6rz6fdirn"; })
(fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.3.0"; sha256 = "02bly8bdc98gs22lqsfx9xicblszr2yan7v2mmw3g7hy6miq5hwq"; })
(fetchNuGet { pname = "System.Reflection.Metadata"; version = "1.6.0"; sha256 = "1wdbavrrkajy7qbdblpbpbalbdl48q3h34cchz24gvdgyrlf15r4"; })
(fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.0.1"; sha256 = "1bangaabhsl4k9fg8khn83wm6yial8ik1sza7401621jc6jrym28"; })
(fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; })
(fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.1.0"; sha256 = "1bjli8a7sc7jlxqgcagl9nh8axzfl11f4ld3rjqsyxc516iijij7"; })
(fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.3.0"; sha256 = "0y2ssg08d817p0vdag98vn238gyrrynjdj4181hdg780sif3ykp1"; })
(fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.0.1"; sha256 = "0b4i7mncaf8cnai85jv3wnw6hps140cxz8vylv2bik6wyzgvz7bi"; })
(fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; })
(fetchNuGet { pname = "System.Runtime"; version = "4.1.0"; sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m"; })
(fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; })
(fetchNuGet { pname = "System.Runtime.Caching"; version = "4.5.0"; sha256 = "07ijp8j0cplcw1ns0fpkfsavppask164jn51lasiji4sfkjy592r"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.5.0"; sha256 = "17labczwqk3jng3kkky73m0jhi8wc21vbl7cz5c0hj2p1dswin43"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.5.2"; sha256 = "1vz4275fjij8inf31np78hw50al8nqkngk04p3xv5n4fcmf1grgi"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.5.3"; sha256 = "1afi6s2r1mh1kygbjmfba6l4f87pi5sg13p4a48idqafli94qxln"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.6.0"; sha256 = "0xmzi2gpbmgyfr75p24rqqsba3cmrqgmcv45lsqp5amgrdwd0f0m"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.7.0"; sha256 = "16r6sn4czfjk8qhnz7bnqlyiaaszr0ihinb7mq9zzr1wba257r54"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.7.1"; sha256 = "119br3pd85lq8zcgh4f60jzmv1g976q1kdgi3hvqdlhfbw6siz2j"; })
(fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.1.0"; sha256 = "0rw4rm4vsm3h3szxp9iijc3ksyviwsv6f63dng3vhqyg4vjdkc2z"; })
(fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; })
(fetchNuGet { pname = "System.Runtime.Handles"; version = "4.0.1"; sha256 = "1g0zrdi5508v49pfm3iii2hn6nm00bgvfpjq1zxknfjrxxa20r4g"; })
(fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; })
(fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.1.0"; sha256 = "01kxqppx3dr3b6b286xafqilv4s2n0gqvfgzfd4z943ga9i81is1"; })
(fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; })
(fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.0.1"; sha256 = "1y308zfvy0l5nrn46mqqr4wb4z1xk758pkk8svbz8b5ij7jnv4nn"; })
(fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; })
(fetchNuGet { pname = "System.Runtime.Serialization.Formatters"; version = "4.3.0"; sha256 = "114j35n8gcvn3sqv9ar36r1jjq0y1yws9r0yk8i6wm4aq7n9rs0m"; })
(fetchNuGet { pname = "System.Runtime.Serialization.Json"; version = "4.3.0"; sha256 = "1qp8ghr70smspnjdmlcbl5vwb7fm2iy1b7wx1p53lbpl35w4kz4a"; })
(fetchNuGet { pname = "System.Runtime.Serialization.Primitives"; version = "4.1.1"; sha256 = "042rfjixknlr6r10vx2pgf56yming8lkjikamg3g4v29ikk78h7k"; })
(fetchNuGet { pname = "System.Runtime.Serialization.Primitives"; version = "4.3.0"; sha256 = "01vv2p8h4hsz217xxs0rixvb7f2xzbh6wv1gzbfykcbfrza6dvnf"; })
(fetchNuGet { pname = "System.Security.AccessControl"; version = "4.5.0"; sha256 = "1wvwanz33fzzbnd2jalar0p0z3x0ba53vzx1kazlskp7pwyhlnq0"; })
(fetchNuGet { pname = "System.Security.Claims"; version = "4.0.1"; sha256 = "03dw0ls49bvsrffgwycyifjgz0qzr9r85skqhdyhfd51fqf398n6"; })
(fetchNuGet { pname = "System.Security.Claims"; version = "4.3.0"; sha256 = "0jvfn7j22l3mm28qjy3rcw287y9h65ha4m940waaxah07jnbzrhn"; })
(fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.2.0"; sha256 = "148s9g5dgm33ri7dnh19s4lgnlxbpwvrw2jnzllq2kijj4i4vs85"; })
(fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; })
(fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.2.0"; sha256 = "118jijz446kix20blxip0f0q8mhsh9bz118mwc2ch1p6g7facpzc"; })
(fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.3.0"; sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv"; })
(fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.5.0"; sha256 = "1pm4ykbcz48f1hdmwpia432ha6qbb9kbrxrrp7cg3m8q8xn52ngn"; })
(fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "5.0.0"; sha256 = "06hkx2za8jifpslkh491dfwzm5dxrsyxzj5lsc0achb6yzg4zqlw"; })
(fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.0.0"; sha256 = "1cwv8lqj8r15q81d2pz2jwzzbaji0l28xfrpw29kdpsaypm92z2q"; })
(fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.3.0"; sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1"; })
(fetchNuGet { pname = "System.Security.Cryptography.Encoding"; version = "4.0.0"; sha256 = "0a8y1a5wkmpawc787gfmnrnbzdgxmx1a14ax43jf3rj9gxmy3vk4"; })
(fetchNuGet { pname = "System.Security.Cryptography.Encoding"; version = "4.3.0"; sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32"; })
(fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.0.0"; sha256 = "16sx3cig3d0ilvzl8xxgffmxbiqx87zdi8fc73i3i7zjih1a7f4q"; })
(fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc"; })
(fetchNuGet { pname = "System.Security.Cryptography.Pkcs"; version = "5.0.0"; sha256 = "0hb2mndac3xrw3786bsjxjfh19bwnr991qib54k6wsqjhjyyvbwj"; })
(fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.0.0"; sha256 = "0i7cfnwph9a10bm26m538h5xcr8b36jscp9sy1zhgifksxz4yixh"; })
(fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.3.0"; sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; })
(fetchNuGet { pname = "System.Security.Cryptography.ProtectedData"; version = "4.4.0"; sha256 = "1q8ljvqhasyynp94a1d7jknk946m20lkwy2c3wa8zw2pc517fbj6"; })
(fetchNuGet { pname = "System.Security.Cryptography.ProtectedData"; version = "4.5.0"; sha256 = "11qlc8q6b7xlspayv07718ibzvlj6ddqqxkvcbxv5b24d5kzbrb7"; })
(fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.1.0"; sha256 = "0clg1bv55mfv5dq00m19cp634zx6inm31kf8ppbq1jgyjf2185dh"; })
(fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; })
(fetchNuGet { pname = "System.Security.Permissions"; version = "4.5.0"; sha256 = "192ww5rm3c9mirxgl1nzyrwd18am3izqls0hzm0fvcdjl5grvbhm"; })
(fetchNuGet { pname = "System.Security.Principal"; version = "4.0.1"; sha256 = "1nbzdfqvzzbgsfdd5qsh94d7dbg2v4sw0yx6himyn52zf8z6007p"; })
(fetchNuGet { pname = "System.Security.Principal"; version = "4.3.0"; sha256 = "12cm2zws06z4lfc4dn31iqv7072zyi4m910d4r6wm8yx85arsfxf"; })
(fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.0.0"; sha256 = "1d3vc8i0zss9z8p4qprls4gbh7q4218l9845kclx7wvw41809k6z"; })
(fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.5.0"; sha256 = "0rmj89wsl5yzwh0kqjgx45vzf694v9p92r4x4q6yxldk1cv1hi86"; })
(fetchNuGet { pname = "System.Security.SecureString"; version = "4.0.0"; sha256 = "026q5f46585hgisz4svhnjc7q0ljprz43v15rybqizlyli5585jz"; })
(fetchNuGet { pname = "System.Security.SecureString"; version = "4.3.0"; sha256 = "1dypfbw7mxd8cbpcxs3jrp7i5wm1vnp43bv823mk2z94r36ixqfc"; })
(fetchNuGet { pname = "System.Text.Encoding"; version = "4.0.11"; sha256 = "1dyqv0hijg265dwxg6l7aiv74102d6xjiwplh2ar1ly6xfaa4iiw"; })
(fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; })
(fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.5.0"; sha256 = "19x38911pawq4mrxrm04l2bnxwxxlzq8v8rj4cbxnfjj8pnd3vj3"; })
(fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.5.1"; sha256 = "1z21qyfs6sg76rp68qdx0c9iy57naan89pg7p6i3qpj8kyzn921w"; })
(fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.0.11"; sha256 = "08nsfrpiwsg9x5ml4xyl3zyvjfdi4mvbqf93kjdh11j4fwkznizs"; })
(fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; })
(fetchNuGet { pname = "System.Text.Encodings.Web"; version = "4.6.0"; sha256 = "0j61vkkcz390zbqsqqzdrzk4siqipi4359bgkh6icxli671k479l"; })
(fetchNuGet { pname = "System.Text.Encodings.Web"; version = "4.7.1"; sha256 = "1wj7r07mjwbf9a79kapy2l9m8mcq8b3nbhg0zaprlsav09k85fmb"; })
(fetchNuGet { pname = "System.Text.Json"; version = "4.6.0"; sha256 = "0ism236hwi0k6axssfq58s1d8lihplwiz058pdvl8al71hagri39"; })
(fetchNuGet { pname = "System.Text.Json"; version = "4.7.2"; sha256 = "10xj1pw2dgd42anikvj9qm23ccssrcp7dpznpj4j7xjp1ikhy3y4"; })
(fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.1.0"; sha256 = "1mw7vfkkyd04yn2fbhm38msk7dz2xwvib14ygjsb8dq2lcvr18y7"; })
(fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.3.0"; sha256 = "1bgq51k7fwld0njylfn7qc5fmwrk2137gdq7djqdsw347paa9c2l"; })
(fetchNuGet { pname = "System.Threading"; version = "4.0.11"; sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls"; })
(fetchNuGet { pname = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; })
(fetchNuGet { pname = "System.Threading.Overlapped"; version = "4.0.1"; sha256 = "0fi79az3vmqdp9mv3wh2phblfjls89zlj6p9nc3i9f6wmfarj188"; })
(fetchNuGet { pname = "System.Threading.Tasks"; version = "4.0.11"; sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5"; })
(fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; })
(fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.0.0"; sha256 = "1cb51z062mvc2i8blpzmpn9d9mm4y307xrwi65di8ri18cz5r1zr"; })
(fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.3.0"; sha256 = "1xxcx2xh8jin360yjwm4x4cf5y3a2bwpn2ygkfkwkicz7zk50s2z"; })
(fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.2"; sha256 = "1sh63dz0dymqcwmprp0nadm77b83vmm7lyllpv578c397bslb8hj"; })
(fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.3"; sha256 = "0g7r6hm572ax8v28axrdxz1gnsblg6kszq17g51pj14a5rn2af7i"; })
(fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.4"; sha256 = "0y6ncasgfcgnjrhynaf0lwpkpkmv4a07sswwkwbwb5h7riisj153"; })
(fetchNuGet { pname = "System.Threading.Thread"; version = "4.0.0"; sha256 = "1gxxm5fl36pjjpnx1k688dcw8m9l7nmf802nxis6swdaw8k54jzc"; })
(fetchNuGet { pname = "System.Threading.ThreadPool"; version = "4.0.10"; sha256 = "0fdr61yjcxh5imvyf93n2m3n5g9pp54bnw2l1d2rdl9z6dd31ypx"; })
(fetchNuGet { pname = "System.Threading.ThreadPool"; version = "4.3.0"; sha256 = "027s1f4sbx0y1xqw2irqn6x161lzj8qwvnh2gn78ciiczdv10vf1"; })
(fetchNuGet { pname = "System.ValueTuple"; version = "4.5.0"; sha256 = "00k8ja51d0f9wrq4vv5z2jhq8hy31kac2rg0rv06prylcybzl8cy"; })
(fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.0.11"; sha256 = "0c6ky1jk5ada9m94wcadih98l6k1fvf6vi7vhn1msjixaha419l5"; })
(fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.3.0"; sha256 = "0c47yllxifzmh8gq6rq6l36zzvw4kjvlszkqa9wq3fr59n0hl3s1"; })
(fetchNuGet { pname = "System.Xml.XDocument"; version = "4.0.11"; sha256 = "0n4lvpqzy9kc7qy1a4acwwd7b7pnvygv895az5640idl2y9zbz18"; })
(fetchNuGet { pname = "System.Xml.XDocument"; version = "4.3.0"; sha256 = "08h8fm4l77n0nd4i4fk2386y809bfbwqb7ih9d7564ifcxr5ssxd"; })
(fetchNuGet { pname = "System.Xml.XmlDocument"; version = "4.3.0"; sha256 = "0bmz1l06dihx52jxjr22dyv5mxv6pj4852lx68grjm7bivhrbfwi"; })
(fetchNuGet { pname = "System.Xml.XmlSerializer"; version = "4.3.0"; sha256 = "07pa4sx196vxkgl3csvdmw94nydlsm9ir38xxcs84qjn8cycd912"; })
]

View file

@ -0,0 +1,40 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p gnused jq common-updater-scripts nuget-to-nix dotnet-sdk_3 nix-prefetch-github
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
deps_file="$(realpath ./deps.nix)"
new_version="$(curl -s "https://api.github.com/repos/loic-sharma/BaGet/releases?per_page=1" | jq -r '.[0].name' | sed 's,^v,,')"
old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
if [[ "$new_version" == "$old_version" ]]; then
echo "Already up to date!"
exit 0
fi
new_rev="v$new_version"
nix-prefetch-github loic-sharma BaGet --rev "$new_rev" > repo_info
new_hash="$(jq -r ".sha256" < repo_info)"
rm repo_info
pushd ../../../..
update-source-version baget "$new_version" "$new_hash"
store_src="$(nix-build -A baget.src --no-out-link)"
src="$(mktemp -d /tmp/baget-src.XXX)"
cp -rT "$store_src" "$src"
trap 'rm -r "$src"' EXIT
chmod -R +w "$src"
pushd "$src"
export DOTNET_NOLOGO=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
mkdir ./nuget_pkgs
dotnet restore src/BaGet/BaGet.csproj --packages ./nuget_pkgs
nuget-to-nix ./nuget_pkgs > "$deps_file"

View file

@ -0,0 +1,238 @@
# This file originates from composer2nix
{ stdenv, lib, writeTextFile, fetchurl, php, unzip, phpPackages }:
let
inherit (phpPackages) composer;
buildZipPackage = { name, src }:
stdenv.mkDerivation {
inherit name src;
buildInputs = [ unzip ];
buildCommand = ''
unzip $src
baseDir=$(find . -type d -mindepth 1 -maxdepth 1)
cd $baseDir
mkdir -p $out
mv * $out
'';
};
buildPackage =
{ name
, src
, packages ? {}
, devPackages ? {}
, buildInputs ? []
, symlinkDependencies ? false
, executable ? false
, removeComposerArtifacts ? false
, postInstall ? ""
, noDev ? false
, unpackPhase ? "true"
, buildPhase ? "true"
, ...}@args:
let
reconstructInstalled = writeTextFile {
name = "reconstructinstalled.php";
executable = true;
text = ''
#! ${php}/bin/php
<?php
if(file_exists($argv[1]))
{
$composerLockStr = file_get_contents($argv[1]);
if($composerLockStr === false)
{
fwrite(STDERR, "Cannot open composer.lock contents\n");
exit(1);
}
else
{
$config = json_decode($composerLockStr, true);
if(array_key_exists("packages", $config))
$allPackages = $config["packages"];
else
$allPackages = array();
${lib.optionalString (!noDev) ''
if(array_key_exists("packages-dev", $config))
$allPackages = array_merge($allPackages, $config["packages-dev"]);
''}
$packagesStr = json_encode($allPackages, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
print($packagesStr);
}
}
else
print("[]");
?>
'';
};
constructBin = writeTextFile {
name = "constructbin.php";
executable = true;
text = ''
#! ${php}/bin/php
<?php
$composerJSONStr = file_get_contents($argv[1]);
if($composerJSONStr === false)
{
fwrite(STDERR, "Cannot open composer.json contents\n");
exit(1);
}
else
{
$config = json_decode($composerJSONStr, true);
if(array_key_exists("bin-dir", $config))
$binDir = $config["bin-dir"];
else
$binDir = "bin";
if(array_key_exists("bin", $config))
{
if(!file_exists("vendor/".$binDir))
mkdir("vendor/".$binDir);
foreach($config["bin"] as $bin)
symlink("../../".$bin, "vendor/".$binDir."/".basename($bin));
}
}
?>
'';
};
bundleDependencies = dependencies:
lib.concatMapStrings (dependencyName:
let
dependency = dependencies.${dependencyName};
in
''
${if dependency.targetDir == "" then ''
vendorDir="$(dirname ${dependencyName})"
mkdir -p "$vendorDir"
${if symlinkDependencies then
''ln -s "${dependency.src}" "$vendorDir/$(basename "${dependencyName}")"''
else
''cp -av "${dependency.src}" "$vendorDir/$(basename "${dependencyName}")"''
}
'' else ''
namespaceDir="${dependencyName}/$(dirname "${dependency.targetDir}")"
mkdir -p "$namespaceDir"
${if symlinkDependencies then
''ln -s "${dependency.src}" "$namespaceDir/$(basename "${dependency.targetDir}")"''
else
''cp -av "${dependency.src}" "$namespaceDir/$(basename "${dependency.targetDir}")"''
}
''}
'') (builtins.attrNames dependencies);
extraArgs = removeAttrs args [ "name" "packages" "devPackages" "buildInputs" ];
in
stdenv.mkDerivation ({
name = "composer-${name}";
buildInputs = [ php composer ] ++ buildInputs;
inherit unpackPhase buildPhase;
installPhase = ''
${if executable then ''
mkdir -p $out/share/php
cp -av $src $out/share/php/$name
chmod -R u+w $out/share/php/$name
cd $out/share/php/$name
'' else ''
cp -av $src $out
chmod -R u+w $out
cd $out
''}
# Remove unwanted files
rm -f *.nix
export HOME=$TMPDIR
# Remove the provided vendor folder if it exists
rm -Rf vendor
# If there is no composer.lock file, compose a dummy file.
# Otherwise, composer attempts to download the package.json file from
# the registry which we do not want.
if [ ! -f composer.lock ]
then
cat > composer.lock <<EOF
{
"packages": []
}
EOF
fi
# Reconstruct the installed.json file from the lock file
mkdir -p vendor/composer
${reconstructInstalled} composer.lock > vendor/composer/installed.json
# Copy or symlink the provided dependencies
cd vendor
${bundleDependencies packages}
${lib.optionalString (!noDev) (bundleDependencies devPackages)}
cd ..
# Reconstruct autoload scripts
# We use the optimize feature because Nix packages cannot change after they have been built
# Using the dynamic loader for a Nix package is useless since there is nothing to dynamically reload.
composer dump-autoload --optimize ${lib.optionalString noDev "--no-dev"}
# Run the install step as a validation to confirm that everything works out as expected
composer install --optimize-autoloader ${lib.optionalString noDev "--no-dev"}
${lib.optionalString executable ''
# Reconstruct the bin/ folder if we deploy an executable project
${constructBin} composer.json
ln -s $(pwd)/vendor/bin $out/bin
''}
${lib.optionalString (!symlinkDependencies) ''
# Patch the shebangs if possible
if [ -d $(pwd)/vendor/bin ]
then
# Look for all executables in bin/
for i in $(pwd)/vendor/bin/*
do
# Look for their location
realFile=$(readlink -f "$i")
# Restore write permissions
chmod u+wx "$(dirname "$realFile")"
chmod u+w "$realFile"
# Patch shebang
sed -e "s|#!/usr/bin/php|#!${php}/bin/php|" \
-e "s|#!/usr/bin/env php|#!${php}/bin/php|" \
"$realFile" > tmp
mv tmp "$realFile"
chmod u+x "$realFile"
done
fi
''}
if [ "$removeComposerArtifacts" = "1" ]
then
# Remove composer stuff
rm -f composer.json composer.lock
fi
# Execute post install hook
runHook postInstall
'';
} // extraArgs);
in
{
composer = lib.makeOverridable composer;
buildZipPackage = lib.makeOverridable buildZipPackage;
buildPackage = lib.makeOverridable buildPackage;
}

View file

@ -0,0 +1,13 @@
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, noDev ? false}:
let
composerEnv = import ./composer-env.nix {
inherit (pkgs) stdenv lib writeTextFile fetchurl php unzip phpPackages;
};
in
import ./php-packages.nix {
inherit composerEnv noDev;
inherit (pkgs) fetchurl fetchgit fetchhg fetchsvn;
}

View file

@ -0,0 +1,39 @@
{ pkgs, stdenv, lib, fetchFromGitHub, dataDir ? "/var/lib/bookstack" }:
let
package = (import ./composition.nix {
inherit pkgs;
inherit (stdenv.hostPlatform) system;
noDev = true; # Disable development dependencies
}).overrideAttrs (attrs : {
installPhase = attrs.installPhase + ''
rm -R $out/storage $out/public/uploads
ln -s ${dataDir}/.env $out/.env
ln -s ${dataDir}/storage $out/storage
ln -s ${dataDir}/public/uploads $out/public/uploads
'';
});
in package.override rec {
pname = "bookstack";
version = "21.12";
src = fetchFromGitHub {
owner = "bookstackapp";
repo = pname;
rev = "v${version}";
sha256 = "1bfwpvawa3pxpdsdbi3nxpjpdv2z1jmv7nk6cs9gs0210jlairsz";
};
meta = with lib; {
description = "A platform to create documentation/wiki content built with PHP & Laravel";
longDescription = ''
A platform for storing and organising information and documentation.
Details for BookStack can be found on the official website at https://www.bookstackapp.com/.
'';
homepage = "https://www.bookstackapp.com/";
license = licenses.mit;
maintainers = with maintainers; [ ymarkus ];
platforms = platforms.linux;
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,50 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nix curl jq nix-update
# check if composer2nix is installed
if ! command -v composer2nix &> /dev/null; then
echo "Please install composer2nix (https://github.com/svanderburg/composer2nix) to run this script."
exit 1
fi
CURRENT_VERSION=$(nix eval --raw '(with import ../../../.. {}; bookstack.version)')
TARGET_VERSION_REMOTE=$(curl https://api.github.com/repos/bookstackapp/bookstack/releases/latest | jq -r ".tag_name")
TARGET_VERSION=${TARGET_VERSION_REMOTE:1}
BOOKSTACK=https://github.com/bookstackapp/bookstack/raw/$TARGET_VERSION_REMOTE
SHA256=$(nix-prefetch-url --unpack "https://github.com/bookstackapp/bookstack/archive/v$TARGET_VERSION/bookstack.tar.gz")
if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then
echo "bookstack is up-to-date: ${CURRENT_VERSION}"
exit 0
fi
curl -LO "$BOOKSTACK/composer.json"
curl -LO "$BOOKSTACK/composer.lock"
composer2nix --name "bookstack" \
--composition=composition.nix \
--no-dev
rm composer.json composer.lock
# change version number
sed -e "s/version =.*;/version = \"$TARGET_VERSION\";/g" \
-e "s/sha256 =.*;/sha256 = \"$SHA256\";/g" \
-i ./default.nix
# fix composer-env.nix
sed -e "s/stdenv\.lib/lib/g" \
-e '3s/stdenv, writeTextFile/stdenv, lib, writeTextFile/' \
-i ./composer-env.nix
# fix composition.nix
sed -e '7s/stdenv writeTextFile/stdenv lib writeTextFile/' \
-i composition.nix
# fix missing newline
echo "" >> composition.nix
echo "" >> php-packages.nix
cd ../../../..
nix-build -A bookstack
exit $?

View file

@ -0,0 +1,38 @@
# Generated by bower2nix v3.2.0 (https://github.com/rvl/bower2nix)
{ fetchbower, buildEnv }:
buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
(fetchbower "jquery" "2.2.4" "2.2.4" "0kaln93pzjlr4vqf2zvsm9dwgjkrii9xlsqg48hc1vs16cl109rn")
(fetchbower "tweetnacl" "0.12.2" "0.12.2" "1lfzbfrdaly3zyzbcp1p53yhxlrx56k8x04q924kg7l52gblm65g")
(fetchbower "components-font-awesome" "4.7.0" "^4.6.3" "1w27im6ayjrbgjqa0i49ml5d3wy4ld40h9b29hz9myv77bpx4lg1")
(fetchbower "ckeditor" "4.14.0" "4.14.0" "0lw9q0k8c0jlxvf35vrccab9c3c8rgpc6x66czj9si8yy2lyliyp")
(fetchbower "codemirror" "5.63.3" "^5.19.0" "09di53sfsgpd328fvz1qjlmybk5mmnb2p9r38xw329bi9b21rq0r")
(fetchbower "requirejs" "2.3.5" "2.3.5" "05lyvgz914h2w08r24rk0vkk3yxmqrvlg7j3i5av9ffkg9lpzsli")
(fetchbower "marked" "1.1.0" "1.1.0" "1sdgqw9iki9c1pfm4c5h6c956mchbip2jywjrcmrlb75k53flsjz")
(fetchbower "rangy" "rangy-release#1.3.0" "rangy-release#~1.3.0" "13x3wci003p8jyv2ncir0k23bxckx99b3555r0zvgmlwycg7w0zv")
(fetchbower "json.sortify" "2.1.0" "~2.1.0" "1rz9xz0gnm4ak31n10vhslqsw8fw493gjylwj8xsy3bxqq1ygpnh")
(fetchbower "secure-fabric.js" "secure-v1.7.9" "secure-v1.7.9" "1l56mk7hbnsm9cdg5zdcmg95p7a9w96dq0bbl8fp11vs0awjil7a")
(fetchbower "hyperjson" "1.4.0" "~1.4.0" "1n68ls3x4lyhg1yy8i4q3xkgh5xqpyakf45sny4x91mkr68x4bd9")
(fetchbower "chainpad-crypto" "0.2.6" "^0.2.0" "0h6ibv6gcym7mm080swdw4l6l159xjmxgqnahyxw3aydha5cj1z0")
(fetchbower "chainpad-listmap" "1.0.0" "^1.0.0" "0qzqblw67y1p69xc9n734srfhjviwwb2jbqxgxs0rf4vdyspwvcb")
(fetchbower "chainpad" "5.2.4" "^5.2.0" "1f4nap0r8w50qpmjdfhhjhpz5xcl0n4zaxxnav1qaxi5j6dyg8h6")
(fetchbower "file-saver" "1.3.1" "1.3.1" "065nzkvdiicxnw06z1sjz1sbp9nyis8z839hv6ng1fk25dc5kvkg")
(fetchbower "alertifyjs" "1.0.11" "1.0.11" "0v7323bzq90k35shm3h6azj4wd9la3kbi1va1pw4qyvndkwma69l")
(fetchbower "scrypt-async" "1.2.0" "1.2.0" "0d076ax708p9b8hcmk4f82j925nlnm0hmp0ni45ql37g7iirfpyv")
(fetchbower "require-css" "0.1.10" "0.1.10" "106gz9i76v71q9zx2pnqkkj342m630lvssnw54023a0ljc0gqcwq")
(fetchbower "bootstrap" "4.6.0" "^v4.0.0" "1pp2n88pkms25p7mbna7vxxl5mkpdn8nvnfzwcwpp6b0871njmr6")
(fetchbower "diff-dom" "2.1.1" "2.1.1" "0nrn6xqlhp0p5ixjxdk8qg3939crkggh1l8swd20d7bsz186l5f1")
(fetchbower "nthen" "0.1.7" "0.1.7" "03yap5ildigaw4rwxmxs37pcwhq415iham8w39zd56ka98gpfxa5")
(fetchbower "open-sans-fontface" "1.4.2" "^1.4.2" "0ksav1fcq640fmdz49ra4prwsrrfj35y2p4shx1jh1j7zxd044nf")
(fetchbower "bootstrap-tokenfield" "0.12.1" "0.12.1" "1dh791s6ih8bf9ihck9n39h68c273jb3lg4mqk94bvqraz45fvwx")
(fetchbower "localforage" "1.10.0" "^1.5.2" "019rh006v2w5x63mgk78qhw59kf8czbkwdvfngmac8fs6gz88lc8")
(fetchbower "html2canvas" "0.4.1" "^0.4.1" "0yg7y90nav068q0i5afc2c221zkddpf28hi0hwc46cawx4180c69")
(fetchbower "croppie" "2.6.5" "^2.5.0" "1j1v5620zi13ad42r358i4ay891abwn6nz357484kgq2bgjj6ccx")
(fetchbower "sortablejs" "1.14.0" "^1.6.0" "104d688lrbwxi3hnfr4q169850ffyfv1s8qnycqxhx0zfh3887m0")
(fetchbower "saferphore" "0.0.1" "^0.0.1" "1wfr9wpbm3lswmvy2p0247ydb108h4qh5s286py89k871qh6jwdi")
(fetchbower "jszip" "Stuk/jszip#3.7.1" "Stuk/jszip#^3.1.5" "0lzq1zd2glvfh3wwj73c9sffas56ql5472yj1cwq3g7iva5iliwq")
(fetchbower "requirejs-plugins" "1.0.3" "^1.0.3" "00s3sdz1ykygx5shldwhhhybwgw7c99vkqd94i5i5x0gl97ifxf5")
(fetchbower "dragula.js" "3.7.2" "3.7.2" "0dbkmrl8bcxiplprmmp9fj96ri5nahb2ql8cc7zwawncv0drvlh0")
(fetchbower "MathJax" "3.0.5" "3.0.5" "087a9av15qj43m8pr3b9g59ncmydhmg40m6dfzsac62ykianh2a0")
(fetchbower "chainpad-netflux" "1.0.0" "^1.0.0" "08rpc73x1vyvd6zkb7w0m1smzjhq3b7cwb30nlmg93x873zjlsl6")
(fetchbower "netflux-websocket" "1.0.0" "^1.0.0" "10hgc5ra3ll7qc2r8aal6p03gx6dgz06l2b54lh995pvf901wzi6")
]; }

View file

@ -0,0 +1,90 @@
{ stdenv
, pkgs
, lib
, buildBowerComponents
, fetchbower
, fetchurl
, nodejs
}:
let
nodePackages = import ./node-packages.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
bowerPackages = (buildBowerComponents {
name = "${cryptpad.name}-bower-packages";
generated = ./bower-packages.nix;
src = cryptpad.src;
}).overrideAttrs (old: {
bowerPackages = old.bowerPackages.override (old_: {
# add missing dependencies:
# Those dependencies are EOL and they are not installed by buildBowerComponents,
# but they are required, otherwise the resolver crashes.
# * add the second jquery ~2.1.0 entry
# * add the second bootstrap ~3.1.1 entry
paths = old_.paths ++ [
(fetchbower "jquery" "2.1.0" "~2.1.0" "02kwvz93vzpv10qnp7s0dz3al0jh77awwrizb6wadsvgifxssnlr")
(fetchbower "bootstrap" "3.1.1" "~3.1.1" "06bhjwa8p7mzbpr3jkgydd804z1nwrkdql66h7jkfml99psv9811")
];
});
});
# find an element in an attribute set
findValue = pred: default: set:
let
list =
lib.concatMap
(name:
let v = set.${name}; in
if pred name v then [ v ] else [ ]
)
(lib.attrNames set)
;
in
if list == [ ] then default
else lib.head list
;
# The cryptpad package attribute key changes for each release. Get it out
# programatically instead.
cryptpad = findValue
(k: v: v.packageName == "cryptpad")
(throw "cryptpad not found")
nodePackages
;
combined = cryptpad.override {
postInstall = ''
out_cryptpad=$out/lib/node_modules/cryptpad
substituteInPlace $out_cryptpad/lib/workers/index.js --replace "lib/workers/db-worker" "$out_cryptpad/lib/workers/db-worker"
# add the bower components
ln -sv \
${bowerPackages}/bower_components \
$out_cryptpad/www/bower_components
# add executable
mkdir $out/bin
cat <<EOF > $out/bin/cryptpad
#!${stdenv.shell}
exec ${nodejs}/bin/node $out_cryptpad/server.js
EOF
chmod +x $out/bin/cryptpad
'';
meta = {
longDescription = ''
CryptPad is a collaboration suite that is end-to-end-encrypted and open-source.
It is built to enable collaboration, synchronizing changes to documents in real time.
Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored.
'';
maintainers = with lib.maintainers; [ davhau ];
mainProgram = "cryptpad";
};
};
in
combined

View file

@ -0,0 +1,18 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -I nixpkgs=../../../.. -p nodePackages.node2nix nix
# This script is meant to be run in the current directory
cryptpadSrc=$(nix eval '(import ../../../.. {}).cryptpad.src' --raw)
echo "cryptpad src: $cryptpadSrc"
nix-shell -I nixpkgs=../../../.. -p '(nodePackages.override { nodejs = nodejs-10_x; }).bower2nix' --run "bower2nix $cryptpadSrc/bower.json bower-packages.nix"
set -euo pipefail
node2nix --nodejs-12 \
--input node-packages.json \
--output node-packages-generated.nix \
--composition node-packages.nix \
--node-env ../../../development/node-packages/node-env.nix

View file

@ -0,0 +1,754 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}:
let
sources = {
"@mcrowe/minibloom-0.2.0" = {
name = "_at_mcrowe_slash_minibloom";
packageName = "@mcrowe/minibloom";
version = "0.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/@mcrowe/minibloom/-/minibloom-0.2.0.tgz";
sha1 = "1bed96aec18388198da37443899b2c3ff5948053";
};
};
"accepts-1.3.7" = {
name = "accepts";
packageName = "accepts";
version = "1.3.7";
src = fetchurl {
url = "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz";
sha512 = "Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==";
};
};
"array-flatten-1.1.1" = {
name = "array-flatten";
packageName = "array-flatten";
version = "1.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz";
sha1 = "9a5f699051b1e7073328f2a008968b64ea2955d2";
};
};
"async-limiter-1.0.1" = {
name = "async-limiter";
packageName = "async-limiter";
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz";
sha512 = "csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==";
};
};
"body-parser-1.18.3" = {
name = "body-parser";
packageName = "body-parser";
version = "1.18.3";
src = fetchurl {
url = "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz";
sha1 = "5b292198ffdd553b3a0f20ded0592b956955c8b4";
};
};
"bytes-3.0.0" = {
name = "bytes";
packageName = "bytes";
version = "3.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz";
sha1 = "d32815404d689699f85a4ea4fa8755dd13a96048";
};
};
"chainpad-crypto-0.2.6" = {
name = "chainpad-crypto";
packageName = "chainpad-crypto";
version = "0.2.6";
src = fetchurl {
url = "https://registry.npmjs.org/chainpad-crypto/-/chainpad-crypto-0.2.6.tgz";
sha512 = "yk7bBj22rs9PaX6LiqQxiw+Vj/afBStsNP1xP/B4Uh9a8iyJ7JrSZJ2Hj3d6fyqxJlBrMAX82Aj5PCZb5dzzHw==";
};
};
"chainpad-server-5.1.0" = {
name = "chainpad-server";
packageName = "chainpad-server";
version = "5.1.0";
src = fetchurl {
url = "https://registry.npmjs.org/chainpad-server/-/chainpad-server-5.1.0.tgz";
sha512 = "BdjgOOLTXXo1EjQ7lURDe7oqsqfQISNvwhILfp3K3diY2K1hxpPLbjYzOSgxNOTADeOAff0xnInR5eUCESVWaQ==";
};
};
"content-disposition-0.5.2" = {
name = "content-disposition";
packageName = "content-disposition";
version = "0.5.2";
src = fetchurl {
url = "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz";
sha1 = "0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4";
};
};
"content-type-1.0.4" = {
name = "content-type";
packageName = "content-type";
version = "1.0.4";
src = fetchurl {
url = "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz";
sha512 = "hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==";
};
};
"cookie-0.3.1" = {
name = "cookie";
packageName = "cookie";
version = "0.3.1";
src = fetchurl {
url = "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz";
sha1 = "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb";
};
};
"cookie-signature-1.0.6" = {
name = "cookie-signature";
packageName = "cookie-signature";
version = "1.0.6";
src = fetchurl {
url = "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz";
sha1 = "e303a882b342cc3ee8ca513a79999734dab3ae2c";
};
};
"debug-2.6.9" = {
name = "debug";
packageName = "debug";
version = "2.6.9";
src = fetchurl {
url = "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz";
sha512 = "bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==";
};
};
"depd-1.1.2" = {
name = "depd";
packageName = "depd";
version = "1.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz";
sha1 = "9bcd52e14c097763e749b274c4346ed2e560b5a9";
};
};
"destroy-1.0.4" = {
name = "destroy";
packageName = "destroy";
version = "1.0.4";
src = fetchurl {
url = "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz";
sha1 = "978857442c44749e4206613e37946205826abd80";
};
};
"ee-first-1.1.1" = {
name = "ee-first";
packageName = "ee-first";
version = "1.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz";
sha1 = "590c61156b0ae2f4f0255732a158b266bc56b21d";
};
};
"encodeurl-1.0.2" = {
name = "encodeurl";
packageName = "encodeurl";
version = "1.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz";
sha1 = "ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59";
};
};
"escape-html-1.0.3" = {
name = "escape-html";
packageName = "escape-html";
version = "1.0.3";
src = fetchurl {
url = "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz";
sha1 = "0258eae4d3d0c0974de1c169188ef0051d1d1988";
};
};
"etag-1.8.1" = {
name = "etag";
packageName = "etag";
version = "1.8.1";
src = fetchurl {
url = "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz";
sha1 = "41ae2eeb65efa62268aebfea83ac7d79299b0887";
};
};
"express-4.16.4" = {
name = "express";
packageName = "express";
version = "4.16.4";
src = fetchurl {
url = "https://registry.npmjs.org/express/-/express-4.16.4.tgz";
sha512 = "j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==";
};
};
"finalhandler-1.1.1" = {
name = "finalhandler";
packageName = "finalhandler";
version = "1.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz";
sha512 = "Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==";
};
};
"forwarded-0.2.0" = {
name = "forwarded";
packageName = "forwarded";
version = "0.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz";
sha512 = "buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==";
};
};
"fresh-0.5.2" = {
name = "fresh";
packageName = "fresh";
version = "0.5.2";
src = fetchurl {
url = "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz";
sha1 = "3d8cadd90d976569fa835ab1f8e4b23a105605a7";
};
};
"fs-extra-7.0.1" = {
name = "fs-extra";
packageName = "fs-extra";
version = "7.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz";
sha512 = "YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==";
};
};
"gar-1.0.4" = {
name = "gar";
packageName = "gar";
version = "1.0.4";
src = fetchurl {
url = "https://registry.npmjs.org/gar/-/gar-1.0.4.tgz";
sha512 = "w4n9cPWyP7aHxKxYHFQMegj7WIAsL/YX/C4Bs5Rr8s1H9M1rNtRWRsw+ovYMkXDQ5S4ZbYHsHAPmevPjPgw44w==";
};
};
"get-folder-size-2.0.1" = {
name = "get-folder-size";
packageName = "get-folder-size";
version = "2.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/get-folder-size/-/get-folder-size-2.0.1.tgz";
sha512 = "+CEb+GDCM7tkOS2wdMKTn9vU7DgnKUTuDlehkNJKNSovdCOVxs14OfKCk4cvSaR3za4gj+OBdl9opPN9xrJ0zA==";
};
};
"graceful-fs-4.2.8" = {
name = "graceful-fs";
packageName = "graceful-fs";
version = "4.2.8";
src = fetchurl {
url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz";
sha512 = "qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==";
};
};
"http-errors-1.6.3" = {
name = "http-errors";
packageName = "http-errors";
version = "1.6.3";
src = fetchurl {
url = "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz";
sha1 = "8b55680bb4be283a0b5bf4ea2e38580be1d9320d";
};
};
"iconv-lite-0.4.23" = {
name = "iconv-lite";
packageName = "iconv-lite";
version = "0.4.23";
src = fetchurl {
url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz";
sha512 = "neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==";
};
};
"inherits-2.0.3" = {
name = "inherits";
packageName = "inherits";
version = "2.0.3";
src = fetchurl {
url = "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz";
sha1 = "633c2c83e3da42a502f52466022480f4208261de";
};
};
"ipaddr.js-1.9.1" = {
name = "ipaddr.js";
packageName = "ipaddr.js";
version = "1.9.1";
src = fetchurl {
url = "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz";
sha512 = "0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==";
};
};
"jsonfile-4.0.0" = {
name = "jsonfile";
packageName = "jsonfile";
version = "4.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz";
sha1 = "8771aae0799b64076b76640fca058f9c10e33ecb";
};
};
"lex-1.7.9" = {
name = "lex";
packageName = "lex";
version = "1.7.9";
src = fetchurl {
url = "https://registry.npmjs.org/lex/-/lex-1.7.9.tgz";
sha1 = "5d5636ccef574348362938b79a47f0eed8ed0d43";
};
};
"looper-3.0.0" = {
name = "looper";
packageName = "looper";
version = "3.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/looper/-/looper-3.0.0.tgz";
sha1 = "2efa54c3b1cbaba9b94aee2e5914b0be57fbb749";
};
};
"media-typer-0.3.0" = {
name = "media-typer";
packageName = "media-typer";
version = "0.3.0";
src = fetchurl {
url = "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz";
sha1 = "8710d7af0aa626f8fffa1ce00168545263255748";
};
};
"merge-descriptors-1.0.1" = {
name = "merge-descriptors";
packageName = "merge-descriptors";
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz";
sha1 = "b00aaa556dd8b44568150ec9d1b953f3f90cbb61";
};
};
"methods-1.1.2" = {
name = "methods";
packageName = "methods";
version = "1.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz";
sha1 = "5529a4d67654134edcc5266656835b0f851afcee";
};
};
"mime-1.4.1" = {
name = "mime";
packageName = "mime";
version = "1.4.1";
src = fetchurl {
url = "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz";
sha512 = "KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==";
};
};
"mime-db-1.50.0" = {
name = "mime-db";
packageName = "mime-db";
version = "1.50.0";
src = fetchurl {
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz";
sha512 = "9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==";
};
};
"mime-types-2.1.33" = {
name = "mime-types";
packageName = "mime-types";
version = "2.1.33";
src = fetchurl {
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz";
sha512 = "plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==";
};
};
"ms-2.0.0" = {
name = "ms";
packageName = "ms";
version = "2.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz";
sha1 = "5608aeadfc00be6c2901df5f9861788de0d597c8";
};
};
"negotiator-0.6.2" = {
name = "negotiator";
packageName = "negotiator";
version = "0.6.2";
src = fetchurl {
url = "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz";
sha512 = "hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==";
};
};
"netflux-websocket-0.1.21" = {
name = "netflux-websocket";
packageName = "netflux-websocket";
version = "0.1.21";
src = fetchurl {
url = "https://registry.npmjs.org/netflux-websocket/-/netflux-websocket-0.1.21.tgz";
sha512 = "Zjl5lefg8urC0a0T7YCPGiUgRsISZBsTZl1STylmQz8Bq4ohcZ8cP3r6VoCpeVcvJ1Y/e3ZCXPxndWlNP9Jfug==";
};
};
"nthen-0.1.8" = {
name = "nthen";
packageName = "nthen";
version = "0.1.8";
src = fetchurl {
url = "https://registry.npmjs.org/nthen/-/nthen-0.1.8.tgz";
sha512 = "Oh2CwIbhj+wUT94lQV7LKmmgw3UYAGGd8oLIqp6btQN3Bz3PuWp4BuvtUo35H3rqDknjPfKx5P6mt7v+aJNjcw==";
};
};
"on-finished-2.3.0" = {
name = "on-finished";
packageName = "on-finished";
version = "2.3.0";
src = fetchurl {
url = "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz";
sha1 = "20f1336481b083cd75337992a16971aa2d906947";
};
};
"parseurl-1.3.3" = {
name = "parseurl";
packageName = "parseurl";
version = "1.3.3";
src = fetchurl {
url = "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz";
sha512 = "CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==";
};
};
"path-to-regexp-0.1.7" = {
name = "path-to-regexp";
packageName = "path-to-regexp";
version = "0.1.7";
src = fetchurl {
url = "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz";
sha1 = "df604178005f522f15eb4490e7247a1bfaa67f8c";
};
};
"proxy-addr-2.0.7" = {
name = "proxy-addr";
packageName = "proxy-addr";
version = "2.0.7";
src = fetchurl {
url = "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz";
sha512 = "llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==";
};
};
"pull-stream-3.6.14" = {
name = "pull-stream";
packageName = "pull-stream";
version = "3.6.14";
src = fetchurl {
url = "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.14.tgz";
sha512 = "KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew==";
};
};
"qs-6.5.2" = {
name = "qs";
packageName = "qs";
version = "6.5.2";
src = fetchurl {
url = "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz";
sha512 = "N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==";
};
};
"range-parser-1.2.1" = {
name = "range-parser";
packageName = "range-parser";
version = "1.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz";
sha512 = "Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==";
};
};
"raw-body-2.3.3" = {
name = "raw-body";
packageName = "raw-body";
version = "2.3.3";
src = fetchurl {
url = "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz";
sha512 = "9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==";
};
};
"safe-buffer-5.1.2" = {
name = "safe-buffer";
packageName = "safe-buffer";
version = "5.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz";
sha512 = "Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==";
};
};
"safer-buffer-2.1.2" = {
name = "safer-buffer";
packageName = "safer-buffer";
version = "2.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz";
sha512 = "YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==";
};
};
"saferphore-0.0.1" = {
name = "saferphore";
packageName = "saferphore";
version = "0.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/saferphore/-/saferphore-0.0.1.tgz";
sha1 = "cc962eda4e2b2452e6437fd32dcfb6f69ef2ea63";
};
};
"send-0.16.2" = {
name = "send";
packageName = "send";
version = "0.16.2";
src = fetchurl {
url = "https://registry.npmjs.org/send/-/send-0.16.2.tgz";
sha512 = "E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==";
};
};
"serve-static-1.13.2" = {
name = "serve-static";
packageName = "serve-static";
version = "1.13.2";
src = fetchurl {
url = "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz";
sha512 = "p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==";
};
};
"setprototypeof-1.1.0" = {
name = "setprototypeof";
packageName = "setprototypeof";
version = "1.1.0";
src = fetchurl {
url = "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz";
sha512 = "BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==";
};
};
"sortify-1.0.4" = {
name = "sortify";
packageName = "sortify";
version = "1.0.4";
src = fetchurl {
url = "https://registry.npmjs.org/sortify/-/sortify-1.0.4.tgz";
sha1 = "f0178687c83231be8a34fc0ec5462ea957b60284";
};
};
"statuses-1.4.0" = {
name = "statuses";
packageName = "statuses";
version = "1.4.0";
src = fetchurl {
url = "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz";
sha512 = "zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==";
};
};
"stream-to-pull-stream-1.7.3" = {
name = "stream-to-pull-stream";
packageName = "stream-to-pull-stream";
version = "1.7.3";
src = fetchurl {
url = "https://registry.npmjs.org/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz";
sha512 = "6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg==";
};
};
"tiny-each-async-2.0.3" = {
name = "tiny-each-async";
packageName = "tiny-each-async";
version = "2.0.3";
src = fetchurl {
url = "https://registry.npmjs.org/tiny-each-async/-/tiny-each-async-2.0.3.tgz";
sha1 = "8ebbbfd6d6295f1370003fbb37162afe5a0a51d1";
};
};
"tweetnacl-0.12.2" = {
name = "tweetnacl";
packageName = "tweetnacl";
version = "0.12.2";
src = fetchurl {
url = "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.12.2.tgz";
sha1 = "bd59f890507856fb0a1136acc3a8b44547e29ddb";
};
};
"tweetnacl-git+https://github.com/dchest/tweetnacl-js.git#v0.12.2" = {
name = "tweetnacl";
packageName = "tweetnacl";
version = "0.12.2";
src = fetchgit {
url = "https://github.com/dchest/tweetnacl-js.git";
rev = "8a21381d696acdc4e99c9f706f1ad23285795f79";
sha256 = "10f27b673944107995b3f6dcd65caecd705acdae9c37b7e79b810a8a72a40a31";
};
};
"type-is-1.6.18" = {
name = "type-is";
packageName = "type-is";
version = "1.6.18";
src = fetchurl {
url = "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz";
sha512 = "TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==";
};
};
"ulimit-0.0.2" = {
name = "ulimit";
packageName = "ulimit";
version = "0.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/ulimit/-/ulimit-0.0.2.tgz";
sha1 = "2b51f9dc8381ae4102636cec5eb338c2630588a0";
};
};
"ultron-1.1.1" = {
name = "ultron";
packageName = "ultron";
version = "1.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz";
sha512 = "UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==";
};
};
"universalify-0.1.2" = {
name = "universalify";
packageName = "universalify";
version = "0.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz";
sha512 = "rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==";
};
};
"unpipe-1.0.0" = {
name = "unpipe";
packageName = "unpipe";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz";
sha1 = "b2bf4ee8514aae6165b4817829d21b2ef49904ec";
};
};
"utils-merge-1.0.1" = {
name = "utils-merge";
packageName = "utils-merge";
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz";
sha1 = "9f95710f50a267947b2ccc124741c1028427e713";
};
};
"vary-1.1.2" = {
name = "vary";
packageName = "vary";
version = "1.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz";
sha1 = "2299f02c6ded30d4a5961b0b9f74524a18f634fc";
};
};
"ws-3.3.3" = {
name = "ws";
packageName = "ws";
version = "3.3.3";
src = fetchurl {
url = "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz";
sha512 = "nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==";
};
};
};
in
{
"cryptpad-git+https://github.com/xwiki-labs/cryptpad.git#4.11.0" = nodeEnv.buildNodePackage {
name = "cryptpad";
packageName = "cryptpad";
version = "4.11.0";
src = fetchgit {
url = "https://github.com/xwiki-labs/cryptpad.git";
rev = "390e38acf63a9d7ae581eaa926ea678a519fcc14";
sha256 = "d75f0568fd146da6512646d9516138f94b0bbbd9a4691eef11d370bf5810176a";
};
dependencies = [
sources."@mcrowe/minibloom-0.2.0"
sources."accepts-1.3.7"
sources."array-flatten-1.1.1"
sources."async-limiter-1.0.1"
sources."body-parser-1.18.3"
sources."bytes-3.0.0"
(sources."chainpad-crypto-0.2.6" // {
dependencies = [
sources."tweetnacl-git+https://github.com/dchest/tweetnacl-js.git#v0.12.2"
];
})
sources."chainpad-server-5.1.0"
sources."content-disposition-0.5.2"
sources."content-type-1.0.4"
sources."cookie-0.3.1"
sources."cookie-signature-1.0.6"
sources."debug-2.6.9"
sources."depd-1.1.2"
sources."destroy-1.0.4"
sources."ee-first-1.1.1"
sources."encodeurl-1.0.2"
sources."escape-html-1.0.3"
sources."etag-1.8.1"
sources."express-4.16.4"
sources."finalhandler-1.1.1"
sources."forwarded-0.2.0"
sources."fresh-0.5.2"
sources."fs-extra-7.0.1"
sources."gar-1.0.4"
sources."get-folder-size-2.0.1"
sources."graceful-fs-4.2.8"
sources."http-errors-1.6.3"
sources."iconv-lite-0.4.23"
sources."inherits-2.0.3"
sources."ipaddr.js-1.9.1"
sources."jsonfile-4.0.0"
sources."lex-1.7.9"
sources."looper-3.0.0"
sources."media-typer-0.3.0"
sources."merge-descriptors-1.0.1"
sources."methods-1.1.2"
sources."mime-1.4.1"
sources."mime-db-1.50.0"
sources."mime-types-2.1.33"
sources."ms-2.0.0"
sources."negotiator-0.6.2"
sources."netflux-websocket-0.1.21"
sources."nthen-0.1.8"
sources."on-finished-2.3.0"
sources."parseurl-1.3.3"
sources."path-to-regexp-0.1.7"
sources."proxy-addr-2.0.7"
sources."pull-stream-3.6.14"
sources."qs-6.5.2"
sources."range-parser-1.2.1"
sources."raw-body-2.3.3"
sources."safe-buffer-5.1.2"
sources."safer-buffer-2.1.2"
sources."saferphore-0.0.1"
sources."send-0.16.2"
sources."serve-static-1.13.2"
sources."setprototypeof-1.1.0"
sources."sortify-1.0.4"
sources."statuses-1.4.0"
sources."stream-to-pull-stream-1.7.3"
sources."tiny-each-async-2.0.3"
sources."tweetnacl-0.12.2"
sources."type-is-1.6.18"
sources."ulimit-0.0.2"
sources."ultron-1.1.1"
sources."universalify-0.1.2"
sources."unpipe-1.0.0"
sources."utils-merge-1.0.1"
sources."vary-1.1.2"
sources."ws-3.3.3"
];
buildInputs = globalBuildInputs;
meta = {
description = "realtime collaborative visual editor with zero knowlege server";
license = "AGPL-3.0+";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
}

View file

@ -0,0 +1,3 @@
[
{ "cryptpad": "git+https://github.com/xwiki-labs/cryptpad.git#4.11.0" }
]

View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
let
nodeEnv = import ../../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages-generated.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View file

@ -0,0 +1,12 @@
diff --git a/config/environments/production.rb b/config/environments/production.rb
index a523888a8d..422c2c1ee8 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -32,6 +32,7 @@ Discourse::Application.configure do
user_name: GlobalSetting.smtp_user_name,
password: GlobalSetting.smtp_password,
authentication: GlobalSetting.smtp_authentication,
+ ca_file: "/etc/ssl/certs/ca-certificates.crt",
enable_starttls_auto: GlobalSetting.smtp_enable_start_tls
}

View file

@ -0,0 +1,48 @@
diff --git a/lib/tasks/admin.rake b/lib/tasks/admin.rake
index 37ef651f2b..b775129498 100644
--- a/lib/tasks/admin.rake
+++ b/lib/tasks/admin.rake
@@ -107,3 +107,43 @@ task "admin:create" => :environment do
end
end
+
+desc "Creates a forum administrator noninteractively"
+task "admin:create_noninteractively" => :environment do
+ email = ENV["ADMIN_EMAIL"]
+ existing_user = User.find_by_email(email)
+
+ # check if user account already exixts
+ if existing_user
+ admin = existing_user
+ else
+ # create new user
+ admin = User.new
+ end
+
+ admin.email = email
+ admin.name = ENV["ADMIN_NAME"]
+ admin.username = ENV["ADMIN_USERNAME"]
+
+ password = ENV["ADMIN_PASSWORD"]
+ unless admin.confirm_password?(password)
+ admin.password = password
+ puts "Admin password set!"
+ end
+
+ admin.active = true
+
+ # save/update user account
+ saved = admin.save
+ raise admin.errors.full_messages.join("\n") unless saved
+
+ puts "Account created successfully with username #{admin.username}" unless existing_user
+
+ # grant admin privileges
+ admin.grant_admin!
+ if admin.trust_level < 1
+ admin.change_trust_level!(1)
+ end
+ admin.email_tokens.update_all confirmed: true
+ admin.activate
+end

View file

@ -0,0 +1,13 @@
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake
index 68b5db61ac..d460b5753e 100644
--- a/lib/tasks/assets.rake
+++ b/lib/tasks/assets.rake
@@ -19,7 +19,7 @@ task 'assets:precompile:before' do
if only_assets_precompile_remaining
# Using exec to free up Rails app memory during ember build
- exec "#{compile_command} && EMBER_CLI_COMPILE_DONE=1 bin/rake assets:precompile"
+ exec "#{compile_command} && EMBER_CLI_COMPILE_DONE=1 bundle exec rake assets:precompile"
else
system compile_command
end

View file

@ -0,0 +1,13 @@
diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb
index 8482ff0210..826d111d65 100644
--- a/lib/plugin/instance.rb
+++ b/lib/plugin/instance.rb
@@ -455,7 +455,7 @@ class Plugin::Instance
end
def auto_generated_path
- File.dirname(path) << "/auto_generated"
+ "#{Rails.root}/public/assets/auto_generated_plugin_assets/#{name}"
end
def after_initialize(&block)

View file

@ -0,0 +1,353 @@
{ stdenv, pkgs, makeWrapper, runCommand, lib, writeShellScript
, fetchFromGitHub, bundlerEnv, callPackage
, ruby, replace, gzip, gnutar, git, cacert, util-linux, gawk, nettools
, imagemagick, optipng, pngquant, libjpeg, jpegoptim, gifsicle, jhead
, oxipng, libpsl, redis, postgresql, which, brotli, procps, rsync, icu
, fetchYarnDeps, yarn, fixup_yarn_lock, nodePackages, nodejs-14_x
, nodejs-16_x
, plugins ? []
}@args:
let
version = "2.9.0.beta4";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse";
rev = "v${version}";
sha256 = "sha256-DpUEBGLgjcroVzdDG8/nGvC+ym19ZkGa7qvHKZZ1mH4=";
};
runtimeDeps = [
# For backups, themes and assets
rubyEnv.wrappedRuby
rsync
gzip
gnutar
git
brotli
# Misc required system utils
which
procps # For ps and kill
util-linux # For renice
gawk
nettools # For hostname
# Image optimization
imagemagick
optipng
oxipng
pngquant
libjpeg
jpegoptim
gifsicle
nodePackages.svgo
jhead
];
runtimeEnv = {
HOME = "/run/discourse/home";
RAILS_ENV = "production";
UNICORN_LISTENER = "/run/discourse/sockets/unicorn.sock";
};
mkDiscoursePlugin =
{ name ? null
, pname ? null
, version ? null
, meta ? null
, bundlerEnvArgs ? {}
, preserveGemsDir ? false
, src
, ...
}@args:
let
rubyEnv = bundlerEnv (bundlerEnvArgs // {
inherit name pname version ruby;
});
in
stdenv.mkDerivation (builtins.removeAttrs args [ "bundlerEnvArgs" ] // {
pluginName = if name != null then name else "${pname}-${version}";
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r * $out/
'' + lib.optionalString (bundlerEnvArgs != {}) (
if preserveGemsDir then ''
cp -r ${rubyEnv}/lib/ruby/gems/* $out/gems/
''
else ''
if [[ -e $out/gems ]]; then
echo "Warning: The repo contains a 'gems' directory which will be removed!"
echo " If you need to preserve it, set 'preserveGemsDir = true'."
rm -r $out/gems
fi
ln -sf ${rubyEnv}/lib/ruby/gems $out/gems
'' + ''
runHook postInstall
'');
});
rake = runCommand "discourse-rake" {
nativeBuildInputs = [ makeWrapper ];
} ''
mkdir -p $out/bin
makeWrapper ${rubyEnv}/bin/rake $out/bin/discourse-rake \
${lib.concatStrings (lib.mapAttrsToList (name: value: "--set ${name} '${value}' ") runtimeEnv)} \
--prefix PATH : ${lib.makeBinPath runtimeDeps} \
--set RAKEOPT '-f ${discourse}/share/discourse/Rakefile' \
--chdir '${discourse}/share/discourse'
'';
rubyEnv = bundlerEnv {
name = "discourse-ruby-env-${version}";
inherit version ruby;
gemdir = ./rubyEnv;
gemset =
let
gems = import ./rubyEnv/gemset.nix;
in
gems // {
mini_racer = gems.mini_racer // {
buildInputs = [ icu ];
dontBuild = false;
NIX_LDFLAGS = "-licui18n";
};
libv8-node =
let
noopScript = writeShellScript "noop" "exit 0";
linkFiles = writeShellScript "link-files" ''
cd ../..
mkdir -p vendor/v8/${stdenv.hostPlatform.system}/libv8/obj/
ln -s "${nodejs-16_x.libv8}/lib/libv8.a" vendor/v8/${stdenv.hostPlatform.system}/libv8/obj/libv8_monolith.a
ln -s ${nodejs-16_x.libv8}/include vendor/v8/include
mkdir -p ext/libv8-node
echo '--- !ruby/object:Libv8::Node::Location::Vendor {}' >ext/libv8-node/.location.yml
'';
in gems.libv8-node // {
dontBuild = false;
postPatch = ''
cp ${noopScript} libexec/build-libv8
cp ${noopScript} libexec/build-monolith
cp ${noopScript} libexec/download-node
cp ${noopScript} libexec/extract-node
cp ${linkFiles} libexec/inject-libv8
'';
};
mini_suffix = gems.mini_suffix // {
propagatedBuildInputs = [ libpsl ];
dontBuild = false;
# Use our libpsl instead of the vendored one, which isn't
# available for aarch64. It has to be called
# libpsl.x86_64.so or it isn't found.
postPatch = ''
cp $(readlink -f ${libpsl}/lib/libpsl.so) vendor/libpsl.x86_64.so
'';
};
};
groups = [
"default" "assets" "development" "test"
];
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = src + "/app/assets/javascripts/yarn.lock";
sha256 = "1l4nfc14cm42lkilsawfhdcnv1ln7m7bpan9a804abv4hwrs3f52";
};
assets = stdenv.mkDerivation {
pname = "discourse-assets";
inherit version src;
nativeBuildInputs = runtimeDeps ++ [
postgresql
redis
nodePackages.uglify-js
nodePackages.terser
yarn
nodejs-14_x
];
patches = [
# Use the Ruby API version in the plugin gem path, to match the
# one constructed by bundlerEnv
./plugin_gem_api_version.patch
# Change the path to the auto generated plugin assets, which
# defaults to the plugin's directory and isn't writable at the
# time of asset generation
./auto_generated_path.patch
# Fix the rake command used to recursively execute itself in the
# assets precompilation task.
./assets_rake_command.patch
];
# We have to set up an environment that is close enough to
# production ready or the assets:precompile task refuses to
# run. This means that Redis and PostgreSQL has to be running and
# database migrations performed.
preBuild = ''
# Yarn wants a real home directory to write cache, config, etc to
export HOME=$NIX_BUILD_TOP/fake_home
# Make yarn install packages from our offline cache, not the registry
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
# Fixup "resolved"-entries in yarn.lock to match our offline cache
${fixup_yarn_lock}/bin/fixup_yarn_lock app/assets/javascripts/yarn.lock
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
yarn install --offline --cwd app/assets/javascripts/discourse
patchShebangs app/assets/javascripts/node_modules/
redis-server >/dev/null &
initdb -A trust $NIX_BUILD_TOP/postgres >/dev/null
postgres -D $NIX_BUILD_TOP/postgres -k $NIX_BUILD_TOP >/dev/null &
export PGHOST=$NIX_BUILD_TOP
echo "Waiting for Redis and PostgreSQL to be ready.."
while ! redis-cli --scan >/dev/null || ! psql -l >/dev/null; do
sleep 0.1
done
psql -d postgres -tAc 'CREATE USER "discourse"'
psql -d postgres -tAc 'CREATE DATABASE "discourse" OWNER "discourse"'
psql 'discourse' -tAc "CREATE EXTENSION IF NOT EXISTS pg_trgm"
psql 'discourse' -tAc "CREATE EXTENSION IF NOT EXISTS hstore"
# Create a temporary home dir to stop bundler from complaining
mkdir $NIX_BUILD_TOP/tmp_home
export HOME=$NIX_BUILD_TOP/tmp_home
${lib.concatMapStringsSep "\n" (p: "ln -sf ${p} plugins/${p.pluginName or ""}") plugins}
export RAILS_ENV=production
bundle exec rake db:migrate >/dev/null
chmod -R +w tmp
'';
buildPhase = ''
runHook preBuild
bundle exec rake assets:precompile
runHook postBuild
'';
installPhase = ''
runHook preInstall
mv public/assets $out
runHook postInstall
'';
passthru = {
inherit yarnOfflineCache;
};
};
discourse = stdenv.mkDerivation {
pname = "discourse";
inherit version src;
buildInputs = [
rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler
];
patches = [
# Load a separate NixOS site settings file
./nixos_defaults.patch
# Add a noninteractive admin creation task
./admin_create.patch
# Add the path to the CA cert bundle to make TLS work
./action_mailer_ca_cert.patch
# Log Unicorn messages to the journal and make request timeout
# configurable
./unicorn_logging_and_timeout.patch
# Use the Ruby API version in the plugin gem path, to match the
# one constructed by bundlerEnv
./plugin_gem_api_version.patch
# Change the path to the auto generated plugin assets, which
# defaults to the plugin's directory and isn't writable at the
# time of asset generation
./auto_generated_path.patch
# Make sure the notification email setting applies
./notification_email.patch
];
postPatch = ''
# Always require lib-files and application.rb through their store
# path, not their relative state directory path. This gets rid of
# warnings and means we don't have to link back to lib from the
# state directory.
find config -type f -execdir sed -Ei "s,(\.\./)+(lib|app)/,$out/share/discourse/\2/," {} \;
'';
buildPhase = ''
runHook preBuild
mv config config.dist
mv public public.dist
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r . $out/share/discourse
rm -r $out/share/discourse/log
ln -sf /var/log/discourse $out/share/discourse/log
ln -sf /var/lib/discourse/tmp $out/share/discourse/tmp
ln -sf /run/discourse/config $out/share/discourse/config
ln -sf /run/discourse/assets/javascripts/plugins $out/share/discourse/app/assets/javascripts/plugins
ln -sf /run/discourse/public $out/share/discourse/public
ln -sf ${assets} $out/share/discourse/public.dist/assets
${lib.concatMapStringsSep "\n" (p: "ln -sf ${p} $out/share/discourse/plugins/${p.pluginName or ""}") plugins}
runHook postInstall
'';
meta = with lib; {
homepage = "https://www.discourse.org/";
platforms = platforms.linux;
maintainers = with maintainers; [ talyz ];
license = licenses.gpl2Plus;
description = "Discourse is an open source discussion platform";
};
passthru = {
inherit rubyEnv runtimeEnv runtimeDeps rake mkDiscoursePlugin assets;
enabledPlugins = plugins;
plugins = callPackage ./plugins/all-plugins.nix { inherit mkDiscoursePlugin; };
ruby = rubyEnv.wrappedRuby;
tests = import ../../../../nixos/tests/discourse.nix {
inherit (stdenv) system;
inherit pkgs;
package = pkgs.discourse.override args;
};
};
};
in discourse

View file

@ -0,0 +1,39 @@
{ stdenv, lib, fetchFromGitHub, ruby, makeWrapper, replace }:
stdenv.mkDerivation rec {
pname = "discourse-mail-receiver";
version = "4.0.7";
src = fetchFromGitHub {
owner = "discourse";
repo = "mail-receiver";
rev = "v${version}";
sha256 = "0grifm5qyqazq63va3w26xjqnxwmfixhx0fx0zy7kd39378wwa6i";
};
nativeBuildInputs = [ replace ];
buildInputs = [ ruby makeWrapper ];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
replace-literal -f -r -e /etc/postfix /run/discourse-mail-receiver .
cp -r receive-mail discourse-smtp-fast-rejection $out/bin/
cp -r lib $out/
wrapProgram $out/bin/receive-mail --set RUBYLIB $out/lib
wrapProgram $out/bin/discourse-smtp-fast-rejection --set RUBYLIB $out/lib
'';
meta = with lib; {
homepage = "https://www.discourse.org/";
platforms = platforms.linux;
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "A helper program which receives incoming mail for Discourse";
};
}

View file

@ -0,0 +1,13 @@
diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb
index a6641f967a..a45353504a 100644
--- a/app/models/site_setting.rb
+++ b/app/models/site_setting.rb
@@ -21,6 +21,8 @@ class SiteSetting < ActiveRecord::Base
end
end
+ load_settings(File.join(Rails.root, 'config', 'nixos_site_settings.json'))
+
setup_deprecated_methods
client_settings << :available_locales

View file

@ -0,0 +1,18 @@
diff --git a/db/fixtures/990_settings.rb b/db/fixtures/990_settings.rb
deleted file mode 100644
index 6f21e58813..0000000000
--- a/db/fixtures/990_settings.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-if SiteSetting.notification_email == SiteSetting.defaults[:notification_email]
- # don't crash for invalid hostname, which is possible in dev
- begin
- SiteSetting.notification_email = "noreply@#{Discourse.current_hostname}"
- rescue Discourse::InvalidParameters
- if Rails.env.production?
- STDERR.puts "WARNING: Discourse hostname: #{Discourse.current_hostname} is not a valid domain for emails!"
- end
- end
-end

View file

@ -0,0 +1,13 @@
diff --git a/lib/plugin_gem.rb b/lib/plugin_gem.rb
index 49882b2cd9..96672df2ea 100644
--- a/lib/plugin_gem.rb
+++ b/lib/plugin_gem.rb
@@ -4,7 +4,7 @@ module PluginGem
def self.load(path, name, version, opts = nil)
opts ||= {}
- gems_path = File.dirname(path) + "/gems/#{RUBY_VERSION}"
+ gems_path = File.dirname(path) + "/gems/#{Gem.ruby_api_version}"
spec_path = gems_path + "/specifications"

View file

@ -0,0 +1,4 @@
Run the nixpkgs/pkgs/servers/web-apps/discourse/update.py script to
update plugins! See the Plugins section of the Discourse chapter in
the NixOS manual (https://nixos.org/manual/nixos/unstable/index.html#module-services-discourse)
for more info.

View file

@ -0,0 +1,24 @@
{ mkDiscoursePlugin, newScope, fetchFromGitHub, ... }@args:
let
callPackage = newScope args;
in
{
discourse-assign = callPackage ./discourse-assign {};
discourse-calendar = callPackage ./discourse-calendar {};
discourse-canned-replies = callPackage ./discourse-canned-replies {};
discourse-chat-integration = callPackage ./discourse-chat-integration {};
discourse-checklist = callPackage ./discourse-checklist {};
discourse-data-explorer = callPackage ./discourse-data-explorer {};
discourse-docs = callPackage ./discourse-docs {};
discourse-github = callPackage ./discourse-github {};
discourse-ldap-auth = callPackage ./discourse-ldap-auth {};
discourse-math = callPackage ./discourse-math {};
discourse-migratepassword = callPackage ./discourse-migratepassword {};
discourse-openid-connect = callPackage ./discourse-openid-connect {};
discourse-prometheus = callPackage ./discourse-prometheus {};
discourse-saved-searches = callPackage ./discourse-saved-searches {};
discourse-solved = callPackage ./discourse-solved {};
discourse-spoiler-alert = callPackage ./discourse-spoiler-alert {};
discourse-voting = callPackage ./discourse-voting {};
discourse-yearly-review = callPackage ./discourse-yearly-review {};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-assign";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-assign";
rev = "7a854fe5046783bcff6cc24fca818056e1b9414a";
sha256 = "sha256-SGGwj0V4mTXD33tLnH76tQD/f6IvDbacq23XbaRdLsI=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-docs";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "Discourse Plugin for assigning users to a topic";
};
}

View file

@ -0,0 +1,6 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'rrule', '0.4.4', require: false

View file

@ -0,0 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.2.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
concurrent-ruby (1.1.10)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
minitest (5.15.0)
rrule (0.4.4)
activesupport (>= 2.3)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
PLATFORMS
ruby
DEPENDENCIES
rrule (= 0.4.4)
BUNDLED WITH
2.3.9

View file

@ -0,0 +1,18 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-calendar";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-calendar";
rev = "eb8bc3e864c6f735fa5a005e854f8c37411b6288";
sha256 = "sha256-fc3oQj2NqaTfmokJUryd2oBd/eVAcNOMMT0ZT45bU28=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-calendar";
maintainers = with maintainers; [ ryantm ];
license = licenses.mit;
description = "Adds the ability to create a dynamic calendar in the first post of a topic";
};
}

View file

@ -0,0 +1,66 @@
{
activesupport = {
dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1jpydd414j0fig3r0f6ci67mchclg6cq2qgqbq9zplrbg40pzfi8";
type = "gem";
};
version = "7.0.2.3";
};
concurrent-ruby = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0s4fpn3mqiizpmpy2a24k4v365pv75y50292r8ajrv4i1p5b2k14";
type = "gem";
};
version = "1.1.10";
};
i18n = {
dependencies = ["concurrent-ruby"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0b2qyvnk4yynlg17ymkq4g5xgr275637fhl1mjh0valw3cb1fhhg";
type = "gem";
};
version = "1.10.0";
};
minitest = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "06xf558gid4w8lwx13jwfdafsch9maz8m0g85wnfymqj63x5nbbd";
type = "gem";
};
version = "5.15.0";
};
rrule = {
dependencies = ["activesupport"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "04h3q0ws0wswqj3mwjyv44yx59d9ima9a820ay9w5bwnlb73syj2";
type = "gem";
};
version = "0.4.4";
};
tzinfo = {
dependencies = ["concurrent-ruby"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "10qp5x7f9hvlc0psv9gsfbxg4a7s0485wsbq1kljkxq94in91l4z";
type = "gem";
};
version = "2.0.4";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-canned-replies";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-canned-replies";
rev = "18af3367d9eda8842e8ff0de96c90aa2f0bdb0a3";
sha256 = "sha256-v8QOR0/9RUJ1zFmzhKYe/GEev3Jl4AlXWkQyuquyuJY=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-canned-replies";
maintainers = with maintainers; [ talyz ];
license = licenses.gpl2Only;
description = "Adds support for inserting a canned reply into the composer window via a UI";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-chat-integration";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-chat-integration";
rev = "eaa7de8c2b659d107c2b16ac0d469592aff79d7c";
sha256 = "sha256-7anXDbltMBM22dBnE5FFwNk7IJEUFZgDzR4Q/AYn6ng=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-chat-integration";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "This plugin integrates Discourse with a number of external chatroom systems";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-checklist";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-checklist";
rev = "68941e370e132c17fc2aa21ac40c033df72c9771";
sha256 = "sha256-jJM/01fKxc1RBcSPt9/KDxMkBMH2AOp9dINxSneNhAs=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-checklist";
maintainers = with maintainers; [ ryantm ];
license = licenses.gpl2Only;
description = "A simple checklist rendering plugin for discourse ";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-data-explorer";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-data-explorer";
rev = "baaac7ce671e716559329ae756988cc395d7079e";
sha256 = "sha256-bUCRfbKXdNbiJnU3xPMhG3s8kH7wQQoS2kV7ScHGOMQ=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-data-explorer";
maintainers = with maintainers; [ ryantm ];
license = licenses.mit;
description = "SQL Queries for admins in Discourse";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-docs";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-docs";
rev = "72b2e87e84221588bc2ff08961a492044f1f8237";
sha256 = "sha256-moR4TJYffh6JwC7oxeS4+Cyngi88Ht2eTbSEJJ4JKdY=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-docs";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "Find and filter knowledge base topics";
};
}

View file

@ -0,0 +1,7 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'sawyer', '0.8.2'
gem 'octokit', '4.22.0'

View file

@ -0,0 +1,47 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
multipart-post (2.1.1)
octokit (4.22.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
public_suffix (4.0.7)
ruby2_keywords (0.0.5)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
PLATFORMS
ruby
DEPENDENCIES
octokit (= 4.22.0)
sawyer (= 0.8.2)
BUNDLED WITH
2.3.9

View file

@ -0,0 +1,19 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-github";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-github";
rev = "36cbacdd32916435391b4700c024074da3bcbe74";
sha256 = "sha256-R4Kp7NFMIXYDcAZlOUdhNdN/mmQMgXlLFolzo2OZahw=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-github";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Adds GitHub badges and linkback functionality";
};
}

View file

@ -0,0 +1,177 @@
{
addressable = {
dependencies = ["public_suffix"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "022r3m9wdxljpbya69y2i3h9g3dhhfaqzidf95m6qjzms792jvgp";
type = "gem";
};
version = "2.8.0";
};
faraday = {
dependencies = ["faraday-em_http" "faraday-em_synchrony" "faraday-excon" "faraday-httpclient" "faraday-multipart" "faraday-net_http" "faraday-net_http_persistent" "faraday-patron" "faraday-rack" "faraday-retry" "ruby2_keywords"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "00palwawk897p5gypw5wjrh93d4p0xz2yl9w93yicb4kq7amh8d4";
type = "gem";
};
version = "1.10.0";
};
faraday-em_http = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "12cnqpbak4vhikrh2cdn94assh3yxza8rq2p9w2j34bqg5q4qgbs";
type = "gem";
};
version = "1.0.0";
};
faraday-em_synchrony = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1vgrbhkp83sngv6k4mii9f2s9v5lmp693hylfxp2ssfc60fas3a6";
type = "gem";
};
version = "1.0.0";
};
faraday-excon = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0h09wkb0k0bhm6dqsd47ac601qiaah8qdzjh8gvxfd376x1chmdh";
type = "gem";
};
version = "1.1.0";
};
faraday-httpclient = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0fyk0jd3ks7fdn8nv3spnwjpzx2lmxmg2gh4inz3by1zjzqg33sc";
type = "gem";
};
version = "1.0.1";
};
faraday-multipart = {
dependencies = ["multipart-post"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "03qfi9020ynf7hkdiaq01sd2mllvw7fg4qiin3pk028b4wv23j3j";
type = "gem";
};
version = "1.0.3";
};
faraday-net_http = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1fi8sda5hc54v1w3mqfl5yz09nhx35kglyx72w7b8xxvdr0cwi9j";
type = "gem";
};
version = "1.0.1";
};
faraday-net_http_persistent = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dc36ih95qw3rlccffcb0vgxjhmipsvxhn6cw71l7ffs0f7vq30b";
type = "gem";
};
version = "1.2.0";
};
faraday-patron = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "19wgsgfq0xkski1g7m96snv39la3zxz6x7nbdgiwhg5v82rxfb6w";
type = "gem";
};
version = "1.0.0";
};
faraday-rack = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1h184g4vqql5jv9s9im6igy00jp6mrah2h14py6mpf9bkabfqq7g";
type = "gem";
};
version = "1.0.0";
};
faraday-retry = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "153i967yrwnswqgvnnajgwp981k9p50ys1h80yz3q94rygs59ldd";
type = "gem";
};
version = "1.0.3";
};
multipart-post = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj";
type = "gem";
};
version = "2.1.1";
};
octokit = {
dependencies = ["faraday" "sawyer"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1nmdd7klyinvrrv2mggwwmc99ykaq7i379j00i37hvvaqx4giifj";
type = "gem";
};
version = "4.22.0";
};
public_suffix = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1f3knlwfwm05sfbaihrxm4g772b79032q14c16q4b38z8bi63qcb";
type = "gem";
};
version = "4.0.7";
};
ruby2_keywords = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1vz322p8n39hz3b4a9gkmz9y7a5jaz41zrm2ywf31dvkqm03glgz";
type = "gem";
};
version = "0.0.5";
};
sawyer = {
dependencies = ["addressable" "faraday"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz";
type = "gem";
};
version = "0.8.2";
};
}

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'pyu-ruby-sasl', '0.0.3.3', require: false
gem 'rubyntlm', '0.3.4', require: false
gem 'net-ldap', '0.14.0'
gem 'omniauth-ldap', '1.0.5'

View file

@ -0,0 +1,28 @@
GEM
remote: https://rubygems.org/
specs:
hashie (5.0.0)
net-ldap (0.14.0)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
omniauth-ldap (1.0.5)
net-ldap (~> 0.12)
omniauth (~> 1.0)
pyu-ruby-sasl (~> 0.0.3.2)
rubyntlm (~> 0.3.4)
pyu-ruby-sasl (0.0.3.3)
rack (2.2.3)
rubyntlm (0.3.4)
PLATFORMS
ruby
DEPENDENCIES
net-ldap (= 0.14.0)
omniauth-ldap (= 1.0.5)
pyu-ruby-sasl (= 0.0.3.3)
rubyntlm (= 0.3.4)
BUNDLED WITH
2.3.9

View file

@ -0,0 +1,18 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-ldap-auth";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "jonmbake";
repo = "discourse-ldap-auth";
rev = "a7a2e35eb5a8f6ee3b90bf48424efcb2a66c9989";
sha256 = "sha256-Dsb12bZEZlNjFGw1GX7zt2hDVM9Ua+MDWSmBn4HEvs0=";
};
meta = with lib; {
homepage = "https://github.com/jonmbake/discourse-ldap-auth";
maintainers = with maintainers; [ ryantm ];
license = licenses.mit;
description = "Discourse plugin to enable LDAP/Active Directory authentication.";
};
}

View file

@ -0,0 +1,74 @@
{
hashie = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1nh3arcrbz1rc1cr59qm53sdhqm137b258y8rcb4cvd3y98lwv4x";
type = "gem";
};
version = "5.0.0";
};
net-ldap = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "18fyxfbh32ai72cwgz8s9w0fg0xq7j534y217flw54mmzsj8i6qp";
type = "gem";
};
version = "0.14.0";
};
omniauth = {
dependencies = ["hashie" "rack"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz";
type = "gem";
};
version = "1.9.1";
};
omniauth-ldap = {
dependencies = ["net-ldap" "omniauth" "pyu-ruby-sasl" "rubyntlm"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1ld3mx46xa1qhc0cpnck1n06xcxs0ag4n41zgabxri27a772f9wz";
type = "gem";
};
version = "1.0.5";
};
pyu-ruby-sasl = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1rcpjiz9lrvyb3rd8k8qni0v4ps08psympffyldmmnrqayyad0sn";
type = "gem";
};
version = "0.0.3.3";
};
rack = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0i5vs0dph9i5jn8dfc6aqd6njcafmb20rwqngrf759c9cvmyff16";
type = "gem";
};
version = "2.2.3";
};
rubyntlm = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "18d1lxhx62swggf4cqg76h7hp04f5801c8h07w08cm9xng2niqby";
type = "gem";
};
version = "0.3.4";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-math";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-math";
rev = "b875a21b4d5225b61cb525531d30eaf852db6237";
sha256 = "sha256-UKba9ZaVjIxOqUYdl00Z2sLt3Y+exBX7MJax8EzXB1Q=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-math";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Official MathJax support for Discourse";
};
}

View file

@ -0,0 +1,6 @@
# frozen_string_literal: true
source "https://rubygems.org"
gem 'bcrypt', '3.1.3'
gem 'unix-crypt', '1.3.0'

View file

@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
bcrypt (3.1.3)
unix-crypt (1.3.0)
PLATFORMS
x86_64-linux
DEPENDENCIES
bcrypt (= 3.1.3)
unix-crypt (= 1.3.0)
BUNDLED WITH
2.2.20

View file

@ -0,0 +1,18 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-migratepassword";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "communiteq";
repo = "discourse-migratepassword";
rev = "91d6a008de91853becca01846aa4662bd227670e";
sha256 = "sha256-aKj0zXyXDnG20qVdhGvn4fwXiBeHFj2pv4bTUP81MP0=";
};
meta = with lib; {
homepage = "https://github.com/communiteq/discourse-migratepassword";
maintainers = with maintainers; [ ryantm ];
license = licenses.gpl2Only;
description = "Support migrated password hashes";
};
}

View file

@ -0,0 +1,22 @@
{
bcrypt = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1d2gqv8vry4ps0asb7nn1z4zxi3mcscy7yrim0npdd294ffyinvj";
type = "gem";
};
version = "3.1.3";
};
unix-crypt = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1wflipsmmicmgvqilp9pml4x19b337kh6p6jgrzqrzpkq2z52gdq";
type = "gem";
};
version = "1.3.0";
};
}

View file

@ -0,0 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'
group :development do
gem 'rubocop-discourse'
end

View file

@ -0,0 +1,37 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.1)
parallel (1.19.2)
parser (2.7.2.0)
ast (~> 2.4.1)
rainbow (3.0.0)
regexp_parser (1.8.1)
rexml (3.2.5)
rubocop (0.93.0)
parallel (~> 1.10)
parser (>= 2.7.1.5)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.6.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.7.1)
parser (>= 2.7.1.5)
rubocop-discourse (2.3.2)
rubocop (>= 0.69.0)
rubocop-rspec (>= 1.39.0)
rubocop-rspec (1.43.2)
rubocop (~> 0.87)
ruby-progressbar (1.10.1)
unicode-display_width (1.7.0)
PLATFORMS
ruby
DEPENDENCIES
rubocop-discourse
BUNDLED WITH
2.1.4

View file

@ -0,0 +1,19 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-openid-connect";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-openid-connect";
rev = "e897702139b9c0dca40b9385427ba8bad0e1eae9";
sha256 = "sha256-miosXf4to60BqGsbXYEL37G38uVHrz2/2Pizn0Rlp2o=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-openid-connect";
maintainers = with maintainers; [ mkg20001 ];
license = licenses.mit;
description = "Discourse plugin to integrate Discourse with an openid-connect login provider.";
};
}

View file

@ -0,0 +1,127 @@
{
ast = {
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1l3468czzjmxl93ap40hp7z94yxp4nbag0bxqs789bm30md90m2a";
type = "gem";
};
version = "2.4.1";
};
parallel = {
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "17b127xxmm2yqdz146qwbs57046kn0js1h8synv01dwqz2z1kp2l";
type = "gem";
};
version = "1.19.2";
};
parser = {
dependencies = ["ast"];
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1f7gmm60yla325wlnd3qkxs59qm2y0aan8ljpg6k18rwzrrfil6z";
type = "gem";
};
version = "2.7.2.0";
};
rainbow = {
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk";
type = "gem";
};
version = "3.0.0";
};
regexp_parser = {
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0n9d14ppshnx71i3mi1pnm3hwhcbb6m6vsc0b0dqgsab8r2rs96n";
type = "gem";
};
version = "1.8.1";
};
rexml = {
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53";
type = "gem";
};
version = "3.2.5";
};
rubocop = {
dependencies = ["parallel" "parser" "rainbow" "regexp_parser" "rexml" "rubocop-ast" "ruby-progressbar" "unicode-display_width"];
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1nrv7i81549addig09grw17qkab3l4319dcsf9y7psl7aa76ng3a";
type = "gem";
};
version = "0.93.0";
};
rubocop-ast = {
dependencies = ["parser"];
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "129hgz4swc8n0g01715v7y00k0h4mlzkxh63q7z27q7mjp54rl74";
type = "gem";
};
version = "0.7.1";
};
rubocop-discourse = {
dependencies = ["rubocop" "rubocop-rspec"];
groups = ["development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "10l2wwnvd4xccgqsyhxrhc5bw10b7an4awl0v90fw5xf2qdjiflw";
type = "gem";
};
version = "2.3.2";
};
rubocop-rspec = {
dependencies = ["rubocop"];
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1sc0bwdxzfr8byxzwvfyf22lwzqcaa6ca7wzxx31mk7vvy7r7dhl";
type = "gem";
};
version = "1.43.2";
};
ruby-progressbar = {
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf";
type = "gem";
};
version = "1.10.1";
};
unicode-display_width = {
groups = ["default" "development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna";
type = "gem";
};
version = "1.7.0";
};
}

View file

@ -0,0 +1,6 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'prometheus_exporter', File.read(File.expand_path("../prometheus_exporter_version", __FILE__)).strip

View file

@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
prometheus_exporter (0.5.0)
PLATFORMS
ruby
DEPENDENCIES
prometheus_exporter (= 0.5.0)
BUNDLED WITH
2.3.9

View file

@ -0,0 +1,26 @@
{ lib, stdenv, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
bundlerEnvArgs.gemdir = ./.;
name = "discourse-prometheus";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-prometheus";
rev = "43536e4a4977718972a673dc2475ae07df9a0a45";
sha256 = "sha256-7sQldPLY7YW/sr4WBHWxJVvhvRK0LwO3+52HAIJFvY4=";
};
patches = [
# The metrics collector tries to run git to get the commit id but fails
# because we don't run Discourse from a Git repository.
./no-git-version.patch
./spec-import-fix-abi-version.patch
];
meta = with lib; {
homepage = "https://github.com/discourse/discourse-prometheus";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "Official Discourse Plugin for Prometheus Monitoring";
};
}

View file

@ -0,0 +1,12 @@
{
prometheus_exporter = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1kmabnxz466zqnyqlzc693ny4l7i0rxvmc0znswvizc0zg4pri80";
type = "gem";
};
version = "0.5.0";
};
}

View file

@ -0,0 +1,36 @@
diff --git a/lib/internal_metric/global.rb b/lib/internal_metric/global.rb
index 682571b..7bdd431 100644
--- a/lib/internal_metric/global.rb
+++ b/lib/internal_metric/global.rb
@@ -30,30 +30,7 @@ module DiscoursePrometheus::InternalMetric
@active_app_reqs = 0
@queued_app_reqs = 0
@fault_logged = {}
-
- begin
- @@version = nil
-
- out, error, status = Open3.capture3('git rev-parse HEAD')
-
- if status.success?
- @@version ||= out.chomp
- else
- raise error
- end
- rescue => e
- if defined?(::Discourse)
- Discourse.warn_exception(e, message: "Failed to calculate discourse_version_info metric")
- else
- STDERR.puts "Failed to calculate discourse_version_info metric: #{e}\n#{e.backtrace.join("\n")}"
- end
-
- @@retries ||= 10
- @@retries -= 1
- if @@retries < 0
- @@version = -1
- end
- end
+ @@version = -1
end
def collect

View file

@ -0,0 +1,16 @@
diff --git a/bin/collector b/bin/collector
index 4fec65e..e59eac7 100755
--- a/bin/collector
+++ b/bin/collector
@@ -3,8 +3,10 @@
Process.setproctitle("discourse prometheus-collector")
+# We need the ABI version {MAJOR}.{MINOR}.0 here.
+abi_version = ENV['GEM_PATH'].split("/")[-1]
version = File.read(File.expand_path("../../prometheus_exporter_version", __FILE__)).strip
-spec_file = File.expand_path("../../gems/#{RUBY_VERSION}/specifications/prometheus_exporter-#{version}.gemspec", __FILE__)
+spec_file = File.expand_path("../../gems/#{abi_version}/specifications/prometheus_exporter-#{version}.gemspec", __FILE__)
spec = Gem::Specification.load spec_file
spec.activate

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-saved-searches";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-saved-searches";
rev = "f008809ee3bf3a8a5c11daff0807d59ab4336a0c";
sha256 = "sha256-/OyFL/9fLdVpsFQIlnjQ6ser6hdEs4X434nAaqKCTUE=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-saved-searches";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "Allow users to save searches and be notified of new results";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-solved";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-solved";
rev = "17ba805a06ddfc27c6435eb20c0f8466f1708be8";
sha256 = "sha256-G48c1khRVnCPXA8ujpDmEzL10uLC9e2sYVLVEXWIk0s=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-solved";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Allow accepted answers on topics";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-spoiler-alert";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-spoiler-alert";
rev = "4a07519cf9d7ac713f5e21ba770adb127524a22d";
sha256 = "sha256-pMTXdjqI4GrLNfZMbyPdeW+Jwieh6I4O/pT2Yyf4ltA=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-spoiler-alert";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Hide spoilers behind the spoiler-alert jQuery plugin";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-voting";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-voting";
rev = "1da667721269ca01ef53c35ec0470486b490e72c";
sha256 = "sha256-VCMv6YWHY24v9KyO4q0YSSYK+mszOVqP46slOh8okvY=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-voting";
maintainers = with maintainers; [ dpausp ];
license = licenses.gpl2Only;
description = "Adds the ability for voting on a topic within a specified category in Discourse";
};
}

View file

@ -0,0 +1,17 @@
{ lib, mkDiscoursePlugin, fetchFromGitHub }:
mkDiscoursePlugin {
name = "discourse-yearly-review";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-yearly-review";
rev = "ef4855f6afa16ef86013bba7da8e50a63e11b493";
sha256 = "sha256-IVKGysAKr+lKV1CO1JJIMLtzcvpK8joWjx8Bfy+dx8Y=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-yearly-review";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Publishes an automated Year in Review topic";
};
}

View file

@ -0,0 +1,268 @@
# frozen_string_literal: true
source 'https://rubygems.org'
# if there is a super emergency and rubygems is playing up, try
#source 'http://production.cf.rubygems.org'
gem 'bootsnap', require: false, platform: :mri
def rails_master?
ENV["RAILS_MASTER"] == '1'
end
if rails_master?
gem 'arel', git: 'https://github.com/rails/arel.git'
gem 'rails', git: 'https://github.com/rails/rails.git'
else
# NOTE: Until rubygems gives us optional dependencies we are stuck with this needing to be explicit
# this allows us to include the bits of rails we use without pieces we do not.
#
# To issue a rails update bump the version number here
rails_version = '6.1.4.7'
gem 'actionmailer', rails_version
gem 'actionpack', rails_version
gem 'actionview', rails_version
gem 'activemodel', rails_version
gem 'activerecord', rails_version
gem 'activesupport', rails_version
gem 'railties', rails_version
gem 'sprockets-rails'
end
gem 'json'
gem 'sprockets'
# this will eventually be added to rails,
# allows us to precompile all our templates in the unicorn master
gem 'actionview_precompiler', require: false
gem 'seed-fu'
gem 'mail', git: 'https://github.com/discourse/mail.git', require: false
gem 'mini_mime'
gem 'mini_suffix'
gem 'redis'
# This is explicitly used by Sidekiq and is an optional dependency.
# We tell Sidekiq to use the namespace "sidekiq" which triggers this
# gem to be used. There is no explicit dependency in sidekiq cause
# redis namespace support is optional
# We already namespace stuff in DiscourseRedis, so we should consider
# just using a single implementation in core vs having 2 namespace implementations
gem 'redis-namespace'
# NOTE: AM serializer gets a lot slower with recent updates
# we used an old branch which is the fastest one out there
# are long term goal here is to fork this gem so we have a
# better maintained living fork
gem 'active_model_serializers', '~> 0.8.3'
gem 'http_accept_language', require: false
# Ember related gems need to be pinned cause they control client side
# behavior, we will push these versions up when upgrading ember
gem 'discourse-ember-rails', '0.18.6', require: 'ember-rails'
gem 'discourse-ember-source', '~> 3.12.2'
gem 'ember-handlebars-template', '0.8.0'
gem 'discourse-fonts'
gem 'barber'
gem 'message_bus'
gem 'rails_multisite'
gem 'fast_xs', platform: :ruby
gem 'xorcist'
gem 'fastimage'
gem 'aws-sdk-s3', require: false
gem 'aws-sdk-sns', require: false
gem 'excon', require: false
gem 'unf', require: false
gem 'email_reply_trimmer'
gem 'image_optim'
gem 'multi_json'
gem 'mustache'
gem 'nokogiri'
gem 'loofah'
gem 'css_parser', require: false
gem 'omniauth'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-github'
gem 'omniauth-oauth2', require: false
gem 'omniauth-google-oauth2'
gem 'oj'
gem 'pg'
gem 'mini_sql'
gem 'pry-rails', require: false
gem 'pry-byebug', require: false
gem 'r2', require: false
gem 'rake'
gem 'thor', require: false
gem 'diffy', require: false
gem 'rinku'
gem 'sidekiq'
gem 'mini_scheduler'
gem 'execjs', require: false
gem 'mini_racer'
gem 'highline', require: false
gem 'rack'
gem 'rack-protection' # security
gem 'cbor', require: false
gem 'cose', require: false
gem 'addressable'
gem 'json_schemer'
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.1")
# net-smtp, net-imap and net-pop were removed from default gems in Ruby 3.1
gem "net-smtp", "~> 0.2.1", require: false
gem "net-imap", "~> 0.2.1", require: false
gem "net-pop", "~> 0.1.1", require: false
gem "digest", "3.0.0", require: false
end
# Gems used only for assets and not required in production environments by default.
# Allow everywhere for now cause we are allowing asset debugging in production
group :assets do
gem 'uglifier'
gem 'rtlit', require: false # for css rtling
end
group :test do
gem 'webmock', require: false
gem 'fakeweb', require: false
gem 'minitest', require: false
gem 'simplecov', require: false
gem "test-prof"
end
group :test, :development do
gem 'rspec'
gem 'listen', require: false
gem 'certified', require: false
gem 'fabrication', require: false
gem 'mocha', require: false
gem 'rb-fsevent', require: RUBY_PLATFORM =~ /darwin/i ? 'rb-fsevent' : false
gem 'rspec-rails'
gem 'shoulda-matchers', require: false
gem 'rspec-html-matchers'
gem 'byebug', require: ENV['RM_INFO'].nil?, platform: :mri
gem "rubocop-discourse", require: false
gem 'parallel_tests'
gem 'rswag-specs'
gem 'annotate'
end
group :development do
gem 'ruby-prof', require: false, platform: :mri
gem 'bullet', require: !!ENV['BULLET']
gem 'better_errors', platform: :mri, require: !!ENV['BETTER_ERRORS']
gem 'binding_of_caller'
gem 'yaml-lint'
end
if ENV["ALLOW_DEV_POPULATE"] == "1"
gem 'discourse_dev_assets'
gem 'faker', "~> 2.16"
else
group :development do
gem 'discourse_dev_assets'
gem 'faker', "~> 2.16"
end
end
# this is an optional gem, it provides a high performance replacement
# to String#blank? a method that is called quite frequently in current
# ActiveRecord, this may change in the future
gem 'fast_blank', platform: :ruby
# this provides a very efficient lru cache
gem 'lru_redux'
gem 'htmlentities', require: false
# IMPORTANT: mini profiler monkey patches, so it better be required last
# If you want to amend mini profiler to do the monkey patches in the railties
# we are open to it. by deferring require to the initializer we can configure discourse installs without it
gem 'rack-mini-profiler', require: ['enable_rails_patches']
gem 'unicorn', require: false, platform: :ruby
gem 'puma', require: false
gem 'rbtrace', require: false, platform: :mri
gem 'gc_tracer', require: false, platform: :mri
# required for feed importing and embedding
gem 'ruby-readability', require: false
# rss gem is a bundled gem from Ruby 3 onwards
gem 'rss', require: false
gem 'stackprof', require: false, platform: :mri
gem 'memory_profiler', require: false, platform: :mri
gem 'cppjieba_rb', require: false
gem 'lograge', require: false
gem 'logstash-event', require: false
gem 'logstash-logger', require: false
gem 'logster'
# NOTE: later versions of sassc are causing a segfault, possibly dependent on processer architecture
# and until resolved should be locked at 2.0.1
gem 'sassc', '2.0.1', require: false
gem "sassc-rails"
gem 'rotp', require: false
gem 'rqrcode'
gem 'rubyzip', require: false
gem 'sshkey', require: false
gem 'rchardet', require: false
gem 'lz4-ruby', require: false, platform: :ruby
gem 'sanitize'
if ENV["IMPORT"] == "1"
gem 'mysql2'
gem 'redcarpet'
# NOTE: in import mode the version of sqlite can matter a lot, so we stick it to a specific one
gem 'sqlite3', '~> 1.3', '>= 1.3.13'
gem 'ruby-bbcode-to-md', git: 'https://github.com/nlalonde/ruby-bbcode-to-md'
gem 'reverse_markdown'
gem 'tiny_tds'
gem 'csv'
end
gem 'webpush', require: false
gem 'colored2', require: false
gem 'maxminddb'
gem 'rails_failover', require: false

View file

@ -0,0 +1,601 @@
GIT
remote: https://github.com/discourse/mail.git
revision: 5b700fc95ee66378e0cf2559abc73c8bc3062a4b
specs:
mail (2.8.0.edge)
mini_mime (>= 0.1.1)
GEM
remote: https://rubygems.org/
specs:
actionmailer (6.1.4.7)
actionpack (= 6.1.4.7)
actionview (= 6.1.4.7)
activejob (= 6.1.4.7)
activesupport (= 6.1.4.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.4.7)
actionview (= 6.1.4.7)
activesupport (= 6.1.4.7)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (6.1.4.7)
activesupport (= 6.1.4.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
actionview_precompiler (0.2.3)
actionview (>= 6.0.a)
active_model_serializers (0.8.4)
activemodel (>= 3.0)
activejob (6.1.4.7)
activesupport (= 6.1.4.7)
globalid (>= 0.3.6)
activemodel (6.1.4.7)
activesupport (= 6.1.4.7)
activerecord (6.1.4.7)
activemodel (= 6.1.4.7)
activesupport (= 6.1.4.7)
activesupport (6.1.4.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.516.0)
aws-sdk-core (3.121.2)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.44.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.96.1)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sdk-sns (1.46.0)
aws-sdk-core (~> 3, >= 3.121.2)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
barber (0.12.2)
ember-source (>= 1.0, < 3.1)
execjs (>= 1.2, < 3)
better_errors (2.9.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
bootsnap (1.11.1)
msgpack (~> 1.2)
builder (3.2.4)
bullet (7.0.1)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
cbor (0.5.9.6)
certified (1.0.0)
chunky_png (1.4.0)
coderay (1.1.3)
colored2 (3.1.2)
concurrent-ruby (1.1.10)
connection_pool (2.2.5)
cose (1.2.0)
cbor (~> 0.5.9)
openssl-signature_algorithm (~> 1.0)
cppjieba_rb (0.4.2)
crack (0.4.5)
rexml
crass (1.0.6)
css_parser (1.11.0)
addressable
debug_inspector (1.1.0)
diff-lcs (1.5.0)
diffy (3.4.0)
discourse-ember-rails (0.18.6)
active_model_serializers
ember-data-source (>= 1.0.0.beta.5)
ember-handlebars-template (>= 0.1.1, < 1.0)
ember-source (>= 1.1.0)
jquery-rails (>= 1.0.17)
railties (>= 3.1)
discourse-ember-source (3.12.2.3)
discourse-fonts (0.0.9)
discourse_dev_assets (0.0.3)
faker (~> 2.16)
literate_randomizer
docile (1.4.0)
ecma-re-validator (0.4.0)
regexp_parser (~> 2.2)
email_reply_trimmer (0.1.13)
ember-data-source (3.0.2)
ember-source (>= 2, < 3.0)
ember-handlebars-template (0.8.0)
barber (>= 0.11.0)
sprockets (>= 3.3, < 4.1)
ember-source (2.18.2)
erubi (1.10.0)
excon (0.92.2)
execjs (2.8.1)
exifr (1.3.9)
fabrication (2.28.0)
faker (2.20.0)
i18n (>= 1.8.11, < 2)
fakeweb (1.3.0)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
fast_blank (1.0.1)
fast_xs (0.8.0)
fastimage (2.2.6)
ffi (1.15.5)
fspath (3.1.2)
gc_tracer (1.5.1)
globalid (1.0.0)
activesupport (>= 5.0)
guess_html_encoding (0.0.11)
hana (1.3.7)
hashdiff (1.0.1)
hashie (5.0.0)
highline (2.0.3)
hkdf (0.3.0)
htmlentities (4.3.4)
http_accept_language (2.1.1)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
image_optim (0.31.1)
exifr (~> 1.2, >= 1.2.2)
fspath (~> 3.0)
image_size (>= 1.5, < 4)
in_threads (~> 1.3)
progress (~> 3.0, >= 3.0.1)
image_size (3.0.1)
in_threads (1.6.0)
ipaddr (1.2.4)
jmespath (1.6.1)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.6.1)
json-schema (2.8.1)
addressable (>= 2.4)
json_schemer (0.2.20)
ecma-re-validator (~> 0.3)
hana (~> 1.3)
regexp_parser (~> 2.0)
uri_template (~> 0.7)
jwt (2.3.0)
kgio (2.11.4)
libv8-node (16.10.0.0)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
literate_randomizer (0.4.0)
lograge (0.12.0)
actionpack (>= 4)
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
logstash-event (1.2.02)
logstash-logger (0.26.1)
logstash-event (~> 1.2)
logster (2.11.0)
loofah (2.16.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lru_redux (1.1.0)
lz4-ruby (0.3.3)
maxminddb (0.1.22)
memory_profiler (1.0.0)
message_bus (4.2.0)
rack (>= 1.1.3)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
mini_racer (0.6.2)
libv8-node (~> 16.10.0.0)
mini_scheduler (0.13.0)
sidekiq (>= 4.2.3)
mini_sql (1.4.0)
mini_suffix (0.3.3)
ffi (~> 1.9)
minitest (5.15.0)
mocha (1.13.0)
msgpack (1.5.1)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
mustache (1.1.1)
nio4r (2.5.8)
nokogiri (1.13.4)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
oauth (0.5.8)
oauth2 (1.4.7)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
oj (3.13.11)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
omniauth-facebook (9.0.0)
omniauth-oauth2 (~> 1.2)
omniauth-github (1.4.0)
omniauth (~> 1.5)
omniauth-oauth2 (>= 1.4.0, < 2.0)
omniauth-google-oauth2 (0.8.2)
jwt (>= 2.0)
oauth2 (~> 1.1)
omniauth (~> 1.1)
omniauth-oauth2 (>= 1.6)
omniauth-oauth (1.2.0)
oauth
omniauth (>= 1.0, < 3)
omniauth-oauth2 (1.7.2)
oauth2 (~> 1.4)
omniauth (>= 1.9, < 3)
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
openssl (2.2.1)
ipaddr
openssl-signature_algorithm (1.1.1)
openssl (~> 2.0)
optimist (3.0.1)
parallel (1.22.1)
parallel_tests (3.8.1)
parallel
parser (3.1.2.0)
ast (~> 2.4.1)
pg (1.3.5)
progress (3.6.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.7)
puma (5.6.4)
nio4r (~> 2.0)
r2 (0.2.7)
racc (1.6.0)
rack (2.2.3)
rack-mini-profiler (3.0.0)
rack (>= 1.2.0)
rack-protection (2.2.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
rails_failover (0.8.1)
activerecord (> 6.0, < 7.1)
concurrent-ruby
railties (> 6.0, < 7.1)
rails_multisite (4.0.1)
activerecord (> 5.0, < 7.1)
railties (> 5.0, < 7.1)
railties (6.1.4.7)
actionpack (= 6.1.4.7)
activesupport (= 6.1.4.7)
method_source
rake (>= 0.13)
thor (~> 1.0)
rainbow (3.1.1)
raindrops (0.20.0)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbtrace (0.4.14)
ffi (>= 1.0.6)
msgpack (>= 0.4.3)
optimist (>= 3.0.0)
rchardet (1.8.0)
redis (4.5.1)
redis-namespace (1.8.2)
redis (>= 3.0.4)
regexp_parser (2.3.0)
request_store (1.5.1)
rack (>= 1.4)
rexml (3.2.5)
rinku (2.0.6)
rotp (6.2.0)
rqrcode (2.1.1)
chunky_png (~> 1.0)
rqrcode_core (~> 1.0)
rqrcode_core (1.2.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-html-matchers (0.9.4)
nokogiri (~> 1)
rspec (>= 3.0.0.a, < 4)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-rails (5.1.1)
actionpack (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.11.0)
rss (0.2.9)
rexml
rswag-specs (2.5.1)
activesupport (>= 3.1, < 7.1)
json-schema (~> 2.2)
railties (>= 3.1, < 7.1)
rtlit (0.0.5)
rubocop (1.27.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.16.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.17.0)
parser (>= 3.1.1.0)
rubocop-discourse (2.5.0)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.9.0)
rubocop (~> 1.19)
ruby-prof (1.4.3)
ruby-progressbar (1.11.0)
ruby-readability (0.7.0)
guess_html_encoding (>= 0.0.4)
nokogiri (>= 1.6.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sanitize (6.0.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
sassc (2.0.1)
ffi (~> 1.9)
rake
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
seed-fu (2.3.9)
activerecord (>= 3.1)
activesupport (>= 3.1)
shoulda-matchers (5.1.0)
activesupport (>= 5.2.0)
sidekiq (6.4.1)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sshkey (2.0.0)
stackprof (0.2.19)
test-prof (1.0.8)
thor (1.2.1)
tilt (2.0.10)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.1)
unicode-display_width (2.1.0)
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
uniform_notifier (1.16.0)
uri_template (0.7.0)
webmock (3.14.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webpush (1.1.0)
hkdf (~> 0.2)
jwt (~> 2.0)
xorcist (1.1.2)
yaml-lint (0.0.10)
zeitwerk (2.5.4)
PLATFORMS
ruby
DEPENDENCIES
actionmailer (= 6.1.4.7)
actionpack (= 6.1.4.7)
actionview (= 6.1.4.7)
actionview_precompiler
active_model_serializers (~> 0.8.3)
activemodel (= 6.1.4.7)
activerecord (= 6.1.4.7)
activesupport (= 6.1.4.7)
addressable
annotate
aws-sdk-s3
aws-sdk-sns
barber
better_errors
binding_of_caller
bootsnap
bullet
byebug
cbor
certified
colored2
cose
cppjieba_rb
css_parser
diffy
discourse-ember-rails (= 0.18.6)
discourse-ember-source (~> 3.12.2)
discourse-fonts
discourse_dev_assets
email_reply_trimmer
ember-handlebars-template (= 0.8.0)
excon
execjs
fabrication
faker (~> 2.16)
fakeweb
fast_blank
fast_xs
fastimage
gc_tracer
highline
htmlentities
http_accept_language
image_optim
json
json_schemer
listen
lograge
logstash-event
logstash-logger
logster
loofah
lru_redux
lz4-ruby
mail!
maxminddb
memory_profiler
message_bus
mini_mime
mini_racer
mini_scheduler
mini_sql
mini_suffix
minitest
mocha
multi_json
mustache
nokogiri
oj
omniauth
omniauth-facebook
omniauth-github
omniauth-google-oauth2
omniauth-oauth2
omniauth-twitter
parallel_tests
pg
pry-byebug
pry-rails
puma
r2
rack
rack-mini-profiler
rack-protection
rails_failover
rails_multisite
railties (= 6.1.4.7)
rake
rb-fsevent
rbtrace
rchardet
redis
redis-namespace
rinku
rotp
rqrcode
rspec
rspec-html-matchers
rspec-rails
rss
rswag-specs
rtlit
rubocop-discourse
ruby-prof
ruby-readability
rubyzip
sanitize
sassc (= 2.0.1)
sassc-rails
seed-fu
shoulda-matchers
sidekiq
simplecov
sprockets
sprockets-rails
sshkey
stackprof
test-prof
thor
uglifier
unf
unicorn
webmock
webpush
xorcist
yaml-lint
BUNDLED WITH
2.3.9

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,25 @@
diff --git a/config/unicorn.conf.rb b/config/unicorn.conf.rb
index e69979adfe..68cb04a036 100644
--- a/config/unicorn.conf.rb
+++ b/config/unicorn.conf.rb
@@ -27,18 +27,10 @@ pid (ENV["UNICORN_PID_PATH"] || "#{discourse_path}/tmp/pids/unicorn.pid")
if ENV["RAILS_ENV"] != "production"
logger Logger.new(STDOUT)
- # we want a longer timeout in dev cause first request can be really slow
- timeout (ENV["UNICORN_TIMEOUT"] && ENV["UNICORN_TIMEOUT"].to_i || 60)
-else
- # By default, the Unicorn logger will write to stderr.
- # Additionally, some applications/frameworks log to stderr or stdout,
- # so prevent them from going to /dev/null when daemonized here:
- stderr_path "#{discourse_path}/log/unicorn.stderr.log"
- stdout_path "#{discourse_path}/log/unicorn.stdout.log"
- # nuke workers after 30 seconds instead of 60 seconds (the default)
- timeout 30
end
+timeout (ENV["UNICORN_TIMEOUT"] && ENV["UNICORN_TIMEOUT"].to_i || 60)
+
# important for Ruby 2.0
preload_app true

View file

@ -0,0 +1,436 @@
#!/usr/bin/env nix-shell
#! nix-shell -i python3 -p bundix bundler nix-update nix-universal-prefetch python3 python3Packages.requests python3Packages.click python3Packages.click-log prefetch-yarn-deps
from __future__ import annotations
import click
import click_log
import shutil
import tempfile
import re
import logging
import subprocess
import os
import stat
import json
import requests
import textwrap
from functools import total_ordering
from distutils.version import LooseVersion
from itertools import zip_longest
from pathlib import Path
from typing import Union, Iterable
logger = logging.getLogger(__name__)
@total_ordering
class DiscourseVersion:
"""Represents a Discourse style version number and git tag.
This takes either a tag or version string as input and
extrapolates the other. Sorting is implemented to work as expected
in regard to A.B.C.betaD version numbers - 2.0.0.beta1 is
considered lower than 2.0.0.
"""
tag: str = ""
version: str = ""
split_version: Iterable[Union[None, int, str]] = []
def __init__(self, version: str):
"""Take either a tag or version number, calculate the other."""
if version.startswith('v'):
self.tag = version
self.version = version.lstrip('v')
else:
self.tag = 'v' + version
self.version = version
self.split_version = LooseVersion(self.version).version
def __eq__(self, other: DiscourseVersion):
"""Versions are equal when their individual parts are."""
return self.split_version == other.split_version
def __gt__(self, other: DiscourseVersion):
"""Check if this version is greater than the other.
Goes through the parts of the version numbers from most to
least significant, only continuing on to the next if the
numbers are equal and no decision can be made. If one version
ends in 'betaX' and the other doesn't, all else being equal,
the one without 'betaX' is considered greater, since it's the
release version.
"""
for (this_ver, other_ver) in zip_longest(self.split_version, other.split_version):
if this_ver == other_ver:
continue
if type(this_ver) is int and type(other_ver) is int:
return this_ver > other_ver
elif 'beta' in [this_ver, other_ver]:
# release version (None) is greater than beta
return this_ver is None
else:
return False
class DiscourseRepo:
version_regex = re.compile(r'^v\d+\.\d+\.\d+(\.beta\d+)?$')
_latest_commit_sha = None
def __init__(self, owner: str = 'discourse', repo: str = 'discourse'):
self.owner = owner
self.repo = repo
@property
def versions(self) -> Iterable[str]:
r = requests.get(f'https://api.github.com/repos/{self.owner}/{self.repo}/git/refs/tags').json()
tags = [x['ref'].replace('refs/tags/', '') for x in r]
# filter out versions not matching version_regex
versions = filter(self.version_regex.match, tags)
versions = [DiscourseVersion(x) for x in versions]
versions.sort(reverse=True)
return versions
@property
def latest_commit_sha(self) -> str:
if self._latest_commit_sha is None:
r = requests.get(f'https://api.github.com/repos/{self.owner}/{self.repo}/commits?per_page=1')
r.raise_for_status()
self._latest_commit_sha = r.json()[0]['sha']
return self._latest_commit_sha
def get_yarn_lock_hash(self, rev: str):
yarnLockText = self.get_file('app/assets/javascripts/yarn.lock', rev)
with tempfile.NamedTemporaryFile(mode='w') as lockFile:
lockFile.write(yarnLockText)
return subprocess.check_output(['prefetch-yarn-deps', lockFile.name]).decode('utf-8').strip()
def get_file(self, filepath, rev):
"""Return file contents at a given rev.
:param str filepath: the path to the file, relative to the repo root
:param str rev: the rev to fetch at :return:
"""
r = requests.get(f'https://raw.githubusercontent.com/{self.owner}/{self.repo}/{rev}/{filepath}')
r.raise_for_status()
return r.text
def _call_nix_update(pkg, version):
"""Call nix-update from nixpkgs root dir."""
nixpkgs_path = Path(__file__).parent / '../../../../'
return subprocess.check_output(['nix-update', pkg, '--version', version], cwd=nixpkgs_path)
def _nix_eval(expr: str):
nixpkgs_path = Path(__file__).parent / '../../../../'
try:
output = subprocess.check_output(['nix-instantiate', '--strict', '--json', '--eval', '-E', f'(with import {nixpkgs_path} {{}}; {expr})'], text=True)
except subprocess.CalledProcessError:
return None
return json.loads(output)
def _get_current_package_version(pkg: str):
return _nix_eval(f'{pkg}.version')
def _diff_file(filepath: str, old_version: DiscourseVersion, new_version: DiscourseVersion):
repo = DiscourseRepo()
current_dir = Path(__file__).parent
old = repo.get_file(filepath, old_version.tag)
new = repo.get_file(filepath, new_version.tag)
if old == new:
click.secho(f'{filepath} is unchanged', fg='green')
return
with tempfile.NamedTemporaryFile(mode='w') as o, tempfile.NamedTemporaryFile(mode='w') as n:
o.write(old), n.write(new)
width = shutil.get_terminal_size((80, 20)).columns
diff_proc = subprocess.run(
['diff', '--color=always', f'--width={width}', '-y', o.name, n.name],
stdout=subprocess.PIPE,
cwd=current_dir,
text=True
)
click.secho(f'Diff for {filepath} ({old_version.version} -> {new_version.version}):', fg='bright_blue', bold=True)
click.echo(diff_proc.stdout + '\n')
return
def _remove_platforms(rubyenv_dir: Path):
for platform in ['arm64-darwin-20', 'x86_64-darwin-18',
'x86_64-darwin-19', 'x86_64-darwin-20',
'x86_64-linux', 'aarch64-linux']:
with open(rubyenv_dir / 'Gemfile.lock', 'r') as f:
for line in f:
if platform in line:
subprocess.check_output(
['bundle', 'lock', '--remove-platform', platform], cwd=rubyenv_dir)
break
@click_log.simple_verbosity_option(logger)
@click.group()
def cli():
pass
@cli.command()
@click.argument('rev', default='latest')
@click.option('--reverse/--no-reverse', default=False, help='Print diffs from REV to current.')
def print_diffs(rev, reverse):
"""Print out diffs for files used as templates for the NixOS module.
The current package version found in the nixpkgs worktree the
script is run from will be used to download the "from" file and
REV used to download the "to" file for the diff, unless the
'--reverse' flag is specified.
REV should be the git rev to find changes in ('vX.Y.Z') or
'latest'; defaults to 'latest'.
"""
if rev == 'latest':
repo = DiscourseRepo()
rev = repo.versions[0].tag
old_version = DiscourseVersion(_get_current_package_version('discourse'))
new_version = DiscourseVersion(rev)
if reverse:
old_version, new_version = new_version, old_version
for f in ['config/nginx.sample.conf', 'config/discourse_defaults.conf']:
_diff_file(f, old_version, new_version)
@cli.command()
@click.argument('rev', default='latest')
def update(rev):
"""Update gem files and version.
REV: the git rev to update to ('vX.Y.Z[.betaA]') or
'latest'; defaults to 'latest'.
"""
repo = DiscourseRepo()
if rev == 'latest':
version = repo.versions[0]
else:
version = DiscourseVersion(rev)
logger.debug(f"Using rev {version.tag}")
logger.debug(f"Using version {version.version}")
rubyenv_dir = Path(__file__).parent / "rubyEnv"
for fn in ['Gemfile.lock', 'Gemfile']:
with open(rubyenv_dir / fn, 'w') as f:
f.write(repo.get_file(fn, version.tag))
subprocess.check_output(['bundle', 'lock'], cwd=rubyenv_dir)
_remove_platforms(rubyenv_dir)
subprocess.check_output(['bundix'], cwd=rubyenv_dir)
_call_nix_update('discourse', version.version)
old_yarn_hash = _nix_eval('discourse.assets.yarnOfflineCache.outputHash')
new_yarn_hash = repo.get_yarn_lock_hash(version.tag)
click.echo(f"Updating yarn lock hash, {old_yarn_hash} -> {new_yarn_hash}")
with open(Path(__file__).parent / "default.nix", 'r+') as f:
content = f.read()
content = content.replace(old_yarn_hash, new_yarn_hash)
f.seek(0)
f.write(content)
f.truncate()
@cli.command()
@click.argument('rev', default='latest')
def update_mail_receiver(rev):
"""Update discourse-mail-receiver.
REV: the git rev to update to ('vX.Y.Z') or 'latest'; defaults to
'latest'.
"""
repo = DiscourseRepo(repo="mail-receiver")
if rev == 'latest':
version = repo.versions[0]
else:
version = DiscourseVersion(rev)
_call_nix_update('discourse-mail-receiver', version.version)
@cli.command()
def update_plugins():
"""Update plugins to their latest revision."""
plugins = [
{'name': 'discourse-assign'},
{'name': 'discourse-calendar'},
{'name': 'discourse-canned-replies'},
{'name': 'discourse-chat-integration'},
{'name': 'discourse-checklist'},
{'name': 'discourse-data-explorer'},
{'name': 'discourse-docs'},
{'name': 'discourse-github'},
{'name': 'discourse-ldap-auth', 'owner': 'jonmbake'},
{'name': 'discourse-math'},
{'name': 'discourse-migratepassword', 'owner': 'discoursehosting'},
{'name': 'discourse-prometheus'},
{'name': 'discourse-openid-connect'},
{'name': 'discourse-saved-searches'},
{'name': 'discourse-solved'},
{'name': 'discourse-spoiler-alert'},
{'name': 'discourse-voting'},
{'name': 'discourse-yearly-review'},
]
for plugin in plugins:
fetcher = plugin.get('fetcher') or "fetchFromGitHub"
owner = plugin.get('owner') or "discourse"
name = plugin.get('name')
repo_name = plugin.get('repo_name') or name
repo = DiscourseRepo(owner=owner, repo=repo_name)
# implement the plugin pinning algorithm laid out here:
# https://meta.discourse.org/t/pinning-plugin-and-theme-versions-for-older-discourse-installs/156971
# this makes sure we don't upgrade plugins to revisions that
# are incompatible with the packaged Discourse version
try:
compatibility_spec = repo.get_file('.discourse-compatibility', repo.latest_commit_sha)
versions = [(DiscourseVersion(discourse_version), plugin_rev.strip(' '))
for [discourse_version, plugin_rev]
in [line.split(':')
for line
in compatibility_spec.splitlines()]]
discourse_version = DiscourseVersion(_get_current_package_version('discourse'))
versions = list(filter(lambda ver: ver[0] >= discourse_version, versions))
if versions == []:
rev = repo.latest_commit_sha
else:
rev = versions[0][1]
print(rev)
except requests.exceptions.HTTPError:
rev = repo.latest_commit_sha
filename = _nix_eval(f'builtins.unsafeGetAttrPos "src" discourse.plugins.{name}')
if filename is None:
filename = Path(__file__).parent / 'plugins' / name / 'default.nix'
filename.parent.mkdir()
has_ruby_deps = False
for line in repo.get_file('plugin.rb', rev).splitlines():
if 'gem ' in line:
has_ruby_deps = True
break
with open(filename, 'w') as f:
f.write(textwrap.dedent(f"""
{{ lib, mkDiscoursePlugin, fetchFromGitHub }}:
mkDiscoursePlugin {{
name = "{name}";"""[1:] + ("""
bundlerEnvArgs.gemdir = ./.;""" if has_ruby_deps else "") + f"""
src = {fetcher} {{
owner = "{owner}";
repo = "{repo_name}";
rev = "replace-with-git-rev";
sha256 = "replace-with-sha256";
}};
meta = with lib; {{
homepage = "";
maintainers = with maintainers; [ ];
license = licenses.mit; # change to the correct license!
description = "";
}};
}}"""))
all_plugins_filename = Path(__file__).parent / 'plugins' / 'all-plugins.nix'
with open(all_plugins_filename, 'r+') as f:
content = f.read()
pos = -1
while content[pos] != '}':
pos -= 1
content = content[:pos] + f' {name} = callPackage ./{name} {{}};' + os.linesep + content[pos:]
f.seek(0)
f.write(content)
f.truncate()
else:
filename = filename['file']
prev_commit_sha = _nix_eval(f'discourse.plugins.{name}.src.rev')
if prev_commit_sha == rev:
click.echo(f'Plugin {name} is already at the latest revision')
continue
prev_hash = _nix_eval(f'discourse.plugins.{name}.src.outputHash')
new_hash = subprocess.check_output([
'nix-universal-prefetch', fetcher,
'--owner', owner,
'--repo', repo_name,
'--rev', rev,
], text=True).strip("\n")
click.echo(f"Update {name}, {prev_commit_sha} -> {rev} in {filename}")
with open(filename, 'r+') as f:
content = f.read()
content = content.replace(prev_commit_sha, rev)
content = content.replace(prev_hash, new_hash)
f.seek(0)
f.write(content)
f.truncate()
rubyenv_dir = Path(filename).parent
gemfile = rubyenv_dir / "Gemfile"
version_file_regex = re.compile(r'.*File\.expand_path\("\.\./(.*)", __FILE__\)')
gemfile_text = ''
for line in repo.get_file('plugin.rb', rev).splitlines():
if 'gem ' in line:
gemfile_text = gemfile_text + line + os.linesep
version_file_match = version_file_regex.match(line)
if version_file_match is not None:
filename = version_file_match.groups()[0]
content = repo.get_file(filename, rev)
with open(rubyenv_dir / filename, 'w') as f:
f.write(content)
if len(gemfile_text) > 0:
if os.path.isfile(gemfile):
os.remove(gemfile)
subprocess.check_output(['bundle', 'init'], cwd=rubyenv_dir)
os.chmod(gemfile, stat.S_IREAD | stat.S_IWRITE | stat.S_IRGRP | stat.S_IROTH)
with open(gemfile, 'a') as f:
f.write(gemfile_text)
subprocess.check_output(['bundle', 'lock', '--add-platform', 'ruby'], cwd=rubyenv_dir)
subprocess.check_output(['bundle', 'lock', '--update'], cwd=rubyenv_dir)
_remove_platforms(rubyenv_dir)
subprocess.check_output(['bundix'], cwd=rubyenv_dir)
if __name__ == '__main__':
cli()

View file

@ -0,0 +1,22 @@
diff --git a/lib/discourse.rb b/lib/discourse.rb
index ea2a3cbafd..66454d9157 100644
--- a/lib/discourse.rb
+++ b/lib/discourse.rb
@@ -62,7 +62,7 @@ module Discourse
fd.fsync()
end
- File.rename(temp_destination, destination)
+ FileUtils.mv(temp_destination, destination)
nil
end
@@ -76,7 +76,7 @@ module Discourse
FileUtils.mkdir_p(File.join(Rails.root, 'tmp'))
temp_destination = File.join(Rails.root, 'tmp', SecureRandom.hex)
execute_command('ln', '-s', source, temp_destination)
- File.rename(temp_destination, destination)
+ FileUtils.mv(temp_destination, destination)
nil
end

View file

@ -0,0 +1,59 @@
{ lib, stdenv, fetchFromGitHub, writeText, nixosTests }:
stdenv.mkDerivation rec {
pname = "dokuwiki";
version = "2020-07-29";
src = fetchFromGitHub {
owner = "splitbrain";
repo = pname;
rev = "release_stable_${version}";
sha256 = "09swcqyd06l3481k190gmlr3b33dlv1lw1kk9nyh5b4sa5p3k7kk";
};
preload = writeText "preload.php" ''
<?php
$config_cascade = array(
'acl' => array(
'default' => getenv('DOKUWIKI_ACL_AUTH_CONFIG'),
),
'plainauth.users' => array(
'default' => getenv('DOKUWIKI_USERS_AUTH_CONFIG'),
'protected' => "" // not used by default
),
);
'';
phpLocalConfig = writeText "local.php" ''
<?php
return require(getenv('DOKUWIKI_LOCAL_CONFIG'));
?>
'';
phpPluginsLocalConfig = writeText "plugins.local.php" ''
<?php
return require(getenv('DOKUWIKI_PLUGINS_LOCAL_CONFIG'));
?>
'';
installPhase = ''
mkdir -p $out/share/dokuwiki
cp -r * $out/share/dokuwiki
cp ${preload} $out/share/dokuwiki/inc/preload.php
cp ${phpLocalConfig} $out/share/dokuwiki/conf/local.php
cp ${phpPluginsLocalConfig} $out/share/dokuwiki/conf/plugins.local.php
'';
passthru.tests = {
inherit (nixosTests) dokuwiki;
};
meta = with lib; {
description = "Simple to use and highly versatile Open Source wiki software that doesn't require a database";
license = licenses.gpl2;
homepage = "https://www.dokuwiki.org";
platforms = platforms.all;
maintainers = with maintainers; [ _1000101 ];
};
}

View file

@ -0,0 +1,51 @@
{ lib, stdenv, fetchzip, php, writeText, nixosTests }:
let
phpExt = php.withExtensions
({ enabled, all }: with all; [ json filter mysqlnd mysqli pdo pdo_mysql ]);
in stdenv.mkDerivation rec {
pname = "engelsystem";
version = "3.1.0";
src = fetchzip {
url =
"https://github.com/engelsystem/engelsystem/releases/download/v3.1.0/engelsystem-v3.1.0.zip";
sha256 = "01wra7li7n5kn1l6xkrmw4vlvvyqh089zs43qzn98hj0mw8gw7ai";
};
buildInputs = [ phpExt ];
installPhase = ''
runHook preInstall
# prepare
rm -r ./storage/
rm -r ./docker/
ln -sf /etc/engelsystem/config.php ./config/config.php
ln -sf /var/lib/engelsystem/storage/ ./storage
mkdir -p $out/share/engelsystem
mkdir -p $out/bin
cp -r . $out/share/engelsystem
echo $(command -v php)
# The patchShebangAuto function always used the php without extensions, so path the shebang manually
sed -i -e "1 s|.*|#\!${phpExt}/bin/php|" "$out/share/engelsystem/bin/migrate"
ln -s "$out/share/engelsystem/bin/migrate" "$out/bin/migrate"
runHook postInstall
'';
passthru.tests = nixosTests.engelsystem;
meta = with lib; {
description =
"Coordinate your volunteers in teams, assign them to work shifts or let them decide for themselves when and where they want to help with what";
homepage = "https://engelsystem.de";
license = licenses.gpl2;
maintainers = with maintainers; [ kloenk ];
mainProgram = "migrate";
platforms = platforms.all;
};
}

View file

@ -0,0 +1,27 @@
{ stdenv
, pkgs
, lib
, nodejs-14_x
}:
let
nodejs = nodejs-14_x;
nodePackages = import ./node-packages.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
ethercalc = lib.head (lib.attrValues nodePackages);
combined = ethercalc.override {
meta = with lib; {
description = "Online collaborative spreadsheet";
license = with licenses; [ cpal10 artistic2 mit asl20 cc0 mpl20 ];
homepage = "https://github.com/audreyt/ethercalc";
maintainers = with maintainers; [ iblech ];
platforms = platforms.unix;
};
};
in
combined

View file

@ -0,0 +1,16 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix
# Run this script not via `./generate.sh`, but via `$PWD/generate.sh`.
# Else `nix-shell` will not find this script.
set -euo pipefail
cd -- "$(dirname -- "$BASH_SOURCE[0]")"
node2nix \
--nodejs-14 \
--input node-packages.json \
--output node-packages-generated.nix \
--composition node-packages.nix \
--node-env ../../../development/node-packages/node-env.nix

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
[
{ "whitebophir": "git+https://github.com/audreyt/ethercalc.git#b196277081d677be991d104e454a52d242ef0189" }
]

View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}:
let
nodeEnv = import ../../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages-generated.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, libzip, boost, wt4, libconfig, pkg-config } :
stdenv.mkDerivation rec {
pname = "fileshelter";
version = "4.0.1";
src = fetchFromGitHub {
owner = "epoupon";
repo = "fileshelter";
rev = "v${version}";
sha256 = "07n70wwqj7lqdxs3wya1m8bwg8l6lgmmlfpwyv3r3s4dfzb1b3ka";
};
enableParallelBuilding = true;
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ libzip boost wt4 libconfig ];
NIX_LDFLAGS = "-lpthread";
postInstall = ''
ln -s ${wt4}/share/Wt/resources $out/share/fileshelter/docroot/resources
'';
meta = with lib; {
homepage = "https://github.com/epoupon/fileshelter";
description = "FileShelter is a 'one-click' file sharing web application";
maintainers = [ maintainers.willibutz ];
license = licenses.gpl3;
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,34 @@
{ lib, fetchFromGitHub, buildGoModule }:
buildGoModule rec {
pname = "galene";
version = "0.4.4";
src = fetchFromGitHub {
owner = "jech";
repo = "galene";
rev = "galene-${version}";
hash = "sha256-5ngX9VakQlcAVGDQ1R62oNfChGPjbu48ILFA3pBqP7k=";
};
vendorSha256 = "0rkn6lpy4n5ra1jy3m0ysdjpwh3hq2z4xwda2pzvp99sgszxl5g3";
ldflags = [ "-s" "-w" ];
preCheck = "export TZ=UTC";
outputs = [ "out" "static" ];
postInstall = ''
mkdir $static
cp -r ./static $static
'';
meta = with lib; {
description = "Videoconferencing server that is easy to deploy, written in Go";
homepage = "https://github.com/jech/galene";
changelog = "https://github.com/jech/galene/raw/galene-${version}/CHANGES";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ rgrunbla ];
};
}

View file

@ -0,0 +1,122 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, makeWrapper
, which
, nodejs
, mkYarnPackage
, fetchYarnDeps
, python3
, nixosTests
, buildGoModule
}:
let
pinData = lib.importJSON ./pin.json;
# we need a different version than the one already available in nixpkgs
esbuild-hedgedoc = buildGoModule rec {
pname = "esbuild";
version = "0.12.27";
src = fetchFromGitHub {
owner = "evanw";
repo = "esbuild";
rev = "v${version}";
sha256 = "sha256-UclUTfm6fxoYEEdEEmO/j+WLZLe8SFzt7+Tej4bR0RU=";
};
vendorSha256 = "sha256-QPkBR+FscUc3jOvH7olcGUhM6OW4vxawmNJuRQxPuGs=";
};
in
mkYarnPackage rec {
pname = "hedgedoc";
inherit (pinData) version;
src = fetchFromGitHub {
owner = "hedgedoc";
repo = "hedgedoc";
rev = version;
sha256 = pinData.srcHash;
};
nativeBuildInputs = [ which makeWrapper ];
extraBuildInputs = [ python3 esbuild-hedgedoc ];
offlineCache = fetchYarnDeps {
inherit yarnLock;
sha256 = pinData.yarnHash;
};
# FIXME(@Ma27) on the bump to 1.9.0 I had to patch this file manually:
# I replaced `midi "https://github.com/paulrosen/MIDI.js.git#abcjs"` with
# `midi "git+https://github.com/paulrosen/MIDI.js.git#abcjs"` on all occurrences.
#
# Without this change `yarn` attempted to download the code directly from GitHub, with
# the `git+`-prefix it actually uses the `midi.js` version from the offline cache
# created by `yarn2nix`. On future bumps this may be necessary as well!
yarnLock = ./yarn.lock;
packageJSON = ./package.json;
postConfigure = ''
rm deps/HedgeDoc/node_modules
cp -R "$node_modules" deps/HedgeDoc
chmod -R u+w deps/HedgeDoc
'';
buildPhase = ''
runHook preBuild
cd deps/HedgeDoc
pushd node_modules/sqlite3
export CPPFLAGS="-I${nodejs}/include/node"
npm run install --build-from-source --nodedir=${nodejs}/include/node
popd
pushd node_modules/esbuild
rm bin/esbuild
ln -s ${lib.getBin esbuild-hedgedoc}/bin/esbuild bin/
popd
npm run build
patchShebangs bin/*
runHook postBuild
'';
dontInstall = true;
distPhase = ''
runHook preDist
mkdir -p $out
cp -R {app.js,bin,lib,locales,node_modules,package.json,public} $out
cat > $out/bin/hedgedoc <<EOF
#!${stdenv.shell}/bin/sh
${nodejs}/bin/node $out/app.js
EOF
chmod +x $out/bin/hedgedoc
wrapProgram $out/bin/hedgedoc \
--set NODE_PATH "$out/lib/node_modules"
runHook postDist
'';
passthru = {
updateScript = ./update.sh;
tests = { inherit (nixosTests) hedgedoc; };
};
meta = with lib; {
description = "Realtime collaborative markdown notes on all platforms";
license = licenses.agpl3;
homepage = "https://hedgedoc.org";
maintainers = with maintainers; [ willibutz ma27 globin ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,215 @@
{
"name": "HedgeDoc",
"version": "1.9.0",
"description": "The best platform to write and share markdown.",
"main": "app.js",
"license": "AGPL-3.0",
"scripts": {
"test": "npm run-script eslint && npm run-script jsonlint && npm run-script mocha-suite",
"eslint": "node_modules/.bin/eslint --max-warnings 0 lib public test app.js",
"jsonlint": "find . -not -path './node_modules/*' -type f -name '*.json' -o -type f -name '*.json.example' | while read json; do echo $json ; jq . $json; done",
"markdownlint": "remark .",
"mocha-suite": "NODE_ENV=test CMD_DB_URL=\"sqlite::memory:\" mocha --exit",
"standard": "echo 'standard is no longer being used, use `npm run eslint` instead!' && exit 1",
"dev": "webpack --config webpack.dev.js --progress --watch",
"heroku-prebuild": "bin/heroku",
"build": "webpack --config webpack.prod.js --progress",
"start": "node app.js"
},
"dependencies": {
"@passport-next/passport-openid": "^1.0.0",
"Idle.Js": "git+https://github.com/shawnmclean/Idle.js",
"archiver": "^5.0.2",
"async": "^3.0.0",
"aws-sdk": "^2.987.0",
"azure-storage": "^2.7.0",
"base64url": "^3.0.0",
"body-parser": "^1.15.2",
"chance": "^1.0.4",
"cheerio": "^0.22.0",
"compression": "^1.6.2",
"connect-flash": "^0.1.1",
"connect-session-sequelize": "^7.1.2",
"cookie": "^0.4.0",
"cookie-parser": "^1.4.3",
"deep-freeze": "^0.0.1",
"diff-match-patch": "git+https://github.com/hackmdio/diff-match-patch.git",
"ejs": "^3.0.0",
"express": ">=4.14",
"express-session": "^1.14.2",
"file-type": "^16.1.0",
"formidable": "^1.0.17",
"graceful-fs": "^4.1.11",
"helmet": "^4.5.0",
"i18n": "^0.13.0",
"is-svg": "^4.3.1",
"jsdom-nogyp": "^0.8.3",
"lodash": "^4.17.20",
"lutim": "^1.0.2",
"lz-string": "git+https://github.com/hackmdio/lz-string.git",
"mariadb": "^2.1.2",
"markdown-it": "^12.0.0",
"markdown-it-abbr": "^1.0.4",
"markdown-it-container": "^3.0.0",
"markdown-it-deflist": "^2.0.1",
"markdown-it-emoji": "^2.0.0",
"markdown-it-footnote": "^3.0.1",
"markdown-it-imsize": "^2.0.1",
"markdown-it-ins": "^3.0.0",
"markdown-it-mark": "^3.0.0",
"markdown-it-mathjax": "^2.0.0",
"markdown-it-regexp": "^0.4.0",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"mattermost": "^3.4.0",
"meta-marked": "git+https://github.com/hedgedoc/meta-marked",
"method-override": "^3.0.0",
"minimist": "^1.2.0",
"minio": "^7.0.19",
"moment": "^2.17.1",
"morgan": "^1.7.0",
"mysql2": "^2.0.0",
"node-fetch": "^2.6.1",
"passport": "^0.4.0",
"passport-dropbox-oauth2": "^1.1.0",
"passport-facebook": "^3.0.0",
"passport-github": "^1.1.0",
"passport-gitlab2": "^5.0.0",
"passport-google-oauth20": "^2.0.0",
"passport-ldapauth": "^3.0.0",
"passport-local": "^1.0.0",
"passport-oauth2": "^1.4.0",
"passport-saml": "^3.1.2",
"passport-twitter": "^1.0.4",
"passport.socketio": "^3.7.0",
"pdfobject": "^2.0.201604172",
"pg": "^8.2.1",
"pg-hstore": "^2.3.3",
"prom-client": "^13.1.0",
"prometheus-api-metrics": "^3.2.0",
"randomcolor": "^0.6.0",
"readline-sync": "^1.4.7",
"rimraf": "^3.0.2",
"scrypt-kdf": "^2.0.1",
"sequelize": "^5.21.1",
"shortid": "2.2.16",
"socket.io": "^2.1.1",
"sqlite3": "^5.0.0",
"store": "^2.0.12",
"string": "^3.3.3",
"toobusy-js": "^0.5.1",
"umzug": "^2.3.0",
"uuid": "^8.0.0",
"validator": "^13.0.0",
"winston": "^3.1.0",
"xss": "^1.0.3"
},
"resolutions": {
"**/tough-cookie": "~2.5.0",
"**/minimatch": "^3.0.2",
"**/request": "^2.88.0"
},
"engines": {
"node": ">=12"
},
"bugs": "https://github.com/hedgedoc/hedgedoc/issues",
"keywords": [
"Collaborative",
"Markdown",
"Notes"
],
"homepage": "https://hedgedoc.org",
"maintainers": [
{
"name": "Claudius Coenen",
"url": "https://www.claudiuscoenen.de/"
},
{
"name": "Christoph (Sheogorath) Kern",
"email": "codimd@sheogorath.shivering-isles.com",
"url": "https://shivering-isles.com"
},
{
"name": "David Mehren",
"email": "hedgedoc@herrmehren.de"
}
],
"repository": {
"type": "git",
"url": "https://github.com/hedgedoc/hedgedoc.git"
},
"devDependencies": {
"abcjs": "5.12.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-loader": "7.1.5",
"babel-plugin-transform-runtime": "6.23.0",
"babel-polyfill": "6.26.0",
"babel-preset-env": "1.7.0",
"babel-runtime": "6.26.0",
"bootstrap": "3.4.1",
"bootstrap-validator": "0.11.9",
"codemirror": "git+https://github.com/hedgedoc/CodeMirror.git",
"copy-webpack-plugin": "6.4.1",
"css-loader": "5.2.7",
"emojify.js": "1.1.0",
"esbuild-loader": "2.15.1",
"escape-html": "1.0.3",
"eslint": "7.32.0",
"eslint-config-standard": "16.0.3",
"eslint-plugin-import": "2.24.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.1.0",
"eslint-plugin-standard": "4.1.0",
"exports-loader": "1.1.1",
"expose-loader": "1.0.3",
"file-loader": "6.2.0",
"file-saver": "2.0.5",
"flowchart.js": "1.15.0",
"fork-awesome": "1.2.0",
"gist-embed": "2.6.0",
"highlight.js": "10.7.3",
"html-webpack-plugin": "4.5.2",
"imports-loader": "1.2.0",
"ionicons": "2.0.1",
"jquery": "3.6.0",
"jquery-mousewheel": "3.1.13",
"jquery-ui": "1.12.1",
"js-cookie": "3.0.1",
"js-sequence-diagrams": "git+https://github.com/hedgedoc/js-sequence-diagrams.git",
"js-yaml": "3.14.1",
"jsonlint": "1.6.3",
"keymaster": "1.6.2",
"less": "4.1.1",
"less-loader": "7.3.0",
"list.js": "2.3.1",
"mathjax": "2.7.9",
"mermaid": "8.12.1",
"mini-css-extract-plugin": "1.6.2",
"mocha": "9.1.1",
"mock-require": "3.0.3",
"optimize-css-assets-webpack-plugin": "6.0.1",
"prismjs": "1.24.1",
"raphael": "2.3.0",
"remark-cli": "10.0.0",
"remark-preset-lint-markdown-style-guide": "5.0.1",
"reveal.js": "3.9.2",
"select2": "3.5.2-browserify",
"socket.io-client": "2.4.0",
"spin.js": "4.1.1",
"string-loader": "0.0.1",
"turndown": "7.1.1",
"url-loader": "4.1.1",
"velocity-animate": "1.5.2",
"visibilityjs": "2.0.2",
"viz.js": "1.8.2",
"webpack": "4.46.0",
"webpack-cli": "4.8.0",
"webpack-merge": "5.8.0",
"wurl": "2.5.4"
},
"optionalDependencies": {
"bufferutil": "^4.0.0",
"utf-8-validate": "^5.0.1"
}
}

View file

@ -0,0 +1,5 @@
{
"version": "1.9.0",
"srcHash": "hSKQGkI1+68Zf05RhgRKZo47buyobzjhURSZ30/h0PA=",
"yarnHash": "0v51jmmbg8fx66ay2glby0gxw07in95igz325p42g5hjd5kankf6"
}

View file

@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../../ -i bash -p nix wget prefetch-yarn-deps nix-prefetch-github
if [ "$#" -gt 1 ] || [[ "$1" == -* ]]; then
echo "Regenerates packaging data for the element packages."
echo "Usage: $0 [git release tag]"
exit 1
fi
version="$1"
set -euo pipefail
if [ -z "$version" ]; then
version="$(wget -O- "https://api.github.com/repos/hedgedoc/hedgedoc/releases?per_page=1" | jq -r '.[0].tag_name')"
fi
src="https://raw.githubusercontent.com/hedgedoc/hedgedoc/$version"
wget "$src/package.json" -O package.json
wget "$src/yarn.lock" -O yarn.lock
sed 's;midi "https://github\.com/paulrosen/MIDI\.js\.git;midi "git+https://github.com/paulrosen/MIDI.js.git;g' -i yarn.lock
src_hash=$(nix-prefetch-github hedgedoc hedgedoc --rev ${version} | jq -r .sha256)
yarn_hash=$(prefetch-yarn-deps yarn.lock)
cat > pin.json << EOF
{
"version": "$version",
"srcHash": "$src_hash",
"yarnHash": "$yarn_hash"
}
EOF

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,63 @@
{ lib, stdenv, fetchurl, writeText, unzip, nixosTests, fetchpatch }:
stdenv.mkDerivation rec {
pname = "invoiceplane";
version = "1.5.11";
src = fetchurl {
url = "https://github.com/InvoicePlane/InvoicePlane/releases/download/v${version}/v${version}.zip";
sha256 = "137g0xps4kb3j7f5gz84ql18iggbya6d9dnrfp05g2qcbbp8kqad";
};
patches = [
# Fix CVE-2021-29024, unauthenticated directory listing
# Should be included in a later release > 1.5.11
# https://github.com/NixOS/nixpkgs/issues/166655
# https://github.com/InvoicePlane/InvoicePlane/pull/754
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/InvoicePlane/InvoicePlane/pull/754.patch";
sha256 = "sha256-EHXw7Zqli/nA3tPIrhxpt8ueXvDtshz0XRzZT78sdQk=";
})
# Fix CVE-2021-29023, password reset rate-limiting
# Should be included in a later release > 1.5.11
# https://github.com/NixOS/nixpkgs/issues/166655
# https://github.com/InvoicePlane/InvoicePlane/pull/739
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/InvoicePlane/InvoicePlane/pull/739.patch";
sha256 = "sha256-6ksJjW6awr3lZsDRxa22pCcRGBVBYyV8+TbhOp6HBq0=";
})
# Fix CVE-2021-29022, full path disclosure
# Should be included in a later release > 1.5.11
# https://github.com/NixOS/nixpkgs/issues/166655
# https://github.com/InvoicePlane/InvoicePlane/pull/767
#(fetchpatch {
# url = "https://patch-diff.githubusercontent.com/raw/InvoicePlane/InvoicePlane/pull/767.patch";
# sha256 = "sha256-rSWDH8KeHSRWLyQEa7RSwv+8+ja9etTz+6Q9XThuwUo=";
#})
];
nativeBuildInputs = [ unzip ];
sourceRoot = ".";
installPhase = ''
mkdir -p $out/
cp -r . $out/
'';
passthru.tests = {
inherit (nixosTests) invoiceplane;
};
meta = with lib; {
description = "Self-hosted open source application for managing your invoices, clients and payments";
license = licenses.mit;
homepage = "https://www.invoiceplane.com";
platforms = platforms.all;
maintainers = with maintainers; [ onny ];
};
}

View file

@ -0,0 +1,33 @@
{ lib, stdenv, fetchFromGitLab, writeText }:
let
localConfig = writeText "config.local.php" ''
<?php
return require(getenv('JIRAFEAU_CONFIG'));
?>
'';
in
stdenv.mkDerivation rec {
pname = "jirafeau";
version = "4.3.0";
src = fetchFromGitLab {
owner = "mojo42";
repo = "Jirafeau";
rev = version;
hash = "sha256-9v6rtxViXsolx5AKSp2HxcFyU1XJWFSiqzTBl+dQBD4=";
};
installPhase = ''
mkdir $out
cp -r * $out/
cp ${localConfig} $out/lib/config.local.php
'';
meta = with lib; {
description = "Website permitting upload of a file in a simple way and giving a unique link to it";
license = licenses.agpl3;
homepage = "https://gitlab.com/mojo42/Jirafeau";
platforms = platforms.all;
maintainers = with maintainers; [ davidtwco ];
};
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchurl, nixosTests }:
stdenv.mkDerivation rec {
pname = "jitsi-meet";
version = "1.0.6155";
src = fetchurl {
url = "https://download.jitsi.org/jitsi-meet/src/jitsi-meet-${version}.tar.bz2";
sha256 = "baCRVYe1z2uH3vSb5KbWs0y4KyQYO3JpTyoGFZIZQqo=";
};
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir $out
mv * $out/
runHook postInstall
'';
passthru.tests = {
single-host-smoke-test = nixosTests.jitsi-meet;
};
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Secure, Simple and Scalable Video Conferences";
longDescription = ''
Jitsi Meet is an open-source (Apache) WebRTC JavaScript application that uses Jitsi Videobridge
to provide high quality, secure and scalable video conferences.
'';
homepage = "https://github.com/jitsi/jitsi-meet";
license = licenses.asl20;
maintainers = teams.jitsi.members;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,12 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pup common-updater-scripts
set -eu -o pipefail
version="$(curl https://download.jitsi.org/stable/ | \
pup 'a[href] text{}' | \
awk -F'[_-]' '/jitsi-meet-web_/ {printf $4"\n"}' | \
sort -u | \
tail -n 1)"
update-source-version jitsi-meet "$version"

View file

@ -0,0 +1,116 @@
{
"name": "lemmy-ui",
"description": "An isomorphic UI for lemmy",
"version": "0.15.1",
"author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0",
"scripts": {
"build:dev": "webpack --mode=development",
"build:prod": "webpack --mode=production",
"clean": "yarn run rimraf dist",
"dev": "yarn start",
"lint": "node generate_translations.js && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src",
"prebuild:dev": "yarn clean && node generate_translations.js",
"prebuild:prod": "yarn clean && node generate_translations.js",
"prepare": "husky install",
"start": "yarn build:dev --watch"
},
"repository": "https://github.com/LemmyNet/lemmy-ui",
"dependencies": {
"@typescript-eslint/parser": "^5.6.0",
"autosize": "^5.0.1",
"check-password-strength": "^2.0.3",
"choices.js": "^10.0.0",
"classnames": "^2.3.1",
"emoji-short-name": "^1.0.0",
"express": "~4.17.1",
"i18next": "^21.5.4",
"inferno": "^7.4.11",
"inferno-create-element": "^7.4.11",
"inferno-helmet": "^5.2.1",
"inferno-hydrate": "^7.4.11",
"inferno-i18next-dess": "^0.0.1",
"inferno-router": "^7.4.11",
"inferno-server": "^7.4.11",
"isomorphic-cookie": "^1.2.4",
"jwt-decode": "^3.1.2",
"markdown-it": "^12.1.0",
"markdown-it-container": "^3.0.0",
"markdown-it-html5-embed": "^1.0.0",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"moment": "^2.29.1",
"register-service-worker": "^1.7.2",
"rxjs": "^7.4.0",
"sass": "^1.47.0",
"serialize-javascript": "^6.0.0",
"tippy.js": "^6.3.7",
"toastify-js": "^1.11.2",
"tributejs": "^5.1.3",
"websocket-ts": "^1.1.1"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.4",
"@babel/plugin-transform-typescript": "^7.16.1",
"@babel/preset-env": "7.16.8",
"@babel/preset-typescript": "^7.16.0",
"@babel/runtime": "^7.16.3",
"@types/autosize": "^4.0.0",
"@types/express": "^4.17.13",
"@types/node": "^17.0.8",
"@types/node-fetch": "^2.5.11",
"@types/serialize-javascript": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"babel-loader": "^8.2.3",
"babel-plugin-inferno": "^6.3.0",
"bootstrap": "^5.1.3",
"bootswatch": "^5.1.3",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^10.0.0",
"css-loader": "^6.5.1",
"eslint": "^8.4.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"import-sort-style-module": "^6.0.0",
"iso-639-1": "^2.1.10",
"lemmy-js-client": "0.15.0",
"lint-staged": "^12.1.2",
"mini-css-extract-plugin": "^2.4.5",
"node-fetch": "^2.6.1",
"prettier": "^2.5.1",
"prettier-plugin-import-sort": "^0.0.7",
"prettier-plugin-organize-imports": "^2.3.4",
"prettier-plugin-packagejson": "^2.2.15",
"rimraf": "^3.0.2",
"run-node-webpack-plugin": "^1.3.0",
"sass-loader": "^12.3.0",
"sortpack": "^2.2.0",
"style-loader": "^3.3.1",
"terser": "^5.10.0",
"typescript": "^4.5.2",
"webpack": "5.66.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "4.7.3",
"webpack-node-externals": "^3.0.0"
},
"engines": {
"node": ">=8.9.0"
},
"engineStrict": true,
"lint-staged": {
"*.{ts,tsx,js}": [
"prettier --write",
"eslint --fix"
],
"package.json": [
"sortpack"
]
},
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module",
"parser": "typescript"
}
}
}

View file

@ -0,0 +1,7 @@
{
"version": "0.15.1",
"serverSha256": "sha256-HHr9mG0AuI/86+EjODE/GT9lhl5DeNkzQ4k077b7ICU=",
"serverCargoSha256": "sha256-ErMNsyHfBiYZA4gjaxPHO+fQseUVIKy/928oGqw+Adg=",
"uiSha256": "sha256-Al6Q1xXkjqIb2v2S4JbmlQAAFCKwzkAW924uolC0tu8=",
"uiYarnDepsSha256": "sha256-Zadp74ZHmbxCHxpDAYOa6Ot2kWujIj8ZzrSaIEsYgMY="
}

View file

@ -0,0 +1,51 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, openssl
, postgresql
, libiconv
, Security
, protobuf
}:
let
pinData = lib.importJSON ./pin.json;
version = pinData.version;
in
rustPlatform.buildRustPackage rec {
inherit version;
pname = "lemmy-server";
src = fetchFromGitHub {
owner = "LemmyNet";
repo = "lemmy";
rev = version;
sha256 = pinData.serverSha256;
};
cargoSha256 = pinData.serverCargoSha256;
buildInputs = [ postgresql ]
++ lib.optionals stdenv.isDarwin [ libiconv Security ];
# Using OPENSSL_NO_VENDOR is not an option on darwin
# As of version 0.10.35 rust-openssl looks for openssl on darwin
# with a hardcoded path to /usr/lib/libssl.x.x.x.dylib
# https://github.com/sfackler/rust-openssl/blob/master/openssl-sys/build/find_normal.rs#L115
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
OPENSSL_INCLUDE_DIR = "${openssl.dev}/include";
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
nativeBuildInputs = [ protobuf ];
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "🐀 Building a federated alternative to reddit in rust";
homepage = "https://join-lemmy.org/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ happysalada ];
mainProgram = "lemmy_server";
};
}

View file

@ -0,0 +1,78 @@
{ lib
, mkYarnPackage
, libsass
, nodejs
, python3
, pkg-config
, fetchFromGitHub
, fetchYarnDeps
}:
let
pinData = lib.importJSON ./pin.json;
pkgConfig = {
node-sass = {
nativeBuildInputs = [ ];
buildInputs = [ libsass pkg-config python3 ];
postInstall = ''
LIBSASS_EXT=auto yarn --offline run build
rm build/config.gypi
'';
};
};
name = "lemmy-ui";
version = pinData.version;
src = fetchFromGitHub {
owner = "LemmyNet";
repo = name;
rev = version;
fetchSubmodules = true;
sha256 = pinData.uiSha256;
};
in
mkYarnPackage {
inherit src pkgConfig name version;
extraBuildInputs = [ libsass ];
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
sha256 = pinData.uiYarnDepsSha256;
};
yarnPreBuild = ''
export npm_config_nodedir=${nodejs}
'';
buildPhase = ''
# Yarn writes cache directories etc to $HOME.
export HOME=$PWD/yarn_home
ln -sf $PWD/node_modules $PWD/deps/lemmy-ui/
yarn --offline build:prod
'';
preInstall = ''
mkdir $out
cp -R ./deps/lemmy-ui/dist $out
cp -R ./node_modules $out
'';
distPhase = "true";
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Building a federated alternative to reddit in rust";
homepage = "https://join-lemmy.org/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ happysalada billewanick ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,51 @@
#!/usr/bin/env nix-shell
#! nix-shell -i oil -p jq sd nix-prefetch-github ripgrep moreutils
# TODO set to `verbose` or `extdebug` once implemented in oil
shopt --set xtrace
# we need failures inside of command subs to get the correct dependency sha256
shopt --unset inherit_errexit
const directory = $(dirname $0 | xargs realpath)
const owner = "LemmyNet"
const ui_repo = "lemmy-ui"
const server_repo = "lemmy"
const latest_rev = $(curl -q https://api.github.com/repos/${owner}/${server_repo}/releases/latest | \
jq -r '.tag_name')
const latest_version = $(echo $latest_rev)
const current_version = $(jq -r '.version' $directory/pin.json)
if ($latest_version === $current_version) {
echo "lemmy is already up-to-date"
return 0
} else {
# for some strange reason, hydra fails on reading upstream package.json directly
const source = "https://raw.githubusercontent.com/$owner/$ui_repo/$latest_version"
const package_json = $(curl -qf $source/package.json)
echo $package_json > $directory/package.json
const server_tarball_meta = $(nix-prefetch-github $owner $server_repo --rev $latest_rev)
const server_tarball_hash = "sha256-$(echo $server_tarball_meta | jq -r '.sha256')"
const ui_tarball_meta = $(nix-prefetch-github $owner $ui_repo --rev $latest_rev)
const ui_tarball_hash = "sha256-$(echo $ui_tarball_meta | jq -r '.sha256')"
jq ".version = \"$latest_version\" | \
.\"serverSha256\" = \"$server_tarball_hash\" | \
.\"uiSha256\" = \"$ui_tarball_hash\" | \
.\"serverCargoSha256\" = \"\" | \
.\"uiYarnDepsSha256\" = \"\"" $directory/pin.json | sponge $directory/pin.json
const new_cargo_sha256 = $(nix-build -A lemmy-server 2>&1 | \
tail -n 2 | \
head -n 1 | \
sd '\s+got:\s+' '')
const new_offline_cache_sha256 = $(nix-build -A lemmy-ui 2>&1 | \
tail -n 2 | \
head -n 1 | \
sd '\s+got:\s+' '')
jq ".\"serverCargoSha256\" = \"$new_cargo_sha256\" | \
.\"uiYarnDepsSha256\" = \"$new_offline_cache_sha256\"" \
$directory/pin.json | sponge $directory/pin.json
}

View file

@ -0,0 +1,6 @@
<?php
// get PIWIK_USER_PATH from environment variable,
// so this bootstrap.php can be read-only but still configure PIWIK_USER_PATH at runtime
if ($path = getenv('PIWIK_USER_PATH')) {
define('PIWIK_USER_PATH', $path);
}

View file

@ -0,0 +1,10 @@
--- a/plugins/GeoIp2/config/config.php
+++ b/plugins/GeoIp2/config/config.php
@@ -1,5 +1,5 @@
<?php
return [
- 'path.geoip2' => DI\string('{path.root}/misc/'),
+ 'path.geoip2' => PIWIK_USER_PATH . '/misc/',
];
\ Pas de fin de ligne à la fin du fichier

View file

@ -0,0 +1,116 @@
{ lib, stdenv, fetchurl, makeWrapper, php }:
let
versions = {
matomo = {
version = "4.5.0";
sha256 = "sha256-OyjdzY+ENYxOTVjDLjj2unJbpaGODIH2I5Acmt45HDA=";
};
matomo-beta = {
version = "4.6.0";
# `beta` examples: "b1", "rc1", null
# when updating: use null if stable version is >= latest beta or release candidate
beta = "b2";
sha256 = "sha256-7p/ZPtr5a/tBjrM27ILF3rNfxDIWuzWKCXNom3HlyL8=";
};
};
common = pname: { version, sha256, beta ? null }:
let
fullVersion = version + lib.optionalString (beta != null) "-${toString beta}";
name = "${pname}-${fullVersion}";
in
stdenv.mkDerivation rec {
inherit name;
version = fullVersion;
src = fetchurl {
url = "https://builds.matomo.org/matomo-${version}.tar.gz";
inherit sha256;
};
nativeBuildInputs = [ makeWrapper ];
patches = [
# This changes the default value of the database server field
# from 127.0.0.1 to localhost.
# unix socket authentication only works with localhost,
# but password-based SQL authentication works with both.
# TODO: is upstream interested in this?
# -> discussion at https://github.com/matomo-org/matomo/issues/12646
./make-localhost-default-database-host.patch
# This changes the default config for path.geoip2 so that it doesn't point
# to the nix store.
./change-path-geoip2.patch
];
# this bootstrap.php adds support for getting PIWIK_USER_PATH
# from an environment variable. Point it to a mutable location
# to be able to use matomo read-only from the nix store
postPatch = ''
cp ${./bootstrap.php} bootstrap.php
'';
# TODO: future versions might rename the PIWIK_… variables to MATOMO_…
# TODO: Move more unnecessary files from share/, especially using PIWIK_INCLUDE_PATH.
# See https://forum.matomo.org/t/bootstrap-php/5926/10 and
# https://github.com/matomo-org/matomo/issues/11654#issuecomment-297730843
installPhase = ''
runHook preInstall
# copy everything to share/, used as webroot folder, and then remove what's known to be not needed
mkdir -p $out/share
cp -ra * $out/share/
# tmp/ is created by matomo in PIWIK_USER_PATH
rmdir $out/share/tmp
# config/ needs to be accessed by PIWIK_USER_PATH anyway
ln -s $out/share/config $out/
makeWrapper ${php}/bin/php $out/bin/matomo-console \
--add-flags "$out/share/console"
runHook postInstall
'';
filesToFix = [
"misc/composer/build-xhprof.sh"
"misc/composer/clean-xhprof.sh"
"misc/cron/archive.sh"
"plugins/GeoIp2/config/config.php"
"plugins/Installation/FormDatabaseSetup.php"
"vendor/pear/archive_tar/sync-php4"
"vendor/szymach/c-pchart/coverage.sh"
"vendor/matomo/matomo-php-tracker/run_tests.sh"
"vendor/twig/twig/drupal_test.sh"
];
# This fixes the consistency check in the admin interface
#
# The filesToFix list may contain files that are exclusive to only one of the versions we build
# make sure to test for existence to avoid erroring on an incompatible version and failing
postFixup = ''
pushd $out/share > /dev/null
for f in $filesToFix; do
if [ -f "$f" ]; then
length="$(wc -c "$f" | cut -d' ' -f1)"
hash="$(md5sum "$f" | cut -d' ' -f1)"
sed -i "s:\\(\"$f\"[^(]*(\\).*:\\1\"$length\", \"$hash\"),:g" config/manifest.inc.php
else
echo "INFO(files-to-fix): $f does not exist in this version"
fi
done
popd > /dev/null
'';
meta = with lib; {
description = "A real-time web analytics application";
license = licenses.gpl3Plus;
homepage = "https://matomo.org/";
platforms = platforms.all;
maintainers = with maintainers; [ florianjacob kiwi sebbel ];
};
};
in
lib.mapAttrs common versions

View file

@ -0,0 +1,13 @@
diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php
index 74de2535b4..bc172ad0eb 100644
--- a/plugins/Installation/FormDatabaseSetup.php
+++ b/plugins/Installation/FormDatabaseSetup.php
@@ -82,7 +82,7 @@ class FormDatabaseSetup extends QuickForm2
$defaults = array(
- 'host' => '127.0.0.1',
+ 'host' => 'localhost',
'type' => $defaultDatabaseType,
'tables_prefix' => 'matomo_',
);

View file

@ -0,0 +1,39 @@
{ lib, stdenv, fetchurl, writeText }:
stdenv.mkDerivation rec {
pname = "mediawiki";
version = "1.37.2";
src = with lib; fetchurl {
url = "https://releases.wikimedia.org/mediawiki/${versions.majorMinor version}/${pname}-${version}.tar.gz";
sha256 = "sha256-WD8HS8r87BfaUBQqVvW7/eXDNml31h2RLX5W/Mo72hs=";
};
prePatch = ''
sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php
'';
phpConfig = writeText "LocalSettings.php" ''
<?php
return require(getenv('MEDIAWIKI_CONFIG'));
?>
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/mediawiki
cp -r * $out/share/mediawiki
cp ${phpConfig} $out/share/mediawiki/LocalSettings.php
runHook postInstall
'';
meta = with lib; {
description = "The collaborative editing software that runs Wikipedia";
license = licenses.gpl2Plus;
homepage = "https://www.mediawiki.org/";
platforms = platforms.all;
maintainers = with maintainers; [ ];
};
}

View file

@ -0,0 +1,62 @@
{ lib, stdenv, fetchurl, writeText, plugins ? [ ] }:
let
version = "3.11.6";
stableVersion = lib.concatStrings (lib.take 2 (lib.splitVersion version));
in stdenv.mkDerivation rec {
pname = "moodle";
inherit version;
src = fetchurl {
url = "https://download.moodle.org/stable${stableVersion}/${pname}-${version}.tgz";
sha256 = "sha256-g3qHYkxiXb18vJ23THUw8ej+s5SgIkJpmjQmmARwQhs=";
};
phpConfig = writeText "config.php" ''
<?php
return require(getenv('MOODLE_CONFIG'));
?>
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/moodle
cp -r . $out/share/moodle
cp ${phpConfig} $out/share/moodle/config.php
${lib.concatStringsSep "\n" (map (p:
let
dir = if p.pluginType == "mod" then
"mod"
else if p.pluginType == "theme" then
"theme"
else if p.pluginType == "block" then
"blocks"
else if p.pluginType == "question" then
"question/type"
else if p.pluginType == "course" then
"course/format"
else if p.pluginType == "report" then
"admin/report"
else
throw "unknown moodle plugin type";
# we have to copy it, because the plugins have refrences to .. inside
in ''
mkdir -p $out/share/moodle/${dir}/${p.name}
cp -r ${p}/* $out/share/moodle/${dir}/${p.name}/
'') plugins)}
runHook postInstall
'';
meta = with lib; {
description =
"Free and open-source learning management system (LMS) written in PHP";
license = licenses.gpl3Plus;
homepage = "https://moodle.org/";
maintainers = with maintainers; [ freezeboy ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,33 @@
{ stdenv, unzip, ... }:
let
buildMoodlePlugin = a@{
name,
src,
pluginType,
configurePhase ? ":",
buildPhase ? ":",
buildInputs ? [ ],
nativeBuildInputs ? [ ],
...
}:
stdenv.mkDerivation (a // {
name = name;
inherit pluginType;
inherit configurePhase buildPhase buildInputs;
nativeBuildInputs = [ unzip ] ++ nativeBuildInputs;
installPhase = ''
runHook preInstall
mkdir -p "$out"
mv * $out/
runHook postInstall
'';
});
in {
inherit buildMoodlePlugin;
}

Some files were not shown because too many files have changed in this diff Show more