about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/backup/fabs/default.nix
blob: f6e9ec291585521fef95bddc80d24270b635cf2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{ 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
    python-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 ];
    broken = lib.versionAtLeast python3.pkgs.sqlalchemy.version "2.0";
    badPlatforms = [
      "x86_64-darwin"
      "aarch64-darwin"
    ];
  };
}