-
Notifications
You must be signed in to change notification settings - Fork 0
/
waved.nix
56 lines (47 loc) · 1.17 KB
/
waved.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, buildGoModule
, buildNpmPackage
, fetchFromGitHub
, makeWrapper
, stdenvNoCC
, fetchurl
}:
let
version = "1.1.1";
src = fetchFromGitHub {
owner = "h2oai";
repo = "wave";
rev = "v${version}";
sha256 = "sha256-fINuoJx7dPN613wLLzcC2aar5vz6L6qzAWm/bWgj9bo=";
};
ui = stdenvNoCC.mkDerivation {
pname = "ui";
inherit version;
src = fetchurl {
url = "https://github.com/h2oai/wave/releases/download/v1.1.1/wave-1.1.1-linux-amd64.tar.gz";
hash = "sha256-Q1SfmRyM02qIHJRIToglx4pEczUjte5dvDWNbCQ0W3s=";
};
installPhase = ''
mkdir -p $out/www
cp -r --no-preserve=mode www $out
'';
};
in
buildGoModule {
pname = "wave";
inherit version src;
vendorHash = "sha256-WQqwUN/TPWhfpgSjLgMVKmXVXTk/ElgT+Nk+XLfNayA=";
nativeBuildInputs = [ makeWrapper ];
#runtimeDependencies = [ ui ];
postInstall = ''
mv $out/bin/wave $out/bin/waved
makeWrapper $out/bin/waved $out/bin/waved2 \
--add-flags "-web-dir ${ui}/www/"
'';
doCheck = true;
meta = with lib; {
platforms = platforms.unix;
license = licenses.asl20;
maintainers = with maintainers; [ sarcasticadmin matthewcroughan ];
};
}