diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix new file mode 100644 index 000000000000..de9d7aabc6d3 --- /dev/null +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -0,0 +1,27 @@ +{stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper}: + +stdenv.mkDerivation { + name = "unison-2.13.16"; + src = fetchurl { + url = http://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.13.16.tar.gz; + sha256 = "808400a933aeb67654edc770822cd186d1b2adc92e7cb5836996c71c69ffe656"; + }; + + buildInputs = [ocaml]; + + addInputsHook = "source $makeWrapper"; + preBuild = "sed -i \"s|\\(OCAMLOPT=.*\\)$|\\1 -I $lablgtk/lib/ocaml/lablgtk2|\" Makefile.OCaml"; + makeFlags = "UISTYLE=gtk2 INSTALLDIR=$(out)/bin/"; + preInstall = "ensureDir $out/bin"; + postInstall = [ + "for i in $(cd $out/bin && ls); do" + " mv $out/bin/$i $out/bin/.orig-$i;" + " echo \"#! $SHELL -e\" > $out/bin/$i;" + " echo \"$xset/bin/xset q | grep -q \\\"$fontschumachermisc\\\" || $xset/bin/xset +fp \\\"$fontschumachermisc/lib/X11/fonts/misc\\\"\" >> $out/bin/$i;" + " echo \"exec \\\"$out/bin/.orig-$i\\\" \\\"\\\$@\\\"\" >> $out/bin/$i;" + " chmod +x $out/bin/$i;" + "done" + ]; + + inherit lablgtk fontschumachermisc xset makeWrapper; +} diff --git a/pkgs/development/libraries/lablgtk/default.nix b/pkgs/development/libraries/lablgtk/default.nix new file mode 100644 index 000000000000..12728717e82c --- /dev/null +++ b/pkgs/development/libraries/lablgtk/default.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl, ocaml, pkgconfig, gtk}: + +stdenv.mkDerivation { + name = "lablgtk-2.6.0"; + src = fetchurl { + url = http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-2.6.0.tar.gz; + sha256 = "3694bc1e288ce0903af6c96a2790d2340ba38fa51b18090062ede75137d97876"; + }; + + buildInputs = [ocaml pkgconfig gtk]; + + configureFlags = "--with-libdir=$(out)/lib/ocaml"; + buildFlags = "world"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6f28dbcfaefd..30e05ef3be92 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1506,6 +1506,11 @@ rec { inherit fetchurl stdenv x11 libjpeg libtiff libungif libpng; }; + lablgtk = import ../development/libraries/lablgtk { + inherit fetchurl stdenv ocaml pkgconfig; + inherit (gtkLibs) gtk; + }; + lcms = import ../development/libraries/lcms { inherit fetchurl stdenv; }; @@ -3312,6 +3317,11 @@ rec { #enableOfficialBranding = true; }; + unison = import ../applications/networking/sync/unison { + inherit fetchurl stdenv ocaml lablgtk makeWrapper; + inherit (xorg) xset fontschumachermisc; + }; + valknut = import ../applications/networking/p2p/valknut { inherit fetchurl stdenv perl x11 libxml2 libjpeg libpng openssl dclib; qt = qt3;