dwarfs: init at 0.6.1

Co-authored-by: Thomas <twatson52@mac.com>
This commit is contained in:
Stella 2022-07-16 14:39:57 +03:00
parent 9aebffaaa0
commit 73570ddb89
No known key found for this signature in database
GPG Key ID: 3D6DCA5B6F2C2A7A
3 changed files with 145 additions and 0 deletions

View File

@ -0,0 +1,103 @@
{ lib
, fetchFromGitHub
, stdenv
, substituteAll
, bison
, boost
, cmake
, double-conversion
, fmt_8
, fuse3
, gflags
, glog
, gtest
, jemalloc
, libarchive
, libevent
, libunwind
, lz4
, openssl
, pkg-config
, ronn
, xxHash
, zstd
}:
stdenv.mkDerivation rec {
pname = "dwarfs";
version = "0.6.1";
src = fetchFromGitHub {
owner = "mhx";
repo = "dwarfs";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-bGJkgcq8JxueRTX08QpJv1A0O5wXbiIgUY7BrY0Ln/M=";
};
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
versionMajor = major version;
versionMinor = minor version;
versionPatch = patch version;
})
];
cmakeFlags = [
"-DPREFER_SYSTEM_ZSTD=ON"
"-DPREFER_SYSTEM_XXHASH=ON"
"-DPREFER_SYSTEM_GTEST=ON"
# may be added under an option in the future
# "-DWITH_LEGACY_FUSE=ON"
"-DWITH_TESTS=ON"
];
nativeBuildInputs = [
bison
cmake
pkg-config
ronn
];
buildInputs = [
# dwarfs
boost
fmt_8
fuse3
jemalloc
libarchive
lz4
xxHash
zstd
# folly
double-conversion
glog
libevent
libunwind
openssl
];
doCheck = true;
checkInputs = [ gtest ];
# this fails inside of the sandbox due to missing access
# to the FUSE device
GTEST_FILTER = "-tools.everything";
meta = with lib; {
description = "A fast high compression read-only file system";
homepage = "https://github.com/mhx/dwarfs";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ keksbg ];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,40 @@
diff --git a/include/dwarfs/version.h b/include/dwarfs/version.h
new file mode 100755
index 0000000..9b12c59
--- /dev/null
+++ b/include/dwarfs/version.h
@@ -0,0 +1,16 @@
+// autogenerated code, do not modify
+
+#pragma once
+
+#define PRJ_VERSION_MAJOR @versionMajor@
+#define PRJ_VERSION_MINOR @versionMinor@
+#define PRJ_VERSION_PATCH @versionPatch@
+
+namespace dwarfs {
+
+extern char const* PRJ_GIT_REV;
+extern char const* PRJ_GIT_DESC;
+extern char const* PRJ_GIT_BRANCH;
+extern char const* PRJ_GIT_ID;
+
+} // namespace dwarfs
diff --git a/src/dwarfs/version.cpp b/src/dwarfs/version.cpp
new file mode 100755
index 0000000..3af0215
--- /dev/null
+++ b/src/dwarfs/version.cpp
@@ -0,0 +1,12 @@
+// autogenerated code, do not modify
+
+#include "dwarfs/version.h"
+
+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@";
+
+} // namespace dwarfs

View File

@ -1187,6 +1187,8 @@ with pkgs;
davinci-resolve = callPackage ../applications/video/davinci-resolve { };
dwarfs = callPackage ../tools/filesystems/dwarfs { };
gamemode = callPackage ../tools/games/gamemode {
libgamemode32 = pkgsi686Linux.gamemode.lib;
};