summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/qutebrowser/default.nix
diff options
context:
space:
mode:
authorTimothy DeHerrera <tim@nrdxp.dev>2022-10-12 17:29:26 -0600
committerTimothy DeHerrera <tim@nrdxp.dev>2022-10-16 15:01:55 -0600
commit65cdf3be6d353975e4463d9e4c3e687dc5a031ae (patch)
treedab592fe44ec0a83284721f39b6ef714a4cfe321 /pkgs/applications/networking/browsers/qutebrowser/default.nix
parentec96702d7dbc5d3af40ef1c4d28040ec4a0f11e8 (diff)
downloadnixpkgs-65cdf3be6d353975e4463d9e4c3e687dc5a031ae.tar
nixpkgs-65cdf3be6d353975e4463d9e4c3e687dc5a031ae.tar.gz
nixpkgs-65cdf3be6d353975e4463d9e4c3e687dc5a031ae.tar.bz2
nixpkgs-65cdf3be6d353975e4463d9e4c3e687dc5a031ae.tar.lz
nixpkgs-65cdf3be6d353975e4463d9e4c3e687dc5a031ae.tar.xz
nixpkgs-65cdf3be6d353975e4463d9e4c3e687dc5a031ae.tar.zst
nixpkgs-65cdf3be6d353975e4463d9e4c3e687dc5a031ae.zip
qutebrowser: use upstream `make install`
Diffstat (limited to 'pkgs/applications/networking/browsers/qutebrowser/default.nix')
-rw-r--r--pkgs/applications/networking/browsers/qutebrowser/default.nix37
1 files changed, 15 insertions, 22 deletions
diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix
index 4f10e76d0e4..87911ced549 100644
--- a/pkgs/applications/networking/browsers/qutebrowser/default.nix
+++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix
@@ -100,9 +100,7 @@ buildPythonApplication {
   dontWrapGApps = true;
   dontWrapQtApps = true;
 
-  preConfigure = ''
-    a2x -f manpage doc/qutebrowser.1.asciidoc
-  '' + lib.optionalString isQt6 ''
+  preConfigure = lib.optionalString isQt6 ''
     python scripts/asciidoc2html.py
   '';
 
@@ -114,25 +112,20 @@ buildPythonApplication {
     sed -i "s,/usr/share/pdf.js,${pdfjs},g" qutebrowser/browser/pdfjs.py
   '';
 
-  postInstall = ''
-    install -Dm644 doc/qutebrowser.1 "$out/share/man/man1/qutebrowser.1"
-    install -Dm644 misc/org.qutebrowser.qutebrowser.desktop \
-        "$out/share/applications/org.qutebrowser.qutebrowser.desktop"
-
-    # Install icons
-    for i in 16 24 32 48 64 128 256 512; do
-        install -Dm644 "${lib.optionalString isQt6 "qutebrowser/"}icons/qutebrowser-''${i}x''${i}.png" \
-            "$out/share/icons/hicolor/''${i}x''${i}/apps/qutebrowser.png"
-    done
-    install -Dm644 ${lib.optionalString isQt6 "qutebrowser/"}icons/qutebrowser.svg \
-        "$out/share/icons/hicolor/scalable/apps/qutebrowser.svg"
+  installPhase = ''
+    runHook preInstall
 
-    # Install scripts
-    sed -i "s,/usr/bin/,$out/bin/,g" scripts/open_url_in_instance.sh
-    ${lib.optionalString isQt6 "rm -rf scripts/{testbrowser,dev}"}
-    install -Dm755 -t "$out/share/qutebrowser/scripts/" $(find scripts -type f)
-    install -Dm755 -t "$out/share/qutebrowser/userscripts/" misc/userscripts/*
+    make -f misc/Makefile \
+      PYTHON=${python3}/bin/python3 \
+      PREFIX=. \
+      DESTDIR="$out" \
+      DATAROOTDIR=/share \
+      install
 
+    runHook postInstall
+  '';
+
+  postInstall = ''
     # Patch python scripts
     buildPythonPath "$out $propagatedBuildInputs"
     scripts=$(grep -rl python "$out"/share/qutebrowser/{user,}scripts/)
@@ -156,10 +149,10 @@ buildPythonApplication {
   '';
 
   meta = with lib; {
-    homepage    = "https://github.com/The-Compiler/qutebrowser";
+    homepage    = "https://github.com/qutebrowser/qutebrowser";
     description = "Keyboard-focused browser with a minimal GUI";
     license     = licenses.gpl3Plus;
-    maintainers = with maintainers; [ jagajaga rnhmjoj ebzzry dotlambda ];
     platforms   = if enableWideVine then [ "x86_64-linux" ] else backendPackage.meta.platforms;
+    maintainers = with maintainers; [ jagajaga rnhmjoj ebzzry dotlambda nrdxp ];
   };
 }