19 beamPackages.mixRelease rec {
23 src = fetchFromGitLab {
24 domain = "git.pleroma.social";
28 sha256 = "sha256-2uKVwjxMLC8jyZWW+ltBRNtOR7RaAb8SPO1iV2wyROc=";
31 patches = [ ./Revert-Config-Restrict-permissions-of-OTP-config.patch ];
33 mixNixDeps = import ./mix.nix {
34 inherit beamPackages lib;
35 overrides = final: prev: {
36 # mix2nix does not support git dependencies yet,
37 # so we need to add them manually
38 captcha = beamPackages.buildMix {
42 src = fetchFromGitLab {
43 domain = "git.pleroma.social";
44 owner = "pleroma/elixir-libraries";
45 repo = "elixir-captcha";
46 rev = "90f6ce7672f70f56708792a98d98bd05176c9176";
47 sha256 = "sha256-s7EuAhmCsQA/4p2NJHJSWB/DZ5hA+7EelPsUOvKr2Po=";
51 prometheus_ex = beamPackages.buildMix {
52 name = "prometheus_ex";
55 src = fetchFromGitHub {
57 repo = "prometheus.ex";
58 rev = "31f7fbe4b71b79ba27efc2a5085746c4011ceb8f";
59 hash = "sha256-2PZP+YnwnHt69HtIAQvjMBqBbfdbkRSoMzb1AL2Zsyc=";
61 beamDeps = with final; [ prometheus ];
63 remote_ip = beamPackages.buildMix {
67 src = fetchFromGitLab {
68 domain = "git.pleroma.social";
69 owner = "pleroma/elixir-libraries";
71 rev = "b647d0deecaa3acb140854fe4bda5b7e1dc6d1c8";
72 hash = "sha256-pgON0uhTPVeeAC866Qz24Jvm1okoAECAHJrRzqaq+zA=";
74 beamDeps = with final; [
80 majic = prev.majic.override { buildInputs = [ file ]; };
81 # Some additional build inputs and build fixes
82 http_signatures = prev.http_signatures.override {
84 substituteInPlace mix.exs --replace ":logger" ":logger, :public_key"
87 fast_html = prev.fast_html.override {
88 nativeBuildInputs = [ cmake ];
89 dontUseCmakeConfigure = true;
92 syslog = prev.syslog.override { buildPlugins = with beamPackages; [ pc ]; };
94 vix = prev.vix.override {
95 nativeBuildInputs = [ pkg-config ];
101 ++ lib.optionals stdenv.isDarwin [
102 darwin.apple_sdk.frameworks.Foundation
103 darwin.apple_sdk.frameworks.AppKit
104 darwin.apple_sdk.frameworks.Kerberos
106 VIX_COMPILATION_MODE = "PLATFORM_PROVIDED_LIBVIPS";
109 # This needs a different version (1.0.14 -> 1.0.18) to build properly with
110 # our Erlang/OTP version.
111 eimp = beamPackages.buildRebar3 rec {
115 src = beamPackages.fetchHex {
118 sha256 = "0fnx2pm1n2m0zs2skivv43s42hrgpq9i143p9mngw9f3swjqpxvx";
122 echo '{plugins, [pc]}.' >> rebar.config
124 buildPlugins = with beamPackages; [ pc ];
126 beamDeps = with final; [ p1_utils ];
129 p1_utils = beamPackages.buildRebar3 rec {
136 sha256 = "120znzz0yw1994nk6v28zql9plgapqpv51n9g6qm6md1f4x7gj0z";
142 mime = prev.mime.override {
145 cfgFile = writeText "config.exs" ''
147 config :mime, :types, %{
148 "application/activity+json" => ["activity+json"],
149 "application/jrd+json" => ["jrd+json"],
150 "application/ld+json" => ["activity+json"],
151 "application/xml" => ["xml"],
152 "application/xrd+xml" => ["xrd+xml"]
158 cp ${cfgFile} config/config.exs
165 tests.pleroma = nixosTests.pleroma;
170 description = "ActivityPub microblogging server";
171 homepage = "https://git.pleroma.social/pleroma/pleroma";
172 license = licenses.agpl3Only;
173 maintainers = with maintainers; [
178 platforms = platforms.unix;