1{ lib
2, fetchFromGitHub
3, perl
4, python3
5, sqlite
6}:
7
8python3.pkgs.buildPythonApplication rec {
9 pname = "fabs";
10 version = "1.1";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "openafs-contrib";
15 repo = "fabs";
16 rev = "v${version}";
17 hash = "sha256-ejAcCwrOWGX0zsMw224f9GTWlozNYC0gU6LdTk0XqH0=";
18 };
19
20 nativeBuildInputs = [
21 perl
22 ];
23
24 propagatedBuildInputs = with python3.pkgs; [
25 alembic
26 python-dateutil
27 pyyaml
28 setuptools
29 sqlalchemy
30 ];
31
32 outputs = [ "out" "man" ];
33
34 preBuild = ''
35 export PREFIX=$out
36 '';
37
38 LOCALSTATEDIR = "/var";
39 LOCKDIR = "/run/lock/fabs";
40
41 preInstall = ''
42 mkdir -p "$out/etc"
43 cp -t "$out/etc" -r etc/fabs
44 '';
45
46 # remove once sqlalchemy backend no longer uses deprecated methods
47 SQLALCHEMY_SILENCE_UBER_WARNING = 1;
48
49 nativeCheckInputs = [
50 python3.pkgs.pytestCheckHook
51 sqlite
52 ];
53
54 meta = with lib; {
55 outputsToInstall = [ "out" "man" ];
56 mainProgram = "fabsys";
57 description = "Flexible AFS Backup System for the OpenAFS distributed file system";
58 homepage = "https://github.com/openafs-contrib/fabs";
59 license = with licenses; [ isc ];
60 maintainers = with maintainers; [ spacefrogg ];
61 broken = lib.versionAtLeast python3.pkgs.sqlalchemy.version "2.0";
62 badPlatforms = [
63 "x86_64-darwin"
64 "aarch64-darwin"
65 ];
66 };
67}