hermit/flake.nix
2022-06-07 14:53:23 +02:00

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 ];
};
}
);
}