tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
init: moneyplex at 16.0.22424
Thomas Strobel
9 years ago
136c249e
b52fa7b6
+119
2 changed files
expand all
collapse all
unified
split
pkgs
applications
office
moneyplex
default.nix
top-level
all-packages.nix
+117
pkgs/applications/office/moneyplex/default.nix
reviewed
···
1
1
+
{ stdenv, requireFile, writeScript, patchelf, libredirect, coreutils, pcsclite
2
2
+
, zlib, glib, gdk_pixbuf, gtk2, cairo, pango, libX11, atk, openssl }:
3
3
+
4
4
+
let
5
5
+
libPath = stdenv.lib.makeLibraryPath [
6
6
+
stdenv.cc.cc zlib glib gdk_pixbuf gtk2 cairo pango libX11 atk openssl
7
7
+
];
8
8
+
in
9
9
+
10
10
+
stdenv.mkDerivation rec {
11
11
+
name = "moneyplex-${version}";
12
12
+
version = "1.0";
13
13
+
14
14
+
src = requireFile {
15
15
+
message = ''
16
16
+
Unfortunately, Matrica does not provide an installable version of moneyplex.
17
17
+
To work around, install moneyplex on another system, und delete the following files
18
18
+
from the moneyplex installation directory: backups, mdaten, rup, Lnx\ Global.ali, Lnx\ Local ...ali
19
19
+
and settings.ini, and then pack the folder into moneyplex-${version}.tar.gz.
20
20
+
'';
21
21
+
name = "moneyplex-${version}.tar.gz";
22
22
+
sha256 = "0wpzwvhybjbqvqi8bpvkvcs3mikvl68gk1hzawihi0xnm28lcxw0";
23
23
+
};
24
24
+
25
25
+
phases = [ "unpackPhase" "installPhase" "postInstall" ];
26
26
+
27
27
+
buildInputs = [ ];
28
28
+
29
29
+
installPhase =
30
30
+
''
31
31
+
mkdir -p "$out/opt/moneyplex"
32
32
+
cp -r . $out/opt/moneyplex
33
33
+
34
34
+
mkdir "$out/bin"
35
35
+
36
36
+
cat > $out/bin/moneyplex <<EOF
37
37
+
#!${stdenv.shell}
38
38
+
39
39
+
if [ -z "\$XDG_DATA_HOME" ]; then
40
40
+
MDIR=\$HOME/.local/share/moneyplex
41
41
+
else
42
42
+
MDIR=\$XDG_DATA_HOME/moneyplex
43
43
+
fi
44
44
+
45
45
+
if [ ! -d "\$MDIR" ]; then
46
46
+
${coreutils}/bin/mkdir -p \$MDIR
47
47
+
${coreutils}/bin/cp -r $out/opt/moneyplex/* \$MDIR
48
48
+
${coreutils}/bin/chmod 0644 \$MDIR/*
49
49
+
${coreutils}/bin/chmod 0755 \$MDIR/system
50
50
+
${coreutils}/bin/chmod 0644 \$MDIR/system/*
51
51
+
${coreutils}/bin/chmod 0755 \$MDIR/reports
52
52
+
${coreutils}/bin/chmod 0644 \$MDIR/reports/*
53
53
+
${coreutils}/bin/chmod 0755 \$MDIR/moneyplex
54
54
+
${coreutils}/bin/chmod 0755 \$MDIR/prestart
55
55
+
${coreutils}/bin/chmod 0755 \$MDIR/mpxalarm
56
56
+
fi
57
57
+
58
58
+
if [ ! -d "\$MDIR/pcsc" ]; then
59
59
+
${coreutils}/bin/mkdir -p \$MDIR/pcsc
60
60
+
fi
61
61
+
if [ ! -e "\$MDIR/pcsc/libpcsclite.so.1" ] || [ ! \`${coreutils}/bin/readlink -f "\$MDIR/pcsc/libpcsclite.so.1"\` -ef "${pcsclite}/lib/libpcsclite.so.1" ]; then
62
62
+
${coreutils}/bin/ln -sf "${pcsclite}/lib/libpcsclite.so.1" "\$MDIR/pcsc/libpcsclite.so.1"
63
63
+
fi
64
64
+
65
65
+
66
66
+
if [ -e "\$MDIR/rup/rupremote.lst" ]; then
67
67
+
for i in \`${coreutils}/bin/cat "\$MDIR/rup/rupremote.lst"\`; do
68
68
+
${coreutils}/bin/mv "\$MDIR/rup/"\`${coreutils}/bin/basename \$i\` "\$MDIR/\$i"
69
69
+
done
70
70
+
rm -r "\$MDIR/rup/rupremote.lst"
71
71
+
fi
72
72
+
73
73
+
if [ ! -e "\$MDIR/moneyplex.patched" ] || [ "\$MDIR/moneyplex" -nt "\$MDIR/moneyplex.patched" ]; then
74
74
+
${coreutils}/bin/cp "\$MDIR/moneyplex" "\$MDIR/moneyplex.patched"
75
75
+
${coreutils}/bin/chmod 0755 "\$MDIR/moneyplex.patched"
76
76
+
fi
77
77
+
if [ ! \`${patchelf}/bin/patchelf --print-interpreter \$MDIR/moneyplex.patched\` = $(cat $NIX_CC/nix-support/dynamic-linker) ] ||
78
78
+
[ ! \`${patchelf}/bin/patchelf --print-rpath \$MDIR/moneyplex.patched\` = "${libPath}" ]; then
79
79
+
${patchelf}/bin/patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath "${libPath}" "\$MDIR/moneyplex.patched"
80
80
+
fi
81
81
+
82
82
+
exec \$MDIR/moneyplex.patched
83
83
+
EOF
84
84
+
85
85
+
chmod +x $out/bin/moneyplex
86
86
+
'';
87
87
+
88
88
+
postInstall = ''
89
89
+
mkdir -p $out/share/icons
90
90
+
cp -r $out/opt/moneyplex/system/mpx256.png $out/share/icons/moneyplex.png
91
91
+
92
92
+
mkdir -p $out/share/applications
93
93
+
cat > $out/share/applications/moneyplex.desktop <<EOF
94
94
+
[Desktop Entry]
95
95
+
Type=Application
96
96
+
Encoding=UTF-8
97
97
+
Name=Moneyplex
98
98
+
GenericName=Moneyplex online banking software
99
99
+
Comment=Online banking software
100
100
+
Icon=$out/share/icons/moneyplex.png
101
101
+
Exec=$out/bin/moneyplex
102
102
+
Terminal=false
103
103
+
Categories=Application;
104
104
+
StartupNotify=true
105
105
+
EOF
106
106
+
'';
107
107
+
108
108
+
109
109
+
meta = with stdenv.lib; {
110
110
+
description = "Moneyplex online banking software";
111
111
+
maintainers = with maintainers; [ tstrobel ];
112
112
+
platforms = platforms.linux;
113
113
+
license = licenses.unfree;
114
114
+
downloadPage = http://matrica.de/download/download.html;
115
115
+
};
116
116
+
117
117
+
}
+2
pkgs/top-level/all-packages.nix
reviewed
···
2910
2910
2911
2911
molly-guard = callPackage ../os-specific/linux/molly-guard { };
2912
2912
2913
2913
+
moneyplex = callPackage ../applications/office/moneyplex { };
2914
2914
+
2913
2915
monit = callPackage ../tools/system/monit { };
2914
2916
2915
2917
moreutils = callPackage ../tools/misc/moreutils {