-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathixpm.nix
More file actions
75 lines (63 loc) · 1.62 KB
/
Copy pathixpm.nix
File metadata and controls
75 lines (63 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
fetchFromGitHub,
pkgs,
php84,
lib,
dataDir ? "/var/lib/ixp-manager",
logDir ? "/var/log/ixp-manager",
cacheDir ? "/var/cache/ixp-manager",
...
}: let
phpPackage = php84.withExtensions ({
enabled,
all,
}:
# xml extension is handled by composer
enabled ++ (with all; [memcached snmp intl curl rrd mbstring gd bcmath zip yaml memcache ds]));
in
phpPackage.buildComposerProject2 rec {
pname = "ixp-manager";
version = "7.1.0";
src = fetchFromGitHub {
owner = "inex";
repo = pname;
tag = "v${version}";
sha256 = "sha256-XT0QFv39482VkmvFXzvm1I2D+oIfgO8C+ko5dBwur7Q=";
};
vendorHash = "sha256-I414l+iLCzcjwDoeoIQPaNohJkgc52TIPZsaQYYMZmM=";
php = phpPackage;
buildInputs = with pkgs; [
# basic tools
openssl
wget
nettools
# dependencies
rrdtool
bgpq3
mrtg
perl
perl540Packages.ConfigGeneral
apacheHttpdPackages.php
perl540Packages.NetAddrIP
];
composerStrictValidation = false;
postInstall = ''
chmod -R u+w $out/share
mv $out/share/php/ixp-manager/* $out
rm -r $out/share
cp ${./artifacts/trustedproxy.php} config/trustedproxy.php
#rm -rf $out/storage/logs $out/bootstrap/cache $out/storage
ln -s ${logDir} $out/storage/logs
ln -s ${dataDir}/storage $out/storage
ln -s ${cacheDir} $out/bootstrap/cache
#ls -l $out
'';
passthru = {
phpPackage = phpPackage;
};
meta = with lib; {
description = "IXP Manager";
platforms = platforms.linux;
license = licenses.gpl3Only;
};
}