python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / by-name / dw / dwarfs / package.nix
blob50c2121997daeb7f4119b42cc198ad902d825882
2   lib,
3   fetchFromGitHub,
4   stdenv,
5   bison,
6   boost,
7   cmake,
8   double-conversion,
9   fmt,
10   fuse3,
11   flac,
12   glog,
13   gtest,
14   howard-hinnant-date,
15   jemalloc,
16   libarchive,
17   libevent,
18   libunwind,
19   lz4,
20   openssl,
21   pkg-config,
22   python3,
23   range-v3,
24   ronn,
25   xxHash,
26   utf8cpp,
27   zstd,
29 stdenv.mkDerivation (finalAttrs: {
30   pname = "dwarfs";
31   version = "0.9.10";
32   src = fetchFromGitHub {
33     owner = "mhx";
34     repo = "dwarfs";
35     rev = "refs/tags/v${finalAttrs.version}";
36     fetchSubmodules = true;
37     hash = "sha256-uyYNs+fDV5BfQwfX9Wi3BwiKjSDQHAKRJ1+UvS/fHoE=";
38   };
40   cmakeFlags = [
41     "-DNIXPKGS_DWARFS_VERSION_OVERRIDE=v${finalAttrs.version}" # see https://github.com/mhx/dwarfs/issues/155
43     # Needs to be set so `dwarfs` does not try to download `gtest`; it is not
44     # a submodule, see: https://github.com/mhx/dwarfs/issues/188#issuecomment-1907657083
45     "-DPREFER_SYSTEM_GTEST=ON"
47     # These should no longer be necessary with a version > 0.9.10:
48     # * https://github.com/mhx/dwarfs/commit/593b22a8a90eb66c0898ae06f097f32f4bf3dfd4
49     # * https://github.com/mhx/dwarfs/commit/6e9608b2b01be13e41e6b728aae537c14c00ad82
50     # * https://github.com/mhx/dwarfs/commit/ce4bee1ad63c666da57d2cdae9fd65214d8dab7f
51     "-DPREFER_SYSTEM_LIBFMT=ON"
52     "-DPREFER_SYSTEM_ZSTD=ON"
53     "-DPREFER_SYSTEM_XXHASH=ON"
55     # may be added under an option in the future
56     # "-DWITH_LEGACY_FUSE=ON"
58     "-DWITH_TESTS=ON"
59   ];
61   nativeBuildInputs = [
62     bison
63     cmake
64     howard-hinnant-date # uses only the header-only parts
65     pkg-config
66     range-v3 # header-only library
67     ronn
68     (python3.withPackages (ps: [ ps.mistletoe ])) # for man pages
69   ];
71   buildInputs = [
72     # dwarfs
73     boost
74     flac # optional; allows automatic audio compression
75     fmt
76     fuse3
77     jemalloc
78     libarchive
79     lz4
80     xxHash
81     utf8cpp
82     zstd
84     # folly
85     double-conversion
86     glog
87     libevent
88     libunwind
89     openssl
90   ];
92   doCheck = true;
93   nativeCheckInputs = [
94     # https://github.com/mhx/dwarfs/issues/188#issuecomment-1907574427
95     # `dwarfs` sets C++20 as the minimum, see
96     #     https://github.com/mhx/dwarfs/blob/2cb5542a5d4274225c5933370adcf00035f6c974/CMakeLists.txt#L129
97     # Thus the `gtest` headers, when included,
98     # refer to symbols that only exist in `.so` files compiled with that version.
99     (gtest.override { cxx_standard = "20"; })
100   ];
101   # these fail inside of the sandbox due to missing access
102   # to the FUSE device
103   GTEST_FILTER =
104     let
105       disabledTests = [
106         "dwarfs/tools_test.end_to_end/*"
107         "dwarfs/tools_test.mutating_and_error_ops/*"
108         "dwarfs/tools_test.categorize/*"
109       ];
110     in
111       "-${lib.concatStringsSep ":" disabledTests}";
113   meta = {
114     description = "Fast high compression read-only file system";
115     homepage = "https://github.com/mhx/dwarfs";
116     changelog = "https://github.com/mhx/dwarfs/blob/v${finalAttrs.version}/CHANGES.md";
117     license = lib.licenses.gpl3Plus;
118     maintainers = [ lib.maintainers.luftmensch-luftmensch ];
119     platforms = lib.platforms.linux;
120   };