2021-08-22 07:53:02 +00:00
|
|
|
{ stdenv, lib, fetchurl, dpkg, atk, glib, pango, gdk-pixbuf, gtk3, cairo
|
2021-08-05 21:33:18 +00:00
|
|
|
, 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 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-01-17 00:15:33 +00:00
|
|
|
libPath = lib.makeLibraryPath [
|
2021-08-22 07:53:02 +00:00
|
|
|
stdenv.cc.cc gtk3 atk glib pango gdk-pixbuf cairo freetype fontconfig dbus
|
2020-04-24 23:36:52 +00:00
|
|
|
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes libxcb
|
2021-06-28 23:13:55 +00:00
|
|
|
libXrender libX11 libXtst libXScrnSaver nss nspr alsa-lib cups expat udev libpulseaudio
|
2021-08-05 21:33:18 +00:00
|
|
|
at-spi2-atk at-spi2-core libxshmfence libdrm libxkbcommon mesa
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hyper";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "3.2.0";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-08-05 21:33:18 +00:00
|
|
|
url = "https://github.com/vercel/hyper/releases/download/v${version}/hyper_${version}_amd64.deb";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "1ryw3315x0lb60j8nzz78h7zd36r2l1j39hnlfav0p7nq8dhqbpm";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ dpkg ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
unpackPhase = ''
|
|
|
|
mkdir pkg
|
|
|
|
dpkg-deb -x $src pkg
|
|
|
|
sourceRoot=pkg
|
|
|
|
'';
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
mv opt "$out/"
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
ln -s "$out/opt/Hyper/hyper" "$out/bin/hyper"
|
2021-03-09 03:18:52 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}:$out/opt/Hyper:\$ORIGIN" "$out/opt/Hyper/hyper"
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mv usr/* "$out/"
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/hyper.desktop \
|
|
|
|
--replace "/opt/Hyper/hyper" "hyper"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
dontPatchELF = true;
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A terminal built on web technologies";
|
|
|
|
homepage = "https://hyper.is/";
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ puffnfresh fabiangd ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|