summary refs log tree commit diff
diff options
context:
space:
mode:
authorFGD <40316600+FabianGD@users.noreply.github.com>2021-08-05 16:26:42 +0200
committerGitHub <noreply@github.com>2021-08-05 16:26:42 +0200
commit3580b1789972cd213df3dcbaee84dcb3a5c5946a (patch)
tree136cc0bcd002e930117dd7f00e01be18802a8d55
parent1248f5ac43d2f6d7975f872395a2fc0cca821b51 (diff)
downloadnixpkgs-3580b1789972cd213df3dcbaee84dcb3a5c5946a.tar
nixpkgs-3580b1789972cd213df3dcbaee84dcb3a5c5946a.tar.gz
nixpkgs-3580b1789972cd213df3dcbaee84dcb3a5c5946a.tar.bz2
nixpkgs-3580b1789972cd213df3dcbaee84dcb3a5c5946a.tar.lz
nixpkgs-3580b1789972cd213df3dcbaee84dcb3a5c5946a.tar.xz
nixpkgs-3580b1789972cd213df3dcbaee84dcb3a5c5946a.tar.zst
nixpkgs-3580b1789972cd213df3dcbaee84dcb3a5c5946a.zip
hyper: 3.0.2 -> 3.1.2 and fix for desktop files (#132395)
* (hyper): 3.0.2 -> 3.1.1 and fix for desktop files

* hyper: fix deb hash
Fixes ownload of old cached deb package and addition of "new" dependencies.

* hyper: move desktopItem into mkDerivation

* hyper: Simpler fix for the desktopItem issue
- Subsituting the erronous path for the executable name
- Cleanup of the function args
-rw-r--r--pkgs/applications/terminal-emulators/hyper/default.nix28
1 files changed, 20 insertions, 8 deletions
diff --git a/pkgs/applications/terminal-emulators/hyper/default.nix b/pkgs/applications/terminal-emulators/hyper/default.nix
index 55798ed6099..f698df598ca 100644
--- a/pkgs/applications/terminal-emulators/hyper/default.nix
+++ b/pkgs/applications/terminal-emulators/hyper/default.nix
@@ -1,36 +1,48 @@
 { stdenv, lib, fetchurl, dpkg, atk, glib, pango, gdk-pixbuf, gnome2, gtk3, cairo
-, freetype, fontconfig, dbus, libXi, libXcursor, libXdamage, libXrandr
-, libXcomposite, libXext, libXfixes, libXrender, libX11, libXtst, libXScrnSaver
-, libxcb, nss, nspr, alsa-lib, cups, expat, udev, libpulseaudio, at-spi2-atk }:
+, freetype, fontconfig, dbus, libXi, libXcursor, libXdamage, libXrandr, libXcomposite
+, libXext, libXfixes, libXrender, libX11, libXtst, libXScrnSaver, libxcb, nss, nspr
+, alsa-lib, cups, expat, udev, libpulseaudio, at-spi2-atk, at-spi2-core, libxshmfence
+, libdrm, libxkbcommon, mesa }:
 
 let
   libPath = lib.makeLibraryPath [
     stdenv.cc.cc gtk3 gnome2.GConf atk glib pango gdk-pixbuf cairo freetype fontconfig dbus
     libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes libxcb
     libXrender libX11 libXtst libXScrnSaver nss nspr alsa-lib cups expat udev libpulseaudio
-    at-spi2-atk
+    at-spi2-atk at-spi2-core libxshmfence libdrm libxkbcommon mesa
   ];
+
 in
 stdenv.mkDerivation rec {
-  version = "3.0.2";
   pname = "hyper";
+  version = "3.1.2";
+
   src = fetchurl {
-    url = "https://github.com/zeit/hyper/releases/download/${version}/hyper_${version}_amd64.deb";
-    sha256 = "0fv4wv5f8nc739bna83qxmgrvvbyq4w9ch764q2f12wjygrz336p";
+    url = "https://github.com/vercel/hyper/releases/download/v${version}/hyper_${version}_amd64.deb";
+    sha256 = "1mixy9hlgdbbnwdgidady7q828dkf09lx1pacwxw386jj7kp4y5g";
   };
-  buildInputs = [ dpkg ];
+
+  nativeBuildInputs = [ dpkg ];
+
   unpackPhase = ''
     mkdir pkg
     dpkg-deb -x $src pkg
     sourceRoot=pkg
   '';
+
   installPhase = ''
     mkdir -p "$out/bin"
     mv opt "$out/"
+
     ln -s "$out/opt/Hyper/hyper" "$out/bin/hyper"
     patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}:$out/opt/Hyper:\$ORIGIN" "$out/opt/Hyper/hyper"
+
     mv usr/* "$out/"
+
+    substituteInPlace $out/share/applications/hyper.desktop \
+      --replace "/opt/Hyper/hyper" "hyper"
   '';
+
   dontPatchELF = true;
   meta = with lib; {
     description = "A terminal built on web technologies";