File tree Expand file tree Collapse file tree 2 files changed +71
-0
lines changed
Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 90859085 githubId = 54999;
90869086 name = "Ariel Nunez";
90879087 };
9088+ interdependence = {
9089+ 9090+ github = "interdependence";
9091+ githubId = 45567423;
9092+ name = "William Vandervalk";
9093+ };
90889094 Intuinewin = {
9089909590909096 github = "Intuinewin";
Original file line number Diff line number Diff line change 1+ {
2+ buildGoModule ,
3+ buildNpmPackage ,
4+ fetchFromGitHub ,
5+ lib ,
6+ restic ,
7+ util-linux ,
8+ } :
9+ let
10+ pname = "backrest" ;
11+ version = "1.5.0" ;
12+
13+ src = fetchFromGitHub {
14+ owner = "garethgeorge" ;
15+ repo = "backrest" ;
16+ rev = "refs/tags/v${ version } " ;
17+ hash = "sha256-qxEZkRKkwKZ+EZ3y3aGcX2ioKOz19SRdi3+9mjF1LpE=" ;
18+ } ;
19+
20+ frontend = buildNpmPackage {
21+ inherit version ;
22+ pname = "${ pname } -webui" ;
23+ src = "${ src } /webui" ;
24+
25+ npmDepsHash = "sha256-mS8G3+JuASaOkAYi+vgWztrSIIu7vfaasu+YeRJjWZw=" ;
26+
27+ installPhase = ''
28+ runHook preInstall
29+ mkdir $out
30+ cp -r dist/* $out
31+ runHook postInstall
32+ '' ;
33+ } ;
34+ in
35+ buildGoModule {
36+ inherit pname src version ;
37+
38+ vendorHash = "sha256-YukcHnXa/QimfX3nDtQI6yfPkEK9j5SPXOPIT++eWsU=" ;
39+
40+ preBuild = ''
41+ mkdir -p ./webui/dist
42+ cp -r ${ frontend } /* ./webui/dist
43+ '' ;
44+
45+ nativeCheckInputs = [ util-linux ] ;
46+
47+ # Fails with handler returned wrong content encoding
48+ checkFlags = [ "-skip=TestServeIndex" ] ;
49+
50+ preCheck = ''
51+ # Use restic from nixpkgs, otherwise download fails in sandbox
52+ export BACKREST_RESTIC_COMMAND="${ restic } /bin/restic"
53+ export HOME=$(pwd)
54+ '' ;
55+
56+ meta = {
57+ description = "Web UI and orchestrator for restic backup" ;
58+ homepage = "https://github.com/garethgeorge/backrest" ;
59+ changelog = "https://github.com/garethgeorge/backrest/releases/tag/v${ version } " ;
60+ license = lib . licenses . gpl3Only ;
61+ maintainers = with lib . maintainers ; [ interdependence ] ;
62+ mainProgram = "backrest" ;
63+ platforms = lib . platforms . unix ;
64+ } ;
65+ }
You can’t perform that action at this time.
0 commit comments