depot/third_party/nixpkgs/pkgs/by-name/cr/criterion/tests/001-version.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

25 lines
436 B
Nix

{
stdenv,
pkg-config,
criterion,
}:
stdenv.mkDerivation rec {
name = "version-tester";
version = "v${criterion.version}";
src = ./test_dummy.c;
dontUnpack = true;
buildInputs = [ criterion ];
nativeBuildInputs = [ pkg-config ];
buildPhase = ''
cc -o ${name} $src `pkg-config --libs criterion`
'';
installPhase = ''
mkdir -p $out/bin
cp ${name} $out/bin/${name}
'';
meta.mainProgram = name;
}