nixpkgs/pkgs/by-name/te/tetrd/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

88 lines
1.6 KiB
Nix

{
stdenv,
lib,
fetchurl,
autoPatchelfHook,
makeWrapper,
c-ares,
ffmpeg,
libevent,
libvpx,
libxslt,
xorg,
minizip,
nss,
re2,
snappy,
libnotify,
libappindicator-gtk3,
libappindicator,
udev,
mesa, # required for libgbm
}:
stdenv.mkDerivation rec {
pname = "tetrd";
version = "1.0.4";
src = fetchurl {
url = "https://web.archive.org/web/20211130190525/https://download.tetrd.app/files/tetrd.linux_amd64.pkg.tar.xz";
sha256 = "1bxp7rg2dm9nnvkgg48xd156d0jgdf35flaw0bwzkkh3zz9ysry2";
};
sourceRoot = ".";
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
buildInputs = [
c-ares
ffmpeg
libevent
libvpx
libxslt
xorg.libXScrnSaver
xorg.libXdamage
xorg.libXtst
minizip
nss
re2
snappy
libnotify
libappindicator-gtk3
libappindicator
udev
mesa
];
installPhase = ''
runHook preInstall
mkdir -p $out/opt
cp -r $sourceRoot/opt/Tetrd $out/opt
cp -r $sourceRoot/usr/share $out
wrapProgram $out/opt/Tetrd/tetrd \
--prefix LD_LIBRARY_PATH ":" ${lib.makeLibraryPath buildInputs}
runHook postInstall
'';
postFixup = ''
substituteInPlace $out/share/applications/tetrd.desktop --replace /opt $out/opt
'';
meta = with lib; {
description = "Share your internet connection from your device to your PC and vice versa through a USB cable";
homepage = "https://tetrd.app";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ Madouura ];
};
}