tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
_3proxy: fix cross-compilation
Nikolay Korotkiy
3 years ago
36b612e9
26e7906a
+17
-4
1 changed file
expand all
collapse all
unified
split
pkgs
applications
networking
3proxy
default.nix
+17
-4
pkgs/applications/networking/3proxy/default.nix
···
1
1
-
{ lib, stdenv, fetchFromGitHub, coreutils, nixosTests }:
1
1
+
{ lib, stdenv, fetchFromGitHub, nixosTests }:
2
2
3
3
stdenv.mkDerivation rec {
4
4
pname = "3proxy";
5
5
version = "0.9.4";
6
6
7
7
src = fetchFromGitHub {
8
8
-
owner = "z3APA3A";
8
8
+
owner = "3proxy";
9
9
repo = pname;
10
10
rev = version;
11
11
sha256 = "sha256-4bLlQ/ULvpjs6fr19yBBln5mRRc+yj+zVLiTs1e/Ypc=";
12
12
};
13
13
14
14
+
# They use 'install -s', that calls the native strip instead of the cross.
15
15
+
# Don't strip binary on install, we strip it on fixup phase anyway.
16
16
+
postPatch = ''
17
17
+
substituteInPlace Makefile.Linux \
18
18
+
--replace "(INSTALL_BIN) -s" "(INSTALL_BIN)" \
19
19
+
--replace "/usr" ""
20
20
+
'';
21
21
+
14
22
makeFlags = [
15
23
"-f Makefile.Linux"
16
16
-
"INSTALL=${coreutils}/bin/install"
24
24
+
"INSTALL=install"
17
25
"DESTDIR=${placeholder "out"}"
26
26
+
"CC:=$(CC)"
18
27
];
19
28
29
29
+
postInstall = ''
30
30
+
rm -fr $out/var
31
31
+
'';
32
32
+
20
33
passthru.tests = {
21
34
smoke-test = nixosTests._3proxy;
22
35
};
23
36
24
37
meta = with lib; {
25
38
description = "Tiny free proxy server";
26
26
-
homepage = "https://github.com/z3APA3A/3proxy";
39
39
+
homepage = "https://github.com/3proxy/3proxy";
27
40
license = licenses.bsd2;
28
41
platforms = platforms.linux;
29
42
maintainers = with maintainers; [ misuzu ];