From 1bcf9527353a701312f86b22b6a3e3022f1abd5c Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Wed, 17 Apr 2024 09:13:06 -0400 Subject: [PATCH 1/3] firefoxpwa: apply nixfmt, sort lists --- pkgs/by-name/fi/firefoxpwa/package.nix | 69 ++++++++++++++++++-------- 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/fi/firefoxpwa/package.nix b/pkgs/by-name/fi/firefoxpwa/package.nix index 971d5ac16fde..1329b4171014 100644 --- a/pkgs/by-name/fi/firefoxpwa/package.nix +++ b/pkgs/by-name/fi/firefoxpwa/package.nix @@ -1,22 +1,25 @@ -{ lib -, rustPlatform -, fetchFromGitHub -, makeWrapper -, pkg-config -, installShellFiles -, firefox-unwrapped -, openssl -, stdenv -, udev -, libva -, mesa -, libnotify -, xorg -, cups -, pciutils -, libcanberra-gtk3 -, extraLibs ? [ ] -, nixosTests +{ + extraLibs ? [ ], + + lib, + fetchFromGitHub, + installShellFiles, + makeWrapper, + rustPlatform, + + cups, + firefox-unwrapped, + libcanberra-gtk3, + libnotify, + libva, + mesa, + nixosTests, + openssl, + pciutils, + pkg-config, + stdenv, + udev, + xorg, }: rustPlatform.buildRustPackage rec { @@ -47,7 +50,11 @@ rustPlatform.buildRustPackage rec { sed -i $'s;DISTRIBUTION_VERSION = \'0.0.0\';DISTRIBUTION_VERSION = \'${version}\';' userchrome/profile/chrome/pwa/chrome.jsm ''; - nativeBuildInputs = [ makeWrapper pkg-config installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + makeWrapper + pkg-config + ]; buildInputs = [ openssl ]; FFPWA_EXECUTABLES = ""; # .desktop entries generated without any store path references @@ -55,7 +62,22 @@ rustPlatform.buildRustPackage rec { completions = "target/${stdenv.targetPlatform.config}/release/completions"; gtk_modules = map (x: x + x.gtkModule) [ libcanberra-gtk3 ]; - libs = let libs = lib.optionals stdenv.isLinux [ udev libva mesa libnotify xorg.libXScrnSaver cups pciutils ] ++ gtk_modules ++ extraLibs; in lib.makeLibraryPath libs + ":" + lib.makeSearchPathOutput "lib" "lib64" libs; + libs = + let + libs = + lib.optionals stdenv.isLinux [ + cups + libnotify + libva + mesa + pciutils + udev + xorg.libXScrnSaver + ] + ++ gtk_modules + ++ extraLibs; + in + lib.makeLibraryPath libs + ":" + lib.makeSearchPathOutput "lib" "lib64" libs; postInstall = '' # Runtime @@ -127,7 +149,10 @@ rustPlatform.buildRustPackage rec { changelog = "https://github.com/filips123/PWAsForFirefox/releases/tag/v${version}"; license = licenses.mpl20; platforms = platforms.unix; - maintainers = with maintainers; [ camillemndn pasqui23 ]; + maintainers = with maintainers; [ + camillemndn + pasqui23 + ]; mainProgram = "firefoxpwa"; }; } From e7722c10477579c3d5f6857a81752a1e40d30f47 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Wed, 17 Apr 2024 09:13:29 -0400 Subject: [PATCH 2/3] firefoxpwa: add adamcstephens as maintainer --- pkgs/by-name/fi/firefoxpwa/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/fi/firefoxpwa/package.nix b/pkgs/by-name/fi/firefoxpwa/package.nix index 1329b4171014..d5aa674016d1 100644 --- a/pkgs/by-name/fi/firefoxpwa/package.nix +++ b/pkgs/by-name/fi/firefoxpwa/package.nix @@ -150,6 +150,7 @@ rustPlatform.buildRustPackage rec { license = licenses.mpl20; platforms = platforms.unix; maintainers = with maintainers; [ + adamcstephens camillemndn pasqui23 ]; From 404bb210268b33f5d1bfc34e1b25e146a3789529 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Wed, 17 Apr 2024 09:14:33 -0400 Subject: [PATCH 3/3] firefoxpwa: fix libEGL detection --- pkgs/by-name/fi/firefoxpwa/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/fi/firefoxpwa/package.nix b/pkgs/by-name/fi/firefoxpwa/package.nix index d5aa674016d1..b75d6694c19d 100644 --- a/pkgs/by-name/fi/firefoxpwa/package.nix +++ b/pkgs/by-name/fi/firefoxpwa/package.nix @@ -10,6 +10,7 @@ cups, firefox-unwrapped, libcanberra-gtk3, + libglvnd, libnotify, libva, mesa, @@ -67,6 +68,7 @@ rustPlatform.buildRustPackage rec { libs = lib.optionals stdenv.isLinux [ cups + libglvnd libnotify libva mesa