-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfreedownloadmanager.nix
78 lines (69 loc) · 1.72 KB
/
freedownloadmanager.nix
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
76
77
78
{ lib
, stdenv
, fetchurl
, dpkg
, wrapGAppsHook
, autoPatchelfHook
, udev
, libdrm
, libpqxx
, unixODBC
, gst_all_1
, xorg
, libpulseaudio
, mysql80
}:
stdenv.mkDerivation rec {
pname = "freedownloadmanager";
version = "6.21.0.5639";
src = fetchurl {
url = "https://files2.freedownloadmanager.org/6/latest/freedownloadmanager.deb";
hash = "sha256-rvntnE6dNRyw4KVY+oKG1pvn1tGfk0u6btWEyV3dBTU=";
};
unpackPhase = "dpkg-deb -x $src .";
nativeBuildInputs = [
dpkg
wrapGAppsHook
autoPatchelfHook
];
buildInputs = [
libdrm
libpqxx
unixODBC
stdenv.cc.cc
mysql80
] ++ (with gst_all_1; [
gstreamer
gst-libav
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
])++(with xorg; [
xcbutilwm # libxcb-icccm.so.4
xcbutilimage # libxcb-image.so.0
xcbutilkeysyms # libxcb-keysyms.so.1
xcbutilrenderutil # libxcb-render-util.so.0
libpulseaudio
]);
runtimeDependencies = [
(lib.getLib udev)
];
installPhase = ''
mkdir -p $out/bin
cp -r opt/freedownloadmanager $out
cp -r usr/share $out
ln -s $out/freedownloadmanager/fdm $out/bin/${pname}
substituteInPlace $out/share/applications/freedownloadmanager.desktop \
--replace 'Exec=/opt/freedownloadmanager/fdm' 'Exec=${pname}' \
--replace "Icon=/opt/freedownloadmanager/icon.png" "Icon=$out/freedownloadmanager/icon.png"
'';
meta = with lib; {
description = "A smart and fast internet download manager";
homepage = "https://www.freedownloadmanager.org";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ ];
};
}