52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{ stdenv
|
|
, lib
|
|
, mkYarnPackage
|
|
, fetchgit
|
|
, python2
|
|
, pkg-config
|
|
, libsass
|
|
, nodejs
|
|
, yarn
|
|
}:
|
|
|
|
let
|
|
version = "unstable";
|
|
|
|
src = fetchgit {
|
|
url = "https://kolaente.dev/vikunja/frontend.git";
|
|
rev = "1c01cb3e476346e26a7de440236bf9e4c51b2ecc";
|
|
sha256 = "0xxkwlrp689sq0c4ryckz7avgnw2mz40hw013jivcr8dh6m09wra";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|
|
|