From 6e21b9eff9868173f1b75dd60ae5311adae2c743 Mon Sep 17 00:00:00 2001 From: quexeky Date: Sun, 28 Sep 2025 12:05:03 +1000 Subject: [PATCH] feat: Add nix package --- nix-app/default.nix | 55 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 nix-app/default.nix diff --git a/nix-app/default.nix b/nix-app/default.nix new file mode 100644 index 0000000..24c172c --- /dev/null +++ b/nix-app/default.nix @@ -0,0 +1,55 @@ +{ pkgs ? import {} }: +# Mostly taken from the cinny nix package +let + # Destructure the necessary dependencies from pkgs + inherit (pkgs) stdenv lib dpkg fetchurl autoPatchelfHook glib-networking libayatana-appindicator openssl webkitgtk_4_1 wrapGAppsHook libcanberra-gtk3; +in +stdenv.mkDerivation rec { + name = "drop-oss-app"; + version = "0.3.3"; + + src = fetchurl { + url = "https://github.com/Drop-OSS/drop-app/releases/download/v${version}/Drop.Desktop.Client_${version}_amd64.deb"; + sha256 = "sha256-w9pnYds8m8DASzCDN3Bp+UF1CcrW24G274OLVdnzIkI="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + dpkg + ]; + + buildInputs = [ + glib-networking + openssl + webkitgtk_4_1 + wrapGAppsHook + libayatana-appindicator + pkgs.gdk-pixbuf + pkgs.gtk3 + libcanberra-gtk3 + pkgs.mesa + pkgs.xorg.libX11 + pkgs.xorg.libXext + ]; + + unpackCmd = "dpkg-deb -x $curSrc source"; + installPhase = "mv usr $out"; + + postFixup = '' + # Ensure libraries get injected + local libPath=${lib.makeLibraryPath buildInputs} + + wrapProgram $out/bin/drop-app \ + --set LD_LIBRARY_PATH "$libPath" + ''; + + meta = with lib; { + description = " The desktop companion app for Drop. It acts a download client, game launcher and game distribution endpoint for Drop. "; + homepage = "https://droposs.org"; + maintainers = [ "quexeky" ]; + license = licenses.agpl3Only; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + platforms = platforms.linux; + mainProgram = "drop-app"; + }; +}