summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-08-31 20:23:24 -0500
committerNathan Ringo <nathan@remexre.com>2024-08-31 20:23:24 -0500
commite9a79a0ed79609c1e293c7b221fce577200b2eb7 (patch)
treee097115f4b4435caa2a26186652cbfffefb2cb28 /nix
parent4617f96a99c0e5dfac1b45b3cff037306e4edc63 (diff)
The start of a new librarified organization.
Diffstat (limited to 'nix')
-rw-r--r--nix/miri.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/nix/miri.nix b/nix/miri.nix
new file mode 100644
index 0000000..5a8c39d
--- /dev/null
+++ b/nix/miri.nix
@@ -0,0 +1,22 @@
+{ fenix, pkgs }:
+
+let
+ rust-nightly-toolchain = fenix.combine [
+ fenix.latest.cargo
+ fenix.latest.rustc
+ fenix.latest.clippy
+ fenix.latest.miri
+ ];
+in
+pkgs.writeShellApplication {
+ name = "cargo-miri";
+ runtimeInputs = [ rust-nightly-toolchain ];
+ text = ''
+ set -x
+ # https://github.com/proptest-rs/proptest/issues/253#issuecomment-1850534278
+ : "''${PROPTEST_DISABLE_FAILURE_PERSISTENCE:=true}"
+ : "''${MIRIFLAGS:=-Zmiri-env-forward=PROPTEST_DISABLE_FAILURE_PERSISTENCE}"
+ export PROPTEST_DISABLE_FAILURE_PERSISTENCE MIRIFLAGS
+ exec cargo "$@"
+ '';
+}