about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/dillong
diff options
context:
space:
mode:
authorFrancesco Gazzetta <fgaz@fgaz.me>2022-11-07 17:13:20 +0100
committerFrancesco Gazzetta <fgaz@fgaz.me>2022-11-07 17:13:20 +0100
commitf6260b00baa812e13e8235cf47459d7d52ed3431 (patch)
tree3cf856696d149939dd876b075c96e6db96c8bd07 /pkgs/applications/networking/browsers/dillong
parent00d58bc626725419b58c0524823f015f73d9c0e1 (diff)
dillong: init at unstable-2021-12-13
Diffstat (limited to 'pkgs/applications/networking/browsers/dillong')
-rw-r--r--pkgs/applications/networking/browsers/dillong/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/dillong/default.nix b/pkgs/applications/networking/browsers/dillong/default.nix
new file mode 100644
index 0000000000000..2d12134caadd8
--- /dev/null
+++ b/pkgs/applications/networking/browsers/dillong/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, which
+, fltk
+, mbedtls
+}:
+
+stdenv.mkDerivation {
+  pname = "dillong";
+  version = "unstable-2021-12-13";
+
+  src = fetchFromGitHub {
+    owner = "w00fpack";
+    repo = "dilloNG";
+    rev = "2804e6e9074b840de3084abb80473983f8e49f5b";
+    hash = "sha256-JSBd8Lgw3I20Es/jQHBtybnLd0iAcs16TqOrOxGPGiU=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    which
+  ];
+
+  buildInputs = [
+    fltk
+    mbedtls
+  ];
+
+  # The start_page and home settings refer to /usr.
+  # We can't change /usr to $out because dillorc is copied to the home directory
+  # on first launch, so the paths would quickly become outdated.
+  # So we just comment them out, and let dillong use the defaults.
+  postPatch = ''
+    substituteInPlace dillorc \
+      --replace "start_page=" "#start_page=" \
+      --replace "home=" "#home="
+  '';
+
+  configureFlags = [ "--enable-ssl=yes" ];
+
+  # Workaround build failure on -fno-common toolchains:
+  #   ld: main.o:/build/dillo-3.0.5/dpid/dpid.h:64: multiple definition of `sock_set';
+  #     dpid.o:/build/dillo-3.0.5/dpid/dpid.h:64: first defined here
+  NIX_CFLAGS_COMPILE = "-fcommon";
+
+  meta = with lib; {
+    description = "Fork of Dillo, a lightweight web browser";
+    homepage = "https://github.com/w00fpack/dilloNG";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ fgaz ];
+  };
+}