summaryrefslogtreecommitdiff
path: root/flake.nix
AgeCommit message (Collapse)Author
2024-05-28build(nix): minor tweaksThomas Mühlbacher
- rm unused function argument - `LIBCLANG_PATH` is superfluous here, this is already handled by `rustPlatform.bindgenHook` for us. - rustc is not directly needed in the `$PATH` for the build but it's good to have in the dev shell.
2024-05-28build(nix): add `cargo test` checkThomas Mühlbacher
this is pretty much a no-op currently, but hopefully we can make some use of it in the future.
2024-05-28build(nix): add cargo clippy checkThomas Mühlbacher
note that this only checks the top-level package, `bch_bindgen` is excluded because it has too many clippy lints.
2024-05-28build(nix): use crane to build packagesThomas Mühlbacher
this enables faster incremental rebuilds in nix. it also allows us to add clippy and cargo test checks more easily. aside from that, i have tried to carry over things that i think are sensible from the previous `mkDerivation` call. the `checkPhase` may as well rather be done in a `installCheckPhase` and we can set `enableParallelBuilding` to speed up the compilation of `libbcachefs.a`.
2024-05-27build(nix): enable rustfmt check+formatterThomas Mühlbacher
with this, the gh actions ci will fail if submitted code does not adhere to rustfmt rules. additionally, running `nix fmt` will also format rust code. because we want rules only supported by nightly rustfmt, and nixpkgs doesn't have a nightly toolchain, we need to pull in another flake input: fenix.
2024-05-22build(nix): add some packages to the dev shellThomas Mühlbacher
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-05-22build(nix): add treefmt-nixThomas Mühlbacher
currently still bare but can be extended with a number of different formatters (rustfmt, clang-format, ...). For full list see https://flake.parts/options/treefmt-nix Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-05-22build(nix): replace flake-utils with flake-partsThomas Mühlbacher
it also provides a way for abstracting `system` and provides optional modules, like treefmt-nix. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-05-22build(nix): rm nixpkgs overlayThomas Mühlbacher
it shouldn't really be our job to define an overlay. it doesn't do anything for us, afaict, and is trivial to implement for downstream users of the flake if they so desire. also the overlay doesn't even overlay anything, there is no package called `bcachefs` in nixpkgs. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-05-22build(nix): simplify devShellThomas Mühlbacher
much more DRY. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-05-22style(nix): group together inputs attrThomas Mühlbacher
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-05-22style(nix): run `nix fmt`Thomas Mühlbacher
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2024-05-22build(nix): switch to new RFC style nixfmtThomas Mühlbacher
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
2023-11-20nix: add bcachefs-fuse packageFinn Behrens
Add a fuseSupport argument and bcachefs-fuse as flake output with fuse enabled. Signed-off-by: Finn Behrens <me@kloenk.de> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-09nix: add devShellFinn Behrens
Add a nix devShell output to provide a development environment for nix users. Signed-off-by: Finn Behrens <me@kloenk.de>
2023-11-09nix: fix build add overlay and formatter to flakeFinn Behrens
Adds overlay flake output to expose the bcachefs package and add and run a nix formatter. Co-authored-by: Leona Maroni <dev@leona.is> Signed-off-by: Leona Maroni <dev@leona.is> Signed-off-by: Finn Behrens <me@kloenk.de>
2023-02-27nix fix up! Rust now integrated into bcachefs binaryDaniel Hill
Heavily simplified to just call make with the required rust dependencies. Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-02-21fixup! Rust now integrated into bcachefs binaryKent Overstreet
2023-01-31fixup! nix: overhaul build system.Daniel Hill
Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-01-03nix: overhaul build system.Daniel Hill
Removed outdated overlay. Simply build tooling using bingenHook and propagated*Inputs Signed-off-by: Daniel Hill <daniel@gluo.nz>
2021-10-20flake.nix: add boot stage1 module test, which takes a long time to buildKayla Firestack
Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-20flake.nix: add netboot-bcachefs nixosSystem definitionKayla Firestack
define example bcachefs enabled nixos installer allows netboot to nixos installer with bcachefs kernel and -tools installed Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-20flake.nix: add nixosModulesKayla Firestack
Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-20flake.nix: add mount developer environmentKayla Firestack
Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-18split mount into a library crate for rust reuseKayla Firestack
update makefile to output shared library and rust build fix default.nix to properly get the binary name for `ln`ing - move binary to main.rs add rustfmt and gitignore files move build.rs file into bch_bindgen for reuse between projects add outputs to nix flake and checks add mount.toml to makefile
2021-10-18add nix flake with checks, overlay, and default packageKayla Firestack