nixpkgs/pkgs/applications/networking/3proxy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.0 KiB
Nix
Raw Normal View History

2022-05-23 21:14:28 +00:00
{ lib, stdenv, fetchFromGitHub, nixosTests }:
2019-08-26 14:21:03 +00:00
stdenv.mkDerivation rec {
pname = "3proxy";
2021-07-03 03:15:55 +00:00
version = "0.9.4";
2020-12-28 21:32:20 +00:00
2019-08-26 14:21:03 +00:00
src = fetchFromGitHub {
2022-05-23 21:14:28 +00:00
owner = "3proxy";
2019-08-26 14:21:03 +00:00
repo = pname;
rev = version;
2021-07-03 03:15:55 +00:00
sha256 = "sha256-4bLlQ/ULvpjs6fr19yBBln5mRRc+yj+zVLiTs1e/Ypc=";
2019-08-26 14:21:03 +00:00
};
2020-12-28 21:32:20 +00:00
2022-05-23 21:14:28 +00:00
# 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" ""
'';
2019-08-26 14:21:03 +00:00
makeFlags = [
2020-12-28 21:32:20 +00:00
"-f Makefile.Linux"
2022-05-23 21:14:28 +00:00
"INSTALL=install"
2020-12-28 21:32:20 +00:00
"DESTDIR=${placeholder "out"}"
2022-05-23 21:14:28 +00:00
"CC:=$(CC)"
2019-08-26 14:21:03 +00:00
];
2020-12-28 21:32:20 +00:00
2022-05-23 21:14:28 +00:00
postInstall = ''
rm -fr $out/var
'';
2021-04-03 22:29:21 +00:00
passthru.tests = {
smoke-test = nixosTests._3proxy;
};
meta = with lib; {
2019-08-26 14:21:03 +00:00
description = "Tiny free proxy server";
2022-05-23 21:14:28 +00:00
homepage = "https://github.com/3proxy/3proxy";
2020-12-28 21:32:20 +00:00
license = licenses.bsd2;
2019-08-26 14:21:03 +00:00
platforms = platforms.linux;
2020-12-28 21:32:20 +00:00
maintainers = with maintainers; [ misuzu ];
2019-08-26 14:21:03 +00:00
};
}