Skip to content

Commit

Permalink
Fix flake for nixpkgs on darwin (#1665)
Browse files Browse the repository at this point in the history
* Do not use SHELL (default shell) but $0 (current shell)

* Cleanup shell hook

---------

Co-authored-by: Gleb <gleb@stellar.org>
  • Loading branch information
TomMD and Ifropc authored Oct 9, 2024
1 parent 8ebf6ea commit 440b75d
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,18 @@
with pkgs;
{
devShells.default = mkShell {
nativeBuildInputs = lib.optionals (stdenv.isDarwin) [
pkgs.darwin.apple_sdk.frameworks.SystemConfiguration
];
buildInputs = [
openssl
pkg-config
libudev-zero
jq
(rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
targets = [ "wasm32-unknown-unknown" ];
})
];
shellHook =
''
echo "Using `nix --version`"
alias stellar="cargo run --bin stellar --"
[ -f ./local.sh ] && source ./local.sh
shell=$0
shell=`basename $SHELL`
source <(stellar completion --shell $shell)
'';
] ++ lib.optionals (stdenv.isLinux) [libudev-zero];
};
}
);
Expand Down

0 comments on commit 440b75d

Please sign in to comment.