diff --git a/.gitignore b/.gitignore index 47e996a..177b56f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target .devenv .direnv +/result diff --git a/flake.nix b/flake.nix index 2e4285d..822a22a 100644 --- a/flake.nix +++ b/flake.nix @@ -65,5 +65,21 @@ }) ]; }; + packages.default = let + toolchain = inputs.fenix.packages.${system}.minimal.toolchain; + pkgs = nixpkgs.legacyPackages.${system}; + in + (pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }) + .buildRustPackage { + pname = "chatthing"; + version = "0.1.0"; + src = ./.; + builtInputs = [pkgs.libpqxx pkgs.openssl]; + nativeBuildInputs = [pkgs.pkg-config]; + cargoLock.lockFile = ./Cargo.lock; + }; }); }