summary refs log tree commit diff
path: root/pkgs/tools/filesystems/blobfuse/default.nix
blob: 64edc17a89f60d82d894e7327081493671ad14ae (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
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, curl, gnutls, libgcrypt, libuuid, fuse, boost }:

let
  version = "1.3.7";
  src = fetchFromGitHub {
    owner  = "Azure";
    repo   = "azure-storage-fuse";
    rev    = "blobfuse-${version}-Linux";
    sha256 = "sha256-yihIuS4AG489U7eBi/p7H6S7Cg54kkQeNVCexxQZ60A=";
  };
  cpplite = stdenv.mkDerivation rec {
    pname = "cpplite";
    inherit version src;

    sourceRoot = "${src.name}/cpplite";
    patches = [ ./install-adls.patch ];

    cmakeFlags = [ "-DBUILD_ADLS=ON" "-DUSE_OPENSSL=OFF" ];

    buildInputs = [ curl libuuid gnutls ];
    nativeBuildInputs = [ cmake pkg-config ];
  };
in stdenv.mkDerivation rec {
  pname = "blobfuse";
  inherit version src;

  env.NIX_CFLAGS_COMPILE = toString [
    # Needed with GCC 12
    "-Wno-error=deprecated-declarations"
    "-Wno-error=catch-value"
  ];

  buildInputs = [ curl gnutls libgcrypt libuuid fuse boost cpplite ];
  nativeBuildInputs = [ cmake pkg-config ];

  meta = with lib; {
    description = "Mount an Azure Blob storage as filesystem through FUSE";
    license = licenses.mit;
    maintainers = with maintainers; [ jbgi ];
    platforms = platforms.linux;
  };
}