2022-05-31 11:53:40 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2016-09-26 07:51:04 +00:00
|
|
|
|
2022-05-31 11:53:40 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gcsfuse";
|
2022-12-01 23:28:50 +00:00
|
|
|
version = "0.41.9";
|
2016-09-26 07:51:04 +00:00
|
|
|
|
2019-09-07 08:51:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "googlecloudplatform";
|
|
|
|
repo = "gcsfuse";
|
|
|
|
rev = "v${version}";
|
2022-12-01 23:28:50 +00:00
|
|
|
sha256 = "sha256-hfdQa0e1S1cIF4V2XPFBl4jzzTWlIxZIJ99PRxCP55s=";
|
2016-09-26 07:51:04 +00:00
|
|
|
};
|
|
|
|
|
2022-05-31 11:53:40 +00:00
|
|
|
vendorSha256 = null;
|
2019-09-07 08:51:29 +00:00
|
|
|
|
2020-01-15 23:18:18 +00:00
|
|
|
subPackages = [ "." "tools/mount_gcsfuse" ];
|
|
|
|
|
2022-05-31 11:53:40 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.gcsfuseVersion=${version}" ];
|
|
|
|
|
2022-11-06 00:21:46 +00:00
|
|
|
preCheck =
|
|
|
|
let skippedTests = [
|
|
|
|
"Test_Main"
|
|
|
|
"TestFlags"
|
|
|
|
]; in
|
|
|
|
''
|
|
|
|
# Disable flaky tests
|
|
|
|
buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]")
|
|
|
|
'';
|
|
|
|
|
2020-01-15 23:18:18 +00:00
|
|
|
postInstall = ''
|
2020-04-28 01:50:57 +00:00
|
|
|
ln -s $out/bin/mount_gcsfuse $out/bin/mount.gcsfuse
|
|
|
|
ln -s $out/bin/mount_gcsfuse $out/bin/mount.fuse.gcsfuse
|
2020-01-15 23:18:18 +00:00
|
|
|
'';
|
2019-10-11 01:39:28 +00:00
|
|
|
|
2019-09-07 08:51:29 +00:00
|
|
|
meta = with lib;{
|
|
|
|
description = "A user-space file system for interacting with Google Cloud Storage";
|
|
|
|
homepage = "https://cloud.google.com/storage/docs/gcs-fuse";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
2022-05-31 11:53:40 +00:00
|
|
|
maintainers = with maintainers; [ aaronjheng ];
|
2016-09-26 07:51:04 +00:00
|
|
|
};
|
|
|
|
}
|