-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.nix
40 lines (33 loc) · 898 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
mkYarnPackage,
fetchYarnDeps,
makeWrapper,
lib,
nodejs,
}:
mkYarnPackage rec {
pname = "untis-ics-sync";
version = "0.7.3";
src = ./.;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
hash = "sha256-AOTjgcUgE6C9v9dksliYTGrE0Xzr89coNaaRAOVldK0=";
};
nativeBuildInputs = [makeWrapper];
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
buildPhase = ''
yarn --offline run build
'';
postInstall = ''
makeWrapper ${lib.getExe nodejs} "$out/bin/untis-ics-sync" \
--add-flags "$out/libexec/untis-ics-sync/deps/untis-ics-sync/dist/main.js"
'';
meta = with lib; {
description = "Serves a calendar API (ICS) for events provided from Untis";
homepage = "https://github.com/bddvlpr/untis-ics-sync";
license = licenses.bsd3;
maintainers = with maintainers; [bddvlpr];
mainProgram = "untis-ics-sync";
};
}