shell.nix 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. { pkgs ? import <nixpkgs> {} }:
  10. with pkgs;
  11. stdenv.mkDerivation {
  12. name = "materialize";
  13. buildInputs = with pkgs; [
  14. clang
  15. rustPlatform.bindgenHook
  16. cmake
  17. perl
  18. rustup
  19. pkg-config
  20. python3
  21. openssl
  22. bazel_7
  23. # CLI tools
  24. postgresql
  25. git
  26. docker
  27. # For docs
  28. hugo
  29. # For lint checks
  30. shellcheck
  31. buf
  32. nodejs_22
  33. jq
  34. openssh
  35. ] ++ lib.optionals stdenv.isDarwin [
  36. libiconv
  37. darwin.apple_sdk.frameworks.DiskArbitration
  38. darwin.apple_sdk.frameworks.Foundation
  39. ];
  40. RUSTFLAGS = "-Cdebuginfo=1 -Csymbol-mangling-version=v0"
  41. + lib.optionalString stdenv.isLinux
  42. " -Clinker=clang -Clink-arg=--ld-path=${pkgs.mold}/bin/mold -Clink-arg=-Wl,--warn-unresolved-symbols";
  43. }