akkoma: 3.14.1 → 3.15.1 (#381201)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
fetchFromGitea,
|
||||
fetchYarnDeps,
|
||||
writableTmpDirAsHomeHook,
|
||||
fixup-yarn-lock,
|
||||
yarn,
|
||||
nodejs,
|
||||
@@ -10,6 +11,7 @@
|
||||
python3,
|
||||
pkg-config,
|
||||
libsass,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -31,6 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeBuildInputs = [
|
||||
fixup-yarn-lock
|
||||
writableTmpDirAsHomeHook
|
||||
yarn
|
||||
nodejs
|
||||
pkg-config
|
||||
@@ -42,8 +45,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
export HOME="$(mktemp -d)"
|
||||
|
||||
yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg finalAttrs.offlineCache}
|
||||
fixup-yarn-lock yarn.lock
|
||||
substituteInPlace yarn.lock \
|
||||
@@ -79,6 +80,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [ "--version=branch=stable" ];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Admin interface for Akkoma";
|
||||
homepage = "https://akkoma.dev/AkkomaGang/akkoma-fe/";
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
stdenv,
|
||||
fetchFromGitea,
|
||||
fetchYarnDeps,
|
||||
writableTmpDirAsHomeHook,
|
||||
fixup-yarn-lock,
|
||||
yarn,
|
||||
nodejs,
|
||||
jpegoptim,
|
||||
oxipng,
|
||||
nodePackages,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -29,6 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
writableTmpDirAsHomeHook
|
||||
fixup-yarn-lock
|
||||
yarn
|
||||
nodejs
|
||||
@@ -48,8 +51,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
export HOME="$(mktemp -d)"
|
||||
|
||||
yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg finalAttrs.offlineCache}
|
||||
fixup-yarn-lock yarn.lock
|
||||
|
||||
@@ -81,6 +82,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
''^v(\d+\.\d+\.\d+)$''
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Frontend for Akkoma";
|
||||
homepage = "https://akkoma.dev/AkkomaGang/akkoma-fe/";
|
||||
|
||||
@@ -1,23 +1,49 @@
|
||||
{ lib
|
||||
, beamPackages
|
||||
, fetchFromGitea
|
||||
, fetchFromGitHub
|
||||
, fetchFromGitLab
|
||||
, cmake
|
||||
, file
|
||||
, nixosTests
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
beamPackages,
|
||||
fetchFromGitea,
|
||||
cmake,
|
||||
file,
|
||||
nixosTests,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
beamPackages.mixRelease rec {
|
||||
pname = "akkoma";
|
||||
version = "3.14.1";
|
||||
version = "3.15.1";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "akkoma.dev";
|
||||
owner = "AkkomaGang";
|
||||
repo = "akkoma";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Ygb51jQatdyX/DzJk84X1AEliBGD938f83UnI5OqBPM=";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-6qsqTguEVu9t6dW8c+VAE5Z7D3FbQ0S2ZfAN5qy7Xak=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ file ];
|
||||
|
||||
mixFodDeps = beamPackages.fetchMixDeps {
|
||||
pname = "mix-deps-${pname}";
|
||||
inherit src version;
|
||||
hash = "sha256-nWtY5eohP9pv/vS9FuCh2nlPxLJ2Y4IRmve5in328DU=";
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out/http_signatures/mix.exs" \
|
||||
--replace-fail ":logger" ":logger, :public_key"
|
||||
|
||||
# Akkoma adds some things to the `mime` package's configuration, which
|
||||
# requires it to be recompiled. However, we can't just recompile things
|
||||
# like we would on other systems. Therefore, we need to add it to mime's
|
||||
# compile-time config too, and also in every package that depends on
|
||||
# mime, directly or indirectly. We take the lazy way out and just add it
|
||||
# to every dependency – it won't make a difference in packages that don't
|
||||
# depend on `mime`.
|
||||
for dep in "$out/"*; do
|
||||
mkdir -p "$dep/config"
|
||||
cat ${./mime.exs} >>"$dep/config/config.exs"
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -26,183 +52,26 @@ beamPackages.mixRelease rec {
|
||||
mix.exs
|
||||
'';
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
postBuild = ''
|
||||
# Digest and compress static files
|
||||
rm -f priv/static/READ_THIS_BEFORE_TOUCHING_FILES_HERE
|
||||
mix phx.digest --no-compile
|
||||
mix do deps.loadpaths --no-deps-check, phx.digest --no-compile
|
||||
'';
|
||||
|
||||
mixNixDeps = import ./mix.nix {
|
||||
inherit beamPackages lib;
|
||||
overrides = final: prev:
|
||||
let
|
||||
mimeTypePatchPhase = ''
|
||||
mkdir -p config
|
||||
cat >> config/config.exs <<EOF
|
||||
Mix.Config.config :mime, :types, %{
|
||||
"application/xml" => ["xml"],
|
||||
"application/xrd+xml" => ["xrd+xml"],
|
||||
"application/jrd+json" => ["jrd+json"],
|
||||
"application/activity+json" => ["activity+json"],
|
||||
"application/ld+json" => ["activity+json"],
|
||||
"image/apng" => ["apng"]
|
||||
}
|
||||
Mix.Config.config :mime, :extensions, %{
|
||||
"activity+json" => "text/plain",
|
||||
"jrd+json" => "text/plain",
|
||||
"xrd+xml" => "text/plain"
|
||||
}
|
||||
EOF
|
||||
'';
|
||||
# Akkoma adds some things to the `mime` package's configuration, which requires it to be recompiled.
|
||||
# However, we can't just recompile things like we would on other systems.
|
||||
# Therefore, we need to add it to mime's compile-time config too, and also in every package that depends on mime, directly or indirectly.
|
||||
# We take the lazy way out and just add it to every dependency - it won't make a difference in packages that don't depend on `mime`.
|
||||
addMimeTypes = _: p: p.override {
|
||||
patchPhase = mimeTypePatchPhase;
|
||||
};
|
||||
in
|
||||
(lib.attrsets.mapAttrs addMimeTypes prev) // {
|
||||
# mix2nix does not support git dependencies yet,
|
||||
# so we need to add them manually
|
||||
captcha = beamPackages.buildMix rec {
|
||||
name = "captcha";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "git.pleroma.social";
|
||||
group = "pleroma";
|
||||
owner = "elixir-libraries";
|
||||
repo = "elixir-captcha";
|
||||
rev = "6630c42aaaab124e697b4e513190c89d8b64e410";
|
||||
hash = "sha256-KLsKBfCt6bUylSTTqRQi6ic0MyimanvIZRhU4Iv5Fmw=";
|
||||
};
|
||||
|
||||
# the binary is not getting installed by default
|
||||
postInstall = "mv priv/* $out/lib/erlang/lib/${name}-${version}/priv/";
|
||||
};
|
||||
concurrent_limiter = beamPackages.buildMix rec {
|
||||
name = "concurrent_limiter";
|
||||
version = "0.1.1";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "akkoma.dev";
|
||||
owner = "AkkomaGang";
|
||||
repo = "concurrent-limiter";
|
||||
rev = "a9e0b3d64574bdba761f429bb4fba0cf687b3338";
|
||||
hash = "sha256-A7ucZnXks4K+JDVY5vV2cT5KfEOUOo/OHO4rga5mGys=";
|
||||
};
|
||||
};
|
||||
elasticsearch = beamPackages.buildMix rec {
|
||||
name = "elasticsearch";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "akkoma.dev";
|
||||
owner = "AkkomaGang";
|
||||
repo = "elasticsearch-elixir";
|
||||
rev = "6cd946f75f6ab9042521a009d1d32d29a90113ca";
|
||||
hash = "sha256-CtmQHVl+VTpemne+nxbkYGcErrgCo+t3ZBPbkFSpyF0=";
|
||||
};
|
||||
};
|
||||
mfm_parser = beamPackages.buildMix rec {
|
||||
name = "mfm_parser";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "akkoma.dev";
|
||||
owner = "AkkomaGang";
|
||||
repo = "mfm-parser";
|
||||
rev = "b21ab7754024af096f2d14247574f55f0063295b";
|
||||
hash = "sha256-couG5jrAo0Fbk/WABd4n3vhXpDUp+9drxExKc5NM9CI=";
|
||||
};
|
||||
|
||||
beamDeps = with final; [ phoenix_view temple ];
|
||||
patchPhase = mimeTypePatchPhase;
|
||||
};
|
||||
search_parser = beamPackages.buildMix rec {
|
||||
name = "search_parser";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FloatingGhost";
|
||||
repo = "pleroma-contrib-search-parser";
|
||||
rev = "08971a81e68686f9ac465cfb6661d51c5e4e1e7f";
|
||||
hash = "sha256-sbo9Kcp2oT05o2GAF+IgziLPYmCkWgBfFMBCytmqg3Y=";
|
||||
};
|
||||
|
||||
beamDeps = with final; [ nimble_parsec ];
|
||||
};
|
||||
temple = beamPackages.buildMix rec {
|
||||
name = "temple";
|
||||
version = "0.9.0-rc.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "akkoma.dev";
|
||||
owner = "AkkomaGang";
|
||||
repo = "temple";
|
||||
rev = "066a699ade472d8fa42a9d730b29a61af9bc8b59";
|
||||
hash = "sha256-qA0z8WTMjO2OixcZBARn/LbuV3s3LGtwZ9nSjj/tWBc=";
|
||||
};
|
||||
|
||||
mixEnv = "dev";
|
||||
beamDeps = with final; [ earmark_parser ex_doc makeup makeup_elixir makeup_erlang nimble_parsec ];
|
||||
patchPhase = mimeTypePatchPhase;
|
||||
};
|
||||
|
||||
# Some additional build inputs and build fixes
|
||||
fast_html = prev.fast_html.override {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
dontUseCmakeConfigure = true;
|
||||
};
|
||||
http_signatures = beamPackages.buildMix rec {
|
||||
name = "http_signatures";
|
||||
version = "0.1.3";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "akkoma.dev";
|
||||
owner = "AkkomaGang";
|
||||
repo = "http_signatures";
|
||||
rev = "d44c43d66758c6a73eaa4da9cffdbee0c5da44ae";
|
||||
hash = "sha256-o5xF++AIJLVMFuQwldNyWpYJGWFHZZTfGy1V80TZzR8=";
|
||||
};
|
||||
|
||||
beamDeps = with final; [ credo ex_doc dialyxir temple ];
|
||||
patchPhase = ''
|
||||
substituteInPlace mix.exs --replace ":logger" ":logger, :public_key"
|
||||
${mimeTypePatchPhase}
|
||||
'';
|
||||
};
|
||||
majic = beamPackages.buildMix {
|
||||
name = "majic";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "akkoma.dev";
|
||||
owner = "AkkomaGang";
|
||||
repo = "majic";
|
||||
rev = "80540b36939ec83f48e76c61e5000e0fd67706f0";
|
||||
hash = "sha256-OMM9aDRvbqCOBIE+iPySU8ONRn1BqHDql22rRSmdW08=";
|
||||
};
|
||||
|
||||
buildInputs = [ file ];
|
||||
beamDeps = with final; [ nimble_pool mime plug credo dialyxir ex_doc elixir_make ];
|
||||
patchPhase = mimeTypePatchPhase;
|
||||
};
|
||||
|
||||
syslog = prev.syslog.override {
|
||||
buildPlugins = with beamPackages; [ pc ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
passthru = {
|
||||
tests = with nixosTests; { inherit akkoma akkoma-confined; };
|
||||
inherit mixNixDeps;
|
||||
tests = with nixosTests; {
|
||||
inherit akkoma akkoma-confined;
|
||||
};
|
||||
|
||||
inherit mixFodDeps;
|
||||
|
||||
# Used to make sure the service uses the same version of elixir as
|
||||
# the package
|
||||
elixirPackage = beamPackages.elixir;
|
||||
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -30,10 +30,10 @@ stdenvNoCC.mkDerivation {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Blob emoji from blobs.gg repacked as APNG";
|
||||
homepage = "https://blobs.gg";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ mvs ];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ mvs ];
|
||||
};
|
||||
}
|
||||
|
||||
14
pkgs/servers/akkoma/mime.exs
Normal file
14
pkgs/servers/akkoma/mime.exs
Normal file
@@ -0,0 +1,14 @@
|
||||
config :mime, :types, %{
|
||||
"application/xml" => ["xml"],
|
||||
"application/xrd+xml" => ["xrd+xml"],
|
||||
"application/jrd+json" => ["jrd+json"],
|
||||
"application/activity+json" => ["activity+json"],
|
||||
"application/ld+json" => ["activity+json"],
|
||||
"image/apng" => ["apng"]
|
||||
}
|
||||
|
||||
config :mime, :extensions, %{
|
||||
"xrd+xml" => "text/plain",
|
||||
"jrd+json" => "text/plain",
|
||||
"activity+json" => "text/plain"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -923,8 +923,12 @@ with pkgs;
|
||||
};
|
||||
|
||||
akkoma = callPackage ../servers/akkoma {
|
||||
elixir = beam_nox.packages.erlang_26.elixir_1_16;
|
||||
beamPackages = beam_nox.packages.erlang_26.extend (self: super: { elixir = self.elixir_1_16; });
|
||||
beamPackages = beam_nox.packages.erlang_26.extend (self: super: {
|
||||
elixir = self.elixir_1_16;
|
||||
rebar3 = self.rebar3WithPlugins {
|
||||
plugins = with self; [ pc ];
|
||||
};
|
||||
});
|
||||
};
|
||||
akkoma-frontends = recurseIntoAttrs {
|
||||
akkoma-fe = callPackage ../servers/akkoma/akkoma-fe { };
|
||||
|
||||
Reference in New Issue
Block a user