python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / filesystems / gcsfuse / default.nix
blob16d0ae0be8c84eae343bb6dee0c1ca2126ce051f
1 { lib, buildGoModule, fetchFromGitHub }:
3 buildGoModule rec {
4   pname = "gcsfuse";
5   version = "0.41.8";
7   src = fetchFromGitHub {
8     owner = "googlecloudplatform";
9     repo = "gcsfuse";
10     rev = "v${version}";
11     sha256 = "sha256-9Y6phVYWI5xhqJf2LL9WbaG8vyfNcGUcnaHjKA4krjA=";
12   };
14   vendorSha256 = null;
16   subPackages = [ "." "tools/mount_gcsfuse" ];
18   ldflags = [ "-s" "-w" "-X main.gcsfuseVersion=${version}" ];
20   preCheck =
21     let skippedTests = [
22       "Test_Main"
23       "TestFlags"
24     ]; in
25     ''
26       # Disable flaky tests
27       buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]")
28     '';
30   postInstall = ''
31     ln -s $out/bin/mount_gcsfuse $out/bin/mount.gcsfuse
32     ln -s $out/bin/mount_gcsfuse $out/bin/mount.fuse.gcsfuse
33   '';
35   meta = with lib;{
36     description = "A user-space file system for interacting with Google Cloud Storage";
37     homepage = "https://cloud.google.com/storage/docs/gcs-fuse";
38     license = licenses.asl20;
39     platforms = platforms.unix;
40     maintainers = with maintainers; [ aaronjheng ];
41   };