forked from MaterializeInc/materialize
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
42 lines (37 loc) · 1.26 KB
/
Copy pathshell.nix
File metadata and controls
42 lines (37 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
target-analyzer = builtins.toString ./../../.rust-analyzer/target;
scoped-rust-analyzer = pkgs.writeShellScriptBin "rust-analyzer" ''
exec ${pkgs.coreutils}/bin/env CARGO_TARGET_DIR=${target-analyzer} ${pkgs.rust-analyzer}/bin/rust-analyzer
'';
in
stdenv.mkDerivation rec {
name = "materialize";
buildInputs = with pkgs; [
clang_14
cmake
rustup
openssl
postgresql
pkg-config
lld_14
python311
scoped-rust-analyzer
shellcheck
];
hardeningDisable = [ "fortify" ];
RUSTFLAGS = "-Clinker=clang -Clink-arg=--ld-path=${pkgs.mold}/bin/mold -Clink-arg=-Wl,--warn-unresolved-symbols -Cdebuginfo=1 -Csymbol-mangling-version=v0 --cfg=tokio_usntable";
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH
export LIBCLANG_PATH="${llvmPackages_14.libclang.lib}/lib";
'';
}