Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, perl, libunwind, buildPackages, gitUpdater }:
2
3stdenv.mkDerivation rec {
4 pname = "strace";
5 version = "6.3";
6
7 src = fetchurl {
8 url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz";
9 sha256 = "sha256-4Xh44wFQbBzDAWERGK0U7+5/i872Oyes5dKQrM57tzE=";
10 };
11
12 depsBuildBuild = [ buildPackages.stdenv.cc ];
13 nativeBuildInputs = [ perl ];
14
15 # On RISC-V platforms, LLVM's libunwind implementation is unsupported by strace.
16 # The build will silently fall back and -k will not work on RISC-V.
17 buildInputs = [ libunwind ]; # support -k
18
19 configureFlags = [ "--enable-mpers=check" ];
20
21 passthru.updateScript = gitUpdater {
22 # No nicer place to find latest release.
23 url = "https://github.com/strace/strace.git";
24 rev-prefix = "v";
25 };
26
27 meta = with lib; {
28 homepage = "https://strace.io/";
29 description = "A system call tracer for Linux";
30 license = with licenses; [ lgpl21Plus gpl2Plus ]; # gpl2Plus is for the test suite
31 platforms = platforms.linux;
32 maintainers = with maintainers; [ globin ma27 qyliss ];
33 };
34}