flake reorg

This commit is contained in:
Robin Appelman 2024-02-23 19:30:06 +01:00
commit 5647cdd759
7 changed files with 145 additions and 19 deletions

32
package.nix Normal file
View file

@ -0,0 +1,32 @@
{
rustPlatform,
openssl,
pkg-config,
lib,
}: let
inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile;
src = sourceByRegex ./api-server ["Cargo.*" "(src)(/.*)?" "README.md"];
version = (fromTOML (readFile api-server/Cargo.toml)).package.version;
in
rustPlatform.buildRustPackage rec {
pname = "ugc-api-server";
inherit src version;
buildInputs = [
openssl
];
nativeBuildInputs = [
pkg-config
];
OPENSSL_NO_VENDOR = 1;
doCheck = false;
cargoLock = {
lockFile = ./api-server/Cargo.lock;
};
}