From ed739f8f11f5c399c5d29b2429ea8e2f1dce0ac8 Mon Sep 17 00:00:00 2001 From: Callum Dunster Date: Thu, 28 Nov 2024 12:58:00 +0100 Subject: [PATCH] Improve Nix development experience (#128) * chore: add direnv support * chore: add perl package to devShell for openssl * chore: change shebang path to use env * docs: update README to run tests in release mode --- .envrc | 1 + README.md | 2 +- build-fixture.sh | 2 +- flake.nix | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/README.md b/README.md index 82758c3..f5a059e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Types and bindings to connect easily to a running Holochain conductor from Rust. ``` bash ./build-fixture.sh -cargo test +cargo test --release ``` ## Contribute diff --git a/build-fixture.sh b/build-fixture.sh index 546581a..a48d4cb 100755 --- a/build-fixture.sh +++ b/build-fixture.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e CARGO_HOME=./fixture/zomes/foo/.cargo cargo build -p test_wasm_foo --release --target wasm32-unknown-unknown --target-dir ./fixture/zomes/foo/target diff --git a/flake.nix b/flake.nix index f2c2e01..8fa533d 100644 --- a/flake.nix +++ b/flake.nix @@ -17,9 +17,11 @@ inputs'.holonix.packages.lair-keystore inputs'.holonix.packages.rust pkgs.go + pkgs.perl ] ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [ # needed to build Holochain on macos pkgs.darwin.apple_sdk.frameworks.SystemConfiguration + pkgs.bzip2 ]); }; };