Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to add rising wave, krb5 missing perl #53

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 32 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
crane.url = "github:ipetkov/crane";
crane.inputs.nixpkgs.follows = "nixpkgs";
risingwave.url = "github:risingwavelabs/risingwave";
risingwave.flake = false;
dream2nix = {
url = "github:nix-community/dream2nix";
inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -36,11 +40,12 @@
outputs = inputs @ {
self,
flake-parts,
crane,
...
}: let
lib = inputs.nixpkgs.lib;
overlayAttrs = (import ./overlays.nix {inherit lib;}) // {rustc = inputs.rust-overlay.overlays.default;};
overlays = builtins.attrValues overlayAttrs;
overlayAttrs = import ./overlays.nix {inherit lib;};
overlays = (builtins.attrValues overlayAttrs) ++ [(import inputs.rust-overlay)];
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin"];

flakeDefaults = {
Expand All @@ -66,7 +71,31 @@
system,
...
}: let
packages = builtins.mapAttrs (name: _: builtins.getAttr name pkgs) overlayAttrs;
# pin nightly for ahash https://users.rust-lang.org/t/error-e0635-unknown-feature-stdsimd/106445/2
rustWithWasiTarget = pkgs.rust-bin.nightly."2024-02-04".default.override {
targets = ["wasm32-wasi"];
};
craneLib = (crane.mkLib pkgs).overrideToolchain rustWithWasiTarget;
risingwave = craneLib.buildPackage {
pname = "risingwave";
version = "1.7.0";
src = craneLib.cleanCargoSource (craneLib.path inputs.risingwave.outPath);
strictDeps = true;
patches = [./patches/risingwave.patch];
nativeBuildInputs = with pkgs; [
krb5
openssl.dev
pkg-config
];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
OPENSSL_NO_VENDOR = 1;
buildInputs =
[]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
pkgs.libiconv
];
};
packages = (builtins.mapAttrs (name: _: builtins.getAttr name pkgs) overlayAttrs) // {inherit risingwave;};
in {
devShells.default = with pkgs;
mkShell {
Expand Down
12 changes: 12 additions & 0 deletions patches/risingwave.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/.cargo/config.toml b/.cargo/config.toml
index fbe29b3e6b..c969802673 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -20,7 +20,6 @@ rustflags = [
[target.x86_64-apple-darwin]
rustflags = [
"-Ctarget-feature=+sse4.2", # use a generally available feature, since it's not for production
- "-Clink-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld",
]

[target.aarch64-apple-darwin]
Loading