3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/terminal-emulators/hyper/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, dpkg, atk, glib, pango, gdk-pixbuf, 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, at-spi2-core, libxshmfence
, libdrm, libxkbcommon, mesa, nixosTests}:
2016-08-30 11:10:42 +01:00
let
2021-01-15 13:21:58 +00:00
libPath = lib.makeLibraryPath [
stdenv.cc.cc gtk3 atk glib pango gdk-pixbuf cairo freetype fontconfig dbus
2017-09-05 12:40:47 +01:00
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-core libxshmfence libdrm libxkbcommon mesa
2016-08-30 11:10:42 +01:00
];
2016-08-30 11:10:42 +01:00
in
stdenv.mkDerivation rec {
pname = "hyper";
2022-08-22 13:04:05 +01:00
version = "3.3.0";
2016-08-30 11:10:42 +01:00
src = fetchurl {
url = "https://github.com/vercel/hyper/releases/download/v${version}/hyper_${version}_amd64.deb";
2022-08-22 13:04:05 +01:00
sha256 = "sha256-VJAFa4I5nHuS/aXhiiXztUh2MjCq5zdwCtK0oSsOrGQ=";
2016-08-30 11:10:42 +01:00
};
nativeBuildInputs = [ dpkg ];
2016-08-30 11:10:42 +01:00
unpackPhase = ''
mkdir pkg
dpkg-deb -x $src pkg
sourceRoot=pkg
'';
2016-08-30 11:10:42 +01:00
installPhase = ''
mkdir -p "$out/bin"
mv opt "$out/"
2017-03-17 00:36:12 +00:00
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"
2016-08-30 11:10:42 +01:00
mv usr/* "$out/"
substituteInPlace $out/share/applications/hyper.desktop \
--replace "/opt/Hyper/hyper" "hyper"
2016-08-30 11:10:42 +01:00
'';
passthru.tests.test = nixosTests.terminal-emulators.hyper;
2016-08-30 11:10:42 +01:00
dontPatchELF = true;
meta = with lib; {
description = "A terminal built on web technologies";
homepage = "https://hyper.is/";
maintainers = with maintainers; [ puffnfresh fabiangd ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2016-08-30 11:10:42 +01:00
license = licenses.mit;
2017-09-05 12:40:47 +01:00
platforms = [ "x86_64-linux" ];
2016-08-30 11:10:42 +01:00
};
}