about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-07-22 12:29:54 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-08-01 10:04:14 +0000
commit3c69727d690cc102a3599f2e411dc2d520d7681f (patch)
treeaecb5dadeeb737397c6ea9a84729e6ab4aa044e9 /pkgs/applications
parent4da2dd2537d840774e6b2393817b48409ba7665d (diff)
netsurf.libcss: rewrite
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/browsers/netsurf/libcss.nix35
1 files changed, 21 insertions, 14 deletions
diff --git a/pkgs/applications/networking/browsers/netsurf/libcss.nix b/pkgs/applications/networking/browsers/netsurf/libcss.nix
index db5a39f22856b..66a3a4057d85e 100644
--- a/pkgs/applications/networking/browsers/netsurf/libcss.nix
+++ b/pkgs/applications/networking/browsers/netsurf/libcss.nix
@@ -1,35 +1,43 @@
-{ lib, stdenv, fetchurl, pkg-config, perl
+{ lib
+, stdenv
+, fetchurl
+, perl
+, pkg-config
 , buildsystem
 , libparserutils
 , libwapcaplet
 }:
 
-stdenv.mkDerivation rec {
-  pname = "netsurf-${libname}";
-  libname = "libcss";
+stdenv.mkDerivation (finalAttrs: {
+  pname = "netsurf-libcss";
   version = "0.9.1";
 
   src = fetchurl {
-    url = "http://download.netsurf-browser.org/libs/releases/${libname}-${version}-src.tar.gz";
-    sha256 = "sha256-0tzhbpM5Lo1qcglCDUfC1Wo4EXAaDoGnJPxUHGPTxtw=";
+    url = "http://download.netsurf-browser.org/libs/releases/libcss-${finalAttrs.version}-src.tar.gz";
+    hash = "sha256-0tzhbpM5Lo1qcglCDUfC1Wo4EXAaDoGnJPxUHGPTxtw=";
   };
 
   nativeBuildInputs = [ pkg-config ];
+
   buildInputs = [
     perl
+    buildsystem
     libparserutils
     libwapcaplet
-    buildsystem ];
+  ];
 
   makeFlags = [
     "PREFIX=$(out)"
     "NSSHARED=${buildsystem}/share/netsurf-buildsystem"
   ];
 
-  env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=implicit-fallthrough" "-Wno-error=maybe-uninitialized" ];
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-Wno-error=implicit-fallthrough"
+    "-Wno-error=maybe-uninitialized"
+  ];
 
-  meta = with lib; {
-    homepage = "https://www.netsurf-browser.org/projects/${libname}/";
+  meta = {
+    homepage = "https://www.netsurf-browser.org/projects/libcss/";
     description = "Cascading Style Sheets library for netsurf browser";
     longDescription = ''
       LibCSS is a CSS parser and selection engine. It aims to parse the forward
@@ -37,8 +45,7 @@ stdenv.mkDerivation rec {
       and is available for use by other software, under a more permissive
       license.
     '';
-    license = licenses.mit;
-    maintainers = [ maintainers.vrthra maintainers.AndersonTorres ];
-    platforms = platforms.linux;
+    license = lib.licenses.mit;
+    inherit (buildsystem.meta) maintainers platforms;
   };
-}
+})