mobilizon/js/default.nix
778a69cd 5e4a36b4e4 use workaround for mkYarnPackage patch
flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:erictapen/nixpkgs/1b8435e4c7386212d892e057620c8c167ae17adc' (2023-08-03)
  → 'github:erictapen/nixpkgs/6f43a2f938963cfebc376da771edfa0953585b4e' (2023-08-29)
2023-08-29 16:31:55 +02:00

36 lines
793 B
Nix

{ 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
'';
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 ];
};
}