forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backrest: init at 1.5.0 (NixOS#342141)
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9085,6 +9085,12 @@ | |
githubId = 54999; | ||
name = "Ariel Nunez"; | ||
}; | ||
interdependence = { | ||
email = "[email protected]"; | ||
github = "interdependence"; | ||
githubId = 45567423; | ||
name = "William Vandervalk"; | ||
}; | ||
Intuinewin = { | ||
email = "[email protected]"; | ||
github = "Intuinewin"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
buildGoModule, | ||
buildNpmPackage, | ||
fetchFromGitHub, | ||
lib, | ||
restic, | ||
util-linux, | ||
}: | ||
let | ||
pname = "backrest"; | ||
version = "1.5.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "garethgeorge"; | ||
repo = "backrest"; | ||
rev = "refs/tags/v${version}"; | ||
hash = "sha256-qxEZkRKkwKZ+EZ3y3aGcX2ioKOz19SRdi3+9mjF1LpE="; | ||
}; | ||
|
||
frontend = buildNpmPackage { | ||
inherit version; | ||
pname = "${pname}-webui"; | ||
src = "${src}/webui"; | ||
|
||
npmDepsHash = "sha256-mS8G3+JuASaOkAYi+vgWztrSIIu7vfaasu+YeRJjWZw="; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir $out | ||
cp -r dist/* $out | ||
runHook postInstall | ||
''; | ||
}; | ||
in | ||
buildGoModule { | ||
inherit pname src version; | ||
|
||
vendorHash = "sha256-YukcHnXa/QimfX3nDtQI6yfPkEK9j5SPXOPIT++eWsU="; | ||
|
||
preBuild = '' | ||
mkdir -p ./webui/dist | ||
cp -r ${frontend}/* ./webui/dist | ||
''; | ||
|
||
nativeCheckInputs = [ util-linux ]; | ||
|
||
# Fails with handler returned wrong content encoding | ||
checkFlags = [ "-skip=TestServeIndex" ]; | ||
|
||
preCheck = '' | ||
# Use restic from nixpkgs, otherwise download fails in sandbox | ||
export BACKREST_RESTIC_COMMAND="${restic}/bin/restic" | ||
export HOME=$(pwd) | ||
''; | ||
|
||
meta = { | ||
description = "Web UI and orchestrator for restic backup"; | ||
homepage = "https://github.com/garethgeorge/backrest"; | ||
changelog = "https://github.com/garethgeorge/backrest/releases/tag/v${version}"; | ||
license = lib.licenses.gpl3Only; | ||
maintainers = with lib.maintainers; [ interdependence ]; | ||
mainProgram = "backrest"; | ||
platforms = lib.platforms.unix; | ||
}; | ||
} |