From 00a584c8f0b6b0f0bc9f47494a848a189f1a7232 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Wed, 6 Nov 2024 16:19:32 +0100 Subject: [PATCH] add build configs --- .gitignore | 1 + flake.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) 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; + }; }); }