29 stdenv.mkDerivation (finalAttrs: {
32 src = fetchFromGitHub {
35 rev = "refs/tags/v${finalAttrs.version}";
36 fetchSubmodules = true;
37 hash = "sha256-uyYNs+fDV5BfQwfX9Wi3BwiKjSDQHAKRJ1+UvS/fHoE=";
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"
64 howard-hinnant-date # uses only the header-only parts
66 range-v3 # header-only library
68 (python3.withPackages (ps: [ ps.mistletoe ])) # for man pages
74 flac # optional; allows automatic audio compression
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"; })
101 # these fail inside of the sandbox due to missing access
106 "dwarfs/tools_test.end_to_end/*"
107 "dwarfs/tools_test.mutating_and_error_ops/*"
108 "dwarfs/tools_test.categorize/*"
111 "-${lib.concatStringsSep ":" disabledTests}";
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;