blob: 415d27749fa862b6f4b2afbab2166c06df87c0dd (
plain) (
tree)
|
|
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
};
outputs = { self, nixpkgs, flake-utils, naersk }:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages."${system}";
naersk-lib = naersk.lib."${system}";
build-inputs = with pkgs; [
libvirt
];
in
rec {
# `nix build`
packages.waifulib = naersk-lib.buildPackage {
pname = "solarlib";
root = ./.;
buildInputs = build-inputs;
};
defaultPackage = packages.waifulib;
# `nix run`
apps.waifulib = flake-utils.lib.mkApp {
drv = packages.waifulib;
};
defaultApp = apps.waifulib;
# `nix develop`
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo ] ++ build-inputs;
};
}
);
}
|