mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-09 00:00:04 +03:00
1f8fc31ddc
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
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
description = "Userspace tools for bcachefs";
|
|
|
|
# Nixpkgs / NixOS version to use.
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
inputs.utils.url = "github:numtide/flake-utils";
|
|
inputs.filter.url = "github:numtide/nix-filter";
|
|
|
|
outputs = { self, nixpkgs, utils, filter, ... }@inputs:
|
|
let
|
|
# System types to support.
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
in
|
|
{
|
|
version = "${builtins.substring 0 8 self.lastModifiedDate}-${self.shortRev or "dirty"}";
|
|
|
|
overlay = import ./nix/overlay.nix inputs;
|
|
}
|
|
// utils.lib.eachSystem supportedSystems (system:
|
|
let pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ self.overlay ];
|
|
};
|
|
in rec {
|
|
|
|
# A Nixpkgs overlay.
|
|
|
|
# Provide some binary packages for selected system types.
|
|
defaultPackage = pkgs.bcachefs.tools;
|
|
packages = {
|
|
inherit (pkgs.bcachefs)
|
|
tools
|
|
toolsValgrind
|
|
toolsDebug
|
|
mount
|
|
bch_bindgen
|
|
kernel;
|
|
|
|
tools-musl = pkgs.pkgsMusl.bcachefs.tools;
|
|
mount-musl = pkgs.pkgsMusl.bcachefs.mount;
|
|
};
|
|
|
|
checks = {
|
|
kernelSrc = packages.kernel.src;
|
|
inherit (packages)
|
|
mount
|
|
bch_bindgen
|
|
toolsValgrind;
|
|
};
|
|
|
|
devShell = devShells.tools;
|
|
devShells.tools = pkgs.bcachefs.tools.override { inShell = true; };
|
|
});
|
|
}
|