mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-31 20:54:56 +00:00
53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
nixosTests,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "3proxy";
|
|
version = "0.9.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "3proxy";
|
|
repo = "3proxy";
|
|
tag = finalAttrs.version;
|
|
sha256 = "sha256-0rCXz/vKFF5rvBXyvtt9DH0Jz+1i7rIylh07FqKBrZM=";
|
|
};
|
|
|
|
# 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-fail "(INSTALL_BIN) -s" "(INSTALL_BIN)" \
|
|
--replace-fail "/usr" ""
|
|
'';
|
|
|
|
makeFlags = [
|
|
"-f Makefile.Linux"
|
|
"INSTALL=install"
|
|
"DESTDIR=${placeholder "out"}"
|
|
"CC:=$(CC)"
|
|
];
|
|
|
|
postInstall = ''
|
|
rm -fr $out/var
|
|
'';
|
|
|
|
# common.c:208:9: error: initialization of 'int (*)(struct pollfd *, unsigned int, int)' from incompatible pointer type 'int (*)(struct pollfd *, nfds_t, int)' {aka 'int (*)(struct pollfd *, long unsigned int, int)'}
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
|
|
|
|
passthru.tests = {
|
|
smoke-test = nixosTests._3proxy;
|
|
};
|
|
|
|
meta = {
|
|
description = "Tiny free proxy server";
|
|
homepage = "https://github.com/3proxy/3proxy";
|
|
license = lib.licenses.bsd2;
|
|
platforms = lib.platforms.linux;
|
|
maintainers = with lib.maintainers; [ misuzu ];
|
|
};
|
|
})
|