desktop-nix/frontend/default.nix

52 lines
1.1 KiB
Nix
Raw Normal View History

2021-05-06 09:55:31 +00:00
{ stdenv
, lib
, mkYarnPackage
, fetchgit
, python2
, pkg-config
, libsass
, nodejs
, yarn
}:
let
2021-05-06 15:30:59 +00:00
version = "unstable";
2021-05-06 09:55:31 +00:00
src = fetchgit {
2021-05-06 15:30:59 +00:00
url = "https://kolaente.dev/vikunja/frontend.git";
2021-06-09 14:13:52 +00:00
rev = "1c01cb3e476346e26a7de440236bf9e4c51b2ecc";
sha256 = "0xxkwlrp689sq0c4ryckz7avgnw2mz40hw013jivcr8dh6m09wra";
2021-05-06 09:55:31 +00:00
};
frontend-modules = mkYarnPackage rec {
name = "vikunja-frontend-modules";
inherit version src;
doDist = false;
};
in stdenv.mkDerivation {
2021-05-06 10:49:44 +00:00
pname = "vikunja-frontend";
2021-05-06 09:55:31 +00:00
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 = {
2021-05-06 10:49:44 +00:00
description = "Frontend of the Vikunja to-do list app";
2021-05-06 09:55:31 +00:00
homepage = "https://vikunja.io/";
2021-05-06 14:31:33 +00:00
license = lib.licenses.agpl3Plus;
2021-05-06 09:55:31 +00:00
maintainers = with lib.maintainers; [ kolaente ];
platforms = lib.platforms.all;
};
}