Unverified Commit b8fab6a5 authored by Janik's avatar Janik Committed by GitHub
Browse files

Merge pull request #245592 from tpwrules/update-dwarfs

parents 3173ae5d 61636ed5
Loading
Loading
Loading
Loading
+12 −17
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
, boost
, cmake
, double-conversion
, fmt_8
, fmt
, fuse3
, glog
, gtest
@@ -20,30 +20,27 @@
, pkg-config
, ronn
, xxHash
, utf8cpp
, zstd
}:

stdenv.mkDerivation rec {
  pname = "dwarfs";
  version = "0.6.2";
  version = "0.7.2";

  src = fetchFromGitHub {
    owner = "mhx";
    repo = "dwarfs";
    rev = "v${version}";
    fetchSubmodules = true;
    sha256 = "sha256-fA/3AooDndqYiK215cu/zTqCqeccHnwIX2CfJ9sC+Fc=";
    hash = "sha256-DcPRrATI2cpLZWAL+sSCoXvJ1R0O3yHqhlJW1aEpDpA=";
  };

  patches = with lib.versions; [
    (substituteAll {
  patches = [
    (with lib.versions; substituteAll {
      src = ./version_info.patch;

      gitRev = "v${version}";
      gitDesc = "v${version}";
      gitBranch = "v${version}";
      gitId = "v${version}"; # displayed as version number

      versionFull = version; # displayed as version number (with v prepended)
      versionMajor = major version;
      versionMinor = minor version;
      versionPatch = patch version;
@@ -54,14 +51,11 @@ stdenv.mkDerivation rec {
    "-DPREFER_SYSTEM_ZSTD=ON"
    "-DPREFER_SYSTEM_XXHASH=ON"
    "-DPREFER_SYSTEM_GTEST=ON"
    "-DPREFER_SYSTEM_LIBFMT=ON"

    # may be added under an option in the future
    # "-DWITH_LEGACY_FUSE=ON"
    "-DWITH_TESTS=ON"

    # temporary hack until folly builds work on aarch64,
    # see https://github.com/facebook/folly/issues/1880
    "-DCMAKE_LIBRARY_ARCHITECTURE=${if stdenv.isx86_64 then "x86_64" else "dummy"}"
  ];

  nativeBuildInputs = [
@@ -74,12 +68,13 @@ stdenv.mkDerivation rec {
  buildInputs = [
    # dwarfs
    boost
    fmt_8
    fmt
    fuse3
    jemalloc
    libarchive
    lz4
    xxHash
    utf8cpp
    zstd

    # folly
@@ -92,9 +87,9 @@ stdenv.mkDerivation rec {

  doCheck = true;
  nativeCheckInputs = [ gtest ];
  # this fails inside of the sandbox due to missing access
  # these fail inside of the sandbox due to missing access
  # to the FUSE device
  GTEST_FILTER = "-tools.everything";
  GTEST_FILTER = "-dwarfs/tools_test.end_to_end/*:dwarfs/tools_test.mutating_ops/*";

  meta = with lib; {
    description = "A fast high compression read-only file system";
+26 −8
Original line number Diff line number Diff line
diff --git a/cmake/package_version.cmake b/cmake/package_version.cmake
new file mode 100644
index 0000000..d4fdb9c
--- /dev/null
+++ b/cmake/package_version.cmake
@@ -0,0 +1,12 @@
+# autogenerated code, do not modify
+
+set(PRJ_GIT_REV "v@versionFull@")
+set(PRJ_GIT_DESC "v@versionFull@")
+set(PRJ_GIT_BRANCH "HEAD")
+set(PRJ_GIT_ID "v@versionFull@")
+set(PRJ_GIT_RELEASE_TAG "v@versionFull@")
+set(PRJ_VERSION_FULL "@versionFull@")
+set(PRJ_VERSION_SHORT "@versionFull@")
+set(PRJ_VERSION_MAJOR "@versionMajor@")
+set(PRJ_VERSION_MINOR "@versionMinor@")
+set(PRJ_VERSION_PATCH "@versionPatch@")
diff --git a/include/dwarfs/version.h b/include/dwarfs/version.h
new file mode 100755
index 0000000..9b12c59
new file mode 100644
index 0000000..54cf86a
--- /dev/null
+++ b/include/dwarfs/version.h
@@ -0,0 +1,16 @@
@@ -21,8 +39,8 @@ index 0000000..9b12c59
+
+} // namespace dwarfs
diff --git a/src/dwarfs/version.cpp b/src/dwarfs/version.cpp
new file mode 100755
index 0000000..3af0215
new file mode 100644
index 0000000..5759120
--- /dev/null
+++ b/src/dwarfs/version.cpp
@@ -0,0 +1,12 @@
@@ -32,9 +50,9 @@ index 0000000..3af0215
+
+namespace dwarfs {
+
+char const* PRJ_GIT_REV = "@gitRev@";
+char const* PRJ_GIT_DESC = "@gitDesc@";
+char const* PRJ_GIT_BRANCH = "@gitBranch@";
+char const* PRJ_GIT_ID = "@gitId@";
+char const* PRJ_GIT_REV = "@versionFull@";
+char const* PRJ_GIT_DESC = "v@versionFull@";
+char const* PRJ_GIT_BRANCH = "HEAD";
+char const* PRJ_GIT_ID = "v@versionFull@";
+
+} // namespace dwarfs