summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2021-06-08 14:37:33 -0300
committerGitHub <noreply@github.com>2021-06-08 14:37:33 -0300
commit9be8db34cf5c05aad77128c87c746bcc909f570d (patch)
treea273dfdf3dfe826afed31e67f249b2f2068a5661 /pkgs
parentc9492a1de65caf94abb75da338784ad6abdd9072 (diff)
parent6749372e17dbd47985ee55f2e6effc4153bdccc9 (diff)
downloadnixpkgs-9be8db34cf5c05aad77128c87c746bcc909f570d.tar
nixpkgs-9be8db34cf5c05aad77128c87c746bcc909f570d.tar.gz
nixpkgs-9be8db34cf5c05aad77128c87c746bcc909f570d.tar.bz2
nixpkgs-9be8db34cf5c05aad77128c87c746bcc909f570d.tar.lz
nixpkgs-9be8db34cf5c05aad77128c87c746bcc909f570d.tar.xz
nixpkgs-9be8db34cf5c05aad77128c87c746bcc909f570d.tar.zst
nixpkgs-9be8db34cf5c05aad77128c87c746bcc909f570d.zip
Merge pull request #126140 from AndersonTorres/quick-patches
quickjs: 2020-11-08 -> 2021-03-27, edbrowse: 3.7.7 -> 3.8.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/edbrowse/0001-small-fixes.patch20
-rw-r--r--pkgs/applications/editors/edbrowse/default.nix78
-rw-r--r--pkgs/development/interpreters/quickjs/default.nix32
3 files changed, 104 insertions, 26 deletions
diff --git a/pkgs/applications/editors/edbrowse/0001-small-fixes.patch b/pkgs/applications/editors/edbrowse/0001-small-fixes.patch
new file mode 100644
index 00000000000..433b884cc5d
--- /dev/null
+++ b/pkgs/applications/editors/edbrowse/0001-small-fixes.patch
@@ -0,0 +1,20 @@
+diff -Naur source.old/src/makefile source/src/makefile
+--- source.old/src/makefile	1969-12-31 21:00:01.000000000 -0300
++++ source/src/makefile	2021-06-07 18:58:48.851231787 -0300
+@@ -101,14 +101,14 @@
+ 
+ #  need packages nodejs and libnode-dev
+ js_hello_v8 : js_hello_v8.cpp
+-	g++ -I/usr/include/v8 js_hello_v8.cpp -lv8 -lstdc++ -o js_hello_v8
++	$(CXX) -I/usr/include/v8 js_hello_v8.cpp -lv8 -lstdc++ -o js_hello_v8
+ 
+ HELLOEXTRA = stringfile.o messages.o msg-strings.o startwindow.o ebrc.o format.o http.o isup.o fetchmail.o sendmail.o plugin.o buffers.o dbstubs.o html.o decorate.o html-tidy.o css.o
+ js_hello_moz : js_hello_moz.o $(HELLOEXTRA) jseng-moz.o
+ 	$(CC) js_hello_moz.o $(HELLOEXTRA) jseng-moz.o $(LDFLAGS) -lmozjs-$(SMV) -lstdc++ -o $@
+ 
+ js_hello_quick : js_hello_quick.c
+-	gcc $(CFLAGS) js_hello_quick.c stringfile.o messages.o msg-strings.o ebrc.o format.o -o js_hello_quick -L/usr/local/lib/quickjs -lquickjs -lm -ldl -lpthread -latomic
++	$(CC) $(CFLAGS) js_hello_quick.c stringfile.o messages.o msg-strings.o ebrc.o format.o -o js_hello_quick $(QUICKJS_LDFLAGS) -lm -lpthread
+ 
+ hello: js_hello_duk js_hello_v8 js_hello_moz js_hello_quick
+ 
diff --git a/pkgs/applications/editors/edbrowse/default.nix b/pkgs/applications/editors/edbrowse/default.nix
index 86cc81a58c2..5b37b86556b 100644
--- a/pkgs/applications/editors/edbrowse/default.nix
+++ b/pkgs/applications/editors/edbrowse/default.nix
@@ -1,41 +1,79 @@
-{ lib, stdenv, fetchFromGitHub, duktape, curl, pcre, readline, openssl, perl, html-tidy }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, curl
+, duktape
+, html-tidy
+, openssl
+, pcre
+, perl
+, pkg-config
+, quickjs
+, readline
+, which
+}:
 
 stdenv.mkDerivation rec {
   pname = "edbrowse";
-  version = "3.7.7";
+  version = "3.8.0";
 
-  buildInputs = [ curl pcre readline openssl duktape perl html-tidy ];
+  src = fetchFromGitHub {
+    owner = "CMB";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-ZXxzQBAmu7kM3sjqg/rDLBXNucO8sFRFKXV8UxQVQZU=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    which
+  ];
+  buildInputs = [
+    curl
+    duktape
+    html-tidy
+    openssl
+    pcre
+    perl
+    quickjs
+    readline
+  ];
+
+  patches = [
+    # Fixes some small annoyances on src/makefile
+    ./0001-small-fixes.patch
+  ];
 
   postPatch = ''
-    for i in ./tools/*.pl
-    do
-      substituteInPlace $i --replace "/usr/bin/perl" "${perl}/bin/perl"
+    substituteInPlace src/makefile --replace\
+      '-L/usr/local/lib/quickjs' '-L${quickjs}/lib/quickjs'
+    for i in $(find ./tools/ -type f ! -name '*.c'); do
+      patchShebangs $i
     done
   '';
 
   makeFlags = [
     "-C" "src"
-    "prefix=${placeholder "out"}"
+    "PREFIX=${placeholder "out"}"
   ];
 
-  src = fetchFromGitHub {
-    owner = "CMB";
-    repo = "edbrowse";
-    rev = "v${version}";
-    sha256 = "0cw9d60mdhwna57r1vxn53s8gl81rr3cxnvm769ifq3xyh49vfcf";
-  };
   meta = with lib; {
+    homepage = "https://edbrowse.org/";
     description = "Command Line Editor Browser";
     longDescription = ''
-      Edbrowse is a combination editor, browser, and mail client that is 100% text based.
-      The interface is similar to /bin/ed, though there are many more features, such as editing multiple files simultaneously, and rendering html.
-      This program was originally written for blind users, but many sighted users have taken advantage of the unique scripting capabilities of this program, which can be found nowhere else.
-      A batch job, or cron job, can access web pages on the internet, submit forms, and send email, with no human intervention whatsoever.
-      edbrowse can also tap into databases through odbc. It was primarily written by Karl Dahlke.
-      '';
+      Edbrowse is a combination editor, browser, and mail client that is 100%
+      text based. The interface is similar to /bin/ed, though there are many
+      more features, such as editing multiple files simultaneously, and
+      rendering html. This program was originally written for blind users, but
+      many sighted users have taken advantage of the unique scripting
+      capabilities of this program, which can be found nowhere else. A batch
+      job, or cron job, can access web pages on the internet, submit forms, and
+      send email, with no human intervention whatsoever. edbrowse can also tap
+      into databases through odbc. It was primarily written by Karl Dahlke.
+    '';
     license = licenses.gpl1Plus;
-    homepage = "https://edbrowse.org/";
     maintainers = with maintainers; [ schmitthenner vrthra equirosa ];
     platforms = platforms.linux;
   };
 }
+# TODO: send the patch to upstream developers
diff --git a/pkgs/development/interpreters/quickjs/default.nix b/pkgs/development/interpreters/quickjs/default.nix
index ac70a50eaa7..4bc0ec528a0 100644
--- a/pkgs/development/interpreters/quickjs/default.nix
+++ b/pkgs/development/interpreters/quickjs/default.nix
@@ -1,17 +1,37 @@
-{ lib, stdenv, fetchurl }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, texinfo
+}:
 
 stdenv.mkDerivation rec {
   pname = "quickjs";
-  version = "2020-11-08";
+  version = "2021-03-27";
 
-  src = fetchurl {
-    url = "https://bellard.org/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "0yqqcjxi3cqagw184mqrxpvqg486x7c233r3cp9mxachngd6779f";
+  src = fetchFromGitHub {
+    owner = "bellard";
+    repo = pname;
+    rev = "b5e62895c619d4ffc75c9d822c8d85f1ece77e5b";
+    hash = "sha256-VMaxVVQuJ3DAwYrC14uJqlRBg0//ugYvtyhOXsTUbCA=";
   };
 
   makeFlags = [ "prefix=${placeholder "out"}" ];
   enableParallelBuilding = true;
 
+  nativeBuildInputs = [
+    texinfo
+  ];
+
+  postBuild = ''
+    (cd doc
+     makeinfo *texi)
+  '';
+
+  postInstall = ''
+    (cd doc
+     install -Dt $out/share/doc *texi *info)
+  '';
+
   doInstallCheck = true;
   installCheckPhase = ''
     PATH="$out/bin:$PATH"
@@ -32,7 +52,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "A small and embeddable Javascript engine";
     homepage = "https://bellard.org/quickjs/";
-    maintainers = with maintainers; [ stesie ];
+    maintainers = with maintainers; [ stesie AndersonTorres ];
     platforms = platforms.linux;
     license = licenses.mit;
   };