diff --git a/flake.nix b/flake.nix index eefdbf6..d79fc5a 100644 --- a/flake.nix +++ b/flake.nix @@ -14,8 +14,19 @@ }; in { - defaultPackage = pkgs.callPackage ./pict-rs.nix { - inherit (pkgs.darwin.apple_sdk.frameworks) Security; + packages = rec { + pict-rs = pkgs.callPackage ./pict-rs.nix { + inherit (pkgs.darwin.apple_sdk.frameworks) Security; + }; + + default = pict-rs; }; + + apps = rec { + dev = flake-utils.lib.mkApp { drv = self.packages.${system}.pict-rs; }; + default = dev; + }; + + devShell = pkgs.callPackage ./shell.nix { }; }); } diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..df89250 --- /dev/null +++ b/shell.nix @@ -0,0 +1,16 @@ +{ pkgs +, mkShell +, cargo +, clippy +, gcc +, protobuf +, rust-analyzer +, rustc +, rustfmt +}: + +mkShell { + nativeBuildInputs = [ cargo clippy gcc protobuf rust-analyzer rustc rustfmt ]; + + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; +}