Basic POC cli working
This commit is contained in:
commit
410e203f9e
9 changed files with 1433 additions and 0 deletions
37
flake.nix
Normal file
37
flake.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
naersk.url = "github:nix-community/naersk"; #https://github.com/nix-community/naersk
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
flake-utils,
|
||||
naersk,
|
||||
nixpkgs,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
pkgs = (import nixpkgs) {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
naersk' = pkgs.callPackage naersk {};
|
||||
in let
|
||||
deps = [pkgs.pkg-config pkgs.openssl];
|
||||
in {
|
||||
# For `nix build` & `nix run`:
|
||||
defaultPackage = naersk'.buildPackage {
|
||||
name = "somcli";
|
||||
src = ./.;
|
||||
buildInputs = deps;
|
||||
};
|
||||
|
||||
# For `nix develop` (optional, can be skipped):
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [rustc cargo rustfmt] ++ deps;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue