diff options
Diffstat (limited to 'pkgs/applications/networking')
6 files changed, 101 insertions, 39 deletions
diff --git a/pkgs/applications/networking/dat/default.nix b/pkgs/applications/networking/dat/default.nix new file mode 100644 index 000000000000..2e0f8005bdbd --- /dev/null +++ b/pkgs/applications/networking/dat/default.nix @@ -0,0 +1,92 @@ +{ stdenv +, fetchurl +, unzip +}: + +stdenv.mkDerivation rec { + pname = "dat"; + version = "13.13.1"; + + suffix = { + x86_64-darwin = "macos-x64"; + x86_64-linux = "linux-x64"; + }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); + + src = fetchurl { + url = "https://github.com/datproject/dat/releases/download/v${version}/${pname}-${version}-${suffix}.zip"; + sha256 = { + x86_64-darwin = "1qj38zn33hhr2v39jw14k2af091bafh5yvhs91h5dnjb2r8yxnaq"; + x86_64-linux = "0vgn57kf3j1pbfxlhj4sl1sm2gfd2gcvhk4wz5yf5mzq1vj9ivpv"; + }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); + }; + + buildInputs = [ unzip ]; + + dontConfigure = true; + dontBuild = true; + dontStrip = true; + dontPatchELF = true; + + installPhase = '' + mkdir -p $out/bin + mv dat $out/bin + ''; + + # dat is a node program packaged using zeit/pkg. + # thus, it contains hardcoded offsets. + # patchelf shifts these locations when it expands headers. + + # this could probably be generalised into allowing any program packaged + # with zeit/pkg to be run on nixos. + + preFixup = let + libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc]; + in stdenv.lib.optionalString (!stdenv.isDarwin) '' + orig_size=$(stat --printf=%s $out/bin/dat) + + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/dat + patchelf --set-rpath ${libPath} $out/bin/dat + chmod +x $out/bin/dat + + new_size=$(stat --printf=%s $out/bin/dat) + + ###### zeit-pkg fixing starts here. + # we're replacing plaintext js code that looks like + # PAYLOAD_POSITION = '1234 ' | 0 + # [...] + # PRELUDE_POSITION = '1234 ' | 0 + # ^-----20-chars-----^^------22-chars------^ + # ^-- grep points here + # + # var_* are as described above + # shift_by seems to be safe so long as all patchelf adjustments occur + # before any locations pointed to by hardcoded offsets + + var_skip=20 + var_select=22 + shift_by=$(expr $new_size - $orig_size) + + function fix_offset { + # $1 = name of variable to adjust + location=$(grep -obUam1 "$1" $out/bin/dat | cut -d: -f1) + location=$(expr $location + $var_skip) + + value=$(dd if=$out/bin/dat iflag=count_bytes,skip_bytes skip=$location \ + bs=1 count=$var_select status=none) + value=$(expr $shift_by + $value) + + echo -n $value | dd of=$out/bin/dat bs=1 seek=$location conv=notrunc + } + + fix_offset PAYLOAD_POSITION + fix_offset PRELUDE_POSITION + ''; + + meta = with stdenv.lib; { + description = "Peer-to-peer sharing and live synchronization of files"; + homepage = "https://dat.foundation/"; + license = licenses.bsd3; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; + maintainers = with maintainers; [ prusnak ]; + }; +} diff --git a/pkgs/applications/networking/instant-messengers/teamspeak/client.nix b/pkgs/applications/networking/instant-messengers/teamspeak/client.nix index a75d0c8633a2..c2a9f4be90a2 100644 --- a/pkgs/applications/networking/instant-messengers/teamspeak/client.nix +++ b/pkgs/applications/networking/instant-messengers/teamspeak/client.nix @@ -101,7 +101,7 @@ stdenv.mkDerivation rec { meta = { description = "The TeamSpeak voice communication tool"; - homepage = http://teamspeak.com/; + homepage = https://teamspeak.com/; license = { fullName = "Teamspeak client license"; url = http://sales.teamspeakusa.com/licensing.php; diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index 3f6d9c498980..e1a40c06d18f 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -10,17 +10,15 @@ with lib; # Main reference: -# - This package is based on the Arch package: +# - This package was originally based on the Arch package but all patches are now upstreamed: # https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/telegram-desktop -# Other references that could be useful (but we should try to stick to Arch): +# Other references that could be useful: # - https://git.alpinelinux.org/aports/tree/testing/telegram-desktop/APKBUILD # - https://github.com/void-linux/void-packages/blob/master/srcpkgs/telegram-desktop/template mkDerivation rec { pname = "telegram-desktop"; version = "1.9.8"; - # Note: Due to our strong dependency on the Arch patches it's probably best - # to also wait for the Arch update (especially if the patches don't apply). # Telegram-Desktop with submodules src = fetchurl { @@ -28,20 +26,6 @@ mkDerivation rec { sha256 = "1rq3180l4ly0n0jj08cxy9l2d07scwp9hasmliva2xspyv7i9ksd"; }; - # Arch patches (svn export telegram-desktop/trunk) - archPatches = fetchsvn { - url = "svn://svn.archlinux.org/community/telegram-desktop/trunk"; - # svn log svn://svn.archlinux.org/community/telegram-desktop/trunk - rev = "554983"; - sha256 = "02gk5dlrmxvyl7w1yxmwclknk1k9drpx6rxqc6vmmw85l763m95j"; - }; - - # Note: It would be best if someone could get as many patches upstream as - # possible (we currently depend a lot on custom patches...). - patches = [ - "${archPatches}/0005-Use-system-wide-fonts.patch" - ]; - postPatch = '' substituteInPlace Telegram/SourceFiles/platform/linux/linux_libs.cpp \ --replace '"appindicator3"' '"${libappindicator-gtk3}/lib/libappindicator3.so"' @@ -64,25 +48,11 @@ mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = [ - "-I${minizip}/include/minizip" - # See Telegram/gyp/qt.gypi - "-I${getDev qtbase}/mkspecs/linux-g++" - ] ++ concatMap (x: [ - "-I${getDev qtbase}/include/${x}" - "-I${getDev qtbase}/include/${x}/${qtbase.version}" - "-I${getDev qtbase}/include/${x}/${qtbase.version}/${x}" - "-I${getDev libopus}/include/opus" - "-I${getDev alsaLib}/include/alsa" - "-I${getDev libpulseaudio}/include/pulse" - ]) [ "QtCore" "QtGui" "QtDBus" ]; - CPPFLAGS = NIX_CFLAGS_COMPILE; - cmakeFlags = [ "-Ddisable_autoupdate=ON" - #"-DTDESKTOP_API_TEST=ON" # TODO: Officiall API credentials for Nixpkgs - "-DTDESKTOP_API_ID=17349" # See: https://github.com/NixOS/nixpkgs/issues/55271 - "-DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb" + # TODO: Officiall API credentials for Nixpkgs + # (see: https://github.com/NixOS/nixpkgs/issues/55271): + "-DTDESKTOP_API_TEST=ON" "-DDESKTOP_APP_USE_GLIBC_WRAPS=OFF" "-DDESKTOP_APP_USE_PACKAGED=ON" "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF" diff --git a/pkgs/applications/networking/irc/wraith/default.nix b/pkgs/applications/networking/irc/wraith/default.nix index 6d9acdb68e52..996ab72d6f5d 100644 --- a/pkgs/applications/networking/irc/wraith/default.nix +++ b/pkgs/applications/networking/irc/wraith/default.nix @@ -40,7 +40,7 @@ mkDerivation rec { The binary will not run when moved onto non-NixOS systems; use patchelf to fix its runtime dependenices. ''; - homepage = http://wraith.botpack.net/; + homepage = https://wraith.botpack.net/; license = licenses.gpl2Plus; maintainers = with maintainers; [ elitak ]; platforms = platforms.linux; diff --git a/pkgs/applications/networking/remote/citrix-workspace/default.nix b/pkgs/applications/networking/remote/citrix-workspace/default.nix index a4deda99f5b2..266528e19019 100644 --- a/pkgs/applications/networking/remote/citrix-workspace/default.nix +++ b/pkgs/applications/networking/remote/citrix-workspace/default.nix @@ -60,7 +60,7 @@ let x86hash = "0afcqirb4q349r3izy88vqkszg6y2wg14iwypk6nrmvwgvcl6jdn"; x64suffix = "20"; x86suffix = "20"; - homepage = https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-latest1.html; + homepage = https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-1908.html; }; "19.10.0" = { diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix index bc93b743f8b1..cada3f93f55a 100644 --- a/pkgs/applications/networking/sync/unison/default.nix +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation (rec { dontStrip = !ocaml.nativeCompilers; meta = { - homepage = http://www.cis.upenn.edu/~bcpierce/unison/; + homepage = https://www.cis.upenn.edu/~bcpierce/unison/; description = "Bidirectional file synchronizer"; license = stdenv.lib.licenses.gpl3Plus; maintainers = with stdenv.lib.maintainers; [viric]; |