X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=default.nix;h=abf6237fe689665c7ce918429c0debcd9f5ffaa4;hb=267e5ce7c38b8f45b8400adc4e21c3cf705b4b6a;hp=4bae440c3b65b4625be5dd499602b489c2b04783;hpb=d784c053b0963b93b19889f8ded3f33b4c9fe724;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/default.nix b/default.nix index 4bae440..abf6237 100644 --- a/default.nix +++ b/default.nix @@ -1,5 +1,5 @@ -with import ./libs.nix; with import {}; +with import ./libs.nix { nixpkgs = import {}; }; let mypkgs = {}; @@ -26,11 +26,13 @@ let } ); - mypkgs.weboob = pythonPackages.weboob.overrideAttrs (old: rec { - postInstall = ''${old.postInstall or ""} - mkdir -p $out/share/bash-completion/completions/ - cp tools/weboob_bash_completion $out/share/bash-completion/completions/weboob - ''; + mypkgs.weboob = (pythonPackages.weboob.overridePythonAttrs { + setupPyBuildFlags = [ "--no-qt" "--xdg" ]; + }).overrideAttrs (old: rec { + postInstall = ''${old.postInstall or ""} + mkdir -p $out/share/bash-completion/completions/ + cp tools/weboob_bash_completion $out/share/bash-completion/completions/weboob + ''; }); mypkgs.slrn = slrn.overrideAttrs (old: rec { @@ -61,11 +63,14 @@ let configureFlags = old.configureFlags ++ [ "--enable-plugins" ]; }); - mypkgs.weechat = nixpkgs_unstable.weechat.override { + mypkgs.weechat = weechat.override { configure = { availablePlugins, ... }: { plugins = with availablePlugins; [ + # Make sure websocket_client is not 0.55.0, it provokes + # regular crashes (python.withPackages (ps: with ps; [websocket_client emoji])) perl + ruby ]; }; }; @@ -88,18 +93,19 @@ let }; }; - mypkgs.terminal-velocity = with python2Packages; buildPythonApplication rec { + mypkgs.terminal-velocity = with python36Packages; buildPythonApplication rec { pname = "terminal-velocity-git"; version = "0.2.0"; patches = [ + ./patches/terminal_velocity_sort_found_notes.patch + ./patches/terminal_velocity_python3_support.patch # FIXME: update this patch when version changes ./patches/terminal_velocity_fix_build.patch - ./patches/terminal_velocity_sort_found_notes.patch ]; - propagatedBuildInputs = [ chardet urwid nixpkgs_unstable.python2Packages.sh pyyaml ]; - buildInputs = [ m2r restructuredtext_lint pygments ]; + propagatedBuildInputs = [ chardet urwid (sh.overridePythonAttrs { doCheck = false; }) pyyaml ]; + buildInputs = [ m2r (restructuredtext_lint.overridePythonAttrs { doCheck = false; }) pygments ]; postInstall = '' rm $out/bin/terminal_velocity @@ -155,6 +161,7 @@ let configureFlags = [ "--with-etc-dir=/etc/cnagios" "--with-var-dir=/var/lib/naemon" + "--with-status-file=/var/lib/naemon/status.dat" "--with-nagios-data=4" ]; @@ -455,9 +462,9 @@ let mypkgs.notmuch-vim = stdenv.mkDerivation rec { name = "notmuch-vim-${version}"; - version = nixpkgs_unstable.notmuch.version; + version = notmuch.version; outputs = [ "out" ]; - src = nixpkgs_unstable.notmuch.src; + src = notmuch.src; phases = [ "unpackPhase" "installPhase" ]; installPhase = '' make -C vim DESTDIR=$out prefix="/share/vim/vimfiles" install @@ -466,10 +473,10 @@ let mypkgs.notmuch-python2 = stdenv.mkDerivation rec { name = "notmuch-python2-${version}"; - version = nixpkgs_unstable.notmuch.version; + version = notmuch.version; outputs = [ "out" ]; buildInputs = [ python2Packages.sphinx python2Packages.python ]; - src = nixpkgs_unstable.notmuch.src; + src = notmuch.src; phases = [ "unpackPhase" "buildPhase" "installPhase" "fixupPhase" ]; buildPhase = '' cd bindings/python @@ -482,10 +489,10 @@ let mypkgs.notmuch-python3 = stdenv.mkDerivation rec { name = "notmuch-python3-${version}"; - version = nixpkgs_unstable.notmuch.version; + version = notmuch.version; outputs = [ "out" ]; - buildInputs = [ nixpkgs_unstable.python3Packages.sphinx nixpkgs_unstable.python3Packages.python ]; - src = nixpkgs_unstable.notmuch.src; + buildInputs = [ python3Packages.sphinx python3Packages.python ]; + src = notmuch.src; phases = [ "unpackPhase" "buildPhase" "installPhase" "fixupPhase" ]; buildPhase = '' cd bindings/python @@ -533,6 +540,121 @@ let install -Dm644 "$src/config" -t "$out/etc/telegramircd/" ''; }; + + mypkgs.lesspipe = lesspipe.overrideAttrs(old: { + configureFlags = (old.configureFlags or []) ++ [ "--yes" ]; + }); + + mypkgs.genius = stdenv.mkDerivation rec { + name = "genius-${version}"; + version = "1.0.24"; + src = fetchurl { + url = "https://download.gnome.org/sources/genius/1.0/${name}.tar.xz"; + sha256 = "772f95f6ae4716d39bb180cd50e8b6b9b074107bee0cd083b825e1e6e55916b6"; + }; + buildInputs = [ + mpfr glib hicolor-icon-theme gtk2 intltool gnome-doc-utils python3 gnome2.gtksourceview + autoconf automake libtool ncurses readline pkg-config + ]; + preConfigure = '' + autoreconf -fi + ''; + preBuild = '' + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + ''; + }; + + mypkgs.unicode = let + version = "12.0"; + version-full = "${version}.0"; + files = { + emoji-data = fetchurl { + url = "http://www.unicode.org/Public/emoji/${version}/emoji-data.txt"; + sha256 = "03sf7h1d6kb9m5s02lif88jsi5kjszpkfvcymaqxj8ds70ar9pgv"; + }; + emoji-sequences = fetchurl { + url = "http://www.unicode.org/Public/emoji/${version}/emoji-sequences.txt"; + sha256 = "1hghki2rn3n7m4lwpwi2a5wrsf2nij4bxga9ldabx4g0g2k23svs"; + }; + emoji-test = fetchurl { + url = "http://www.unicode.org/Public/emoji/${version}/emoji-test.txt"; + sha256 = "1dqd0fh999mh6naj816ni113m9dimfy3ih9nffjq2lrv9mmlgdck"; + }; + emoji-variation-sequences = fetchurl { + url = "http://www.unicode.org/Public/emoji/${version}/emoji-variation-sequences.txt"; + sha256 = "1cccwx5bl79w4c19vi5dhjqxrph92s8hihp9y8s2cqvdzmgbln7a"; + }; + emoji-zwj-sequences = fetchurl { + url = "http://www.unicode.org/Public/emoji/${version}/emoji-zwj-sequences.txt"; + sha256 = "1l791nbijmmhwa7kmvfn8gp26ban512l6mgqpz1mnbq3xm19181n"; + }; + }; + zippedFiles = { + UCD = fetchurl { + url = "http://www.unicode.org/Public/zipped/${version-full}/UCD.zip"; + sha256 = "1ighy39cjkmqnv1797wrxjz76mv1fdw7zp5j04q55bkwxsdkvrmh"; + }; + Unihan = fetchurl { + url = "http://www.unicode.org/Public/zipped/${version-full}/Unihan.zip"; + sha256 = "1kfdhgg2gm52x3s07bijb5cxjy0jxwhd097k5lqhvzpznprm6ibf"; + }; + }; + in + pkgs.runCommand "unicode" { + buildInputs = [ libarchive ]; + } '' + mkdir -p $out/share/unicode + ${builtins.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: u: "install -Dm644 ${u} $out/share/unicode/emoji/${n}.txt") files)} + ${builtins.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: u: '' + install -Dm644 ${u} $out/share/unicode/${n}.zip + bsdtar -C "$out/share/unicode" -x -f "$out/share/unicode/${n}.zip" + '') zippedFiles)} + ''; + + mypkgs.dwm = dwm.overrideAttrs(old: rec { + postPatch = '' + cp ${./patches/dwm_config.h} ./config.h + ''; + }); + + mypkgs.flrn = let + slang = stdenv.mkDerivation rec { + name = "slang-debian-patched-${version}"; + version = "1.4.9"; + src = fetchurl { + url = "ftp://space.mit.edu/pub/davis/slang/v1.4/slang-1.4.9.tar.gz"; + sha256 = "1y2mg0whqh4b3acd0k17i4biz55bimxg8aaxhmwd165cvspxns9r"; + }; + debianPatches = fetchurl { + url = "http://archive.debian.org/debian-archive/debian-amd64/pool/main/s/slang/slang_1.4.9dbs-8.diff.gz"; + sha256 = "0xdq14k5ynqfwpmis1rcggs7m4n921i3bs27icbmbhfg5gb2hap2"; + }; + preConfigure = '' + cp $debianPatches ./slang.diff.gz + gunzip slang.diff.gz + patch -p1 < slang.diff + for i in debian/patches/*; do + patch -p1 < $i + done + makeFlagsArray=(CFLAGS=" -g -O2 -fno-strength-reduce -DUTF8 -D_REENTRANT -D_XOPEN_SOURCE=500") + ''; + postBuild = '' + sed -i "1i#ifndef UTF8\n#define UTF8\n#endif" src/slang.h + ''; + }; + in + stdenv.mkDerivation (fetchedGithub ./fetched/flrn.json // rec { + buildInputs = [ libetpan openssl autoconf groff slang yacc ]; + preConfigure = '' + sed -i -e "s/test -e configure/false/" configure.in + autoconf + sed -i -e '/define CHECK_MAIL/d' src/flrn_config.h + sed -i -e '/DEFAULT_DIR_FILE/s@".flrn"@".config/flrn"@' src/flrn_config.h + sed -i -e '/DEFAULT_CONFIG_FILE/s@".flrnrc"@"flrnrc"@' src/flrn_config.h + sed -i -e '/DEFAULT_FLNEWS_FILE/s@".flnewsrc"@"flnewsrc"@' src/flrn_config.h + sed -i -e '/flrn_char chaine/s@18@20@' src/flrn_command.c + ''; + }); # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks in @@ -544,7 +666,7 @@ in inherit pdftk; inherit googler; inherit jrnl; - inherit apg; + inherit apg pwgen; inherit newsboat; inherit vcsh; inherit xmr-stak; @@ -576,25 +698,27 @@ in inherit nix-zsh-completions; inherit browsh; inherit monero; - stgit = gitAndTools.stgit; - # todo: lx* ?, unrar, unzip, zeromq? - #inherit nextcloud-client; - #inherit nixos; - } // (with nixpkgs_unstable; { - inherit googler; - inherit khal; - inherit newsboat; - inherit xmr-stak; - inherit urlwatch; - inherit graphicsmagick; - inherit ncmpc; - inherit solc; - inherit w3m lynx links; - inherit valgrind; - inherit ranger; - inherit strace; - inherit notmuch notmuch-mutt; + inherit nextcloud-client; + inherit feh imagemagick; + inherit lftp; stgit = gitAndTools.stgit; inherit bundix; bower2nix = nodePackages.bower2nix; - }) + inherit firefox; + inherit jq; + inherit lzo unzip bzip2 p7zip xz; + # unrar is unfree + inherit tig; + #inherit nixos; + inherit emacs26-nox; + inherit highlight sourceHighlight; + pygmentize = python3Packages.pygments; + inherit iftop htop; + inherit fetchmail; + inherit bc; + inherit cpulimit; + inherit dmenu st; + inherit poppler_utils; + inherit tmux; + inherit netcat-gnu; + }