Skip to content

Commit

Permalink
attempt to add rising wave, krb5 missing perl
Browse files Browse the repository at this point in the history
  • Loading branch information
ahirner committed Mar 11, 2024
1 parent cc3a494 commit a45a08d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 3 deletions.
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.

34 changes: 31 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,30 @@
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; [
openssl.dev
pkg-config
];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
OPENSSL_NO_VENDOR = 1;
buildInputs = with pkgs;
[krb5]
++ 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]

0 comments on commit a45a08d

Please sign in to comment.