forked from jan-leila/nix-config
		
	feat: started to create polycule package
This commit is contained in:
		
							parent
							
								
									6dfe3ac326
								
							
						
					
					
						commit
						c10c610034
					
				
					 6 changed files with 2646 additions and 0 deletions
				
			
		
							
								
								
									
										149
									
								
								modules/common-modules/pkgs/polycule/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										149
									
								
								modules/common-modules/pkgs/polycule/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,149 @@ | |||
| { | ||||
|   lib, | ||||
|   flutter329, | ||||
|   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, | ||||
| }: | ||||
| flutter329.buildFlutterApplication rec { | ||||
|   pname = "polycule"; | ||||
|   version = "0.3.0"; | ||||
| 
 | ||||
|   src = fetchFromGitLab { | ||||
|     owner = "polycule_client"; | ||||
|     repo = "polycule"; | ||||
|     rev = "v${version}"; | ||||
|     hash = "sha256-kY1vJiDXh0rSCJNOAkO8JGiMR8kXwDHuc3T+S4MkOWY="; | ||||
|   }; | ||||
| 
 | ||||
|   pubspecLock = lib.importJSON ./polycule-pubspec.lock.json; | ||||
| 
 | ||||
|   gitHashes = { | ||||
|     matrix = "sha256-e1HGC2yZyqqYB5YAGKmUkkdDbuSzhiUenJMKJgQYIi8="; | ||||
|     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"; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue