continuwuity/nix/packages/rocksdb.nix
Henry-Hiles 5a63eb729c
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 3s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 8s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been skipped
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m27s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 21m14s
Checks / Prek / Check changed files (push) Successful in 27s
Documentation / Build and Deploy Documentation (push) Successful in 1m16s
Checks / Prek / Pre-commit & Formatting (push) Successful in 1m30s
Checks / Prek / Clippy and Cargo Tests (push) Has been skipped
Release Docker Image / Build linux-arm64 (release) (push) Successful in 13m34s
Release Docker Image / Build linux-amd64 (release) (push) Successful in 53m48s
Release Docker Image / Create Multi-arch Release Manifest (push) Successful in 18s
Release Docker Image / Build linux-amd64 (max-perf) (push) Successful in 30m26s
Release Docker Image / Build linux-arm64 (max-perf) (push) Successful in 1h12m6s
Release Docker Image / Release Binaries (push) Has been skipped
Release Docker Image / Create Max-Perf Manifest (push) Successful in 10m3s
Release Docker Image / Mirror Images (push) Successful in 2m22s
fix: disable rocksdb on nix by default
2026-05-24 12:16:19 -04:00

36 lines
1.3 KiB
Nix

{
# stdenv,
# enableJemalloc ? stdenv.hostPlatform.isLinux,
enableJemalloc ? false,
rocksdb,
fetchFromGitea,
rust-jemalloc-sys-unprefixed,
...
}:
(rocksdb.override {
# rocksdb fails to build with prefixed jemalloc, which is required on
# darwin due to [1]. In this case, fall back to building rocksdb with
# libc malloc. This should not cause conflicts, because all of the
# jemalloc symbols are prefixed.
#
# [1]: https://github.com/tikv/jemallocator/blob/ab0676d77e81268cd09b059260c75b38dbef2d51/jemalloc-sys/src/env.rs#L17
jemalloc = rust-jemalloc-sys-unprefixed;
inherit enableJemalloc;
}).overrideAttrs
({
version = "continuwuity-v0.5.0-unstable-2026-05-19";
src = fetchFromGitea {
domain = "forgejo.ellis.link";
owner = "continuwuation";
repo = "rocksdb";
rev = "3756b2b905e13216d8b56bcc783d814e7b073aff";
hash = "sha256-rSv4fr2bf9JJwdodgeuPCuceeh7k97KVxrAOC0wyPQY=";
};
# We have this already at https://forgejo.ellis.link/continuwuation/rocksdb/commit/a935c0273e1ba44eacf88ce3685a9b9831486155
# Unsetting `patches` so we don't have to revert it and make this nix exclusive
patches = [ ];
# Unset postPatch, as our version override breaks version-specific sed calls in the original package
postPatch = "";
})