]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Add some missing tools
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 11 Mar 2019 09:39:48 +0000 (10:39 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 11 Mar 2019 09:39:48 +0000 (10:39 +0100)
default.nix

index 1f50aa365046a18e29ceff3fdf665837d9afe0ae..5268565c15ef37f2ab5d863a6fa6caff6ae6124a 100644 (file)
@@ -548,9 +548,76 @@ let
         '';
     };
 
-    mypkgs.lesspipe = lesspipe.overrideAttrs(old: {
-      configureFlags = (old.configureFlags or []) ++ [ "--yes" ];
-    });
+  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)}
+    '';
+
 # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
 # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
 in
@@ -609,4 +676,8 @@ in
     inherit emacs26-nox;
     inherit highlight sourceHighlight;
     pygmentize = python3Packages.pygments;
+    inherit iftop htop;
+    inherit fetchmail;
+    inherit bc;
+    inherit cpulimit;
   }