nixpkgs/pkgs/by-name/cr/criterion/tests/001-version.nix
2024-05-06 19:13:57 +02:00

26 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;
}