2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gcsfuse";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.42.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "googlecloudplatform";
|
|
|
|
repo = "gcsfuse";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-Yv2IY+ZSyZDcgEpMGYZxqxKc6twmMh/18HlTKdyUGbk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
vendorHash = null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
subPackages = [ "." "tools/mount_gcsfuse" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.gcsfuseVersion=${version}" ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
preCheck =
|
2023-02-02 18:25:31 +00:00
|
|
|
let
|
|
|
|
skippedTests = [
|
|
|
|
"Test_Main"
|
|
|
|
"TestFlags"
|
|
|
|
];
|
|
|
|
in
|
2022-11-04 12:27:35 +00:00
|
|
|
''
|
|
|
|
# Disable flaky tests
|
|
|
|
buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]")
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
ln -s $out/bin/mount_gcsfuse $out/bin/mount.gcsfuse
|
|
|
|
ln -s $out/bin/mount_gcsfuse $out/bin/mount.fuse.gcsfuse
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A user-space file system for interacting with Google Cloud Storage";
|
|
|
|
homepage = "https://cloud.google.com/storage/docs/gcs-fuse";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/GoogleCloudPlatform/gcsfuse/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
2022-06-26 10:26:21 +00:00
|
|
|
maintainers = with maintainers; [ aaronjheng ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|