diff options
author | Nikolay Korotkiy <sikmir@disroot.org> | 2022-05-24 00:14:28 +0300 |
---|---|---|
committer | Nikolay Korotkiy <sikmir@disroot.org> | 2022-05-24 00:14:28 +0300 |
commit | 36b612e90ebc992c79a20c8d39e36619239f4a32 (patch) | |
tree | 3460f15c0ffc79f0162f1bac69c9b47a93fe0048 /pkgs/applications/networking/3proxy | |
parent | 26e7906a969db1b2e44ca9125b985ca38c039597 (diff) |
_3proxy: fix cross-compilation
Diffstat (limited to 'pkgs/applications/networking/3proxy')
-rw-r--r-- | pkgs/applications/networking/3proxy/default.nix | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/pkgs/applications/networking/3proxy/default.nix b/pkgs/applications/networking/3proxy/default.nix index b83f93b3b68c5..ab5ae744d2715 100644 --- a/pkgs/applications/networking/3proxy/default.nix +++ b/pkgs/applications/networking/3proxy/default.nix @@ -1,29 +1,42 @@ -{ lib, stdenv, fetchFromGitHub, coreutils, nixosTests }: +{ lib, stdenv, fetchFromGitHub, nixosTests }: stdenv.mkDerivation rec { pname = "3proxy"; version = "0.9.4"; src = fetchFromGitHub { - owner = "z3APA3A"; + owner = "3proxy"; repo = pname; rev = version; sha256 = "sha256-4bLlQ/ULvpjs6fr19yBBln5mRRc+yj+zVLiTs1e/Ypc="; }; + # They use 'install -s', that calls the native strip instead of the cross. + # Don't strip binary on install, we strip it on fixup phase anyway. + postPatch = '' + substituteInPlace Makefile.Linux \ + --replace "(INSTALL_BIN) -s" "(INSTALL_BIN)" \ + --replace "/usr" "" + ''; + makeFlags = [ "-f Makefile.Linux" - "INSTALL=${coreutils}/bin/install" + "INSTALL=install" "DESTDIR=${placeholder "out"}" + "CC:=$(CC)" ]; + postInstall = '' + rm -fr $out/var + ''; + passthru.tests = { smoke-test = nixosTests._3proxy; }; meta = with lib; { description = "Tiny free proxy server"; - homepage = "https://github.com/z3APA3A/3proxy"; + homepage = "https://github.com/3proxy/3proxy"; license = licenses.bsd2; platforms = platforms.linux; maintainers = with maintainers; [ misuzu ]; |