Files
minne/nix/surrealdb-binary.nix
T
Per Stark 1f0c7d4e51 dev: devenv deprecation
removed devenv in favor for plain nix, implemented using flake-parts
2026-06-28 22:27:14 +02:00

42 lines
960 B
Nix

# Pinned SurrealDB release binary (avoids building nixpkgs surrealdb from source).
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
openssl,
rocksdb,
}:
stdenv.mkDerivation {
pname = "surrealdb";
version = "2.6.5";
src = fetchurl {
url = "https://github.com/surrealdb/surrealdb/releases/download/v2.6.5/surreal-v2.6.5.linux-amd64.tgz";
hash = "sha256-kp1z9GxPtZ8jeBDm/m2lTBdWBk8+2NfR9qlw6P3zj7A=";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
openssl
rocksdb
stdenv.cc.cc.lib
];
sourceRoot = ".";
installPhase = ''
runHook preInstall
install -Dm755 surreal $out/bin/surreal
runHook postInstall
'';
meta = {
description = "SurrealDB prebuilt binary pinned for local dev and VM smoke tests";
homepage = "https://surrealdb.com/";
license = lib.licenses.bsl11;
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}