trying some stuff
This commit is contained in:
parent
9a37316d9e
commit
69ecd4ff89
4 changed files with 231 additions and 0 deletions
59
packages/convex/default.nix
Normal file
59
packages/convex/default.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
|
||||
# dependencies
|
||||
openssl,
|
||||
pkg-config,
|
||||
cmake,
|
||||
llvmPackages,
|
||||
postgresql,
|
||||
sqlite,
|
||||
|
||||
#options
|
||||
dbBackend ? "postgresql",
|
||||
|
||||
...
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "convex";
|
||||
version = "2025-08-20-c9b561e";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "get-convex";
|
||||
repo = "convex-backend";
|
||||
rev = "c9b561e1b365c85ef28af35d742cb7dd174b5555";
|
||||
hash = "sha256-4h4AQt+rQ+nTw6eTbbB5vqFt9MFjKYw3Z7bGXdXijJ0=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-pcDNWGrk9D0qcF479QAglPLFDZp27f8RueP5/lq9jho=";
|
||||
|
||||
cargoBuildFlags = [
|
||||
"-p" "local_backend"
|
||||
"--bin" "convex-local-backend"
|
||||
];
|
||||
|
||||
env = {
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
# Build-time dependencies
|
||||
nativeBuildInputs = [ pkg-config cmake rustPlatform.bindgenHook ];
|
||||
|
||||
# Run-time dependencies
|
||||
buildInputs =
|
||||
[ openssl ]
|
||||
++ lib.optional (dbBackend == "sqlite") sqlite
|
||||
++ lib.optional (dbBackend == "postgresql") postgresql;
|
||||
|
||||
buildFeatures = "";
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.fsl11Asl20;
|
||||
mainProgram = "convex";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue