From a2230e848bc85e484ef14163ac90fdb7045855f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 26 Apr 2019 02:35:33 +0200 Subject: Move more packages to separate files --- default.nix | 138 ++------------------- fetched/cnagios.json | 15 --- fetched/mutt-ics.json | 15 --- fetched/nagios-cli.json | 15 --- fetched/nagnu.json | 15 --- fetched/pg_activity.json | 15 --- fetched/pgloader.json | 15 --- fetched/telegram-cli.json | 15 --- fetched/telegram-history-dump.json | 15 --- patches/muttprint_0.73-4.diff.gz | Bin 16525 -> 0 bytes patches/muttprint_regex.patch | 11 -- patches/muttprint_two_edge.patch | 19 --- patches/telegram-cli.patch | 90 -------------- pkgs/cnagios/cnagios.json | 15 +++ pkgs/cnagios/default.nix | 22 ++++ pkgs/mutt-ics/default.nix | 5 + pkgs/mutt-ics/mutt-ics.json | 15 +++ pkgs/muttprint/0.73-4.diff.gz | Bin 0 -> 16525 bytes pkgs/muttprint/default.nix | 44 +++++++ pkgs/muttprint/regex.patch | 11 ++ pkgs/muttprint/two_edge.patch | 19 +++ pkgs/nagios-cli/default.nix | 2 + pkgs/nagios-cli/nagios-cli.json | 15 +++ pkgs/nagnu/default.nix | 12 ++ pkgs/nagnu/nagnu.json | 15 +++ pkgs/pg_activity/default.nix | 5 + pkgs/pg_activity/pg_activity.json | 15 +++ pkgs/pgloader/default.nix | 16 +++ pkgs/pgloader/pgloader.json | 15 +++ pkgs/telegram-cli/default.nix | 16 +++ pkgs/telegram-cli/telegram-cli.json | 15 +++ pkgs/telegram-cli/telegram-cli.patch | 90 ++++++++++++++ pkgs/telegram-history-dump/default.nix | 9 ++ .../telegram-history-dump.json | 15 +++ 34 files changed, 380 insertions(+), 369 deletions(-) delete mode 100644 fetched/cnagios.json delete mode 100644 fetched/mutt-ics.json delete mode 100644 fetched/nagios-cli.json delete mode 100644 fetched/nagnu.json delete mode 100644 fetched/pg_activity.json delete mode 100644 fetched/pgloader.json delete mode 100644 fetched/telegram-cli.json delete mode 100644 fetched/telegram-history-dump.json delete mode 100644 patches/muttprint_0.73-4.diff.gz delete mode 100644 patches/muttprint_regex.patch delete mode 100644 patches/muttprint_two_edge.patch delete mode 100644 patches/telegram-cli.patch create mode 100644 pkgs/cnagios/cnagios.json create mode 100644 pkgs/cnagios/default.nix create mode 100644 pkgs/mutt-ics/default.nix create mode 100644 pkgs/mutt-ics/mutt-ics.json create mode 100644 pkgs/muttprint/0.73-4.diff.gz create mode 100644 pkgs/muttprint/default.nix create mode 100644 pkgs/muttprint/regex.patch create mode 100644 pkgs/muttprint/two_edge.patch create mode 100644 pkgs/nagios-cli/default.nix create mode 100644 pkgs/nagios-cli/nagios-cli.json create mode 100644 pkgs/nagnu/default.nix create mode 100644 pkgs/nagnu/nagnu.json create mode 100644 pkgs/pg_activity/default.nix create mode 100644 pkgs/pg_activity/pg_activity.json create mode 100644 pkgs/pgloader/default.nix create mode 100644 pkgs/pgloader/pgloader.json create mode 100644 pkgs/telegram-cli/default.nix create mode 100644 pkgs/telegram-cli/telegram-cli.json create mode 100644 pkgs/telegram-cli/telegram-cli.patch create mode 100644 pkgs/telegram-history-dump/default.nix create mode 100644 pkgs/telegram-history-dump/telegram-history-dump.json diff --git a/default.nix b/default.nix index 38d7e0b..7b2ca98 100644 --- a/default.nix +++ b/default.nix @@ -74,55 +74,20 @@ let }; }; + mypkgs.cnagios = callPackage ./pkgs/cnagios { inherit fetchedGithub; }; mypkgs.mtop = callPackage ./pkgs/mtop {}; + mypkgs.muttprint = callPackage ./pkgs/muttprint {}; + mypkgs.mutt-ics = callPackage ./pkgs/mutt-ics { inherit fetchedGithub; }; + mypkgs.nagios-cli = callPackage ./pkgs/nagios-cli { inherit fetchedGithub; }; + #mypkgs.nagnu = callPackage ./pkgs/nagnu { inherit fetchedGithub; }; mypkgs.note = callPackage ./pkgs/note {}; + mypkgs.pg_activity = callPackage ./pkgs/pg_activity { inherit fetchedGithub; }; + mypkgs.pgloader = callPackage ./pkgs/pgloader { inherit fetchedGithub; }; + mypkgs.telegram-cli = callPackage ./pkgs/telegram-cli { inherit fetchedGithub; }; + mypkgs.telegram-history-dump = callPackage ./pkgs/telegram-history-dump { inherit fetchedGithub; }; mypkgs.terminal-velocity = callPackage ./pkgs/terminal-velocity {}; mypkgs.tiv = callPackage ./pkgs/tiv {}; - mypkgs.cnagios = stdenv.mkDerivation (fetchedGithub ./fetched/cnagios.json // rec { - configureFlags = [ - "--with-etc-dir=/etc/cnagios" - "--with-var-dir=/var/lib/naemon" - "--with-status-file=/var/lib/naemon/status.dat" - "--with-nagios-data=4" - ]; - - prePatch = '' - sed -i -e "s/-lcurses/-lncurses/" Makefile.in - ''; - installPhase = '' - install -dm755 $out/share/doc/cnagios - install -Dm644 cnagiosrc $out/share/doc/cnagios/ - install -Dm644 cnagios.help $out/share/doc/cnagios/ - install -Dm644 cnagios.pl $out/share/doc/cnagios/ - install -dm755 $out/bin - install -Dm755 cnagios $out/bin/ - ''; - propagatedBuildInputs = [ perl ncurses ]; - }); - - mypkgs.nagios-cli = python2Packages.buildPythonApplication (fetchedGithub ./fetched/nagios-cli.json); - - mypkgs.pg_activity = with python2Packages; buildPythonApplication (fetchedGithub ./fetched/pg_activity.json // rec { - propagatedBuildInputs = [ psycopg2 psutil ]; - }); - - mypkgs.pgloader = stdenv.mkDerivation (fetchedGithub ./fetched/pgloader.json // rec { - buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ]; - LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; - buildPhase = '' - export PATH=$PATH:$out/bin - export HOME=$TMPDIR - make pgloader - ''; - dontStrip = true; - enableParallelBuilding = false; - installPhase = '' - install -Dm755 build/bin/pgloader "$out/bin/pgloader" - wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}" - ''; - }); - mypkgs.pelican = python3Packages.pelican.overrideAttrs(old: fetchedGithub ./fetched/pelican.json // rec { propagatedBuildInputs = old.propagatedBuildInputs ++ [ python3Packages.pyyaml ]; }); @@ -147,18 +112,6 @@ let } ); - # mypkgs.nagnu = stdenv.mkDerivation (fetchedGithub ./fetched/nagnu.json // rec { - # buildInputs = [ ncurses curl ]; - # installPhase = '' - # mkdir -p $out/bin - # cp nagnu $out/bin - # mkdir -p $out/share/doc/nagnu - # cp nagnu.conf.sample $out/share/doc/nagnu - # mkdir -p $out/share/man/man8 - # cp docs/nagnu.8 $out/share/man/man8 - # ''; - # }); - mypkgs.goaccess = goaccess.overrideAttrs(old: rec { name = "goaccess-${version}"; version = "1.3"; @@ -170,79 +123,6 @@ let buildInputs = old.buildInputs ++ [ tokyocabinet bzip2 ]; }); - mypkgs.mutt-ics = with python3Packages; buildPythonApplication (fetchedGithub ./fetched/mutt-ics.json // rec { - propagatedBuildInputs = [ icalendar ]; - }); - - mypkgs.telegram-cli = stdenv.mkDerivation (fetchedGithub ./fetched/telegram-cli.json // rec { - patches = [ - ./patches/telegram-cli.patch - ]; - buildInputs = [ pkgconfig libevent lua jansson openssl readline zlib libconfig ]; - preBuild = '' - sed -i -e 's@"/etc/" PROG_NAME "/server.pub"@"'$out'/etc/server.pub"@' main.c - ''; - installPhase = '' - mkdir -p $out - install -Dm755 bin/telegram-cli $out/bin/telegram-cli - install -Dm644 tg-server.pub $out/etc/server.pub - install -Dm644 debian/telegram-cli.8 $out/man/man8/telegram-cli.8 - ''; - }); - - mypkgs.telegram-history-dump = stdenv.mkDerivation (fetchedGithub ./fetched/telegram-history-dump.json // rec { - installPhase = '' - mkdir -p $out/lib $out/bin - cp -a $src $out/lib/telegram-history-dump - ln -s $out/lib/telegram-history-dump/telegram-history-dump.rb $out/bin/telegram-history-dump - ''; - buildInputs = [ ruby ]; - }); - - mypkgs.muttprint = stdenv.mkDerivation rec { - name = "muttprint-${version}"; - version = "0.73"; - src = fetchurl { - url = "http://downloads.sf.net/muttprint/${name}.tar.gz"; - sha256 = "1dny4niyibfgazwlzfcnb37jy6k140rs6baaj629z12rmahfdavw"; - }; - patches = [ - ./patches/muttprint_0.73-4.diff.gz - ./patches/muttprint_regex.patch - ./patches/muttprint_two_edge.patch - ]; - preConfigure = '' - aclocal - automake --add-missing --copy - autoconf - ''; - preBuild = '' - cd pics - convert -flop BabyTuX.eps BabyTuX.eps - for i in BabyTuX_color.eps BabyTuX.eps Debian_color.eps \ - Debian.eps Gentoo.eps Gentoo_color.eps ; do - convert $i $(basename $i .eps).png - done - convert penguin.eps penguin.jpg - cd .. - ''; - postInstall = '' - perlFlags= - for i in $(IFS=:; echo $PERL5LIB); do - perlFlags="$perlFlags -I$i" - done - - sed -i "$out/bin/muttprint" -e "s|^#\!\(.*[ /]perl.*\)$|#\!\1$perlFlags|" - sed -i "$out/bin/muttprint" -e "s|ENV{HOME}/.muttprintrc|ENV{XDG_CONFIG_HOME}/muttprint/muttprintrc|" - - wrapProgram $out/bin/muttprint \ - --prefix PATH : ${lib.makeBinPath [ psutils dialog - (texlive.combine { inherit (texlive) scheme-basic utopia fancyvrb lastpage marvosym ucs cm-super; }) ]} - ''; - buildInputs = [ makeWrapper automake autoconf imagemagick ghostscript perl ] ++ - (with perlPackages; [ TimeDate FileWhich TextIconv ]); - }; - mypkgs.yarn2nix = yarn2nixPackage.yarn2nix; mypkgs.cardano = let diff --git a/fetched/cnagios.json b/fetched/cnagios.json deleted file mode 100644 index 4c1c385..0000000 --- a/fetched/cnagios.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "3bd27fb-master", - "meta": { - "name": "cnagios", - "url": "https://github.com/dannywarren/cnagios", - "branch": "master" - }, - "github": { - "owner": "dannywarren", - "repo": "cnagios", - "rev": "3bd27fb40e68f61ffd01bea6234b919a667b6fe4", - "sha256": "0iy5pmlcz6y3if72nav22xqxniiv1v8ywi0927m6s459hkw5n2rb", - "fetchSubmodules": true - } -} diff --git a/fetched/mutt-ics.json b/fetched/mutt-ics.json deleted file mode 100644 index ae8ed37..0000000 --- a/fetched/mutt-ics.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "d291187-master", - "meta": { - "name": "mutt-ics", - "url": "https://github.com/dmedvinsky/mutt-ics", - "branch": "master" - }, - "github": { - "owner": "dmedvinsky", - "repo": "mutt-ics", - "rev": "d29118788f291f67d34fefa6eda9f95846a2fe34", - "sha256": "0kqzngsvzjq5gpf60jhfmb2xzjznvk172khf4dlcb72n3ak4rb92", - "fetchSubmodules": true - } -} diff --git a/fetched/nagios-cli.json b/fetched/nagios-cli.json deleted file mode 100644 index fc91227..0000000 --- a/fetched/nagios-cli.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "edc51ea-master", - "meta": { - "name": "nagios-cli", - "url": "https://github.com/tehmaze/nagios-cli", - "branch": "master" - }, - "github": { - "owner": "tehmaze", - "repo": "nagios-cli", - "rev": "edc51eaccf1086bb4469ce45c5e5155f2d71a2f9", - "sha256": "1qw5fv4niz079zqwmfr3kzjv8cc31rbhi9whdbv9c32qdi3h7vsp", - "fetchSubmodules": true - } -} diff --git a/fetched/nagnu.json b/fetched/nagnu.json deleted file mode 100644 index 60a8b07..0000000 --- a/fetched/nagnu.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "c7e65fc-master", - "meta": { - "name": "nagnu", - "url": "https://github.com/frlen/nagnu", - "branch": "master" - }, - "github": { - "owner": "frlen", - "repo": "nagnu", - "rev": "c7e65fc02f46a3756a4cc47953ea2f3e57a84728", - "sha256": "1i2jm8ibvqcc734daamnzc3hx8q0nsry1x12q0kr5yvcsdjjgyy3", - "fetchSubmodules": true - } -} diff --git a/fetched/pg_activity.json b/fetched/pg_activity.json deleted file mode 100644 index 4485d9a..0000000 --- a/fetched/pg_activity.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "v1.4.0", - "meta": { - "name": "pg_activity", - "url": "https://github.com/julmon/pg_activity/", - "branch": "refs/tags/v1.4.0" - }, - "github": { - "owner": "julmon", - "repo": "pg_activity", - "rev": "f26ae614c204254a805309026eebd5e9230b0214", - "sha256": "1bmvgrmna7vz2a6vknxm0k19vl9x7l6hn6vpfd7jgd53rz7c9w5p", - "fetchSubmodules": true - } -} diff --git a/fetched/pgloader.json b/fetched/pgloader.json deleted file mode 100644 index dfe310b..0000000 --- a/fetched/pgloader.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "v3.5.2", - "meta": { - "name": "pgloader", - "url": "https://github.com/dimitri/pgloader", - "branch": "refs/tags/v3.5.2" - }, - "github": { - "owner": "dimitri", - "repo": "pgloader", - "rev": "63af7e7373975391446dcae151f5c61564849025", - "sha256": "1rd0k1x7ml6b6x526brachm13v51vx5ikpg64c8k8j29cskq2vqa", - "fetchSubmodules": true - } -} diff --git a/fetched/telegram-cli.json b/fetched/telegram-cli.json deleted file mode 100644 index 53e0a7b..0000000 --- a/fetched/telegram-cli.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "6547c0b-master", - "meta": { - "name": "telegram-cli", - "url": "https://github.com/vysheng/tg", - "branch": "master" - }, - "github": { - "owner": "vysheng", - "repo": "tg", - "rev": "6547c0b21b977b327b3c5e8142963f4bc246187a", - "sha256": "07sss5cnw2ygd7mp8f5532lmj7qm6ywqf4cjaq5g13i8igzqzwzj", - "fetchSubmodules": true - } -} diff --git a/fetched/telegram-history-dump.json b/fetched/telegram-history-dump.json deleted file mode 100644 index 487df73..0000000 --- a/fetched/telegram-history-dump.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "468ea91-master", - "meta": { - "name": "telegram-history-dump", - "url": "https://github.com/tvdstaaij/telegram-history-dump", - "branch": "master" - }, - "github": { - "owner": "tvdstaaij", - "repo": "telegram-history-dump", - "rev": "468ea91e543529b54bc2c5ea28b1ea17f362fd3e", - "sha256": "1wmwiqacfa56bmwx50njnb15cg0fy6rbdrmrjd4xfbh8bs6yp0gh", - "fetchSubmodules": true - } -} diff --git a/patches/muttprint_0.73-4.diff.gz b/patches/muttprint_0.73-4.diff.gz deleted file mode 100644 index c4f3cef..0000000 Binary files a/patches/muttprint_0.73-4.diff.gz and /dev/null differ diff --git a/patches/muttprint_regex.patch b/patches/muttprint_regex.patch deleted file mode 100644 index e99c4a2..0000000 --- a/patches/muttprint_regex.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/muttprint 2015-07-21 11:18:04.219578426 +1200 -+++ b/muttprint 2015-07-21 11:18:53.906243779 +1200 -@@ -1635,7 +1635,7 @@ - open (AUX, "$auxfile") or fatalError "Could not open $auxfile:\n$!"; - - while () { -- ($numberOfPages) = /\\newlabel{LastPage}{{}{(\d+)}}/; -+ ($numberOfPages) = /\\newlabel\{LastPage}\{\{}\{(\d+)}}/; - } - - close AUX or fatalError "Could not close $auxfile:\n$!"; diff --git a/patches/muttprint_two_edge.patch b/patches/muttprint_two_edge.patch deleted file mode 100644 index 4a7290d..0000000 --- a/patches/muttprint_two_edge.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/muttprint 2016-05-05 13:48:50.515950744 +1200 -+++ b/muttprint 2016-05-05 13:52:10.722623902 +1200 -@@ -643,14 +643,14 @@ - if ($Config{PAPERSAVE} eq "on") { - if ($useCups) { - $Config{PRINT_COMMAND} =~ -- s/\$CUPS_OPTIONS/ -o sides=two-sided-long-edge \$CUPS_OPTIONS/; -+ s/\$CUPS_OPTIONS/ -o sides=two-sided-short-edge \$CUPS_OPTIONS/; - } else { # no cups - modifyPS("landscape"); - } - } else { # no papersave - if ($useCups) { - $Config{PRINT_COMMAND} =~ -- s/\$CUPS_OPTIONS/ -o sides=two-sided-short-edge \$CUPS_OPTIONS/; -+ s/\$CUPS_OPTIONS/ -o sides=two-sided-long-edge \$CUPS_OPTIONS/; - } else { # no cups - modifyPS("portrait"); - } diff --git a/patches/telegram-cli.patch b/patches/telegram-cli.patch deleted file mode 100644 index 2d2b7b0..0000000 --- a/patches/telegram-cli.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff --git a/tgl/crypto/rsa_pem_openssl.c b/tgl/crypto/rsa_pem_openssl.c -index db653f2..5e6a697 100644 ---- a/tgl/crypto/rsa_pem_openssl.c -+++ b/tgl/crypto/rsa_pem_openssl.c -@@ -36,6 +36,12 @@ TGLC_WRAPPER_ASSOC(rsa,RSA) - // TODO: Refactor crucial struct-identity into its own header. - TGLC_WRAPPER_ASSOC(bn,BIGNUM) - -+/* -+ * Since OpenSSL version 1.1.0 the RSA struct (rsa_st) is opaque, -+ * see also https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes -+ */ -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) -+ - TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) { - RSA *ret = RSA_new (); - ret->e = unwrap_bn (TGLC_bn_new ()); -@@ -47,7 +53,30 @@ TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) { - #define RSA_GETTER(M) \ - TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \ - return wrap_bn (unwrap_rsa (key)->M); \ -- } \ -+ } -+ -+#else // OPENSSL_VERSION_NUMBER -+ -+TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) { -+ RSA *ret = RSA_new (); -+ BIGNUM *ret_e = unwrap_bn (TGLC_bn_new ()); -+ BIGNUM *ret_n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL)); -+ RSA_set0_key (ret, ret_n, ret_e, NULL); -+ TGLC_bn_set_word (wrap_bn (ret_e), e); -+ return wrap_rsa (ret); -+} -+ -+#define RSA_GETTER(M) \ -+TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \ -+ BIGNUM *rsa_n, *rsa_e, *rsa_d; \ -+ RSA_get0_key(unwrap_rsa (key), \ -+ (const BIGNUM **) &rsa_n, \ -+ (const BIGNUM **) &rsa_e, \ -+ (const BIGNUM **) &rsa_d); \ -+ return wrap_bn (rsa_ ## M); \ -+} -+ -+#endif // OPENSSL_VERSION_NUMBER - - RSA_GETTER(n); - RSA_GETTER(e); -@@ -60,4 +89,4 @@ TGLC_rsa *TGLC_pem_read_RSAPublicKey (FILE *fp) { - return wrap_rsa (PEM_read_RSAPublicKey (fp, NULL, NULL, NULL)); - } - --#endif -+#endif // TGL_AVOID_OPENSSL -diff --git a/tgl/mtproto-utils.c b/tgl/mtproto-utils.c -index 0948bc8..cfdb216 100644 ---- a/tgl/mtproto-utils.c -+++ b/tgl/mtproto-utils.c -@@ -98,7 +98,7 @@ static unsigned long long BN2ull (TGLC_bn *b) { - if (sizeof (unsigned long) == 8) { - return TGLC_bn_get_word (b); - } else if (sizeof (unsigned long long) == 8) { -- assert (0); // As long as nobody ever uses this code, assume it is broken. -+// assert (0); // As long as nobody ever uses this code, assume it is broken. - unsigned long long tmp; - /* Here be dragons, but it should be okay due to be64toh */ - TGLC_bn_bn2bin (b, (unsigned char *) &tmp); -@@ -112,7 +112,7 @@ static void ull2BN (TGLC_bn *b, unsigned long long val) { - if (sizeof (unsigned long) == 8 || val < (1ll << 32)) { - TGLC_bn_set_word (b, val); - } else if (sizeof (unsigned long long) == 8) { -- assert (0); // As long as nobody ever uses this code, assume it is broken. -+// assert (0); // As long as nobody ever uses this code, assume it is broken. - htobe64(val); - /* Here be dragons, but it should be okay due to htobe64 */ - TGLC_bn_bin2bn ((unsigned char *) &val, 8, b); -diff --git a/tgl/tl-parser/tl-parser.c b/tgl/tl-parser/tl-parser.c -index 524b196..aeadbd2 100644 ---- a/tgl/tl-parser/tl-parser.c -+++ b/tgl/tl-parser/tl-parser.c -@@ -1903,7 +1903,7 @@ struct tl_combinator_tree *tl_parse_args134 (struct tree *T) { - //assert (S->data); - char *name = S->data; - if (!name) { -- static char s[20]; -+ static char s[21]; - sprintf (s, "%lld", lrand48 () * (1ll << 32) + lrand48 ()); - name = s; - } diff --git a/pkgs/cnagios/cnagios.json b/pkgs/cnagios/cnagios.json new file mode 100644 index 0000000..4c1c385 --- /dev/null +++ b/pkgs/cnagios/cnagios.json @@ -0,0 +1,15 @@ +{ + "tag": "3bd27fb-master", + "meta": { + "name": "cnagios", + "url": "https://github.com/dannywarren/cnagios", + "branch": "master" + }, + "github": { + "owner": "dannywarren", + "repo": "cnagios", + "rev": "3bd27fb40e68f61ffd01bea6234b919a667b6fe4", + "sha256": "0iy5pmlcz6y3if72nav22xqxniiv1v8ywi0927m6s459hkw5n2rb", + "fetchSubmodules": true + } +} 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 @@ +{ stdenv, fetchedGithub, perl, ncurses }: +stdenv.mkDerivation (fetchedGithub ./cnagios.json // { + configureFlags = [ + "--with-etc-dir=/etc/cnagios" + "--with-var-dir=/var/lib/naemon" + "--with-status-file=/var/lib/naemon/status.dat" + "--with-nagios-data=4" + ]; + + prePatch = '' + sed -i -e "s/-lcurses/-lncurses/" Makefile.in + ''; + installPhase = '' + install -dm755 $out/share/doc/cnagios + install -Dm644 cnagiosrc $out/share/doc/cnagios/ + install -Dm644 cnagios.help $out/share/doc/cnagios/ + install -Dm644 cnagios.pl $out/share/doc/cnagios/ + install -dm755 $out/bin + install -Dm755 cnagios $out/bin/ + ''; + buildInputs = [ perl ncurses ]; +}) 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 @@ +{ python3Packages, fetchedGithub }: +with python3Packages; +buildPythonApplication (fetchedGithub ./mutt-ics.json // { + propagatedBuildInputs = [ icalendar ]; +}) diff --git a/pkgs/mutt-ics/mutt-ics.json b/pkgs/mutt-ics/mutt-ics.json new file mode 100644 index 0000000..ae8ed37 --- /dev/null +++ b/pkgs/mutt-ics/mutt-ics.json @@ -0,0 +1,15 @@ +{ + "tag": "d291187-master", + "meta": { + "name": "mutt-ics", + "url": "https://github.com/dmedvinsky/mutt-ics", + "branch": "master" + }, + "github": { + "owner": "dmedvinsky", + "repo": "mutt-ics", + "rev": "d29118788f291f67d34fefa6eda9f95846a2fe34", + "sha256": "0kqzngsvzjq5gpf60jhfmb2xzjznvk172khf4dlcb72n3ak4rb92", + "fetchSubmodules": true + } +} diff --git a/pkgs/muttprint/0.73-4.diff.gz b/pkgs/muttprint/0.73-4.diff.gz new file mode 100644 index 0000000..c4f3cef Binary files /dev/null and b/pkgs/muttprint/0.73-4.diff.gz 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 @@ +{ stdenv, fetchurl, lib, psutils, dialog, texlive, makeWrapper, automake, autoconf, imagemagick, ghostscript, perl, perlPackages }: +stdenv.mkDerivation rec { + name = "muttprint-${version}"; + version = "0.73"; + src = fetchurl { + url = "http://downloads.sf.net/muttprint/${name}.tar.gz"; + sha256 = "1dny4niyibfgazwlzfcnb37jy6k140rs6baaj629z12rmahfdavw"; + }; + patches = [ + ./0.73-4.diff.gz + ./regex.patch + ./two_edge.patch + ]; + preConfigure = '' + aclocal + automake --add-missing --copy + autoconf + ''; + preBuild = '' + cd pics + convert -flop BabyTuX.eps BabyTuX.eps + for i in BabyTuX_color.eps BabyTuX.eps Debian_color.eps \ + Debian.eps Gentoo.eps Gentoo_color.eps ; do + convert $i $(basename $i .eps).png + done + convert penguin.eps penguin.jpg + cd .. + ''; + postInstall = '' + perlFlags= + for i in $(IFS=:; echo $PERL5LIB); do + perlFlags="$perlFlags -I$i" + done + + sed -i "$out/bin/muttprint" -e "s|^#\!\(.*[ /]perl.*\)$|#\!\1$perlFlags|" + sed -i "$out/bin/muttprint" -e "s|ENV{HOME}/.muttprintrc|ENV{XDG_CONFIG_HOME}/muttprint/muttprintrc|" + + wrapProgram $out/bin/muttprint \ + --prefix PATH : ${lib.makeBinPath [ psutils dialog + (texlive.combine { inherit (texlive) scheme-basic utopia fancyvrb lastpage marvosym ucs cm-super; }) ]} + ''; + buildInputs = [ makeWrapper automake autoconf imagemagick ghostscript perl ] ++ + (with perlPackages; [ TimeDate FileWhich TextIconv ]); +} diff --git a/pkgs/muttprint/regex.patch b/pkgs/muttprint/regex.patch new file mode 100644 index 0000000..e99c4a2 --- /dev/null +++ b/pkgs/muttprint/regex.patch @@ -0,0 +1,11 @@ +--- a/muttprint 2015-07-21 11:18:04.219578426 +1200 ++++ b/muttprint 2015-07-21 11:18:53.906243779 +1200 +@@ -1635,7 +1635,7 @@ + open (AUX, "$auxfile") or fatalError "Could not open $auxfile:\n$!"; + + while () { +- ($numberOfPages) = /\\newlabel{LastPage}{{}{(\d+)}}/; ++ ($numberOfPages) = /\\newlabel\{LastPage}\{\{}\{(\d+)}}/; + } + + close AUX or fatalError "Could not close $auxfile:\n$!"; diff --git a/pkgs/muttprint/two_edge.patch b/pkgs/muttprint/two_edge.patch new file mode 100644 index 0000000..4a7290d --- /dev/null +++ b/pkgs/muttprint/two_edge.patch @@ -0,0 +1,19 @@ +--- a/muttprint 2016-05-05 13:48:50.515950744 +1200 ++++ b/muttprint 2016-05-05 13:52:10.722623902 +1200 +@@ -643,14 +643,14 @@ + if ($Config{PAPERSAVE} eq "on") { + if ($useCups) { + $Config{PRINT_COMMAND} =~ +- s/\$CUPS_OPTIONS/ -o sides=two-sided-long-edge \$CUPS_OPTIONS/; ++ s/\$CUPS_OPTIONS/ -o sides=two-sided-short-edge \$CUPS_OPTIONS/; + } else { # no cups + modifyPS("landscape"); + } + } else { # no papersave + if ($useCups) { + $Config{PRINT_COMMAND} =~ +- s/\$CUPS_OPTIONS/ -o sides=two-sided-short-edge \$CUPS_OPTIONS/; ++ s/\$CUPS_OPTIONS/ -o sides=two-sided-long-edge \$CUPS_OPTIONS/; + } else { # no cups + modifyPS("portrait"); + } 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 @@ +{ python2Packages, fetchedGithub }: +python2Packages.buildPythonApplication (fetchedGithub ./nagios-cli.json) diff --git a/pkgs/nagios-cli/nagios-cli.json b/pkgs/nagios-cli/nagios-cli.json new file mode 100644 index 0000000..fc91227 --- /dev/null +++ b/pkgs/nagios-cli/nagios-cli.json @@ -0,0 +1,15 @@ +{ + "tag": "edc51ea-master", + "meta": { + "name": "nagios-cli", + "url": "https://github.com/tehmaze/nagios-cli", + "branch": "master" + }, + "github": { + "owner": "tehmaze", + "repo": "nagios-cli", + "rev": "edc51eaccf1086bb4469ce45c5e5155f2d71a2f9", + "sha256": "1qw5fv4niz079zqwmfr3kzjv8cc31rbhi9whdbv9c32qdi3h7vsp", + "fetchSubmodules": true + } +} 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 @@ +{ stdenv, fetchedGithub, ncurses, curl }: +stdenv.mkDerivation (fetchedGithub ./nagnu.json // rec { + buildInputs = [ ncurses curl ]; + installPhase = '' + mkdir -p $out/bin + cp nagnu $out/bin + mkdir -p $out/share/doc/nagnu + cp nagnu.conf.sample $out/share/doc/nagnu + mkdir -p $out/share/man/man8 + cp docs/nagnu.8 $out/share/man/man8 + ''; +}) diff --git a/pkgs/nagnu/nagnu.json b/pkgs/nagnu/nagnu.json new file mode 100644 index 0000000..60a8b07 --- /dev/null +++ b/pkgs/nagnu/nagnu.json @@ -0,0 +1,15 @@ +{ + "tag": "c7e65fc-master", + "meta": { + "name": "nagnu", + "url": "https://github.com/frlen/nagnu", + "branch": "master" + }, + "github": { + "owner": "frlen", + "repo": "nagnu", + "rev": "c7e65fc02f46a3756a4cc47953ea2f3e57a84728", + "sha256": "1i2jm8ibvqcc734daamnzc3hx8q0nsry1x12q0kr5yvcsdjjgyy3", + "fetchSubmodules": true + } +} 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 @@ +{ python2Packages, fetchedGithub }: +with python2Packages; +buildPythonApplication (fetchedGithub ./pg_activity.json // { + propagatedBuildInputs = [ psycopg2 psutil ]; +}) diff --git a/pkgs/pg_activity/pg_activity.json b/pkgs/pg_activity/pg_activity.json new file mode 100644 index 0000000..4485d9a --- /dev/null +++ b/pkgs/pg_activity/pg_activity.json @@ -0,0 +1,15 @@ +{ + "tag": "v1.4.0", + "meta": { + "name": "pg_activity", + "url": "https://github.com/julmon/pg_activity/", + "branch": "refs/tags/v1.4.0" + }, + "github": { + "owner": "julmon", + "repo": "pg_activity", + "rev": "f26ae614c204254a805309026eebd5e9230b0214", + "sha256": "1bmvgrmna7vz2a6vknxm0k19vl9x7l6hn6vpfd7jgd53rz7c9w5p", + "fetchSubmodules": true + } +} 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 @@ +{ stdenv, fetchedGithub, sbcl, cacert, sqlite, freetds, libzip, curl, git, openssl, makeWrapper }: +stdenv.mkDerivation (fetchedGithub ./pgloader.json // { + buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ]; + LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; + buildPhase = '' + export PATH=$PATH:$out/bin + export HOME=$TMPDIR + make pgloader + ''; + dontStrip = true; + enableParallelBuilding = false; + installPhase = '' + install -Dm755 build/bin/pgloader "$out/bin/pgloader" + wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" + ''; +}) diff --git a/pkgs/pgloader/pgloader.json b/pkgs/pgloader/pgloader.json new file mode 100644 index 0000000..dfe310b --- /dev/null +++ b/pkgs/pgloader/pgloader.json @@ -0,0 +1,15 @@ +{ + "tag": "v3.5.2", + "meta": { + "name": "pgloader", + "url": "https://github.com/dimitri/pgloader", + "branch": "refs/tags/v3.5.2" + }, + "github": { + "owner": "dimitri", + "repo": "pgloader", + "rev": "63af7e7373975391446dcae151f5c61564849025", + "sha256": "1rd0k1x7ml6b6x526brachm13v51vx5ikpg64c8k8j29cskq2vqa", + "fetchSubmodules": true + } +} 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 @@ +{ stdenv, fetchedGithub, pkgconfig, libevent, lua, jansson, openssl, readline, zlib, libconfig }: +stdenv.mkDerivation (fetchedGithub ./telegram-cli.json // { + patches = [ + ./telegram-cli.patch + ]; + buildInputs = [ pkgconfig libevent lua jansson openssl readline zlib libconfig ]; + preBuild = '' + sed -i -e 's@"/etc/" PROG_NAME "/server.pub"@"'$out'/etc/server.pub"@' main.c + ''; + installPhase = '' + mkdir -p $out + install -Dm755 bin/telegram-cli $out/bin/telegram-cli + install -Dm644 tg-server.pub $out/etc/server.pub + install -Dm644 debian/telegram-cli.8 $out/man/man8/telegram-cli.8 + ''; +}) diff --git a/pkgs/telegram-cli/telegram-cli.json b/pkgs/telegram-cli/telegram-cli.json new file mode 100644 index 0000000..53e0a7b --- /dev/null +++ b/pkgs/telegram-cli/telegram-cli.json @@ -0,0 +1,15 @@ +{ + "tag": "6547c0b-master", + "meta": { + "name": "telegram-cli", + "url": "https://github.com/vysheng/tg", + "branch": "master" + }, + "github": { + "owner": "vysheng", + "repo": "tg", + "rev": "6547c0b21b977b327b3c5e8142963f4bc246187a", + "sha256": "07sss5cnw2ygd7mp8f5532lmj7qm6ywqf4cjaq5g13i8igzqzwzj", + "fetchSubmodules": true + } +} diff --git a/pkgs/telegram-cli/telegram-cli.patch b/pkgs/telegram-cli/telegram-cli.patch new file mode 100644 index 0000000..2d2b7b0 --- /dev/null +++ b/pkgs/telegram-cli/telegram-cli.patch @@ -0,0 +1,90 @@ +diff --git a/tgl/crypto/rsa_pem_openssl.c b/tgl/crypto/rsa_pem_openssl.c +index db653f2..5e6a697 100644 +--- a/tgl/crypto/rsa_pem_openssl.c ++++ b/tgl/crypto/rsa_pem_openssl.c +@@ -36,6 +36,12 @@ TGLC_WRAPPER_ASSOC(rsa,RSA) + // TODO: Refactor crucial struct-identity into its own header. + TGLC_WRAPPER_ASSOC(bn,BIGNUM) + ++/* ++ * Since OpenSSL version 1.1.0 the RSA struct (rsa_st) is opaque, ++ * see also https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes ++ */ ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++ + TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) { + RSA *ret = RSA_new (); + ret->e = unwrap_bn (TGLC_bn_new ()); +@@ -47,7 +53,30 @@ TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) { + #define RSA_GETTER(M) \ + TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \ + return wrap_bn (unwrap_rsa (key)->M); \ +- } \ ++ } ++ ++#else // OPENSSL_VERSION_NUMBER ++ ++TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) { ++ RSA *ret = RSA_new (); ++ BIGNUM *ret_e = unwrap_bn (TGLC_bn_new ()); ++ BIGNUM *ret_n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL)); ++ RSA_set0_key (ret, ret_n, ret_e, NULL); ++ TGLC_bn_set_word (wrap_bn (ret_e), e); ++ return wrap_rsa (ret); ++} ++ ++#define RSA_GETTER(M) \ ++TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \ ++ BIGNUM *rsa_n, *rsa_e, *rsa_d; \ ++ RSA_get0_key(unwrap_rsa (key), \ ++ (const BIGNUM **) &rsa_n, \ ++ (const BIGNUM **) &rsa_e, \ ++ (const BIGNUM **) &rsa_d); \ ++ return wrap_bn (rsa_ ## M); \ ++} ++ ++#endif // OPENSSL_VERSION_NUMBER + + RSA_GETTER(n); + RSA_GETTER(e); +@@ -60,4 +89,4 @@ TGLC_rsa *TGLC_pem_read_RSAPublicKey (FILE *fp) { + return wrap_rsa (PEM_read_RSAPublicKey (fp, NULL, NULL, NULL)); + } + +-#endif ++#endif // TGL_AVOID_OPENSSL +diff --git a/tgl/mtproto-utils.c b/tgl/mtproto-utils.c +index 0948bc8..cfdb216 100644 +--- a/tgl/mtproto-utils.c ++++ b/tgl/mtproto-utils.c +@@ -98,7 +98,7 @@ static unsigned long long BN2ull (TGLC_bn *b) { + if (sizeof (unsigned long) == 8) { + return TGLC_bn_get_word (b); + } else if (sizeof (unsigned long long) == 8) { +- assert (0); // As long as nobody ever uses this code, assume it is broken. ++// assert (0); // As long as nobody ever uses this code, assume it is broken. + unsigned long long tmp; + /* Here be dragons, but it should be okay due to be64toh */ + TGLC_bn_bn2bin (b, (unsigned char *) &tmp); +@@ -112,7 +112,7 @@ static void ull2BN (TGLC_bn *b, unsigned long long val) { + if (sizeof (unsigned long) == 8 || val < (1ll << 32)) { + TGLC_bn_set_word (b, val); + } else if (sizeof (unsigned long long) == 8) { +- assert (0); // As long as nobody ever uses this code, assume it is broken. ++// assert (0); // As long as nobody ever uses this code, assume it is broken. + htobe64(val); + /* Here be dragons, but it should be okay due to htobe64 */ + TGLC_bn_bin2bn ((unsigned char *) &val, 8, b); +diff --git a/tgl/tl-parser/tl-parser.c b/tgl/tl-parser/tl-parser.c +index 524b196..aeadbd2 100644 +--- a/tgl/tl-parser/tl-parser.c ++++ b/tgl/tl-parser/tl-parser.c +@@ -1903,7 +1903,7 @@ struct tl_combinator_tree *tl_parse_args134 (struct tree *T) { + //assert (S->data); + char *name = S->data; + if (!name) { +- static char s[20]; ++ static char s[21]; + sprintf (s, "%lld", lrand48 () * (1ll << 32) + lrand48 ()); + name = s; + } 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 @@ +{ stdenv, ruby, fetchedGithub }: +stdenv.mkDerivation (fetchedGithub ./telegram-history-dump.json // { + installPhase = '' + mkdir -p $out/lib $out/bin + cp -a $src $out/lib/telegram-history-dump + ln -s $out/lib/telegram-history-dump/telegram-history-dump.rb $out/bin/telegram-history-dump + ''; + buildInputs = [ ruby ]; +}) diff --git a/pkgs/telegram-history-dump/telegram-history-dump.json b/pkgs/telegram-history-dump/telegram-history-dump.json new file mode 100644 index 0000000..487df73 --- /dev/null +++ b/pkgs/telegram-history-dump/telegram-history-dump.json @@ -0,0 +1,15 @@ +{ + "tag": "468ea91-master", + "meta": { + "name": "telegram-history-dump", + "url": "https://github.com/tvdstaaij/telegram-history-dump", + "branch": "master" + }, + "github": { + "owner": "tvdstaaij", + "repo": "telegram-history-dump", + "rev": "468ea91e543529b54bc2c5ea28b1ea17f362fd3e", + "sha256": "1wmwiqacfa56bmwx50njnb15cg0fy6rbdrmrjd4xfbh8bs6yp0gh", + "fetchSubmodules": true + } +} -- cgit v1.2.3