mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 12:53:05 +00:00
26 lines
436 B
Nix
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;
|
|
}
|