format all nix code by using nix fmt
This commit is contained in:
parent
656bbd46c0
commit
435cbd0d6b
52
default.nix
52
default.nix
|
@ -1,12 +1,13 @@
|
|||
{ lib
|
||||
, beam_nox
|
||||
, fetchFromGitHub
|
||||
, git
|
||||
, cmake
|
||||
, nixosTests
|
||||
, src
|
||||
, src-config
|
||||
, mobilizon-js
|
||||
{
|
||||
lib,
|
||||
beam_nox,
|
||||
fetchFromGitHub,
|
||||
git,
|
||||
cmake,
|
||||
nixosTests,
|
||||
src,
|
||||
src-config,
|
||||
mobilizon-js,
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -25,21 +26,20 @@ mixRelease rec {
|
|||
# This circumvents a startup error for now
|
||||
stripDebug = false;
|
||||
|
||||
nativeBuildInputs = [ git cmake ];
|
||||
nativeBuildInputs = [
|
||||
git
|
||||
cmake
|
||||
];
|
||||
|
||||
# Update deps.nix by running `mix deps.nix`
|
||||
mixNixDeps = import ./deps.nix {
|
||||
inherit lib;
|
||||
beamPackages = beam_nox.packages.erlang;
|
||||
overrides = (final: prev:
|
||||
(lib.mapAttrs
|
||||
(_: value: value.override {
|
||||
appConfigPath = src-config;
|
||||
})
|
||||
prev) // {
|
||||
fast_html = prev.fast_html.override {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
};
|
||||
overrides = (
|
||||
final: prev:
|
||||
(lib.mapAttrs (_: value: value.override { appConfigPath = src-config; }) prev)
|
||||
// {
|
||||
fast_html = prev.fast_html.override { nativeBuildInputs = [ cmake ]; };
|
||||
ex_cldr = prev.ex_cldr.overrideAttrs (old: {
|
||||
# We have to use the GitHub sources, as it otherwise tries to download
|
||||
# the locales at build time.
|
||||
|
@ -47,7 +47,8 @@ mixRelease rec {
|
|||
owner = "elixir-cldr";
|
||||
repo = "cldr";
|
||||
rev = "v${old.version}";
|
||||
sha256 = assert old.version == "2.37.5";
|
||||
sha256 =
|
||||
assert old.version == "2.37.5";
|
||||
"sha256-T5Qvuo+xPwpgBsqHNZYnTCA4loToeBn1LKTMsDcCdYs=";
|
||||
};
|
||||
postInstall = ''
|
||||
|
@ -55,7 +56,8 @@ mixRelease rec {
|
|||
'';
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -63,8 +65,7 @@ mixRelease rec {
|
|||
'';
|
||||
|
||||
# Install the compiled js part
|
||||
preBuild =
|
||||
''
|
||||
preBuild = ''
|
||||
cp -a "${mobilizon-js}/_napalm-install/priv/static" ./priv
|
||||
chmod 770 -R ./priv
|
||||
'';
|
||||
|
@ -89,6 +90,9 @@ mixRelease rec {
|
|||
description = "Mobilizon is an online tool to help manage your events, your profiles and your groups";
|
||||
homepage = "https://joinmobilizon.org/";
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = with maintainers; [ minijackson erictapen ];
|
||||
maintainers = with maintainers; [
|
||||
minijackson
|
||||
erictapen
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
387
deps.nix
387
deps.nix
|
@ -1,36 +1,41 @@
|
|||
{ lib, beamPackages, overrides ? (x: y: { }) }:
|
||||
{
|
||||
lib,
|
||||
beamPackages,
|
||||
overrides ? (x: y: { }),
|
||||
}:
|
||||
|
||||
let
|
||||
buildMix = lib.makeOverridable beamPackages.buildMix;
|
||||
buildRebar3 = lib.makeOverridable beamPackages.buildRebar3;
|
||||
|
||||
defaultOverrides = (final: prev:
|
||||
defaultOverrides = (
|
||||
final: prev:
|
||||
|
||||
let
|
||||
apps = { };
|
||||
|
||||
workarounds = { };
|
||||
|
||||
applyOverrides = appName: drv:
|
||||
applyOverrides =
|
||||
appName: drv:
|
||||
let
|
||||
allOverridesForApp = builtins.foldl'
|
||||
(acc: workaround: acc // workarounds.${workaround} drv)
|
||||
{ }
|
||||
apps.${appName};
|
||||
allOverridesForApp = builtins.foldl' (
|
||||
acc: workaround: acc // workarounds.${workaround} drv
|
||||
) { } apps.${appName};
|
||||
|
||||
in
|
||||
if builtins.hasAttr appName apps
|
||||
then
|
||||
drv.override allOverridesForApp
|
||||
else
|
||||
drv;
|
||||
if builtins.hasAttr appName apps then drv.override allOverridesForApp else drv;
|
||||
|
||||
in
|
||||
builtins.mapAttrs applyOverrides prev);
|
||||
builtins.mapAttrs applyOverrides prev
|
||||
);
|
||||
|
||||
self = packages // (defaultOverrides self packages) // (overrides self packages);
|
||||
|
||||
packages = with beamPackages; with self; {
|
||||
packages =
|
||||
with beamPackages;
|
||||
with self;
|
||||
{
|
||||
absinthe =
|
||||
let
|
||||
version = "1.7.6";
|
||||
|
@ -45,7 +50,12 @@ let
|
|||
sha256 = "e7626951ca5eec627da960615b51009f3a774765406ff02722b1d818f17e5778";
|
||||
};
|
||||
|
||||
beamDeps = [ dataloader decimal nimble_parsec telemetry ];
|
||||
beamDeps = [
|
||||
dataloader
|
||||
decimal
|
||||
nimble_parsec
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
absinthe_phoenix =
|
||||
|
@ -62,7 +72,14 @@ let
|
|||
sha256 = "d36918925c380dc7d2ed7d039c9a3b4182ec36723f7417a68745ade5aab22f8d";
|
||||
};
|
||||
|
||||
beamDeps = [ absinthe absinthe_plug decimal phoenix phoenix_html phoenix_pubsub ];
|
||||
beamDeps = [
|
||||
absinthe
|
||||
absinthe_plug
|
||||
decimal
|
||||
phoenix
|
||||
phoenix_html
|
||||
phoenix_pubsub
|
||||
];
|
||||
};
|
||||
|
||||
absinthe_plug =
|
||||
|
@ -79,7 +96,10 @@ let
|
|||
sha256 = "bbb04176647b735828861e7b2705465e53e2cf54ccf5a73ddd1ebd855f996e5a";
|
||||
};
|
||||
|
||||
beamDeps = [ absinthe plug ];
|
||||
beamDeps = [
|
||||
absinthe
|
||||
plug
|
||||
];
|
||||
};
|
||||
|
||||
argon2_elixir =
|
||||
|
@ -96,7 +116,10 @@ let
|
|||
sha256 = "f9da27cf060c9ea61b1bd47837a28d7e48a8f6fa13a745e252556c14f9132c7f";
|
||||
};
|
||||
|
||||
beamDeps = [ comeonin elixir_make ];
|
||||
beamDeps = [
|
||||
comeonin
|
||||
elixir_make
|
||||
];
|
||||
};
|
||||
|
||||
atomex =
|
||||
|
@ -130,7 +153,13 @@ let
|
|||
sha256 = "3e29150245a9b5f56944434e5240966e75c917dad248f689ab589b32187a81af";
|
||||
};
|
||||
|
||||
beamDeps = [ hpax plug telemetry thousand_island websock ];
|
||||
beamDeps = [
|
||||
hpax
|
||||
plug
|
||||
telemetry
|
||||
thousand_island
|
||||
websock
|
||||
];
|
||||
};
|
||||
|
||||
cachex =
|
||||
|
@ -147,7 +176,12 @@ let
|
|||
sha256 = "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2";
|
||||
};
|
||||
|
||||
beamDeps = [ eternal jumper sleeplocks unsafe ];
|
||||
beamDeps = [
|
||||
eternal
|
||||
jumper
|
||||
sleeplocks
|
||||
unsafe
|
||||
];
|
||||
};
|
||||
|
||||
castore =
|
||||
|
@ -194,7 +228,11 @@ let
|
|||
sha256 = "3362b838836a9f0fa309de09a7127e36e67310e797d556db92f71b548832c7cf";
|
||||
};
|
||||
|
||||
beamDeps = [ castore certifi decimal ];
|
||||
beamDeps = [
|
||||
castore
|
||||
certifi
|
||||
decimal
|
||||
];
|
||||
};
|
||||
|
||||
codepagex =
|
||||
|
@ -273,7 +311,10 @@ let
|
|||
sha256 = "09d61781b76ce216e395cdbc883ff00d00f46a503e215c22722dba82507dfef0";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto telemetry ];
|
||||
beamDeps = [
|
||||
ecto
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
db_connection =
|
||||
|
@ -322,7 +363,10 @@ let
|
|||
sha256 = "2455d626e7c61a128b02a4a8caddb092548c3eb613ac6f6a85e4cbb6caddc4d1";
|
||||
};
|
||||
|
||||
beamDeps = [ cldr_utils jason ];
|
||||
beamDeps = [
|
||||
cldr_utils
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
eblurhash =
|
||||
|
@ -354,7 +398,11 @@ let
|
|||
sha256 = "ebd3d3772cd0dfcd8d772659e41ed527c28b2a8bde4b00fe03e0463da0f1983b";
|
||||
};
|
||||
|
||||
beamDeps = [ decimal jason telemetry ];
|
||||
beamDeps = [
|
||||
decimal
|
||||
jason
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
ecto_autoslug_field =
|
||||
|
@ -371,7 +419,10 @@ let
|
|||
sha256 = "b6ddd614805263e24b5c169532c934440d0289181cce873061fca3a8e92fd9ff";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto slugify ];
|
||||
beamDeps = [
|
||||
ecto
|
||||
slugify
|
||||
];
|
||||
};
|
||||
|
||||
ecto_dev_logger =
|
||||
|
@ -388,7 +439,10 @@ let
|
|||
sha256 = "a55e58bad5d5c9b8ef2a3c3347dbdf7efa880a5371cf1457e44b41f489a43927";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto jason ];
|
||||
beamDeps = [
|
||||
ecto
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
ecto_enum =
|
||||
|
@ -405,7 +459,11 @@ let
|
|||
sha256 = "8fb55c087181c2b15eee406519dc22578fa60dd82c088be376d0010172764ee4";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto ecto_sql postgrex ];
|
||||
beamDeps = [
|
||||
ecto
|
||||
ecto_sql
|
||||
postgrex
|
||||
];
|
||||
};
|
||||
|
||||
ecto_shortuuid =
|
||||
|
@ -422,7 +480,10 @@ let
|
|||
sha256 = "b92e3b71e86be92f5a7ef6f3de170e7864454e630f7b01dd930414baf38efb65";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto shortuuid ];
|
||||
beamDeps = [
|
||||
ecto
|
||||
shortuuid
|
||||
];
|
||||
};
|
||||
|
||||
ecto_sql =
|
||||
|
@ -439,7 +500,12 @@ let
|
|||
sha256 = "ce14063ab3514424276e7e360108ad6c2308f6d88164a076aac8a387e1fea634";
|
||||
};
|
||||
|
||||
beamDeps = [ db_connection ecto postgrex telemetry ];
|
||||
beamDeps = [
|
||||
db_connection
|
||||
ecto
|
||||
postgrex
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
elixir_make =
|
||||
|
@ -456,7 +522,10 @@ let
|
|||
sha256 = "7a71945b913d37ea89b06966e1342c85cfe549b15e6d6d081e8081c493062c07";
|
||||
};
|
||||
|
||||
beamDeps = [ castore certifi ];
|
||||
beamDeps = [
|
||||
castore
|
||||
certifi
|
||||
];
|
||||
};
|
||||
|
||||
erlport =
|
||||
|
@ -503,7 +572,13 @@ let
|
|||
sha256 = "74ad5ddff791112ce4156382e171a5f5d3766af9d5c4675e0571f081fe136479";
|
||||
};
|
||||
|
||||
beamDeps = [ cldr_utils decimal gettext jason nimble_parsec ];
|
||||
beamDeps = [
|
||||
cldr_utils
|
||||
decimal
|
||||
gettext
|
||||
jason
|
||||
nimble_parsec
|
||||
];
|
||||
};
|
||||
|
||||
ex_cldr_calendars =
|
||||
|
@ -520,7 +595,10 @@ let
|
|||
sha256 = "06d2407e699032d5cdc515593b7ce7869f10ce28e98a4ed68d9b21e5001036d4";
|
||||
};
|
||||
|
||||
beamDeps = [ ex_cldr_numbers jason ];
|
||||
beamDeps = [
|
||||
ex_cldr_numbers
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
ex_cldr_currencies =
|
||||
|
@ -537,7 +615,10 @@ let
|
|||
sha256 = "31df8bd37688340f8819bdd770eb17d659652078d34db632b85d4a32864d6a25";
|
||||
};
|
||||
|
||||
beamDeps = [ ex_cldr jason ];
|
||||
beamDeps = [
|
||||
ex_cldr
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
ex_cldr_dates_times =
|
||||
|
@ -554,7 +635,11 @@ let
|
|||
sha256 = "0f2f250d479cadda4e0ef3a5e3d936ae7ba1a3f1199db6791e284e86203495b1";
|
||||
};
|
||||
|
||||
beamDeps = [ ex_cldr_calendars ex_cldr_numbers jason ];
|
||||
beamDeps = [
|
||||
ex_cldr_calendars
|
||||
ex_cldr_numbers
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
ex_cldr_languages =
|
||||
|
@ -571,7 +656,10 @@ let
|
|||
sha256 = "22fb1fef72b7b4b4872d243b34e7b83734247a78ad87377986bf719089cc447a";
|
||||
};
|
||||
|
||||
beamDeps = [ ex_cldr jason ];
|
||||
beamDeps = [
|
||||
ex_cldr
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
ex_cldr_numbers =
|
||||
|
@ -588,7 +676,13 @@ let
|
|||
sha256 = "6fd5a82f0785418fa8b698c0be2b1845dff92b77f1b3172c763d37868fb503d2";
|
||||
};
|
||||
|
||||
beamDeps = [ decimal digital_token ex_cldr ex_cldr_currencies jason ];
|
||||
beamDeps = [
|
||||
decimal
|
||||
digital_token
|
||||
ex_cldr
|
||||
ex_cldr_currencies
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
ex_cldr_plugs =
|
||||
|
@ -605,7 +699,12 @@ let
|
|||
sha256 = "4f7b4a5fe061734cef7b62ff29118ed6ac72698cdd7bcfc97495db73611fe0fe";
|
||||
};
|
||||
|
||||
beamDeps = [ ex_cldr gettext jason plug ];
|
||||
beamDeps = [
|
||||
ex_cldr
|
||||
gettext
|
||||
jason
|
||||
plug
|
||||
];
|
||||
};
|
||||
|
||||
ex_ical =
|
||||
|
@ -720,7 +819,10 @@ let
|
|||
sha256 = "f18e3c7668f82d3ae0b15f48d48feeb257e28aa5ab1b0dbf781c7312e5da029d";
|
||||
};
|
||||
|
||||
beamDeps = [ elixir_make nimble_pool ];
|
||||
beamDeps = [
|
||||
elixir_make
|
||||
nimble_pool
|
||||
];
|
||||
};
|
||||
|
||||
fast_sanitize =
|
||||
|
@ -737,7 +839,10 @@ let
|
|||
sha256 = "e8ad286d10d0386e15d67d0ee125245ebcfbc7d7290b08712ba9013c8c5e56e2";
|
||||
};
|
||||
|
||||
beamDeps = [ fast_html plug ];
|
||||
beamDeps = [
|
||||
fast_html
|
||||
plug
|
||||
];
|
||||
};
|
||||
|
||||
file_info =
|
||||
|
@ -820,7 +925,12 @@ let
|
|||
sha256 = "0bebc5b00f8b11835066bd6213fbeeec03704b4a1c206920b81c1ec2201d185f";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto geo jason postgrex ];
|
||||
beamDeps = [
|
||||
ecto
|
||||
geo
|
||||
jason
|
||||
postgrex
|
||||
];
|
||||
};
|
||||
|
||||
geohax =
|
||||
|
@ -867,7 +977,10 @@ let
|
|||
sha256 = "06ff962feae8a310cffdf86b74bfcda6e2d0dccb439bb1f62df2b657b1c0269b";
|
||||
};
|
||||
|
||||
beamDeps = [ geolix mmdb2_decoder ];
|
||||
beamDeps = [
|
||||
geolix
|
||||
mmdb2_decoder
|
||||
];
|
||||
};
|
||||
|
||||
gettext =
|
||||
|
@ -901,7 +1014,10 @@ let
|
|||
sha256 = "b189ff38cd46a22a8a824866a6867ca8722942347f13c33f7d23126af8821b52";
|
||||
};
|
||||
|
||||
beamDeps = [ jose plug ];
|
||||
beamDeps = [
|
||||
jose
|
||||
plug
|
||||
];
|
||||
};
|
||||
|
||||
guardian_db =
|
||||
|
@ -918,7 +1034,12 @@ let
|
|||
sha256 = "9c2ec4278efa34f9f1cc6ba795e552d41fdc7ffba5319d67eeb533b89392d183";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto ecto_sql guardian postgrex ];
|
||||
beamDeps = [
|
||||
ecto
|
||||
ecto_sql
|
||||
guardian
|
||||
postgrex
|
||||
];
|
||||
};
|
||||
|
||||
guardian_phoenix =
|
||||
|
@ -935,7 +1056,10 @@ let
|
|||
sha256 = "21f439246715192b231f228680465d1ed5fbdf01555a4a3b17165532f5f9a08c";
|
||||
};
|
||||
|
||||
beamDeps = [ guardian phoenix ];
|
||||
beamDeps = [
|
||||
guardian
|
||||
phoenix
|
||||
];
|
||||
};
|
||||
|
||||
hackney =
|
||||
|
@ -952,7 +1076,15 @@ let
|
|||
sha256 = "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3";
|
||||
};
|
||||
|
||||
beamDeps = [ certifi idna metrics mimerl parse_trans ssl_verify_fun unicode_util_compat ];
|
||||
beamDeps = [
|
||||
certifi
|
||||
idna
|
||||
metrics
|
||||
mimerl
|
||||
parse_trans
|
||||
ssl_verify_fun
|
||||
unicode_util_compat
|
||||
];
|
||||
};
|
||||
|
||||
hammer =
|
||||
|
@ -1358,7 +1490,12 @@ let
|
|||
sha256 = "fd3ccbbfdbb2bc77107c8790946f9821a831ed0720688485ee6adcd7863886cf";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto_sql jason postgrex telemetry ];
|
||||
beamDeps = [
|
||||
ecto_sql
|
||||
jason
|
||||
postgrex
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
paasaa =
|
||||
|
@ -1405,7 +1542,17 @@ let
|
|||
sha256 = "b1ec57f2e40316b306708fe59b92a16b9f6f4bf50ccfa41aa8c7feb79e0ec02a";
|
||||
};
|
||||
|
||||
beamDeps = [ castore jason phoenix_pubsub phoenix_template phoenix_view plug plug_crypto telemetry websock_adapter ];
|
||||
beamDeps = [
|
||||
castore
|
||||
jason
|
||||
phoenix_pubsub
|
||||
phoenix_template
|
||||
phoenix_view
|
||||
plug
|
||||
plug_crypto
|
||||
telemetry
|
||||
websock_adapter
|
||||
];
|
||||
};
|
||||
|
||||
phoenix_ecto =
|
||||
|
@ -1422,7 +1569,11 @@ let
|
|||
sha256 = "d36c401206f3011fefd63d04e8ef626ec8791975d9d107f9a0817d426f61ac07";
|
||||
};
|
||||
|
||||
beamDeps = [ ecto phoenix_html plug ];
|
||||
beamDeps = [
|
||||
ecto
|
||||
phoenix_html
|
||||
plug
|
||||
];
|
||||
};
|
||||
|
||||
phoenix_html =
|
||||
|
@ -1456,7 +1607,15 @@ let
|
|||
sha256 = "daa17b3fbdfd6347aaade4db01a5dd24d23af0f4344e2e24934e8adfb4a11607";
|
||||
};
|
||||
|
||||
beamDeps = [ jason phoenix phoenix_html phoenix_template phoenix_view plug telemetry ];
|
||||
beamDeps = [
|
||||
jason
|
||||
phoenix
|
||||
phoenix_html
|
||||
phoenix_template
|
||||
phoenix_view
|
||||
plug
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
phoenix_pubsub =
|
||||
|
@ -1488,7 +1647,13 @@ let
|
|||
sha256 = "4000eeba3f9d7d1a6bf56d2bd56733d5cadf41a7f0d8ffe5bb67e7d667e204a2";
|
||||
};
|
||||
|
||||
beamDeps = [ hackney phoenix phoenix_html phoenix_view swoosh ];
|
||||
beamDeps = [
|
||||
hackney
|
||||
phoenix
|
||||
phoenix_html
|
||||
phoenix_view
|
||||
swoosh
|
||||
];
|
||||
};
|
||||
|
||||
phoenix_template =
|
||||
|
@ -1522,7 +1687,10 @@ let
|
|||
sha256 = "cd34049af41be2c627df99cd4eaa71fc52a328c0c3d8e7d4aa28f880c30e7f64";
|
||||
};
|
||||
|
||||
beamDeps = [ phoenix_html phoenix_template ];
|
||||
beamDeps = [
|
||||
phoenix_html
|
||||
phoenix_template
|
||||
];
|
||||
};
|
||||
|
||||
plug =
|
||||
|
@ -1539,7 +1707,11 @@ let
|
|||
sha256 = "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2";
|
||||
};
|
||||
|
||||
beamDeps = [ mime plug_crypto telemetry ];
|
||||
beamDeps = [
|
||||
mime
|
||||
plug_crypto
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
plug_crypto =
|
||||
|
@ -1586,7 +1758,11 @@ let
|
|||
sha256 = "6458f7d5b70652bc81c3ea759f91736c16a31be000f306d3c64bcdfe9a18b3cc";
|
||||
};
|
||||
|
||||
beamDeps = [ db_connection decimal jason ];
|
||||
beamDeps = [
|
||||
db_connection
|
||||
decimal
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
progress_bar =
|
||||
|
@ -1620,7 +1796,10 @@ let
|
|||
allRefs = true;
|
||||
};
|
||||
|
||||
beamDeps = [ absinthe hammer ];
|
||||
beamDeps = [
|
||||
absinthe
|
||||
hammer
|
||||
];
|
||||
};
|
||||
|
||||
ranch =
|
||||
|
@ -1652,7 +1831,10 @@ let
|
|||
sha256 = "616ffdf66aaad6a72fc546dabf42eed87e2a99e97b09cbd92b10cc180d02ed74";
|
||||
};
|
||||
|
||||
beamDeps = [ combine plug ];
|
||||
beamDeps = [
|
||||
combine
|
||||
plug
|
||||
];
|
||||
};
|
||||
|
||||
replug =
|
||||
|
@ -1686,7 +1868,11 @@ let
|
|||
sha256 = "f9fc7641ef61e885510f5e5963c2948b9de1de597c63f781e9d3d6c9c8681ab4";
|
||||
};
|
||||
|
||||
beamDeps = [ hackney jason plug ];
|
||||
beamDeps = [
|
||||
hackney
|
||||
jason
|
||||
plug
|
||||
];
|
||||
};
|
||||
|
||||
shortuuid =
|
||||
|
@ -1825,7 +2011,15 @@ let
|
|||
sha256 = "97a667b96ca8cc48a4679f6cd1f40a36d8701cf052587298473614caa70f164a";
|
||||
};
|
||||
|
||||
beamDeps = [ bandit gen_smtp hackney jason mime plug telemetry ];
|
||||
beamDeps = [
|
||||
bandit
|
||||
gen_smtp
|
||||
hackney
|
||||
jason
|
||||
mime
|
||||
plug
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
telemetry =
|
||||
|
@ -1857,7 +2051,13 @@ let
|
|||
sha256 = "10501f360cd926a309501287470372af1a6e1cbed0f43949203a4c13300bc79f";
|
||||
};
|
||||
|
||||
beamDeps = [ castore hackney jason mime telemetry ];
|
||||
beamDeps = [
|
||||
castore
|
||||
hackney
|
||||
jason
|
||||
mime
|
||||
telemetry
|
||||
];
|
||||
};
|
||||
|
||||
thousand_island =
|
||||
|
@ -1891,7 +2091,11 @@ let
|
|||
sha256 = "8b9024f7efbabaf9bd7aa04f65cf8dcd7c9818ca5737677c7b76acbc6a94d1aa";
|
||||
};
|
||||
|
||||
beamDeps = [ combine gettext tzdata ];
|
||||
beamDeps = [
|
||||
combine
|
||||
gettext
|
||||
tzdata
|
||||
];
|
||||
};
|
||||
|
||||
tls_certificate_check =
|
||||
|
@ -1925,7 +2129,12 @@ let
|
|||
sha256 = "d1a345e07b3378c4c902ad54fbd5d54c8c3dd55dba883b7407fe57bcec45ff2a";
|
||||
};
|
||||
|
||||
beamDeps = [ castore certifi geo jason ];
|
||||
beamDeps = [
|
||||
castore
|
||||
certifi
|
||||
geo
|
||||
jason
|
||||
];
|
||||
};
|
||||
|
||||
tzdata =
|
||||
|
@ -1976,7 +2185,11 @@ let
|
|||
sha256 = "5068ae2b9e217c2f05aa9a67483a6531e21ba0be9a6f6c8749bb7fd1599be321";
|
||||
};
|
||||
|
||||
beamDeps = [ httpoison sweet_xml ueberauth ];
|
||||
beamDeps = [
|
||||
httpoison
|
||||
sweet_xml
|
||||
ueberauth
|
||||
];
|
||||
};
|
||||
|
||||
ueberauth_discord =
|
||||
|
@ -1993,7 +2206,10 @@ let
|
|||
sha256 = "d6f98ef91abb4ddceada4b7acba470e0e68c4d2de9735ff2f24172a8e19896b4";
|
||||
};
|
||||
|
||||
beamDeps = [ oauth2 ueberauth ];
|
||||
beamDeps = [
|
||||
oauth2
|
||||
ueberauth
|
||||
];
|
||||
};
|
||||
|
||||
ueberauth_facebook =
|
||||
|
@ -2010,7 +2226,10 @@ let
|
|||
sha256 = "bf8ce5d66b1c50da8abff77e8086c1b710bdde63f4acaef19a651ba43a9537a8";
|
||||
};
|
||||
|
||||
beamDeps = [ oauth2 ueberauth ];
|
||||
beamDeps = [
|
||||
oauth2
|
||||
ueberauth
|
||||
];
|
||||
};
|
||||
|
||||
ueberauth_github =
|
||||
|
@ -2027,7 +2246,10 @@ let
|
|||
sha256 = "ae0ab2879c32cfa51d7287a48219b262bfdab0b7ec6629f24160564247493cc6";
|
||||
};
|
||||
|
||||
beamDeps = [ oauth2 ueberauth ];
|
||||
beamDeps = [
|
||||
oauth2
|
||||
ueberauth
|
||||
];
|
||||
};
|
||||
|
||||
ueberauth_gitlab_strategy =
|
||||
|
@ -2044,7 +2266,10 @@ let
|
|||
sha256 = "e86e2e794bb063c07c05a6b1301b73f2be3ba9308d8f47ecc4d510ef9226091e";
|
||||
};
|
||||
|
||||
beamDeps = [ oauth2 ueberauth ];
|
||||
beamDeps = [
|
||||
oauth2
|
||||
ueberauth
|
||||
];
|
||||
};
|
||||
|
||||
ueberauth_google =
|
||||
|
@ -2061,7 +2286,10 @@ let
|
|||
sha256 = "7f7deacd679b2b66e3bffb68ecc77aa1b5396a0cbac2941815f253128e458c38";
|
||||
};
|
||||
|
||||
beamDeps = [ oauth2 ueberauth ];
|
||||
beamDeps = [
|
||||
oauth2
|
||||
ueberauth
|
||||
];
|
||||
};
|
||||
|
||||
ueberauth_keycloak_strategy =
|
||||
|
@ -2078,7 +2306,10 @@ let
|
|||
sha256 = "c03027937bddcbd9ff499e457f9bb05f79018fa321abf79ebcfed2af0007211b";
|
||||
};
|
||||
|
||||
beamDeps = [ oauth2 ueberauth ];
|
||||
beamDeps = [
|
||||
oauth2
|
||||
ueberauth
|
||||
];
|
||||
};
|
||||
|
||||
ueberauth_twitter =
|
||||
|
@ -2095,7 +2326,11 @@ let
|
|||
sha256 = "83ca8ea3e1a3f976f1adbebfb323b9ebf53af453fbbf57d0486801a303b16065";
|
||||
};
|
||||
|
||||
beamDeps = [ httpoison oauther ueberauth ];
|
||||
beamDeps = [
|
||||
httpoison
|
||||
oauther
|
||||
ueberauth
|
||||
];
|
||||
};
|
||||
|
||||
unicode_util_compat =
|
||||
|
@ -2159,7 +2394,10 @@ let
|
|||
sha256 = "08b1726094a131490ff0a2c7764c4cdd4b5cdf8ba9762638a5dd4bcd9e5fc936";
|
||||
};
|
||||
|
||||
beamDeps = [ jason phoenix ];
|
||||
beamDeps = [
|
||||
jason
|
||||
phoenix
|
||||
];
|
||||
};
|
||||
|
||||
web_push_encryption =
|
||||
|
@ -2176,7 +2414,10 @@ let
|
|||
allRefs = true;
|
||||
};
|
||||
|
||||
beamDeps = [ httpoison jose ];
|
||||
beamDeps = [
|
||||
httpoison
|
||||
jose
|
||||
];
|
||||
};
|
||||
|
||||
websock =
|
||||
|
@ -2208,7 +2449,11 @@ let
|
|||
sha256 = "4b977ba4a01918acbf77045ff88de7f6972c2a009213c515a445c48f224ffce9";
|
||||
};
|
||||
|
||||
beamDeps = [ bandit plug websock ];
|
||||
beamDeps = [
|
||||
bandit
|
||||
plug
|
||||
websock
|
||||
];
|
||||
};
|
||||
|
||||
xml_builder =
|
||||
|
|
217
flake.nix
217
flake.nix
|
@ -8,20 +8,27 @@
|
|||
napalm.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nix-filter, napalm }:
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nix-filter,
|
||||
napalm,
|
||||
}:
|
||||
let
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs
|
||||
[ "x86_64-linux" "aarch64-linux" ]
|
||||
(system: f system);
|
||||
nixpkgsFor = forAllSystems (
|
||||
system:
|
||||
import nixpkgs { inherit system; }
|
||||
);
|
||||
forAllSystems =
|
||||
f:
|
||||
nixpkgs.lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
] (system: f system);
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
||||
filter = nix-filter.lib;
|
||||
in
|
||||
{
|
||||
|
||||
packages = forAllSystems (system:
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
# Directories that are neither needed for building the frontend nor the backend.
|
||||
|
@ -69,7 +76,10 @@
|
|||
{
|
||||
inherit (pkgs) nodejs;
|
||||
nativeBuildInputs = [ pkgs.imagemagick ];
|
||||
npmCommands = [ "npm install" "npm run build" ];
|
||||
npmCommands = [
|
||||
"npm install"
|
||||
"npm run build"
|
||||
];
|
||||
# Keep this in sync with the content of ./patches/
|
||||
customPatchPackages = {
|
||||
vue-i18n-extract."2.0.7" = pkgs: prev: {
|
||||
|
@ -81,9 +91,11 @@
|
|||
};
|
||||
|
||||
default = self.packages."${system}".mobilizon;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
devShells = forAllSystems (system:
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
settingsFormat = pkgs.formats.elixirConf { };
|
||||
|
@ -93,11 +105,19 @@
|
|||
server = true;
|
||||
url.host = "mobilizon.dev";
|
||||
http = {
|
||||
ip = settingsFormat.lib.mkTuple [ 0 0 0 0 0 0 0 1 ];
|
||||
ip = settingsFormat.lib.mkTuple [
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
];
|
||||
port = 4000;
|
||||
};
|
||||
secret_key_base =
|
||||
"2q/l1WDx3RQQy7gZ1k001//6nc66moWUEJQyGuMK/z3zPLYW6FYtIgCkUzGP0+X/";
|
||||
secret_key_base = "2q/l1WDx3RQQy7gZ1k001//6nc66moWUEJQyGuMK/z3zPLYW6FYtIgCkUzGP0+X/";
|
||||
};
|
||||
"Mobilizon.Web.Auth.Guardian" = {
|
||||
secret_key = "N8x7/tf0kInLFS2poO22g6OGPiMjSrDEhmk29nFqV35q7hQ0DtBt/cRYCsqBNp2L";
|
||||
|
@ -121,13 +141,11 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
default =
|
||||
pkgs.mkShell {
|
||||
default = pkgs.mkShell {
|
||||
MIX_ENV = "dev";
|
||||
PGUSER = "mobilizon";
|
||||
PGDATABASE = "mobilizon";
|
||||
buildInputs =
|
||||
with pkgs; [
|
||||
buildInputs = with pkgs; [
|
||||
elixir
|
||||
cmake
|
||||
imagemagick
|
||||
|
@ -135,7 +153,10 @@
|
|||
inotify-tools
|
||||
(pkgs.writeShellApplication {
|
||||
name = "build";
|
||||
runtimeInputs = [ elixir nodejs ];
|
||||
runtimeInputs = [
|
||||
elixir
|
||||
nodejs
|
||||
];
|
||||
text = ''
|
||||
mix deps.get
|
||||
mix deps.nix
|
||||
|
@ -147,7 +168,10 @@
|
|||
})
|
||||
(pkgs.writeShellApplication {
|
||||
name = "setup";
|
||||
runtimeInputs = [ elixir postgresql ];
|
||||
runtimeInputs = [
|
||||
elixir
|
||||
postgresql
|
||||
];
|
||||
text = ''
|
||||
cat ${mobilizonConfig} > config/runtime.exs
|
||||
# We assume the database already exists
|
||||
|
@ -177,17 +201,23 @@
|
|||
})
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
nixosModules.devSetup = { config, lib, pkgs, ... }:
|
||||
nixosModules.devSetup =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.mobilizonDevEnvironment;
|
||||
in
|
||||
{
|
||||
|
||||
options.mobilizonDevEnvironment = {
|
||||
enable = lib.mkEnableOption
|
||||
(lib.mdDoc "development environment for Mobilizon");
|
||||
enable = lib.mkEnableOption (lib.mdDoc "development environment for Mobilizon");
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Unix user that runs the backend application to connect to the database";
|
||||
|
@ -217,9 +247,7 @@
|
|||
|
||||
};
|
||||
|
||||
overlays.default = final: prev: {
|
||||
inherit (self.packages."${prev.system}") mobilizon;
|
||||
};
|
||||
overlays.default = final: prev: { inherit (self.packages."${prev.system}") mobilizon; };
|
||||
|
||||
checks = forAllSystems (system: {
|
||||
inherit (self.packages.${system}) mobilizon;
|
||||
|
@ -238,12 +266,14 @@
|
|||
lib = {
|
||||
# Patch the logos in the source tree of a mobilizon-frontend package before building.
|
||||
# Can be used to construct the argument for .overrideAttrs on mobilizon-frontend.
|
||||
mobilizonLogosOverride = icons:
|
||||
mobilizonLogosOverride =
|
||||
icons:
|
||||
let
|
||||
inherit (icons) logo favicon;
|
||||
in
|
||||
old: {
|
||||
postPatch = ''
|
||||
postPatch =
|
||||
''
|
||||
cp '${logo}' src/assets/logo.svg
|
||||
|
||||
magick convert \
|
||||
|
@ -315,43 +345,118 @@
|
|||
-resize 366x108 \
|
||||
public/img/mobilizon_logo.png
|
||||
|
||||
'' + nixpkgs.lib.concatMapStrings
|
||||
({ resize, filename }: ''
|
||||
''
|
||||
+
|
||||
nixpkgs.lib.concatMapStrings
|
||||
(
|
||||
{ resize, filename }:
|
||||
''
|
||||
magick convert \
|
||||
-resize x${resize} \
|
||||
'${favicon}' \
|
||||
public/img/icons/${filename}
|
||||
|
||||
'')
|
||||
''
|
||||
)
|
||||
[
|
||||
{ resize = "180"; filename = "apple-touch-icon.png"; }
|
||||
{ resize = "180"; filename = "apple-touch-icon-180x180.png"; }
|
||||
{ resize = "152"; filename = "apple-touch-icon-152x152.png"; }
|
||||
{ resize = "120"; filename = "apple-touch-icon-120x120.png"; }
|
||||
{ resize = "76"; filename = "apple-touch-icon-76x76.png"; }
|
||||
{ resize = "60"; filename = "apple-touch-icon-60x60.png"; }
|
||||
{ resize = "192"; filename = "android-chrome-192x192.png"; }
|
||||
{ resize = "512"; filename = "android-chrome-512x512.png"; }
|
||||
{ resize = "192"; filename = "android-chrome-maskable-192x192.png"; }
|
||||
{ resize = "512"; filename = "android-chrome-maskable-512x512.png"; }
|
||||
{ resize = "128"; filename = "badge-128x128.png"; }
|
||||
{ resize = "144"; filename = "icon-144x144.png"; }
|
||||
{ resize = "168"; filename = "icon-168x168.png"; }
|
||||
{ resize = "256"; filename = "icon-256x256.png"; }
|
||||
{ resize = "48"; filename = "icon-48x48.png"; }
|
||||
{ resize = "72"; filename = "icon-72x72.png"; }
|
||||
{ resize = "96"; filename = "icon-96x96.png"; }
|
||||
{ resize = "144"; filename = "msapplication-icon-144x144.png"; }
|
||||
{ resize = "150"; filename = "mstile-150x150.png"; }
|
||||
{ resize = "192"; filename = "android-chrome-192x192.png"; }
|
||||
{ resize = "512"; filename = "android-chrome-512x512.png"; }
|
||||
{ resize = "192"; filename = "android-chrome-maskable-192x192.png"; }
|
||||
{ resize = "512"; filename = "android-chrome-maskable-512x512.png"; }
|
||||
{
|
||||
resize = "180";
|
||||
filename = "apple-touch-icon.png";
|
||||
}
|
||||
{
|
||||
resize = "180";
|
||||
filename = "apple-touch-icon-180x180.png";
|
||||
}
|
||||
{
|
||||
resize = "152";
|
||||
filename = "apple-touch-icon-152x152.png";
|
||||
}
|
||||
{
|
||||
resize = "120";
|
||||
filename = "apple-touch-icon-120x120.png";
|
||||
}
|
||||
{
|
||||
resize = "76";
|
||||
filename = "apple-touch-icon-76x76.png";
|
||||
}
|
||||
{
|
||||
resize = "60";
|
||||
filename = "apple-touch-icon-60x60.png";
|
||||
}
|
||||
{
|
||||
resize = "192";
|
||||
filename = "android-chrome-192x192.png";
|
||||
}
|
||||
{
|
||||
resize = "512";
|
||||
filename = "android-chrome-512x512.png";
|
||||
}
|
||||
{
|
||||
resize = "192";
|
||||
filename = "android-chrome-maskable-192x192.png";
|
||||
}
|
||||
{
|
||||
resize = "512";
|
||||
filename = "android-chrome-maskable-512x512.png";
|
||||
}
|
||||
{
|
||||
resize = "128";
|
||||
filename = "badge-128x128.png";
|
||||
}
|
||||
{
|
||||
resize = "144";
|
||||
filename = "icon-144x144.png";
|
||||
}
|
||||
{
|
||||
resize = "168";
|
||||
filename = "icon-168x168.png";
|
||||
}
|
||||
{
|
||||
resize = "256";
|
||||
filename = "icon-256x256.png";
|
||||
}
|
||||
{
|
||||
resize = "48";
|
||||
filename = "icon-48x48.png";
|
||||
}
|
||||
{
|
||||
resize = "72";
|
||||
filename = "icon-72x72.png";
|
||||
}
|
||||
{
|
||||
resize = "96";
|
||||
filename = "icon-96x96.png";
|
||||
}
|
||||
{
|
||||
resize = "144";
|
||||
filename = "msapplication-icon-144x144.png";
|
||||
}
|
||||
{
|
||||
resize = "150";
|
||||
filename = "mstile-150x150.png";
|
||||
}
|
||||
{
|
||||
resize = "192";
|
||||
filename = "android-chrome-192x192.png";
|
||||
}
|
||||
{
|
||||
resize = "512";
|
||||
filename = "android-chrome-512x512.png";
|
||||
}
|
||||
{
|
||||
resize = "192";
|
||||
filename = "android-chrome-maskable-192x192.png";
|
||||
}
|
||||
{
|
||||
resize = "512";
|
||||
filename = "android-chrome-maskable-512x512.png";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style);
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,7 +7,10 @@ in
|
|||
|
||||
{
|
||||
name = "mobilizon";
|
||||
meta.maintainers = with lib.maintainers; [ minijackson erictapen ];
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
minijackson
|
||||
erictapen
|
||||
];
|
||||
|
||||
nodes.server =
|
||||
{ pkgs, ... }:
|
||||
|
|
Loading…
Reference in a new issue