Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, nixosTests }: 2 3stdenv.mkDerivation rec { 4 pname = "3proxy"; 5 version = "0.9.4"; 6 7 src = fetchFromGitHub { 8 owner = "3proxy"; 9 repo = pname; 10 rev = version; 11 sha256 = "sha256-4bLlQ/ULvpjs6fr19yBBln5mRRc+yj+zVLiTs1e/Ypc="; 12 }; 13 14 # They use 'install -s', that calls the native strip instead of the cross. 15 # Don't strip binary on install, we strip it on fixup phase anyway. 16 postPatch = '' 17 substituteInPlace Makefile.Linux \ 18 --replace "(INSTALL_BIN) -s" "(INSTALL_BIN)" \ 19 --replace "/usr" "" 20 ''; 21 22 makeFlags = [ 23 "-f Makefile.Linux" 24 "INSTALL=install" 25 "DESTDIR=${placeholder "out"}" 26 "CC:=$(CC)" 27 ]; 28 29 postInstall = '' 30 rm -fr $out/var 31 ''; 32 33 passthru.tests = { 34 smoke-test = nixosTests._3proxy; 35 }; 36 37 meta = with lib; { 38 description = "Tiny free proxy server"; 39 homepage = "https://github.com/3proxy/3proxy"; 40 license = licenses.bsd2; 41 platforms = platforms.linux; 42 maintainers = with maintainers; [ misuzu ]; 43 }; 44}