Unverified Commit eecaf1b9 authored by Damien Cassou's avatar Damien Cassou Committed by GitHub
Browse files

Merge pull request #261878 from DamienCassou/blobfuse-2.1.0

blobfuse: 1.3.7 -> 2.1.0
parents 7fb9ba1b ad86590c
Loading
Loading
Loading
Loading
+16 −26
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, curl, gnutls, libgcrypt, libuuid, fuse, boost }:
{ lib, buildGoModule, fetchFromGitHub, fuse3, testers, blobfuse }:

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

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

    cmakeFlags = [ "-DBUILD_ADLS=ON" "-DUSE_OPENSSL=OFF" ];
  vendorHash = "sha256-WfVFV/6Owx51rHXyfMp7CRW7aQ3R5BFyfHronQ58Gik=";

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

  env.NIX_CFLAGS_COMPILE = toString [
    # Needed with GCC 12
    "-Wno-error=deprecated-declarations"
    "-Wno-error=catch-value"
  ];
  # Many tests depend on network or needs to be configured to pass. See the link below for a starting point
  # https://github.com/NixOS/nixpkgs/pull/201196/files#diff-e669dbe391f8856f4564f26023fe147a7b720aeefe6869ab7a218f02a8247302R20
  doCheck = false;

  buildInputs = [ curl gnutls libgcrypt libuuid fuse boost cpplite ];
  nativeBuildInputs = [ cmake pkg-config ];
  passthru.tests.version = testers.testVersion { package = blobfuse; };

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