flake reorg

This commit is contained in:
Robin Appelman 2024-09-27 17:40:09 +02:00
commit 2a34eee2f1
11 changed files with 179 additions and 285 deletions

30
nix/logsmash.nix Normal file
View file

@ -0,0 +1,30 @@
{ stdenv
, makeRustPlatform
, rust-bin
, lib
, extracted-logs-rust
,
}:
let
inherit (lib.sources) sourceByRegex;
src = sourceByRegex ../. [ "Cargo.*" "(src|data)(/.*)?" ];
rustPlatform = makeRustPlatform {
cargo = rust-bin.stable.latest.default;
rustc = rust-bin.stable.latest.default;
};
in
rustPlatform.buildRustPackage rec {
pname = "logsmash";
version = "0.1.0";
inherit src;
preBuild = ''
rm -r data/src/data
cp -r ${extracted-logs-rust} data/src/data
'';
cargoLock = {
lockFile = ../Cargo.lock;
};
}