diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-26 02:35:33 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-26 02:35:33 +0200 |
commit | a2230e848bc85e484ef14163ac90fdb7045855f7 (patch) | |
tree | 2a1cc4158e5aeca3b6022efec7cc11ee405b7757 | |
parent | 1618010c141571c4d9a3fa9d340d009620c4520f (diff) | |
download | Nix-a2230e848bc85e484ef14163ac90fdb7045855f7.tar.gz Nix-a2230e848bc85e484ef14163ac90fdb7045855f7.tar.zst Nix-a2230e848bc85e484ef14163ac90fdb7045855f7.zip |
Move more packages to separate files
-rw-r--r-- | default.nix | 138 | ||||
-rw-r--r-- | pkgs/cnagios/cnagios.json (renamed from fetched/cnagios.json) | 0 | ||||
-rw-r--r-- | pkgs/cnagios/default.nix | 22 | ||||
-rw-r--r-- | pkgs/mutt-ics/default.nix | 5 | ||||
-rw-r--r-- | pkgs/mutt-ics/mutt-ics.json (renamed from fetched/mutt-ics.json) | 0 | ||||
-rw-r--r-- | pkgs/muttprint/0.73-4.diff.gz (renamed from patches/muttprint_0.73-4.diff.gz) | bin | 16525 -> 16525 bytes | |||
-rw-r--r-- | pkgs/muttprint/default.nix | 44 | ||||
-rw-r--r-- | pkgs/muttprint/regex.patch (renamed from patches/muttprint_regex.patch) | 0 | ||||
-rw-r--r-- | pkgs/muttprint/two_edge.patch (renamed from patches/muttprint_two_edge.patch) | 0 | ||||
-rw-r--r-- | pkgs/nagios-cli/default.nix | 2 | ||||
-rw-r--r-- | pkgs/nagios-cli/nagios-cli.json (renamed from fetched/nagios-cli.json) | 0 | ||||
-rw-r--r-- | pkgs/nagnu/default.nix | 12 | ||||
-rw-r--r-- | pkgs/nagnu/nagnu.json (renamed from fetched/nagnu.json) | 0 | ||||
-rw-r--r-- | pkgs/pg_activity/default.nix | 5 | ||||
-rw-r--r-- | pkgs/pg_activity/pg_activity.json (renamed from fetched/pg_activity.json) | 0 | ||||
-rw-r--r-- | pkgs/pgloader/default.nix | 16 | ||||
-rw-r--r-- | pkgs/pgloader/pgloader.json (renamed from fetched/pgloader.json) | 0 | ||||
-rw-r--r-- | pkgs/telegram-cli/default.nix | 16 | ||||
-rw-r--r-- | pkgs/telegram-cli/telegram-cli.json (renamed from fetched/telegram-cli.json) | 0 | ||||
-rw-r--r-- | pkgs/telegram-cli/telegram-cli.patch (renamed from patches/telegram-cli.patch) | 0 | ||||
-rw-r--r-- | pkgs/telegram-history-dump/default.nix | 9 | ||||
-rw-r--r-- | pkgs/telegram-history-dump/telegram-history-dump.json (renamed from fetched/telegram-history-dump.json) | 0 |
22 files changed, 140 insertions, 129 deletions
diff --git a/default.nix b/default.nix index 38d7e0b..7b2ca98 100644 --- a/default.nix +++ b/default.nix | |||
@@ -74,55 +74,20 @@ let | |||
74 | }; | 74 | }; |
75 | }; | 75 | }; |
76 | 76 | ||
77 | mypkgs.cnagios = callPackage ./pkgs/cnagios { inherit fetchedGithub; }; | ||
77 | mypkgs.mtop = callPackage ./pkgs/mtop {}; | 78 | mypkgs.mtop = callPackage ./pkgs/mtop {}; |
79 | mypkgs.muttprint = callPackage ./pkgs/muttprint {}; | ||
80 | mypkgs.mutt-ics = callPackage ./pkgs/mutt-ics { inherit fetchedGithub; }; | ||
81 | mypkgs.nagios-cli = callPackage ./pkgs/nagios-cli { inherit fetchedGithub; }; | ||
82 | #mypkgs.nagnu = callPackage ./pkgs/nagnu { inherit fetchedGithub; }; | ||
78 | mypkgs.note = callPackage ./pkgs/note {}; | 83 | mypkgs.note = callPackage ./pkgs/note {}; |
84 | mypkgs.pg_activity = callPackage ./pkgs/pg_activity { inherit fetchedGithub; }; | ||
85 | mypkgs.pgloader = callPackage ./pkgs/pgloader { inherit fetchedGithub; }; | ||
86 | mypkgs.telegram-cli = callPackage ./pkgs/telegram-cli { inherit fetchedGithub; }; | ||
87 | mypkgs.telegram-history-dump = callPackage ./pkgs/telegram-history-dump { inherit fetchedGithub; }; | ||
79 | mypkgs.terminal-velocity = callPackage ./pkgs/terminal-velocity {}; | 88 | mypkgs.terminal-velocity = callPackage ./pkgs/terminal-velocity {}; |
80 | mypkgs.tiv = callPackage ./pkgs/tiv {}; | 89 | mypkgs.tiv = callPackage ./pkgs/tiv {}; |
81 | 90 | ||
82 | mypkgs.cnagios = stdenv.mkDerivation (fetchedGithub ./fetched/cnagios.json // rec { | ||
83 | configureFlags = [ | ||
84 | "--with-etc-dir=/etc/cnagios" | ||
85 | "--with-var-dir=/var/lib/naemon" | ||
86 | "--with-status-file=/var/lib/naemon/status.dat" | ||
87 | "--with-nagios-data=4" | ||
88 | ]; | ||
89 | |||
90 | prePatch = '' | ||
91 | sed -i -e "s/-lcurses/-lncurses/" Makefile.in | ||
92 | ''; | ||
93 | installPhase = '' | ||
94 | install -dm755 $out/share/doc/cnagios | ||
95 | install -Dm644 cnagiosrc $out/share/doc/cnagios/ | ||
96 | install -Dm644 cnagios.help $out/share/doc/cnagios/ | ||
97 | install -Dm644 cnagios.pl $out/share/doc/cnagios/ | ||
98 | install -dm755 $out/bin | ||
99 | install -Dm755 cnagios $out/bin/ | ||
100 | ''; | ||
101 | propagatedBuildInputs = [ perl ncurses ]; | ||
102 | }); | ||
103 | |||
104 | mypkgs.nagios-cli = python2Packages.buildPythonApplication (fetchedGithub ./fetched/nagios-cli.json); | ||
105 | |||
106 | mypkgs.pg_activity = with python2Packages; buildPythonApplication (fetchedGithub ./fetched/pg_activity.json // rec { | ||
107 | propagatedBuildInputs = [ psycopg2 psutil ]; | ||
108 | }); | ||
109 | |||
110 | mypkgs.pgloader = stdenv.mkDerivation (fetchedGithub ./fetched/pgloader.json // rec { | ||
111 | buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ]; | ||
112 | LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; | ||
113 | buildPhase = '' | ||
114 | export PATH=$PATH:$out/bin | ||
115 | export HOME=$TMPDIR | ||
116 | make pgloader | ||
117 | ''; | ||
118 | dontStrip = true; | ||
119 | enableParallelBuilding = false; | ||
120 | installPhase = '' | ||
121 | install -Dm755 build/bin/pgloader "$out/bin/pgloader" | ||
122 | wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}" | ||
123 | ''; | ||
124 | }); | ||
125 | |||
126 | mypkgs.pelican = python3Packages.pelican.overrideAttrs(old: fetchedGithub ./fetched/pelican.json // rec { | 91 | mypkgs.pelican = python3Packages.pelican.overrideAttrs(old: fetchedGithub ./fetched/pelican.json // rec { |
127 | propagatedBuildInputs = old.propagatedBuildInputs ++ [ python3Packages.pyyaml ]; | 92 | propagatedBuildInputs = old.propagatedBuildInputs ++ [ python3Packages.pyyaml ]; |
128 | }); | 93 | }); |
@@ -147,18 +112,6 @@ let | |||
147 | } | 112 | } |
148 | ); | 113 | ); |
149 | 114 | ||
150 | # mypkgs.nagnu = stdenv.mkDerivation (fetchedGithub ./fetched/nagnu.json // rec { | ||
151 | # buildInputs = [ ncurses curl ]; | ||
152 | # installPhase = '' | ||
153 | # mkdir -p $out/bin | ||
154 | # cp nagnu $out/bin | ||
155 | # mkdir -p $out/share/doc/nagnu | ||
156 | # cp nagnu.conf.sample $out/share/doc/nagnu | ||
157 | # mkdir -p $out/share/man/man8 | ||
158 | # cp docs/nagnu.8 $out/share/man/man8 | ||
159 | # ''; | ||
160 | # }); | ||
161 | |||
162 | mypkgs.goaccess = goaccess.overrideAttrs(old: rec { | 115 | mypkgs.goaccess = goaccess.overrideAttrs(old: rec { |
163 | name = "goaccess-${version}"; | 116 | name = "goaccess-${version}"; |
164 | version = "1.3"; | 117 | version = "1.3"; |
@@ -170,79 +123,6 @@ let | |||
170 | buildInputs = old.buildInputs ++ [ tokyocabinet bzip2 ]; | 123 | buildInputs = old.buildInputs ++ [ tokyocabinet bzip2 ]; |
171 | }); | 124 | }); |
172 | 125 | ||
173 | mypkgs.mutt-ics = with python3Packages; buildPythonApplication (fetchedGithub ./fetched/mutt-ics.json // rec { | ||
174 | propagatedBuildInputs = [ icalendar ]; | ||
175 | }); | ||
176 | |||
177 | mypkgs.telegram-cli = stdenv.mkDerivation (fetchedGithub ./fetched/telegram-cli.json // rec { | ||
178 | patches = [ | ||
179 | ./patches/telegram-cli.patch | ||
180 | ]; | ||
181 | buildInputs = [ pkgconfig libevent lua jansson openssl readline zlib libconfig ]; | ||
182 | preBuild = '' | ||
183 | sed -i -e 's@"/etc/" PROG_NAME "/server.pub"@"'$out'/etc/server.pub"@' main.c | ||
184 | ''; | ||
185 | installPhase = '' | ||
186 | mkdir -p $out | ||
187 | install -Dm755 bin/telegram-cli $out/bin/telegram-cli | ||
188 | install -Dm644 tg-server.pub $out/etc/server.pub | ||
189 | install -Dm644 debian/telegram-cli.8 $out/man/man8/telegram-cli.8 | ||
190 | ''; | ||
191 | }); | ||
192 | |||
193 | mypkgs.telegram-history-dump = stdenv.mkDerivation (fetchedGithub ./fetched/telegram-history-dump.json // rec { | ||
194 | installPhase = '' | ||
195 | mkdir -p $out/lib $out/bin | ||
196 | cp -a $src $out/lib/telegram-history-dump | ||
197 | ln -s $out/lib/telegram-history-dump/telegram-history-dump.rb $out/bin/telegram-history-dump | ||
198 | ''; | ||
199 | buildInputs = [ ruby ]; | ||
200 | }); | ||
201 | |||
202 | mypkgs.muttprint = stdenv.mkDerivation rec { | ||
203 | name = "muttprint-${version}"; | ||
204 | version = "0.73"; | ||
205 | src = fetchurl { | ||
206 | url = "http://downloads.sf.net/muttprint/${name}.tar.gz"; | ||
207 | sha256 = "1dny4niyibfgazwlzfcnb37jy6k140rs6baaj629z12rmahfdavw"; | ||
208 | }; | ||
209 | patches = [ | ||
210 | ./patches/muttprint_0.73-4.diff.gz | ||
211 | ./patches/muttprint_regex.patch | ||
212 | ./patches/muttprint_two_edge.patch | ||
213 | ]; | ||
214 | preConfigure = '' | ||
215 | aclocal | ||
216 | automake --add-missing --copy | ||
217 | autoconf | ||
218 | ''; | ||
219 | preBuild = '' | ||
220 | cd pics | ||
221 | convert -flop BabyTuX.eps BabyTuX.eps | ||
222 | for i in BabyTuX_color.eps BabyTuX.eps Debian_color.eps \ | ||
223 | Debian.eps Gentoo.eps Gentoo_color.eps ; do | ||
224 | convert $i $(basename $i .eps).png | ||
225 | done | ||
226 | convert penguin.eps penguin.jpg | ||
227 | cd .. | ||
228 | ''; | ||
229 | postInstall = '' | ||
230 | perlFlags= | ||
231 | for i in $(IFS=:; echo $PERL5LIB); do | ||
232 | perlFlags="$perlFlags -I$i" | ||
233 | done | ||
234 | |||
235 | sed -i "$out/bin/muttprint" -e "s|^#\!\(.*[ /]perl.*\)$|#\!\1$perlFlags|" | ||
236 | sed -i "$out/bin/muttprint" -e "s|ENV{HOME}/.muttprintrc|ENV{XDG_CONFIG_HOME}/muttprint/muttprintrc|" | ||
237 | |||
238 | wrapProgram $out/bin/muttprint \ | ||
239 | --prefix PATH : ${lib.makeBinPath [ psutils dialog | ||
240 | (texlive.combine { inherit (texlive) scheme-basic utopia fancyvrb lastpage marvosym ucs cm-super; }) ]} | ||
241 | ''; | ||
242 | buildInputs = [ makeWrapper automake autoconf imagemagick ghostscript perl ] ++ | ||
243 | (with perlPackages; [ TimeDate FileWhich TextIconv ]); | ||
244 | }; | ||
245 | |||
246 | mypkgs.yarn2nix = yarn2nixPackage.yarn2nix; | 126 | mypkgs.yarn2nix = yarn2nixPackage.yarn2nix; |
247 | 127 | ||
248 | mypkgs.cardano = let | 128 | mypkgs.cardano = let |
diff --git a/fetched/cnagios.json b/pkgs/cnagios/cnagios.json index 4c1c385..4c1c385 100644 --- a/fetched/cnagios.json +++ b/pkgs/cnagios/cnagios.json | |||
diff --git a/pkgs/cnagios/default.nix b/pkgs/cnagios/default.nix new file mode 100644 index 0000000..2e6c799 --- /dev/null +++ b/pkgs/cnagios/default.nix | |||
@@ -0,0 +1,22 @@ | |||
1 | { stdenv, fetchedGithub, perl, ncurses }: | ||
2 | stdenv.mkDerivation (fetchedGithub ./cnagios.json // { | ||
3 | configureFlags = [ | ||
4 | "--with-etc-dir=/etc/cnagios" | ||
5 | "--with-var-dir=/var/lib/naemon" | ||
6 | "--with-status-file=/var/lib/naemon/status.dat" | ||
7 | "--with-nagios-data=4" | ||
8 | ]; | ||
9 | |||
10 | prePatch = '' | ||
11 | sed -i -e "s/-lcurses/-lncurses/" Makefile.in | ||
12 | ''; | ||
13 | installPhase = '' | ||
14 | install -dm755 $out/share/doc/cnagios | ||
15 | install -Dm644 cnagiosrc $out/share/doc/cnagios/ | ||
16 | install -Dm644 cnagios.help $out/share/doc/cnagios/ | ||
17 | install -Dm644 cnagios.pl $out/share/doc/cnagios/ | ||
18 | install -dm755 $out/bin | ||
19 | install -Dm755 cnagios $out/bin/ | ||
20 | ''; | ||
21 | buildInputs = [ perl ncurses ]; | ||
22 | }) | ||
diff --git a/pkgs/mutt-ics/default.nix b/pkgs/mutt-ics/default.nix new file mode 100644 index 0000000..26f95eb --- /dev/null +++ b/pkgs/mutt-ics/default.nix | |||
@@ -0,0 +1,5 @@ | |||
1 | { python3Packages, fetchedGithub }: | ||
2 | with python3Packages; | ||
3 | buildPythonApplication (fetchedGithub ./mutt-ics.json // { | ||
4 | propagatedBuildInputs = [ icalendar ]; | ||
5 | }) | ||
diff --git a/fetched/mutt-ics.json b/pkgs/mutt-ics/mutt-ics.json index ae8ed37..ae8ed37 100644 --- a/fetched/mutt-ics.json +++ b/pkgs/mutt-ics/mutt-ics.json | |||
diff --git a/patches/muttprint_0.73-4.diff.gz b/pkgs/muttprint/0.73-4.diff.gz index c4f3cef..c4f3cef 100644 --- a/patches/muttprint_0.73-4.diff.gz +++ b/pkgs/muttprint/0.73-4.diff.gz | |||
Binary files differ | |||
diff --git a/pkgs/muttprint/default.nix b/pkgs/muttprint/default.nix new file mode 100644 index 0000000..0863a7b --- /dev/null +++ b/pkgs/muttprint/default.nix | |||
@@ -0,0 +1,44 @@ | |||
1 | { stdenv, fetchurl, lib, psutils, dialog, texlive, makeWrapper, automake, autoconf, imagemagick, ghostscript, perl, perlPackages }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | name = "muttprint-${version}"; | ||
4 | version = "0.73"; | ||
5 | src = fetchurl { | ||
6 | url = "http://downloads.sf.net/muttprint/${name}.tar.gz"; | ||
7 | sha256 = "1dny4niyibfgazwlzfcnb37jy6k140rs6baaj629z12rmahfdavw"; | ||
8 | }; | ||
9 | patches = [ | ||
10 | ./0.73-4.diff.gz | ||
11 | ./regex.patch | ||
12 | ./two_edge.patch | ||
13 | ]; | ||
14 | preConfigure = '' | ||
15 | aclocal | ||
16 | automake --add-missing --copy | ||
17 | autoconf | ||
18 | ''; | ||
19 | preBuild = '' | ||
20 | cd pics | ||
21 | convert -flop BabyTuX.eps BabyTuX.eps | ||
22 | for i in BabyTuX_color.eps BabyTuX.eps Debian_color.eps \ | ||
23 | Debian.eps Gentoo.eps Gentoo_color.eps ; do | ||
24 | convert $i $(basename $i .eps).png | ||
25 | done | ||
26 | convert penguin.eps penguin.jpg | ||
27 | cd .. | ||
28 | ''; | ||
29 | postInstall = '' | ||
30 | perlFlags= | ||
31 | for i in $(IFS=:; echo $PERL5LIB); do | ||
32 | perlFlags="$perlFlags -I$i" | ||
33 | done | ||
34 | |||
35 | sed -i "$out/bin/muttprint" -e "s|^#\!\(.*[ /]perl.*\)$|#\!\1$perlFlags|" | ||
36 | sed -i "$out/bin/muttprint" -e "s|ENV{HOME}/.muttprintrc|ENV{XDG_CONFIG_HOME}/muttprint/muttprintrc|" | ||
37 | |||
38 | wrapProgram $out/bin/muttprint \ | ||
39 | --prefix PATH : ${lib.makeBinPath [ psutils dialog | ||
40 | (texlive.combine { inherit (texlive) scheme-basic utopia fancyvrb lastpage marvosym ucs cm-super; }) ]} | ||
41 | ''; | ||
42 | buildInputs = [ makeWrapper automake autoconf imagemagick ghostscript perl ] ++ | ||
43 | (with perlPackages; [ TimeDate FileWhich TextIconv ]); | ||
44 | } | ||
diff --git a/patches/muttprint_regex.patch b/pkgs/muttprint/regex.patch index e99c4a2..e99c4a2 100644 --- a/patches/muttprint_regex.patch +++ b/pkgs/muttprint/regex.patch | |||
diff --git a/patches/muttprint_two_edge.patch b/pkgs/muttprint/two_edge.patch index 4a7290d..4a7290d 100644 --- a/patches/muttprint_two_edge.patch +++ b/pkgs/muttprint/two_edge.patch | |||
diff --git a/pkgs/nagios-cli/default.nix b/pkgs/nagios-cli/default.nix new file mode 100644 index 0000000..35e3790 --- /dev/null +++ b/pkgs/nagios-cli/default.nix | |||
@@ -0,0 +1,2 @@ | |||
1 | { python2Packages, fetchedGithub }: | ||
2 | python2Packages.buildPythonApplication (fetchedGithub ./nagios-cli.json) | ||
diff --git a/fetched/nagios-cli.json b/pkgs/nagios-cli/nagios-cli.json index fc91227..fc91227 100644 --- a/fetched/nagios-cli.json +++ b/pkgs/nagios-cli/nagios-cli.json | |||
diff --git a/pkgs/nagnu/default.nix b/pkgs/nagnu/default.nix new file mode 100644 index 0000000..0056393 --- /dev/null +++ b/pkgs/nagnu/default.nix | |||
@@ -0,0 +1,12 @@ | |||
1 | { stdenv, fetchedGithub, ncurses, curl }: | ||
2 | stdenv.mkDerivation (fetchedGithub ./nagnu.json // rec { | ||
3 | buildInputs = [ ncurses curl ]; | ||
4 | installPhase = '' | ||
5 | mkdir -p $out/bin | ||
6 | cp nagnu $out/bin | ||
7 | mkdir -p $out/share/doc/nagnu | ||
8 | cp nagnu.conf.sample $out/share/doc/nagnu | ||
9 | mkdir -p $out/share/man/man8 | ||
10 | cp docs/nagnu.8 $out/share/man/man8 | ||
11 | ''; | ||
12 | }) | ||
diff --git a/fetched/nagnu.json b/pkgs/nagnu/nagnu.json index 60a8b07..60a8b07 100644 --- a/fetched/nagnu.json +++ b/pkgs/nagnu/nagnu.json | |||
diff --git a/pkgs/pg_activity/default.nix b/pkgs/pg_activity/default.nix new file mode 100644 index 0000000..f47884a --- /dev/null +++ b/pkgs/pg_activity/default.nix | |||
@@ -0,0 +1,5 @@ | |||
1 | { python2Packages, fetchedGithub }: | ||
2 | with python2Packages; | ||
3 | buildPythonApplication (fetchedGithub ./pg_activity.json // { | ||
4 | propagatedBuildInputs = [ psycopg2 psutil ]; | ||
5 | }) | ||
diff --git a/fetched/pg_activity.json b/pkgs/pg_activity/pg_activity.json index 4485d9a..4485d9a 100644 --- a/fetched/pg_activity.json +++ b/pkgs/pg_activity/pg_activity.json | |||
diff --git a/pkgs/pgloader/default.nix b/pkgs/pgloader/default.nix new file mode 100644 index 0000000..e4f24ea --- /dev/null +++ b/pkgs/pgloader/default.nix | |||
@@ -0,0 +1,16 @@ | |||
1 | { stdenv, fetchedGithub, sbcl, cacert, sqlite, freetds, libzip, curl, git, openssl, makeWrapper }: | ||
2 | stdenv.mkDerivation (fetchedGithub ./pgloader.json // { | ||
3 | buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ]; | ||
4 | LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; | ||
5 | buildPhase = '' | ||
6 | export PATH=$PATH:$out/bin | ||
7 | export HOME=$TMPDIR | ||
8 | make pgloader | ||
9 | ''; | ||
10 | dontStrip = true; | ||
11 | enableParallelBuilding = false; | ||
12 | installPhase = '' | ||
13 | install -Dm755 build/bin/pgloader "$out/bin/pgloader" | ||
14 | wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" | ||
15 | ''; | ||
16 | }) | ||
diff --git a/fetched/pgloader.json b/pkgs/pgloader/pgloader.json index dfe310b..dfe310b 100644 --- a/fetched/pgloader.json +++ b/pkgs/pgloader/pgloader.json | |||
diff --git a/pkgs/telegram-cli/default.nix b/pkgs/telegram-cli/default.nix new file mode 100644 index 0000000..4b82b35 --- /dev/null +++ b/pkgs/telegram-cli/default.nix | |||
@@ -0,0 +1,16 @@ | |||
1 | { stdenv, fetchedGithub, pkgconfig, libevent, lua, jansson, openssl, readline, zlib, libconfig }: | ||
2 | stdenv.mkDerivation (fetchedGithub ./telegram-cli.json // { | ||
3 | patches = [ | ||
4 | ./telegram-cli.patch | ||
5 | ]; | ||
6 | buildInputs = [ pkgconfig libevent lua jansson openssl readline zlib libconfig ]; | ||
7 | preBuild = '' | ||
8 | sed -i -e 's@"/etc/" PROG_NAME "/server.pub"@"'$out'/etc/server.pub"@' main.c | ||
9 | ''; | ||
10 | installPhase = '' | ||
11 | mkdir -p $out | ||
12 | install -Dm755 bin/telegram-cli $out/bin/telegram-cli | ||
13 | install -Dm644 tg-server.pub $out/etc/server.pub | ||
14 | install -Dm644 debian/telegram-cli.8 $out/man/man8/telegram-cli.8 | ||
15 | ''; | ||
16 | }) | ||
diff --git a/fetched/telegram-cli.json b/pkgs/telegram-cli/telegram-cli.json index 53e0a7b..53e0a7b 100644 --- a/fetched/telegram-cli.json +++ b/pkgs/telegram-cli/telegram-cli.json | |||
diff --git a/patches/telegram-cli.patch b/pkgs/telegram-cli/telegram-cli.patch index 2d2b7b0..2d2b7b0 100644 --- a/patches/telegram-cli.patch +++ b/pkgs/telegram-cli/telegram-cli.patch | |||
diff --git a/pkgs/telegram-history-dump/default.nix b/pkgs/telegram-history-dump/default.nix new file mode 100644 index 0000000..9215d5b --- /dev/null +++ b/pkgs/telegram-history-dump/default.nix | |||
@@ -0,0 +1,9 @@ | |||
1 | { stdenv, ruby, fetchedGithub }: | ||
2 | stdenv.mkDerivation (fetchedGithub ./telegram-history-dump.json // { | ||
3 | installPhase = '' | ||
4 | mkdir -p $out/lib $out/bin | ||
5 | cp -a $src $out/lib/telegram-history-dump | ||
6 | ln -s $out/lib/telegram-history-dump/telegram-history-dump.rb $out/bin/telegram-history-dump | ||
7 | ''; | ||
8 | buildInputs = [ ruby ]; | ||
9 | }) | ||
diff --git a/fetched/telegram-history-dump.json b/pkgs/telegram-history-dump/telegram-history-dump.json index 487df73..487df73 100644 --- a/fetched/telegram-history-dump.json +++ b/pkgs/telegram-history-dump/telegram-history-dump.json | |||