crane/checks/with-build-script-custom/mycustomscript.rs
Ivan Petkov 22f971a126
mkDummySrc: fix handling of build scripts (#122)
* Instead of injecting our own dummy `build.rs` file, we will patch the
  `Cargo.toml` files to specify a build script in the Nix store
* This allow cargo to notice the difference (i.e. changed build script
  path) where it could not before (due to nix enforcing that all sources
  always have the same timestamp)
2022-09-28 02:05:06 +00:00

11 lines
198 B
Rust

use std::{
fs,
io::{self, Write},
};
fn main() -> io::Result<()> {
fs::create_dir_all("./target")?;
fs::File::create("./target/mydata")?.write_all(b"hello world!\n")?;
Ok(())
}