summary refs log tree commit diff
path: root/pkgs/applications/version-management
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2014-06-10 09:20:00 +0400
committerMichael Raskin <7c6f434c@mail.ru>2014-06-10 09:21:26 +0400
commitf4987a0edc5783d28333d06fd1d2751cf009e5be (patch)
tree4a22c538c63fadccce6d73c648276ddd9687f530 /pkgs/applications/version-management
parentd0365a6cde538525ed37ee7b60fbd789a2ff7325 (diff)
downloadnixpkgs-f4987a0edc5783d28333d06fd1d2751cf009e5be.tar
nixpkgs-f4987a0edc5783d28333d06fd1d2751cf009e5be.tar.gz
nixpkgs-f4987a0edc5783d28333d06fd1d2751cf009e5be.tar.bz2
nixpkgs-f4987a0edc5783d28333d06fd1d2751cf009e5be.tar.lz
nixpkgs-f4987a0edc5783d28333d06fd1d2751cf009e5be.tar.xz
nixpkgs-f4987a0edc5783d28333d06fd1d2751cf009e5be.tar.zst
nixpkgs-f4987a0edc5783d28333d06fd1d2751cf009e5be.zip
Update Monotone and add source-updater script
Diffstat (limited to 'pkgs/applications/version-management')
-rw-r--r--pkgs/applications/version-management/monotone/default.nix13
-rw-r--r--pkgs/applications/version-management/monotone/default.upstream8
-rw-r--r--pkgs/applications/version-management/monotone/glibc-file-handle.patch166
3 files changed, 16 insertions, 171 deletions
diff --git a/pkgs/applications/version-management/monotone/default.nix b/pkgs/applications/version-management/monotone/default.nix
index 0df1c652761..6be36533ce6 100644
--- a/pkgs/applications/version-management/monotone/default.nix
+++ b/pkgs/applications/version-management/monotone/default.nix
@@ -1,8 +1,10 @@
 { stdenv, fetchurl, boost, zlib, botan, libidn
-, lua, pcre, sqlite, perl, pkgconfig, expect }:
+, lua, pcre, sqlite, perl, pkgconfig, expect
+, bzip2, gmp, openssl
+}:
 
 let
-  version = "1.0";
+  version = "1.1";
   perlVersion = (builtins.parseDrvName perl.name).version;
 in
 
@@ -13,12 +15,13 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://monotone.ca/downloads/${version}/monotone-${version}.tar.bz2";
-    sha256 = "5c530bc4652b2c08b5291659f0c130618a14780f075f981e947952dcaefc31dc";
+    sha256 = "124cwgi2q86hagslbk5idxbs9j896rfjzryhr6z63r6l485gcp7r";
   };
 
-  patches = [ ./glibc-file-handle.patch ];
+  patches = [ ];
 
-  buildInputs = [ boost zlib botan libidn lua pcre sqlite pkgconfig expect ];
+  buildInputs = [ boost zlib botan libidn lua pcre sqlite pkgconfig expect 
+    openssl gmp bzip2 ];
 
   postInstall = ''
     mkdir -p $out/share/${name}
