1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 autoconf-archive,
7 pkg-config,
8 gettext,
9 libssl,
10 txt2man,
11}:
12
13stdenv.mkDerivation rec {
14 pname = "axel";
15 version = "2.17.14";
16
17 src = fetchFromGitHub {
18 owner = "axel-download-accelerator";
19 repo = pname;
20 rev = "v${version}";
21 sha256 = "sha256-5GUna5k8GhAx1Xe8n9IvXT7IO6gksxCLh+sMANlxTBM=";
22 };
23
24 postPatch = ''
25 substituteInPlace configure.ac \
26 --replace-fail "AM_GNU_GETTEXT_VERSION([0.11.1])" "AM_GNU_GETTEXT_VERSION([0.12])"
27 '';
28
29 nativeBuildInputs = [
30 autoreconfHook
31 pkg-config
32 autoconf-archive
33 txt2man
34 ];
35
36 buildInputs = [
37 gettext
38 libssl
39 ];
40
41 installFlags = [ "ETCDIR=${placeholder "out"}/etc" ];
42
43 postInstall = ''
44 mkdir -p $out/share/doc
45 cp doc/axelrc.example $out/share/doc/axelrc.example
46 '';
47
48 meta = with lib; {
49 description = "Console downloading program with some features for parallel connections for faster downloading";
50 homepage = "https://github.com/axel-download-accelerator/axel";
51 maintainers = with maintainers; [ pSub ];
52 platforms = with platforms; unix;
53 license = licenses.gpl2Plus;
54 mainProgram = "axel";
55 };
56}