Skip to content

Commit 67d9b47

Browse files
authored
backrest: init at 1.5.0 (#342141)
2 parents e2dd770 + 76fbeed commit 67d9b47

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

maintainers/maintainer-list.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9085,6 +9085,12 @@
90859085
githubId = 54999;
90869086
name = "Ariel Nunez";
90879087
};
9088+
interdependence = {
9089+
email = "[email protected]";
9090+
github = "interdependence";
9091+
githubId = 45567423;
9092+
name = "William Vandervalk";
9093+
};
90889094
Intuinewin = {
90899095
email = "[email protected]";
90909096
github = "Intuinewin";
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
}

0 commit comments

Comments
 (0)