From 195800e8816a53d5faafde4a0990a904dbac2510 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 16 Jun 2014 14:26:40 -0700 Subject: [PATCH 1/6] Do not use static-libgcc flag on Darwin --- pkgs/development/libraries/zlib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 088eb1b9493..f45c18dd0f1 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { # As zlib takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - NIX_CFLAGS_COMPILE = "-static-libgcc"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc"; crossAttrs = { dontStrip = static; From f39471a87314e5a6a67c15b3831acbc090f999fb Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 16 Jun 2014 16:39:20 -0700 Subject: [PATCH 2/6] ncurses: apply a patch on Darwin for a clang bug --- pkgs/development/libraries/ncurses/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 993993cecd0..7b502822a18 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -18,7 +18,13 @@ stdenv.mkDerivation (rec { sha256 = "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh"; }; - patches = [ ./patch-ac ]; + clangPatch = fetchurl { + # Patch referenced from https://github.com/Homebrew/homebrew-dupes/issues/43 + url = "http://lists.gnu.org/archive/html/bug-ncurses/2011-04/txtkWQqiQvcZe.txt"; + sha256 = "03lrwqvb0r2qgi8hz7ayd3g26d6xilr3c92j8li3b77kdc0w0rlv"; + }; + + patches = [ ./patch-ac ] ++ stdenv.lib.optional stdenv.isDarwin clangPatch; configureFlags = '' --with-shared --without-debug --enable-pc-files --enable-symlinks From 0cf6e55a701a460ac6b28850cd16641b707d3ba8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 20 Jun 2014 22:31:55 -0700 Subject: [PATCH 3/6] proofgeneral_4_3_pre: Add expression needed for current prooftree --- .../editors/emacs-modes/proofgeneral/4.2.nix | 54 +++++++++++++++++++ .../emacs-modes/proofgeneral/4.3pre.nix | 48 +++++++++++++++++ pkgs/top-level/all-packages.nix | 9 +++- 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/editors/emacs-modes/proofgeneral/4.2.nix create mode 100644 pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/4.2.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/4.2.nix new file mode 100644 index 00000000000..0dea1a13977 --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/proofgeneral/4.2.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake }: + +stdenv.mkDerivation (rec { + name = "ProofGeneral-4.2"; + + src = fetchurl { + url = http://proofgeneral.inf.ed.ac.uk/releases/ProofGeneral-4.2.tgz; + sha256 = "09qb0myq66fw17v4ziz401ilsb5xlxz1nl2wsp69d0vrfy0bcrrm"; + }; + + sourceRoot = name; + + buildInputs = [ emacs texinfo texLive perl which ]; + + prePatch = + '' sed -i "Makefile" \ + -e "s|^\(\(DEST_\)\?PREFIX\)=.*$|\1=$out|g ; \ + s|/sbin/install-info|install-info|g" + + + # Workaround for bug #458 + # ProofGeneral 4.2 byte-compilation fails with Emacs 24.2.90 + # http://proofgeneral.inf.ed.ac.uk/trac/ticket/458 + sed -i "Makefile" \ + -e "s|(setq byte-compile-error-on-warn t)||g" + + sed -i "bin/proofgeneral" -e's/which/type -p/g' + + # @image{ProofGeneral} fails, so remove it. + sed -i '94d' doc/PG-adapting.texi + sed -i '101d' doc/ProofGeneral.texi + ''; + + preBuild = '' + make clean; + ''; + + installPhase = + # Copy `texinfo.tex' in the right place so that `texi2pdf' works. + '' cp -v "${automake}/share/"automake-*/texinfo.tex doc + make install install-doc + ''; + + meta = { + description = "Proof General, an Emacs front-end for proof assistants"; + longDescription = '' + Proof General is a generic front-end for proof assistants (also known as + interactive theorem provers), based on the customizable text editor Emacs. + ''; + homepage = http://proofgeneral.inf.ed.ac.uk; + license = "GPLv2+"; + platforms = stdenv.lib.platforms.unix; # arbitrary choice + }; +}) diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix new file mode 100644 index 00000000000..3a492dc0c7f --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake }: + +stdenv.mkDerivation (rec { + name = "ProofGeneral-4.3pre131011"; + + src = fetchurl { + url = http://proofgeneral.inf.ed.ac.uk/releases/ProofGeneral-4.3pre131011.tgz; + sha256 = "0104iy2xik5npkdg9p2ir6zqyrmdc93azrgm3ayvg0z76vmnb816"; + }; + + sourceRoot = name; + + buildInputs = [ emacs texinfo texLive perl which ]; + + prePatch = + '' sed -i "Makefile" \ + -e "s|^\(\(DEST_\)\?PREFIX\)=.*$|\1=$out|g ; \ + s|/sbin/install-info|install-info|g" + + + sed -i "bin/proofgeneral" -e's/which/type -p/g' + + # @image{ProofGeneral} fails, so remove it. + sed -i '94d' doc/PG-adapting.texi + sed -i '96d' doc/ProofGeneral.texi + ''; + + preBuild = '' + make clean; + ''; + + installPhase = + # Copy `texinfo.tex' in the right place so that `texi2pdf' works. + '' cp -v "${automake}/share/"automake-*/texinfo.tex doc + make install install-doc + ''; + + meta = { + description = "Proof General, an Emacs front-end for proof assistants"; + longDescription = '' + Proof General is a generic front-end for proof assistants (also known as + interactive theorem provers), based on the customizable text editor Emacs. + ''; + homepage = http://proofgeneral.inf.ed.ac.uk; + license = "GPLv2+"; + platforms = stdenv.lib.platforms.unix; # arbitrary choice + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ede0521df2..e7ade25cbf4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8383,12 +8383,19 @@ let prologMode = callPackage ../applications/editors/emacs-modes/prolog { }; - proofgeneral = callPackage ../applications/editors/emacs-modes/proofgeneral { + proofgeneral_4_2 = callPackage ../applications/editors/emacs-modes/proofgeneral/4.2.nix { texinfo = texinfo4 ; texLive = pkgs.texLiveAggregationFun { paths = [ pkgs.texLive pkgs.texLiveCMSuper ]; }; }; + proofgeneral_4_3_pre = callPackage ../applications/editors/emacs-modes/proofgeneral/4.3pre.nix { + texinfo = texinfo4 ; + texLive = pkgs.texLiveAggregationFun { + paths = [ pkgs.texLive pkgs.texLiveCMSuper ]; + }; + }; + proofgeneral = self.proofgeneral_4_2; quack = callPackage ../applications/editors/emacs-modes/quack { }; From 073933101e7aa47eb8756dc0b4385bd46a436c70 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 20 Jun 2014 22:36:06 -0700 Subject: [PATCH 4/6] proofgeneral: Delete default.nix for proofgeneral --- .../emacs-modes/proofgeneral/default.nix | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 pkgs/applications/editors/emacs-modes/proofgeneral/default.nix diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/default.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/default.nix deleted file mode 100644 index 3f974423fd7..00000000000 --- a/pkgs/applications/editors/emacs-modes/proofgeneral/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake }: - -stdenv.mkDerivation (rec { - name = "ProofGeneral-4.2"; - - src = fetchurl { - url = http://proofgeneral.inf.ed.ac.uk/releases/ProofGeneral-4.2.tgz; - sha256 = "09qb0myq66fw17v4ziz401ilsb5xlxz1nl2wsp69d0vrfy0bcrrm"; - }; - - sourceRoot = name; - - buildInputs = [ emacs texinfo texLive perl which ]; - - prePatch = - '' sed -i "Makefile" \ - -e "s|^\(\(DEST_\)\?PREFIX\)=.*$|\1=$out|g ; \ - s|/sbin/install-info|install-info|g" - - - # Workaround for bug #458 - # ProofGeneral 4.2 byte-compilation fails with Emacs 24.2.90 - # http://proofgeneral.inf.ed.ac.uk/trac/ticket/458 - sed -i "Makefile" \ - -e "s|(setq byte-compile-error-on-warn t)||g" - - sed -i "bin/proofgeneral" -e's/which/type -p/g' - - # @image{ProofGeneral} fails, so remove it. - sed -i '94d' doc/PG-adapting.texi - sed -i '101d' doc/ProofGeneral.texi - ''; - - preBuild = '' - make clean; - ''; - - installPhase = - # Copy `texinfo.tex' in the right place so that `texi2pdf' works. - '' cp -v "${automake}/share/"automake-*/texinfo.tex doc - make install install-doc - ''; - - meta = { - description = "Proof General, an Emacs front-end for proof assistants"; - longDescription = '' - Proof General is a generic front-end for proof assistants (also known as - interactive theorem provers), based on the customizable text editor Emacs. - ''; - homepage = http://proofgeneral.inf.ed.ac.uk; - license = "GPLv2+"; - platforms = stdenv.lib.platforms.gnu; # arbitrary choice - }; -}) From 116807aa5527138a2f277385d4d2033a3ed732cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 21 Jun 2014 15:53:22 +0200 Subject: [PATCH 5/6] retroshare: place plugins at proper place Now they can be used. --- .../networking/p2p/retroshare/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/p2p/retroshare/default.nix b/pkgs/applications/networking/p2p/retroshare/default.nix index 3ae4f2a7483..4e3f495456c 100644 --- a/pkgs/applications/networking/p2p/retroshare/default.nix +++ b/pkgs/applications/networking/p2p/retroshare/default.nix @@ -11,7 +11,13 @@ stdenv.mkDerivation { NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${libxml2}/include/libxml2"; - patchPhase = "sed -i 's/UpnpString_get_String(es_event->PublisherUrl)/es_event->PublisherUrl/' libretroshare/src/upnp/UPnPBase.cpp"; + patchPhase = '' + sed -i 's/UpnpString_get_String(es_event->PublisherUrl)/es_event->PublisherUrl/' \ + libretroshare/src/upnp/UPnPBase.cpp + # Extensions get installed + sed -i "s,/usr/lib/retroshare/extensions/,$out/share/retroshare," \ + libretroshare/src/rsserver/rsinit.cc + ''; buildInputs = [ speex qt libupnp gpgme gnome3.libgnome_keyring glib libssh pkgconfig protobuf bzip2 libXScrnSaver curl libxml2 libxslt ]; @@ -24,8 +30,12 @@ stdenv.mkDerivation { postInstall = '' mkdir -p $out/bin - ln -s $out/retroshare-nogui $out/bin - ln -s $out/RetroShare $out/bin + mv $out/retroshare-nogui $out/bin + mv $out/RetroShare $out/bin + + # plugins + mkdir -p $out/share/retroshare + mv $out/lib* $out/share/retroshare ''; meta = with stdenv.lib; { From 476700d56f25122aaea0f2bc657b2d396e3b97bd Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 21 Jun 2014 09:20:46 -0700 Subject: [PATCH 6/6] git-annex: Build on Darwin, let Cabal determine proper flags --- .../git-and-tools/git-annex/default.nix | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix index 72f00bbad2e..8c2ee6a4944 100644 --- a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix @@ -11,6 +11,7 @@ , tastyHunit, tastyQuickcheck, tastyRerun, text, time, transformers , unixCompat, utf8String, uuid, wai, waiExtra, warp, warpTls, which , xmlTypes, yesod, yesodCore, yesodDefault, yesodForm, yesodStatic +, fsnotify }: cabal.mkDerivation (self: { @@ -21,9 +22,9 @@ cabal.mkDerivation (self: { isExecutable = true; buildDepends = [ aeson async blazeBuilder bloomfilter byteable caseInsensitive - clientsession cryptoApi cryptohash dataDefault dataenc DAV dbus - dlist dns editDistance exceptions extensibleExceptions fdoNotify - feed filepath gnutls hamlet hinotify hS3 hslogger HTTP httpClient + clientsession cryptoApi cryptohash dataDefault dataenc DAV + dlist dns editDistance exceptions extensibleExceptions + feed filepath gnutls hamlet hS3 hslogger HTTP httpClient httpConduit httpTypes IfElse json liftedBase MissingH monadControl mtl network networkConduit networkInfo networkMulticast networkProtocolXmpp optparseApplicative QuickCheck random regexTdfa @@ -31,19 +32,13 @@ cabal.mkDerivation (self: { tastyQuickcheck tastyRerun text time transformers unixCompat utf8String uuid wai waiExtra warp warpTls xmlTypes yesod yesodCore yesodDefault yesodForm yesodStatic - ]; + ] ++ (if (!self.stdenv.isDarwin) then [ + dbus fdoNotify hinotify + ] else [ + fsnotify + ]); buildTools = [ bup curl git gnupg1 lsof openssh perl rsync which ]; - configureFlags = "-fS3 - -fWebDAV - -fInotify - -fDbus - -fAssistant - -fWebapp - -fPairing - -fXMPP - -fDNS - -fProduction - -fTDFA"; + configureFlags = "-fAssistant -fProduction"; preConfigure = '' export HOME="$NIX_BUILD_TOP/tmp" mkdir "$HOME"