about summary refs log tree commit diff
path: root/pkgs/tools/backup/fabs
diff options
context:
space:
mode:
authorMichael Raitza <michael.raitza@tu-dresden.de>2023-03-08 19:12:31 +0100
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-04-11 08:30:56 -0300
commit38b97e374d7f108b059b5662bfb5cc5cac407871 (patch)
tree885d9062c3e92b0cc19988e26ef6a245df2de230 /pkgs/tools/backup/fabs
parent9e9444a744b0a91a00c50bdc63e380d53581ca08 (diff)
fabs: init at 1.1
Diffstat (limited to 'pkgs/tools/backup/fabs')
-rw-r--r--pkgs/tools/backup/fabs/default.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/tools/backup/fabs/default.nix b/pkgs/tools/backup/fabs/default.nix
new file mode 100644
index 0000000000000..9a2a6045c1429
--- /dev/null
+++ b/pkgs/tools/backup/fabs/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, fetchFromGitHub
+, perl
+, python3
+, sqlite
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "fabs";
+  version = "1.1";
+  format = "setuptools";
+
+  src = fetchFromGitHub {
+    owner = "openafs-contrib";
+    repo = "fabs";
+    rev = "v${version}";
+    hash = "sha256-ejAcCwrOWGX0zsMw224f9GTWlozNYC0gU6LdTk0XqH0=";
+  };
+
+  nativeBuildInputs = [
+    perl
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    alembic
+    dateutil
+    pyyaml
+    setuptools
+    sqlalchemy
+  ];
+
+  outputs = [ "out" "man" ];
+
+  preBuild = ''
+    export PREFIX=$out
+  '';
+
+  LOCALSTATEDIR = "/var";
+  LOCKDIR = "/run/lock/fabs";
+
+  preInstall = ''
+    mkdir -p "$out/etc"
+    cp -t "$out/etc" -r etc/fabs
+  '';
+
+  # remove once sqlalchemy backend no longer uses deprecated methods
+  SQLALCHEMY_SILENCE_UBER_WARNING = 1;
+
+  nativeCheckInputs = [
+    python3.pkgs.pytestCheckHook
+    sqlite
+  ];
+
+  meta = with lib; {
+    outputsToInstall = [ "out" "man" ];
+    mainProgram = "fabsys";
+    description = "Flexible AFS Backup System for the OpenAFS distributed file system";
+    homepage = "https://github.com/openafs-contrib/fabs";
+    license = with licenses; [ isc ];
+    maintainers = with maintainers; [ spacefrogg ];
+    badPlatforms = [
+      "x86_64-darwin"
+      "aarch64-darwin"
+    ];
+  };
+}