diff --git a/pkgs/applications/version-management/monotone/default.upstream b/pkgs/applications/version-management/monotone/default.upstream
new file mode 100644
index 00000000000..e0d01fb190c
--- /dev/null
+++ b/pkgs/applications/version-management/monotone/default.upstream
@@ -0,0 +1,8 @@
+url http://www.monotone.ca/downloads.php
+
+do_overwrite(){
+  ensure_version
+  ensure_hash
+  set_var_value version $CURRENT_VERSION
+  set_var_value sha256 $CURRENT_HASH
+}
diff --git a/pkgs/applications/version-management/monotone/glibc-file-handle.patch b/pkgs/applications/version-management/monotone/glibc-file-handle.patch
deleted file mode 100644
index 601b6ede0fb..00000000000
--- a/pkgs/applications/version-management/monotone/glibc-file-handle.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-Revision: da62cad10eda55aa233ac124273f3db4f541137a
-Parent:   65bcb8cf8b32f68a5b48629b328f6d65979e58df
-Author:   Thomas Moschny <thomas.moschny@gmx.de>
-Date:     07.05.2011 13:32:06
-Branch:   net.venge.monotone
-
-Changelog: 
-
-* src/rcs_file.cc: Rename struct "file_handle" to "rcs_file_handle"
-  to avoid a name clash with a struct of same name defined by newer
-  glibc's "fcntl.h". For aesthetic reasons, also rename struct
-  "file_source".
-
-References:
-https://code.monotone.ca/p/monotone/source/commit/da62cad10eda55aa233ac124273f3db4f541137a/
-https://bugs.gentoo.org/396651
-
-============================================================
---- a/src/rcs_file.cc	885b3fbe7b6cfed78816f0e57cd71d44616213c6
-+++ b/src/rcs_file.cc	03cf68912a4a708545ebce3d415c0e970ddead0b
-@@ -42,12 +42,12 @@ struct
- 
- #ifdef HAVE_MMAP
- struct
--file_handle
-+rcs_file_handle
- {
-   string const & filename;
-   off_t length;
-   int fd;
--  file_handle(string const & fn) :
-+  rcs_file_handle(string const & fn) :
-     filename(fn),
-     length(0),
-     fd(-1)
-@@ -60,13 +60,13 @@ file_handle
-       if (fd == -1)
-         throw oops("open of " + filename + " failed");
-     }
--  ~file_handle()
-+  ~rcs_file_handle()
-     {
-       if (close(fd) == -1)
-         throw oops("close of " + filename + " failed");
-     }
- };
--struct file_source
-+struct rcs_file_source
- {
-   string const & filename;
-   int fd;
-@@ -91,7 +91,7 @@ struct file_source
-       ++pos;
-     return good();
-   }
--  file_source(string const & fn,
-+  rcs_file_source(string const & fn,
-               int f,
-               off_t len) :
-     filename(fn),
-@@ -104,7 +104,7 @@ struct file_source
-     if (mapping == MAP_FAILED)
-       throw oops("mmap of " + filename + " failed");
-   }
--  ~file_source()
-+  ~rcs_file_source()
-   {
-     if (munmap(mapping, length) == -1)
-       throw oops("munmapping " + filename + " failed, after reading RCS file");
-@@ -112,12 +112,12 @@ struct
- };
- #elif defined(WIN32)
- struct
--file_handle
-+rcs_file_handle
- {
-   string const & filename;
-   off_t length;
-   HANDLE fd;
--  file_handle(string const & fn) :
-+  rcs_file_handle(string const & fn) :
-     filename(fn),
-     length(0),
-     fd(NULL)
-@@ -134,7 +134,7 @@ file_handle
-       if (fd == NULL)
-         throw oops("open of " + filename + " failed");
-     }
--  ~file_handle()
-+  ~rcs_file_handle()
-     {
-       if (CloseHandle(fd)==0)
-         throw oops("close of " + filename + " failed");
-@@ -142,7 +142,7 @@ struct
- };
- 
- struct
--file_source
-+rcs_file_source
- {
-   string const & filename;
-   HANDLE fd,map;
-@@ -167,7 +167,7 @@ file_source
-       ++pos;
-     return good();
-   }
--  file_source(string const & fn,
-+  rcs_file_source(string const & fn,
-               HANDLE f,
-               off_t len) :
-     filename(fn),
-@@ -183,7 +183,7 @@ file_source
-     if (mapping==NULL)
-       throw oops("MapViewOfFile of " + filename + " failed");
-   }
--  ~file_source()
-+  ~rcs_file_source()
-   {
-     if (UnmapViewOfFile(mapping)==0)
-       throw oops("UnmapViewOfFile of " + filename + " failed");
-@@ -193,7 +193,7 @@ file_source
- };
- #else
- // no mmap at all
--typedef istream file_source;
-+typedef istream rcs_file_source;
- #endif
- 
- typedef enum
-@@ -220,7 +220,7 @@ static token_type
- }
- 
- static token_type
--get_token(file_source & ist,
-+get_token(rcs_file_source & ist,
-           string & str,
-           size_t & line,
-           size_t & col)
-@@ -303,14 +303,14 @@ struct parser
- 
- struct parser
- {
--  file_source & ist;
-+  rcs_file_source & ist;
-   rcs_file & r;
-   string token;
-   token_type ttype;
- 
-   size_t line, col;
- 
--  parser(file_source & s,
-+  parser(rcs_file_source & s,
-          rcs_file & r)
-     : ist(s), r(r), line(1), col(1)
-   {}
-@@ -489,8 +489,8 @@ parse_rcs_file(string const & filename, 
- parse_rcs_file(string const & filename, rcs_file & r)
- {
- #if defined(HAVE_MMAP) || defined(WIN32)
--      file_handle handle(filename);
--      file_source ifs(filename, handle.fd, handle.length);
-+      rcs_file_handle handle(filename);
-+      rcs_file_source ifs(filename, handle.fd, handle.length);
- #else
-       ifstream ifs(filename.c_str());
-       ifs.unsetf(ios_base::skipws);