From 202c06daedf31d088f556ce3e6e8cfb5047b753c Mon Sep 17 00:00:00 2001 From: William Vandervalk Date: Sun, 15 Sep 2024 15:59:05 -0400 Subject: [PATCH 1/2] maintainers: add interdependence --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 78100e49ad341..d597833620fab 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9073,6 +9073,12 @@ githubId = 54999; name = "Ariel Nunez"; }; + interdependence = { + email = "git@williamvandervalk.com"; + github = "interdependence"; + githubId = 45567423; + name = "William Vandervalk"; + }; Intuinewin = { email = "antoinelabarussias@gmail.com"; github = "Intuinewin"; From 76fbeedfa5f4e17ac91e74ecce0e1e203f019c9b Mon Sep 17 00:00:00 2001 From: William Vandervalk Date: Sun, 15 Sep 2024 16:02:27 -0400 Subject: [PATCH 2/2] backrest: init at 1.5.0 --- pkgs/by-name/ba/backrest/package.nix | 65 ++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkgs/by-name/ba/backrest/package.nix diff --git a/pkgs/by-name/ba/backrest/package.nix b/pkgs/by-name/ba/backrest/package.nix new file mode 100644 index 0000000000000..af057af6b5cfa --- /dev/null +++ b/pkgs/by-name/ba/backrest/package.nix @@ -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; + }; +}