2023-08-12 03:50:50 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
2023-08-12 16:00:13 +00:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
2023-08-12 03:50:50 +00:00
|
|
|
with nixpkgs.legacyPackages.${system}; {
|
2023-08-12 12:34:39 +00:00
|
|
|
packages =
|
|
|
|
{
|
2023-08-12 15:56:19 +00:00
|
|
|
default = import ./package.nix;
|
2023-08-12 03:50:50 +00:00
|
|
|
};
|
2023-08-12 12:34:39 +00:00
|
|
|
|
|
|
|
devShells.default = mkShell {
|
2023-08-12 03:50:50 +00:00
|
|
|
inputsFrom = builtins.attrValues self.packages.${system};
|
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
|
|
|
|
'';
|
|
|
|
# LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";
|
|
|
|
|
|
|
|
# I'm never quite sure which one to use, but in this case neither
|
|
|
|
# result in a proper dev shell
|
|
|
|
buildInputs = [ cargo ];
|
|
|
|
nativeBuildInputs = [ cargo clang ];
|
|
|
|
};
|
|
|
|
|
2023-08-12 12:40:32 +00:00
|
|
|
nixosModules = {
|
|
|
|
# add moduleA from flakeA as an output
|
|
|
|
# moduleA = flakeA.nixosModules.moduleA;
|
2023-08-12 15:43:37 +00:00
|
|
|
default = import ./module.nix;
|
2023-08-12 12:40:32 +00:00
|
|
|
};
|
2023-08-12 03:50:50 +00:00
|
|
|
});
|
|
|
|
}
|