33 lines
876 B
Nix
33 lines
876 B
Nix
{
|
|
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}";
|
|
in
|
|
rec {
|
|
# `nix build`
|
|
packages."hermit" = naersk-lib.buildPackage {
|
|
pname = "hermit";
|
|
root = ./.;
|
|
};
|
|
defaultPackage = packages."hermit";
|
|
|
|
# `nix run`
|
|
apps."hermit"= flake-utils.lib.mkApp {
|
|
drv = packages."hermit";
|
|
};
|
|
defaultApp = apps."hermit";
|
|
|
|
# `nix develop`
|
|
devShell = pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs; [ rustc cargo openssl pkgconfig ];
|
|
};
|
|
}
|
|
);
|
|
}
|