2023-08-09 15:48:22 +02:00
|
|
|
{ lib, filter, yarn, mkYarnPackage, imagemagick }:
|
2023-08-03 16:59:12 +02:00
|
|
|
|
|
|
|
mkYarnPackage rec {
|
2023-08-09 15:48:22 +02:00
|
|
|
src = filter {
|
|
|
|
root = ./.;
|
|
|
|
exclude = [ (filter.matchExt "nix") ];
|
|
|
|
};
|
2023-08-03 16:59:12 +02:00
|
|
|
|
2023-08-29 16:09:45 +02:00
|
|
|
# Somehow $out/deps/mobilizon/node_modules ends up only containing a .bin
|
|
|
|
# directory otherwise.
|
|
|
|
yarnPostBuild = ''
|
|
|
|
rm -rf $out/deps/mobilizon/node_modules
|
|
|
|
ln -s $out/node_modules $out/deps/mobilizon/node_modules
|
|
|
|
'';
|
|
|
|
|
2023-08-03 16:59:12 +02:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
yarn run build
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
2023-08-10 14:09:50 +02:00
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "yarn run test";
|
2023-08-03 16:59:12 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ imagemagick ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Frontend for the Mobilizon server";
|
|
|
|
homepage = "https://joinmobilizon.org/";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
maintainers = with maintainers; [ minijackson erictapen ];
|
|
|
|
};
|
|
|
|
}
|