forked from the-distro/ofborg
replace update-carnix.sh
Crate2nix hasn't been added to nixpkgs yet so it needs to be pulled in separately.
This commit is contained in:
parent
c7a5d20f52
commit
dcb534e3ae
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cargo build
|
||||
carnix generate-nix --src .
|
6
nix/update-crates.sh
Executable file
6
nix/update-crates.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -E "with import <nixpkgs> {}; mkShell { nativeBuildInputs = [ (import (builtins.fetchTarball https://github.com/kolloch/crate2nix/archive/0.8.0.tar.gz) {}) ]; }"
|
||||
set -e
|
||||
|
||||
cargo build
|
||||
crate2nix generate
|
Loading…
Reference in a new issue