about summary refs log tree commit diff
path: root/pkgs/applications/editors/bviplus
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-02-07 16:06:56 +0000
committerRobin Gloster <mail@glob.in>2016-02-07 16:06:56 +0000
commit56ae3db53fefd363306e9c826bfc5e771e6ed599 (patch)
tree23afe4117d9f3af4b7eb5dff9fcd0a2e271d745e /pkgs/applications/editors/bviplus
parent955a9a3be72c9911b5b4bf3dde72d14e362fe450 (diff)
downloadnixlib-56ae3db53fefd363306e9c826bfc5e771e6ed599.tar
nixlib-56ae3db53fefd363306e9c826bfc5e771e6ed599.tar.gz
nixlib-56ae3db53fefd363306e9c826bfc5e771e6ed599.tar.bz2
nixlib-56ae3db53fefd363306e9c826bfc5e771e6ed599.tar.lz
nixlib-56ae3db53fefd363306e9c826bfc5e771e6ed599.tar.xz
nixlib-56ae3db53fefd363306e9c826bfc5e771e6ed599.tar.zst
nixlib-56ae3db53fefd363306e9c826bfc5e771e6ed599.zip
bviplus: fix build with gcc5 (inline semantics)
Diffstat (limited to 'pkgs/applications/editors/bviplus')
-rw-r--r--pkgs/applications/editors/bviplus/default.nix12
-rw-r--r--pkgs/applications/editors/bviplus/gcc5.diff11
2 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/applications/editors/bviplus/default.nix b/pkgs/applications/editors/bviplus/default.nix
index 0a8d7081b230..d61fa182379b 100644
--- a/pkgs/applications/editors/bviplus/default.nix
+++ b/pkgs/applications/editors/bviplus/default.nix
@@ -1,17 +1,23 @@
-{ stdenv, lib, fetchurl, ncurses }:
+{ stdenv, fetchurl, ncurses }:
 
 stdenv.mkDerivation rec {
   name = "bviplus-${version}";
   version = "0.9.4";
+
   src = fetchurl {
-    url = "http://downloads.sourceforge.net/project/bviplus/bviplus/${version}/bviplus-${version}.tgz";
+    url = "mirror://sourceforge/project/bviplus/bviplus/${version}/bviplus-${version}.tgz";
     sha256 = "10x6fbn8v6i0y0m40ja30pwpyqksnn8k2vqd290vxxlvlhzah4zb";
   };
+
   buildInputs = [
     ncurses
   ];
+
+  patches = [ ./gcc5.diff ];
+
   makeFlags = "PREFIX=$(out)";
-  meta = with lib; {
+
+  meta = with stdenv.lib; {
     description = "ncurses based hex editor with a vim-like interface";
     homepage = "http://bviplus.sourceforge.net";
     license = licenses.gpl3;
diff --git a/pkgs/applications/editors/bviplus/gcc5.diff b/pkgs/applications/editors/bviplus/gcc5.diff
new file mode 100644
index 000000000000..75dc57151dd5
--- /dev/null
+++ b/pkgs/applications/editors/bviplus/gcc5.diff
@@ -0,0 +1,11 @@
+--- bviplus-0.9.4/vf_backend.c	2016-02-07 15:58:47.265405962 +0000
++++ bviplus-0.9.4/vf_backend.c	2016-02-07 16:04:30.020004919 +0000
+@@ -253,7 +253,7 @@
+ /*---------------------------
+ 
+   ---------------------------*/
+-inline void compute_percent_complete(off_t offset, off_t size, int *complete)
++extern void compute_percent_complete(off_t offset, off_t size, int *complete)
+ {
+   if (size == 0)
+   {