]>
Commit | Line | Data |
---|---|---|
177da38b IB |
1 | with import <nixpkgs> {}; |
2 | let | |
b7cb5556 | 3 | mypkgs = {}; |
e8ac4a54 IB |
4 | postHook = '' |
5 | header() { | |
6 | echo -ne "\033[1;36m" | |
7 | echo -n "$1" | |
8 | echo -e "\033[0m" | |
9 | } | |
10 | ||
11 | echoCmd() { | |
12 | printf "\033[1;34m%s:\033[0m" "$1" | |
13 | shift | |
14 | printf ' %q' "$@" | |
15 | echo | |
16 | } | |
17 | ''; | |
18 | ||
177da38b IB |
19 | fetchedGithub = path: |
20 | let | |
21 | json = lib.importJSON path; | |
22 | in rec { | |
23 | version = json.tag; | |
24 | name = "${json.meta.name}-${version}"; | |
25 | src = fetchFromGitHub json.github; | |
26 | }; | |
27 | ||
6b53d116 IB |
28 | fetchedGit = path: |
29 | let | |
30 | json = lib.importJSON path; | |
31 | in rec { | |
32 | version = json.tag; | |
33 | name = "${json.meta.name}-${version}"; | |
34 | src = fetchgit json.git; | |
35 | }; | |
36 | ||
90a37f5e | 37 | mypkgs.ledger = (ledger.override { boost = boost166; }).overrideAttrs (_old: |
177da38b IB |
38 | fetchedGithub ./fetched/ledger.json // { |
39 | postInstall = ""; | |
40 | } | |
41 | ); | |
42 | ||
90a37f5e | 43 | mypkgs.taskwarrior = taskwarrior.overrideAttrs (old: rec { |
c7aeff7d | 44 | postInstall = ''${old.postInstall} |
177da38b IB |
45 | mkdir -p "$out/share/vim/vimfiles/ftdetect" |
46 | mkdir -p "$out/share/vim/vimfiles/syntax" | |
47 | ln -s "../../../../share/doc/task/scripts/vim/ftdetect/task.vim" "$out/share/vim/vimfiles/ftdetect/" | |
48 | ln -s "../../../../share/doc/task/scripts/vim/syntax/taskrc.vim" "$out/share/vim/vimfiles/syntax/" | |
49 | ln -s "../../../../share/doc/task/scripts/vim/syntax/taskdata.vim" "$out/share/vim/vimfiles/syntax/" | |
50 | ln -s "../../../../share/doc/task/scripts/vim/syntax/taskedit.vim" "$out/share/vim/vimfiles/syntax/" | |
51 | ''; | |
52 | }); | |
53 | ||
90a37f5e | 54 | mypkgs.vit = (vit.override { taskwarrior = mypkgs.taskwarrior; }).overrideAttrs (old: |
177da38b | 55 | fetchedGithub ./fetched/vit.json // { |
c7aeff7d | 56 | buildInputs = old.buildInputs ++ [perlPackages.TryTiny perlPackages.TextCharWidth]; |
177da38b IB |
57 | } |
58 | ); | |
59 | ||
b7cb5556 | 60 | mypkgs.weboob = pythonPackages.weboob.overrideAttrs (old: rec { |
c7aeff7d | 61 | postInstall = ''${old.postInstall or ""} |
ac6bfec2 IB |
62 | mkdir -p $out/share/bash-completion/completions/ |
63 | cp tools/weboob_bash_completion $out/share/bash-completion/completions/weboob | |
64 | ''; | |
65 | }); | |
66 | ||
90a37f5e | 67 | mypkgs.slrn = slrn.overrideAttrs (old: rec { |
ac6bfec2 IB |
68 | version = "1.0.3a"; |
69 | name = "slrn-${version}"; | |
70 | src = fetchurl { | |
71 | url = "http://www.jedsoft.org/releases/slrn/slrn-${version}.tar.bz2"; | |
72 | sha256 = "1b1d9iikr60w0vq86y9a0l4gjl0jxhdznlrdp3r405i097as9a1v"; | |
73 | }; | |
c7aeff7d | 74 | configureFlags = old.configureFlags ++ [ "--with-slrnpull" ]; |
ac6bfec2 IB |
75 | }); |
76 | ||
90a37f5e | 77 | mypkgs.ldapvi = ldapvi.overrideAttrs (old: fetchedGit ./fetched/ldapvi.json); |
6b53d116 IB |
78 | |
79 | nixos = import ./nixos_tools.nix {}; | |
80 | ||
90a37f5e | 81 | mypkgs.pass = (pass.withExtensions (exts: [ exts.pass-otp ])).overrideAttrs (old: |
6b53d116 | 82 | fetchedGit ./fetched/pass.json // { |
c7aeff7d | 83 | patches = old.patches ++ [ ./patches/pass-fix-pass-init.patch ]; |
6b53d116 IB |
84 | } |
85 | ); | |
29120e77 | 86 | |
90a37f5e | 87 | mypkgs.profanity = (profanity.override { |
3936ddc5 IB |
88 | notifySupport = true; |
89 | inherit libnotify gpgme gdk_pixbuf; | |
90 | python = python3; | |
c7aeff7d IB |
91 | }).overrideAttrs (old: rec { |
92 | configureFlags = old.configureFlags ++ [ "--enable-plugins" ]; | |
3936ddc5 IB |
93 | }); |
94 | ||
90a37f5e | 95 | mypkgs.weechat = weechat.override { |
3936ddc5 IB |
96 | configure = { availablePlugins, ... }: { |
97 | plugins = with availablePlugins; [ | |
98 | (python.withPackages (ps: with ps; [websocket_client emoji])) | |
99 | perl | |
100 | ]; | |
101 | }; | |
102 | }; | |
103 | ||
d0f80881 | 104 | buildPerlPackage = callPackage <nixpkgs/pkgs/development/perl-modules/generic> { }; |
b7cb5556 | 105 | mypkgs.note = buildPerlPackage rec { |
d0f80881 IB |
106 | name = "note-1.3.26"; |
107 | src = fetchurl { | |
108 | url = "mirror://cpan/authors/id/T/TL/TLINDEN/${name}.tar.gz"; | |
109 | sha256 = "1h645rnb5vpms48fcyzvp7cwwcbf9k5xq49w2bpniyzzgk2brjrq"; | |
110 | }; | |
111 | outputs = ["out" "man"]; | |
444be914 | 112 | propragatedBuildInputs = [ perlPackages.YAML ]; |
d0f80881 IB |
113 | meta = with stdenv.lib; { |
114 | description = "A perl script for maintaining notes"; | |
115 | homepage = http://www.daemon.de/NOTE; | |
116 | license = licenses.gpl3; | |
117 | maintainers = with maintainers; [ { name = "T.v.Dein"; email = "tlinden@cpan.org"; } ]; | |
118 | platforms = platforms.unix; | |
119 | }; | |
120 | }; | |
121 | ||
b7cb5556 | 122 | mypkgs.terminal_velocity = with python2Packages; buildPythonApplication rec { |
d0f80881 IB |
123 | pname = "terminal-velocity-git"; |
124 | version = "0.2.0"; | |
125 | ||
126 | patches = [ | |
127 | # FIXME: update this patch when version changes | |
128 | ./patches/terminal_velocity_fix_build.patch | |
129 | ./patches/terminal_velocity_sort_found_notes.patch | |
130 | ]; | |
131 | ||
132 | propagatedBuildInputs = [ chardet urwid sh pyyaml ]; | |
133 | buildInputs = [ m2r restructuredtext_lint pygments ]; | |
134 | ||
135 | src = fetchPypi { | |
136 | inherit pname version; | |
137 | sha256 = "13yrkcmvh5h5fwnai61sbmqkrjyisz08n62pq0ada2lyyqf7g6b9"; | |
138 | }; | |
139 | }; | |
45cb532f | 140 | |
b7cb5556 | 141 | mypkgs.mtop = buildPerlPackage rec { |
45cb532f IB |
142 | name = "mtop-${version}"; |
143 | version = "0.6.6"; | |
144 | src = fetchurl { | |
145 | url = "http://downloads.sourceforge.net/project/mtop/mtop/v${version}/mtop-${version}.tar.gz"; | |
146 | sha256 = "0x0x5300b1j9i0xxk8rsrki0pspyzj2vylhzv8qg3l6j26aw0zrf"; | |
147 | }; | |
148 | outputs = ["out"]; | |
149 | buildInputs = [ perlPackages.DBI perlPackages.DBDmysql perlPackages.Curses ]; | |
150 | ||
151 | postInstall = '' | |
152 | cd "$out" | |
153 | preConfigure || true | |
154 | ''; | |
155 | meta = with stdenv.lib; { | |
156 | description = "MySQL top (monitor and examine slow queries)"; | |
157 | homepage = http://mtop.sourceforge.net/; | |
158 | license = licenses.gpl3; | |
159 | maintainers = with maintainers; [ { name = "Marc Prewitt"; email = "mprewitt@chelsea.net"; } ]; | |
160 | platforms = platforms.unix; | |
161 | }; | |
162 | }; | |
163 | ||
b7cb5556 | 164 | mypkgs.tiv = buildPerlPackage rec { |
9f7e0ed0 IB |
165 | name = "tiv-${version}"; |
166 | version = "2015"; | |
167 | src = fetchurl { | |
168 | url = "http://xyne.archlinux.ca/projects/tiv/src/tiv-${version}.tar.xz"; | |
169 | sha256 = "1vq073v7z7vmcd57lhs4rf4jasji69cpjgkz4dykp94a77p1qq90"; | |
170 | }; | |
171 | outputs = ["out"]; | |
172 | buildInputs = [ perlPackages.PerlMagick ]; | |
173 | perlPreHookScript = ./hooks/tiv_builder.sh; | |
174 | perlPreHook = '' | |
175 | source ${perlPreHookScript} | |
176 | ''; | |
177 | installPhase = '' | |
178 | install -Dm755 tiv "$out/bin/tiv" | |
179 | ''; | |
180 | }; | |
181 | ||
b7cb5556 | 182 | mypkgs.cnagios = stdenv.mkDerivation (fetchedGithub ./fetched/cnagios.json // rec { |
364c87ba IB |
183 | configureFlags = [ |
184 | "--with-etc-dir=/etc/cnagios" | |
185 | "--with-var-dir=/var/lib/naemon" | |
186 | "--with-nagios-data=4" | |
187 | ]; | |
188 | ||
189 | prePatch = '' | |
190 | sed -i -e "s/-lcurses/-lncurses/" Makefile.in | |
191 | ''; | |
192 | installPhase = '' | |
193 | install -dm755 $out/share/doc/cnagios | |
194 | install -Dm644 cnagiosrc $out/share/doc/cnagios/ | |
195 | install -Dm644 cnagios.help $out/share/doc/cnagios/ | |
196 | install -Dm644 cnagios.pl $out/share/doc/cnagios/ | |
197 | install -dm755 $out/bin | |
198 | install -Dm755 cnagios $out/bin/ | |
199 | ''; | |
200 | propagatedBuildInputs = [ perl ncurses ]; | |
201 | }); | |
202 | ||
b7cb5556 | 203 | mypkgs.nagios-cli = python2Packages.buildPythonApplication (fetchedGithub ./fetched/nagios-cli.json); |
a54bdff3 | 204 | |
b7cb5556 | 205 | mypkgs.pg_activity = with python2Packages; buildPythonApplication (fetchedGithub ./fetched/pg_activity.json // rec { |
86f4a644 IB |
206 | propagatedBuildInputs = [ psycopg2 psutil ]; |
207 | }); | |
b693a794 | 208 | |
b7cb5556 | 209 | mypkgs.pgloader = stdenv.mkDerivation (fetchedGithub ./fetched/pgloader.json // rec { |
b693a794 IB |
210 | buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ]; |
211 | LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; | |
212 | buildPhase = '' | |
213 | export PATH=$PATH:$out/bin | |
214 | export HOME=$TMPDIR | |
215 | make pgloader | |
216 | ''; | |
217 | dontStrip = true; | |
218 | enableParallelBuilding = false; | |
219 | installPhase = '' | |
220 | install -Dm755 build/bin/pgloader "$out/bin/pgloader" | |
221 | wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}" | |
222 | ''; | |
223 | }); | |
224 | ||
b7cb5556 | 225 | mypkgs.pelican = python3Packages.pelican.overrideAttrs(old: fetchedGithub ./fetched/pelican.json // rec { |
dab1955f IB |
226 | propagatedBuildInputs = old.propagatedBuildInputs ++ [ python3Packages.pyyaml ]; |
227 | }); | |
228 | ||
107eeb7c IB |
229 | mypkgs.elinks = elinks.overrideAttrs (old: |
230 | fetchedGithub ./fetched/elinks.json // rec { | |
231 | preConfigure = ''sh autogen.sh''; | |
232 | buildInputs = old.buildInputs ++ [ gettext automake autoconf ]; | |
233 | configureFlags = [ | |
234 | "--disable-smb" "--without-x" "--enable-cgi" | |
235 | "--enable-leds" "--enable-256-colors" | |
236 | "--enable-html-highlight" "--with-zlib" | |
237 | ]; | |
238 | patches = []; | |
239 | } | |
240 | ); | |
45cb532f IB |
241 | # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh |
242 | # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks | |
177da38b | 243 | in |
b7cb5556 | 244 | mypkgs // { |
ac6bfec2 | 245 | inherit nix-prefetch-scripts; |
9f7e0ed0 | 246 | inherit nix-generate-from-cpan; |
b7cb5556 | 247 | inherit timewarrior; |
ac6bfec2 | 248 | inherit sc-im; |
6b53d116 IB |
249 | inherit pal; |
250 | inherit duplicity duply; | |
251 | inherit pdftk; | |
252 | inherit googler; | |
253 | inherit jrnl; | |
254 | inherit apg; | |
255 | inherit newsboat; | |
256 | inherit vcsh; | |
257 | inherit xmr-stak; | |
258 | inherit urlwatch; | |
3936ddc5 | 259 | inherit ranger; |
b7cb5556 | 260 | inherit irssi; |
9106eaf4 IB |
261 | inherit abook khard khal; |
262 | inherit graphicsmagick; | |
263 | inherit youtube-dl; | |
892cb808 IB |
264 | inherit ncmpc; |
265 | inherit cadaver; | |
266 | inherit mairix notmuch; | |
267 | inherit ctags; | |
268 | inherit s3cmd; | |
269 | inherit solc; # solidity | |
270 | inherit rtorrent; | |
271 | inherit strace; | |
272 | inherit vdirsyncer; | |
273 | inherit w3m lynx links; | |
274 | inherit gitRepo; | |
275 | inherit valgrind; | |
dab1955f IB |
276 | inherit iotop iperf; |
277 | inherit keybase; | |
278 | inherit bogofilter; | |
c7aeff7d IB |
279 | # todo: lx* ?, unrar, unzip, zeromq? |
280 | #inherit nextcloud-client; | |
6b53d116 | 281 | #inherit nixos; |
177da38b | 282 | } |