commit eff718e110f5d2b9ea7d746b2d45d23e912a2f50
parent 1b482e4e399f766cf8241c9b70fc7a329d1546a8
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Sun, 5 Mar 2023 21:51:14 +0400
qutebrowser: add qute-pass userscript
Diffstat:
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/pkgs/darwin/qutebrowser/bin.nix b/pkgs/darwin/qutebrowser/bin.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchfromgh, undmg }:
+{ lib, stdenv, fetchfromgh, undmg, python3Packages, qutebrowser }:
stdenv.mkDerivation (finalAttrs: {
pname = "qutebrowser-bin";
@@ -14,21 +14,30 @@ stdenv.mkDerivation (finalAttrs: {
sourceRoot = ".";
- nativeBuildInputs = [ undmg ];
+ nativeBuildInputs = [ undmg python3Packages.wrapPython ];
installPhase = ''
+ runHook preInstall
+
mkdir -p $out/Applications
cp -r *.app $out/Applications
+
+ runHook postInstall
'';
- preferLocalBuild = true;
+ postInstall = ''
+ tar -C $out/Applications/qutebrowser.app/Contents/Resources \
+ --strip-components=2 -xvzf ${qutebrowser.src} \
+ qutebrowser-${qutebrowser.version}/misc/userscripts/qute-pass
- meta = with lib; {
- description = "A keyboard-driven, vim-like browser";
- homepage = "https://qutebrowser.org";
- license = licenses.gpl3Plus;
- maintainers = [ maintainers.sikmir ];
- platforms = [ "x86_64-darwin" ];
- skip.ci = true;
- };
+ buildPythonPath ${python3Packages.tldextract};
+ patchPythonScript $out/Applications/qutebrowser.app/Contents/Resources/userscripts/qute-pass
+ '';
+
+ meta = with lib;
+ qutebrowser.meta // {
+ maintainers = [ maintainers.sikmir ];
+ platforms = [ "x86_64-darwin" ];
+ skip.ci = true;
+ };
})