Merge pull request #181723 from keksbg/add-dwarfs

This commit is contained in:
Winter 2022-08-02 11:11:01 -04:00 committed by GitHub
commit 8849b7ae5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 154 additions and 0 deletions

View file

@ -6697,6 +6697,15 @@
githubId = 37185887;
name = "Calvin Kim";
};
keksbg = {
email = "keksbg@riseup.net";
name = "Stella";
github = "keksbg";
githubId = 10682187;
keys = [{
fingerprint = "AB42 1F18 5A19 A160 AD77 9885 3D6D CA5B 6F2C 2A7A";
}];
};
keldu = {
email = "mail@keldu.de";
github = "keldu";

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

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