149 lines
		
	
	
	
		
			3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			149 lines
		
	
	
	
		
			3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  lib,
 | 
						|
  flutter332,
 | 
						|
  fetchFromGitLab,
 | 
						|
  pkg-config,
 | 
						|
  wrapGAppsHook,
 | 
						|
  gtk3,
 | 
						|
  glib,
 | 
						|
  glib-networking,
 | 
						|
  webkitgtk_4_1,
 | 
						|
  libsecret,
 | 
						|
  libnotify,
 | 
						|
  dbus,
 | 
						|
  sqlcipher,
 | 
						|
  openssl,
 | 
						|
  mpv,
 | 
						|
  alsa-lib,
 | 
						|
  libass,
 | 
						|
  ffmpeg-full,
 | 
						|
  libplacebo,
 | 
						|
  libunwind,
 | 
						|
  shaderc,
 | 
						|
  vulkan-headers,
 | 
						|
  vulkan-loader,
 | 
						|
  lcms2,
 | 
						|
  libdovi,
 | 
						|
  libdvdnav,
 | 
						|
  libdvdread,
 | 
						|
  mujs,
 | 
						|
  libbluray,
 | 
						|
  lua,
 | 
						|
  rubberband,
 | 
						|
  libuchardet,
 | 
						|
  zimg,
 | 
						|
  openal,
 | 
						|
  pipewire,
 | 
						|
  libpulseaudio,
 | 
						|
  libcaca,
 | 
						|
  libdrm,
 | 
						|
  libdisplay-info,
 | 
						|
  libgbm,
 | 
						|
  xorg,
 | 
						|
  nv-codec-headers-11,
 | 
						|
  libva,
 | 
						|
  libvdpau,
 | 
						|
}:
 | 
						|
flutter332.buildFlutterApplication rec {
 | 
						|
  pname = "polycule";
 | 
						|
  version = "0.3.4";
 | 
						|
 | 
						|
  src = fetchFromGitLab {
 | 
						|
    owner = "polycule_client";
 | 
						|
    repo = "polycule";
 | 
						|
    rev = "v${version}";
 | 
						|
    hash = "sha256-RUu8DKuX2NUU5Ce5WLHtDaORkn7CSrgTj3KhM/z+yHc=";
 | 
						|
  };
 | 
						|
 | 
						|
  pubspecLock = lib.importJSON ./polycule-pubspec.lock.json;
 | 
						|
 | 
						|
  gitHashes = {
 | 
						|
    matrix = "sha256-w/QB5nYJ9Lh77TcYKEN/DnNQjWfp+9NX0dwQ9GOzWE8=";
 | 
						|
    media_kit = "sha256-1sVX+aHFLFJBtrNZrR6tWkb80vFELW2N9EejyQKlBPg=";
 | 
						|
    media_kit_libs_android_video = "sha256-N6QoktM8u9NYF8MAXLsxM9RlV8nICM4NbnmABHTRkZg=";
 | 
						|
  };
 | 
						|
 | 
						|
  nativeBuildInputs = [
 | 
						|
    pkg-config
 | 
						|
    wrapGAppsHook
 | 
						|
  ];
 | 
						|
 | 
						|
  buildInputs = [
 | 
						|
    gtk3
 | 
						|
    glib
 | 
						|
    glib-networking
 | 
						|
    webkitgtk_4_1
 | 
						|
    libsecret
 | 
						|
    libnotify
 | 
						|
    dbus
 | 
						|
    sqlcipher
 | 
						|
    openssl
 | 
						|
    mpv
 | 
						|
    alsa-lib
 | 
						|
    libass
 | 
						|
    ffmpeg-full
 | 
						|
    libplacebo
 | 
						|
    libunwind
 | 
						|
    shaderc
 | 
						|
    vulkan-headers
 | 
						|
    vulkan-loader
 | 
						|
    lcms2
 | 
						|
    libdovi
 | 
						|
    libdvdnav
 | 
						|
    libdvdread
 | 
						|
    mujs
 | 
						|
    libbluray
 | 
						|
    lua
 | 
						|
    rubberband
 | 
						|
    libuchardet
 | 
						|
    zimg
 | 
						|
    openal
 | 
						|
    pipewire
 | 
						|
    libpulseaudio
 | 
						|
    libcaca
 | 
						|
    libdrm
 | 
						|
    libdisplay-info
 | 
						|
    libgbm
 | 
						|
    xorg.libXScrnSaver
 | 
						|
    xorg.libXpresent
 | 
						|
    nv-codec-headers-11
 | 
						|
    libva
 | 
						|
    libvdpau
 | 
						|
  ];
 | 
						|
 | 
						|
  flutterBuildFlags = [
 | 
						|
    "--release"
 | 
						|
    "--target"
 | 
						|
    "lib/main.dart"
 | 
						|
    "--dart-define=POLYCULE_VERSION=v${version}"
 | 
						|
    "--dart-define=POLYCULE_IS_STABLE=true"
 | 
						|
    "--no-tree-shake-icons"
 | 
						|
  ];
 | 
						|
 | 
						|
  postInstall = ''
 | 
						|
    # Install desktop files and icons from the source
 | 
						|
    install -Dm644 linux/business.braid.polycule.desktop $out/share/applications/polycule.desktop
 | 
						|
    install -Dm644 assets/logo/logo-circle.png $out/share/pixmaps/polycule.png
 | 
						|
 | 
						|
    # Update desktop file to use correct executable name
 | 
						|
    substituteInPlace $out/share/applications/polycule.desktop \
 | 
						|
      --replace 'Exec=business.braid.polycule' 'Exec=polycule'
 | 
						|
 | 
						|
    # Create a symlink with the expected name
 | 
						|
    ln -sf $out/bin/polycule $out/bin/business.braid.polycule
 | 
						|
  '';
 | 
						|
 | 
						|
  meta = with lib; {
 | 
						|
    description = "A geeky and efficient [matrix] client for power users";
 | 
						|
    longDescription = ''
 | 
						|
      Polycule is a modern Matrix client built with Flutter, designed for power users
 | 
						|
      who want a fast, efficient, and feature-rich Matrix experience.
 | 
						|
    '';
 | 
						|
    homepage = "https://polycule.im/";
 | 
						|
    license = licenses.eupl12;
 | 
						|
    maintainers = [];
 | 
						|
    platforms = ["x86_64-linux" "aarch64-linux"];
 | 
						|
    sourceProvenance = with sourceTypes; [fromSource];
 | 
						|
    mainProgram = "polycule";
 | 
						|
  };
 | 
						|
}
 |