diff --git a/README.md b/README.md index dad2b2d..30871f9 100644 --- a/README.md +++ b/README.md @@ -214,8 +214,8 @@ Currently there is no easy way to set up a test instance of ofborg. If `cargo check` and `cargo test` both succeed, feel free to Pull Request your changes. Make sure to format your code with `cargo fmt` and check for additional warnings with `cargo clippy`. If you added, removed, or updated the dependencies, also be -sure to update Carnix by running -[`./nix/update-carnix.sh`](./nix/update-carnix.sh). +sure to update Cargo.nix by running +[`./nix/update-crates.sh`](./nix/update-crates.sh). To disable warnings as errors, run your command with an empty `RUSTFLAGS`. For example: diff --git a/default.nix b/default.nix index 11ac39e..f212cc4 100644 --- a/default.nix +++ b/default.nix @@ -57,14 +57,13 @@ in Build failed because you bumped the Cargo - version without regenerating the carnix - file. + version without regenerating the Cargo.nix. Run: - nix-shell --run ./nix/update-carnix.sh + nix-shell --run ./nix/update-crates.sh and commit those changes. diff --git a/nix/update-carnix.sh b/nix/update-carnix.sh deleted file mode 100755 index d5da7ca..0000000 --- a/nix/update-carnix.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -set -eu - -cargo build -carnix generate-nix --src . diff --git a/nix/update-crates.sh b/nix/update-crates.sh new file mode 100755 index 0000000..7e5ace5 --- /dev/null +++ b/nix/update-crates.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -E "with import {}; mkShell { nativeBuildInputs = [ (import (builtins.fetchTarball https://github.com/kolloch/crate2nix/archive/0.8.0.tar.gz) {}) ]; }" +set -e + +cargo build +crate2nix generate