flake reorg

This commit is contained in:
Robin Appelman 2026-05-14 18:59:12 +02:00
commit 23fc8d2509
8 changed files with 123 additions and 105 deletions

31
nix/package.nix Normal file
View file

@ -0,0 +1,31 @@
{
rustPlatform,
lib,
openssl,
pkg-config,
}: let
inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile;
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];
cargoPackage = (fromTOML (readFile ../Cargo.toml)).package;
in
rustPlatform.buildRustPackage {
pname = cargoPackage.name;
inherit (cargoPackage) version;
inherit src;
buildInputs = [
openssl
];
nativeBuildInputs = [
pkg-config
];
cargoLock = {
lockFile = ../Cargo.lock;
};
meta.mainProgram = "demostf-backup";
}