mobilizon/js/default.nix

36 lines
793 B
Nix
Raw Normal View History

{ lib, filter, yarn, mkYarnPackage, imagemagick }:
mkYarnPackage rec {
src = filter {
root = ./.;
exclude = [ (filter.matchExt "nix") ];
};
# 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
'';
buildPhase = ''
runHook preBuild
yarn run build
runHook postBuild
'';
2023-08-10 14:09:50 +02:00
doCheck = true;
checkPhase = "yarn run test";
nativeBuildInputs = [ imagemagick ];
meta = with lib; {
description = "Frontend for the Mobilizon server";
homepage = "https://joinmobilizon.org/";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ minijackson erictapen ];
};
}