2021-05-20 07:42:15 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-03-19 08:46:14 +01:00
|
|
|
, fetchFromGitLab
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libslirp";
|
2021-05-20 07:42:15 +02:00
|
|
|
version = "4.5.0";
|
2020-03-19 08:46:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "slirp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-05-20 07:42:15 +02:00
|
|
|
sha256 = "sha256-UdKBED7xR0gDf3aj3+6I62CnAwGP7XxskaFzWeUUkkk=";
|
2020-03-19 08:46:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ glib ];
|
|
|
|
|
2020-04-24 02:13:31 +02:00
|
|
|
postPatch = ''
|
|
|
|
echo ${version} > .tarball-version
|
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2020-03-19 08:46:14 +01:00
|
|
|
description = "General purpose TCP-IP emulator";
|
|
|
|
homepage = "https://gitlab.freedesktop.org/slirp/libslirp";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
2020-12-02 21:11:26 +01:00
|
|
|
platforms = platforms.unix;
|
2020-03-19 08:46:14 +01:00
|
|
|
};
|
|
|
|
}
|