Merge pull request #174190 from sikmir/3proxy
_3proxy: fix cross-compilation
This commit is contained in:
commit
b7066a162e
1 changed files with 17 additions and 4 deletions
|
@ -1,29 +1,42 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, coreutils, nixosTests }:
|
{ lib, stdenv, fetchFromGitHub, nixosTests }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "3proxy";
|
pname = "3proxy";
|
||||||
version = "0.9.4";
|
version = "0.9.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "z3APA3A";
|
owner = "3proxy";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-4bLlQ/ULvpjs6fr19yBBln5mRRc+yj+zVLiTs1e/Ypc=";
|
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 = [
|
makeFlags = [
|
||||||
"-f Makefile.Linux"
|
"-f Makefile.Linux"
|
||||||
"INSTALL=${coreutils}/bin/install"
|
"INSTALL=install"
|
||||||
"DESTDIR=${placeholder "out"}"
|
"DESTDIR=${placeholder "out"}"
|
||||||
|
"CC:=$(CC)"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
rm -fr $out/var
|
||||||
|
'';
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
smoke-test = nixosTests._3proxy;
|
smoke-test = nixosTests._3proxy;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Tiny free proxy server";
|
description = "Tiny free proxy server";
|
||||||
homepage = "https://github.com/z3APA3A/3proxy";
|
homepage = "https://github.com/3proxy/3proxy";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ misuzu ];
|
maintainers = with maintainers; [ misuzu ];
|
||||||
|
|
Loading…
Reference in a new issue