{ stdenv , lib , mkYarnPackage , fetchgit , python2 , pkg-config , libsass , nodejs , yarn }: let version = "unstable"; src = fetchgit { url = "https://kolaente.dev/vikunja/frontend.git"; rev = "19fd94a915ea80f7ad757620a41cacc157cbd4b5"; sha256 = "0ibp59nyh9bg58scr39z0zh3n061fsss264n3mw15g3s7m7h5xyy"; }; frontend-modules = mkYarnPackage rec { name = "vikunja-frontend-modules"; inherit version src; doDist = false; }; in stdenv.mkDerivation { pname = "vikunja-frontend"; inherit version src; nativeBuildInputs = [ frontend-modules yarn ]; buildPhase = '' # Cannot use symlink or postcss-loader will crap out cp -r ${frontend-modules}/libexec/vikunja-frontend/node_modules/ . yarn --offline run build sed -i 's/\/api\/v1//g' dist/index.html ''; installPhase = '' cp -r dist $out ''; meta = { description = "Frontend of the Vikunja to-do list app"; homepage = "https://vikunja.io/"; license = lib.licenses.agpl3Plus; maintainers = with lib.maintainers; [ kolaente ]; platforms = lib.platforms.all; }; }