15 inherit (beamPackages) mixRelease buildMix;
16 common = callPackage ./common.nix { };
19 inherit (common) pname version src;
21 nativeBuildInputs = [ git cmake ];
23 mixNixDeps = import ./mix.nix {
24 inherit beamPackages lib;
25 overrides = (final: prev:
27 (_: value: value.override {
28 appConfigPath = src + "/config";
31 fast_html = prev.fast_html.override {
32 nativeBuildInputs = [ cmake ];
34 ex_cldr = prev.ex_cldr.overrideAttrs (old: {
35 # We have to use the GitHub sources, as it otherwise tries to download
36 # the locales at build time.
37 src = fetchFromGitHub {
38 owner = "elixir-cldr";
40 rev = "v${old.version}";
41 sha256 = assert old.version == "2.37.5";
42 "sha256-T5Qvuo+xPwpgBsqHNZYnTCA4loToeBn1LKTMsDcCdYs=";
45 cp $src/priv/cldr/locales/* $out/lib/erlang/lib/ex_cldr-${old.version}/priv/cldr/locales/
48 # Upstream issue: https://github.com/bryanjos/geo_postgis/pull/87
49 geo_postgis = prev.geo_postgis.overrideAttrs (old: {
50 propagatedBuildInputs = old.propagatedBuildInputs ++ [ final.ecto ];
53 # The remainder are Git dependencies (and their deps) that are not supported by mix2nix currently.
54 web_push_encryption = buildMix rec {
55 name = "web_push_encryption";
57 src = fetchFromGitHub {
59 repo = "elixir-web-push-encryption";
60 rev = "6e143dcde0a2854c4f0d72816b7ecab696432779";
61 sha256 = "sha256-Da+/28SPZuUQBi8fQj31zmMvhMrYUaQIW4U4E+mRtMg=";
63 beamDeps = with final; [ httpoison jose ];
65 icalendar = buildMix rec {
67 version = "unstable-2022-04-10";
68 src = fetchFromGitHub {
71 rev = "1033d922c82a7223db0ec138e2316557b70ff49f";
72 sha256 = "sha256-N3bJZznNazLewHS4c2B7LP1lgxd1wev+EWVlQ7rOwfU=";
74 beamDeps = with final; [ mix_test_watch ex_doc timex ];
76 rajska = buildMix rec {
79 src = fetchFromGitHub {
82 rev = "0c036448e261e8be6a512581c592fadf48982d84";
83 sha256 = "sha256-4pfply1vTAIT2Xvm3kONmrCK05xKfXFvcb8EKoSCXBE=";
85 beamDeps = with final; [ ex_doc credo absinthe excoveralls hammer mock ];
87 exkismet = buildMix rec {
90 src = fetchFromGitHub {
93 rev = "8b5485fde00fafbde20f315bec387a77f7358334";
94 sha256 = "sha256-ttgCWoBKU7VTjZJBhZNtqVF4kN7psBr/qOeR65MbTqw=";
96 beamDeps = with final; [ httpoison ex_doc credo doctor dialyxir ];
102 # Install the compiled js part
105 cp -a "${mobilizon-frontend}/static" ./priv
110 mix phx.digest --no-deps-check
114 tests.smoke-test = nixosTests.mobilizon;
115 updateScript = writeShellScriptBin "update.sh" ''
118 ${mix2nix}/bin/mix2nix '${src}/mix.lock' > pkgs/servers/mobilizon/mix.nix
120 elixirPackage = beamPackages.elixir;
124 description = "Mobilizon is an online tool to help manage your events, your profiles and your groups";
125 homepage = "https://joinmobilizon.org/";
126 license = licenses.agpl3Plus;
127 maintainers = with maintainers; [ minijackson erictapen ];