_3proxy: fix cross-compilation

+17 -4
+17 -4
pkgs/applications/networking/3proxy/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, coreutils, nixosTests }: 2 3 stdenv.mkDerivation rec { 4 pname = "3proxy"; 5 version = "0.9.4"; 6 7 src = fetchFromGitHub { 8 - owner = "z3APA3A"; 9 repo = pname; 10 rev = version; 11 sha256 = "sha256-4bLlQ/ULvpjs6fr19yBBln5mRRc+yj+zVLiTs1e/Ypc="; 12 }; 13 14 makeFlags = [ 15 "-f Makefile.Linux" 16 - "INSTALL=${coreutils}/bin/install" 17 "DESTDIR=${placeholder "out"}" 18 ]; 19 20 passthru.tests = { 21 smoke-test = nixosTests._3proxy; 22 }; 23 24 meta = with lib; { 25 description = "Tiny free proxy server"; 26 - homepage = "https://github.com/z3APA3A/3proxy"; 27 license = licenses.bsd2; 28 platforms = platforms.linux; 29 maintainers = with maintainers; [ misuzu ];
··· 1 + { lib, stdenv, fetchFromGitHub, nixosTests }: 2 3 stdenv.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 ];