chore(zseri/s-r-sc): prepare for publishing on crates.io
Change-Id: Iaa9aab04a14dc2a62c5427e796d3df49bd31f9c3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5442 Tested-by: BuildkiteCI Reviewed-by: zseri <zseri.devel@ytrizja.de>
This commit is contained in:
parent
2c54c8cfaa
commit
f6e12d9e78
2 changed files with 5 additions and 32 deletions
|
@ -1,6 +1,11 @@
|
|||
[package]
|
||||
name = "store-ref-scanner"
|
||||
version = "0.1.0"
|
||||
description = "scanner/extractor of Nix-like store paths from byte arrays/streams"
|
||||
license = "MIT OR Apache-2.0"
|
||||
categories = ["no-std", "parsing"]
|
||||
edition = "2021"
|
||||
homepage = "https://cs.tvl.fyi/depot/-/tree/users/zseri/store-ref-scanner"
|
||||
include = ["/src"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
{ depot, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
parent = depot.users.zseri.store-ref-scanner;
|
||||
in
|
||||
pkgs.buildRustCrate {
|
||||
pname = "store-ref-scanner-tests";
|
||||
inherit (parent) crateName src version edition;
|
||||
buildTests = true;
|
||||
postInstall = ''
|
||||
set -ex
|
||||
export RUST_BACKTRACE=1
|
||||
# recreate a file hierarchy as when running tests with cargo
|
||||
# the source for test data
|
||||
# build outputs
|
||||
testRoot=target/debug
|
||||
mkdir -p $testRoot
|
||||
chmod +w -R .
|
||||
# test harness executables are suffixed with a hash,
|
||||
# like cargo does this allows to prevent name collision
|
||||
# with the main executables of the crate
|
||||
hash=$(basename $out)
|
||||
ls -lasR $out
|
||||
for file in $out/tests/*; do
|
||||
f=$testRoot/$(basename $file)-$hash
|
||||
cp $file $f
|
||||
$f 2>&1 | tee -a $out/tests.log
|
||||
done
|
||||
rm -rf $out/tests
|
||||
set +ex
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue