# SPDX-FileCopyrightText: V # SPDX-FileCopyrightText: edef # SPDX-License-Identifier: OSL-3.0 with import ./nix; let inherit (gcc) cc; # workaround for fusermount(1) getting shadowed by pkgs.fuse # fusermount needs to be SUID-root to work, so nothing we can supply will suffice # we have to pull it from the system environment instead # NOTE: this has to go *before* pkgs.fuse in PATH fusermount = writeShellScriptBin "fusermount" '' IFS=: for p in $PATH; do [ -u "$p/fusermount" ] && exec "$p/fusermount" "$@" done echo cannot find SUID fusermount >&2 exit 1 ''; in mkShell { packages = [ cargo cargo-watch clippy # needed by rust-analyzer rustc # core crate code rustfmt # format-on-save # needed by prost-build protobuf # needed by fuser pkgconfig fuse # needed by git2 openssl ]; # needed by prost-build PROTOC = "protoc"; MINITRACE_CC1 = "${cc}/libexec/gcc/x86_64-unknown-linux-gnu/${cc.version}/cc1"; shellHook = '' export PATH=${fusermount}/bin:$PATH ''; }