From b8a905931ebf4d416f40c063595daa9245f0cb54 Mon Sep 17 00:00:00 2001 From: Max Hille Date: Tue, 13 Jul 2021 17:11:18 +0200 Subject: [PATCH 1/2] maintainers: add maxhille --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 334ea7b72d7..47826b08cf1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6604,6 +6604,12 @@ githubId = 35892750; name = "Maxine Aubrey"; }; + maxhille = { + email = "mh@lambdasoup.com"; + github = "maxhille"; + githubId = 693447; + name = "Max Hille"; + }; maxhbr = { email = "nixos@maxhbr.dev"; github = "maxhbr"; From 8b9bd1657a9da08a4e6666ab148f924154c06f35 Mon Sep 17 00:00:00 2001 From: Max Hille Date: Tue, 12 Jan 2021 15:23:20 +0100 Subject: [PATCH 2/2] aether: init at 2.0.0-dev.15 basically cloned the discord package as it is also electron --- .../networking/aether/default.nix | 115 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 117 insertions(+) create mode 100644 pkgs/applications/networking/aether/default.nix diff --git a/pkgs/applications/networking/aether/default.nix b/pkgs/applications/networking/aether/default.nix new file mode 100644 index 00000000000..ddb137137cf --- /dev/null +++ b/pkgs/applications/networking/aether/default.nix @@ -0,0 +1,115 @@ +{ autoPatchelfHook, makeDesktopItem, lib, stdenv, wrapGAppsHook +, alsa-lib, at-spi2-atk, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig +, freetype, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid +, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext +, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence +, mesa, nspr, nss, pango, systemd, libappindicator-gtk3, libdbusmenu +, fetchurl, fetchFromGitHub, imagemagick, copyDesktopItems +}: + +let + binaryName = "AetherP2P"; +in +stdenv.mkDerivation rec { + pname = "aether"; + version = "2.0.0-dev.15"; + + srcs = [ + (fetchurl { + url = "https://static.getaether.net/Releases/Aether-${version}/2011262249.19338c93/linux/Aether-${version}%2B2011262249.19338c93.tar.gz"; + sha256 = "1hi8w83zal3ciyzg2m62shkbyh6hj7gwsidg3dn88mhfy68himf7"; + # % in the url / canonical filename causes an error + name = "aether-tarball.tar.gz"; + }) + (fetchFromGitHub { + owner = "aethereans"; + repo = "aether-app"; + rev = "53b6c8b2a9253cbf056ea3ebb077e0e08cbc5b1d"; + sha256 = "1kgkzh7ih2q9dsckdkinh5dbzvr7gdykf8yz6h8pyhvzyjhk1v0r"; + }) + ]; + + sourceRoot = "Aether-${version}+2011262249.19338c93"; + + # there is no logo in the tarball so we grab it from github and convert it in the build phase + buildPhase = '' + convert ../source/aether-core/aether/client/src/app/ext_dep/images/Linux-Windows-App-Icon.png -resize 512x512 aether.png + ''; + + dontWrapGApps = true; + + buildInputs = [ + alsa-lib + cups + libdrm + libuuid + libXdamage + libX11 + libXScrnSaver + libXtst + libxcb + libxshmfence + mesa + nss + ]; + + nativeBuildInputs = [ + imagemagick + autoPatchelfHook + wrapGAppsHook + copyDesktopItems + ]; + + desktopItems = [ + (makeDesktopItem { + name = pname; + exec = binaryName; + icon = pname; + desktopName = "Aether"; + genericName = meta.description; + categories = "Network;"; + mimeType = "x-scheme-handler/aether"; + }) + ]; + + installPhase = + let + libPath = lib.makeLibraryPath [ + libcxx systemd libpulseaudio libdrm mesa + stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups dbus expat fontconfig freetype + gdk-pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid + libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender + libXtst nspr nss libxcb pango systemd libXScrnSaver + libappindicator-gtk3 libdbusmenu + ]; + in + '' + mkdir -p $out/{bin,opt/${binaryName},share/icons/hicolor/512x512/apps} + mv * $out/opt/${binaryName} + + chmod +x $out/opt/${binaryName}/${binaryName} + patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \ + $out/opt/${binaryName}/${binaryName} + + wrapProgram $out/opt/${binaryName}/${binaryName} \ + "''${gappsWrapperArgs[@]}" \ + --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}" \ + --prefix LD_LIBRARY_PATH : ${libPath} + + ln -s $out/opt/${binaryName}/${binaryName} $out/bin/ + + ln -s $out/opt/${binaryName}/aether.png $out/share/icons/hicolor/512x512/apps/ + + runHook postInstall + ''; + + meta = with lib; { + description = "Peer-to-peer ephemeral public communities"; + homepage = "https://getaether.net/"; + downloadPage = "https://getaether.net/download/"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ maxhille ]; + # other platforms could be supported by building from source + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 174927ce3af..bee0133878b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -174,6 +174,8 @@ in addOpenGLRunpath = callPackage ../build-support/add-opengl-runpath { }; + aether = callPackage ../applications/networking/aether { }; + alda = callPackage ../development/interpreters/alda { }; althttpd = callPackage ../servers/althttpd { };