| 
									
										
										
										
											2024-05-12 21:11:31 +02:00
										 |  |  | # How to upgrade to a newer version | 
					
						
							| 
									
										
										
										
											2025-02-18 22:41:00 +01:00
										 |  |  | # - On the june and december release, you'll have to update nixpkgs to the current branch | 
					
						
							|  |  |  | # Change `nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";` | 
					
						
							|  |  |  | # to the latest release (see https://nixos.org/) | 
					
						
							|  |  |  | # - Run `$ nix flake update` | 
					
						
							| 
									
										
										
										
											2024-05-12 21:11:31 +02:00
										 |  |  | # - Comment `src.hash` | 
					
						
							|  |  |  | # - Change `version` | 
					
						
							|  |  |  | # - Run `$ nix build` | 
					
						
							|  |  |  | # This will fetch the source code | 
					
						
							|  |  |  | # Since `hash` is not provided, nix will stop building and throw an error: | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # error: hash mismatch in fixed-output derivation '/nix/store/fghi3ljs6fhz8pwm3dh73j5fwjpq5wbz-source.drv': | 
					
						
							|  |  |  | #          specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= | 
					
						
							|  |  |  | #             got:    sha256-+uthA1w8CmZfW+WOK9wYGl2fUl/k10ufOc8W+Pwa9iQ= | 
					
						
							|  |  |  | # error: 1 dependencies of derivation '/nix/store/imcwsw5r74vkd8r0qa2k7cys2xfgraaz-tildefriends-0.0.18.drv' failed to build | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # - Change `src.hash` to the new one, ie `sha256-+uthA1w8CmZfW+WOK9wYGl2fUl/k10ufOc8W+Pwa9iQ=` | 
					
						
							|  |  |  | # - Uncomment `src.hash` | 
					
						
							|  |  |  | # - Build again, this time it should work. | 
					
						
							|  |  |  | # - Check the release notes, if there's a new dependency or a change to `GNUMakefile`, this file might need to be changed too. | 
					
						
							|  |  |  | # For more details, contact tasiaiso @ https://tilde.club/~tasiaiso/ | 
					
						
							| 
									
										
										
										
											2024-05-12 20:12:50 +02:00
										 |  |  | { | 
					
						
							|  |  |  |   pkgs ? import <nixpkgs> {}, | 
					
						
							|  |  |  |   lib ? import <nixpkgs/lib>, | 
					
						
							|  |  |  | }: | 
					
						
							|  |  |  | pkgs.stdenv.mkDerivation rec { | 
					
						
							|  |  |  |   pname = "tildefriends"; | 
					
						
							| 
									
										
										
										
											2025-09-24 19:18:52 -04:00
										 |  |  |   version = "0.2025.9"; | 
					
						
							| 
									
										
										
										
											2024-05-12 20:12:50 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   src = pkgs.fetchFromGitea { | 
					
						
							|  |  |  |     domain = "dev.tildefriends.net"; | 
					
						
							|  |  |  |     owner = "cory"; | 
					
						
							|  |  |  |     repo = "tildefriends"; | 
					
						
							| 
									
										
										
										
											2024-05-30 11:34:57 +02:00
										 |  |  |     rev = "v${version}"; | 
					
						
							| 
									
										
										
										
											2025-09-24 19:18:52 -04:00
										 |  |  |     hash = "sha256-1nhsfhdOO5HIiiTMb+uROB8nDPL/UpOYm52hZ/OpPyk="; | 
					
						
							| 
									
										
										
										
											2024-05-12 20:12:50 +02:00
										 |  |  |     fetchSubmodules = true; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   nativeBuildInputs = with pkgs; [ | 
					
						
							| 
									
										
										
										
											2024-06-04 15:22:18 +02:00
										 |  |  |     glibc | 
					
						
							| 
									
										
										
										
											2024-05-12 20:12:50 +02:00
										 |  |  |     gnumake | 
					
						
							| 
									
										
										
										
											2025-01-30 12:31:12 -05:00
										 |  |  |     openssl | 
					
						
							| 
									
										
										
										
											2024-05-12 20:12:50 +02:00
										 |  |  |     which | 
					
						
							|  |  |  |   ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   buildInputs = with pkgs; [ | 
					
						
							| 
									
										
										
										
											2024-06-04 15:22:18 +02:00
										 |  |  |     glibc | 
					
						
							| 
									
										
										
										
											2025-01-30 12:31:12 -05:00
										 |  |  |     openssl | 
					
						
							| 
									
										
										
										
											2024-05-12 20:12:50 +02:00
										 |  |  |     which | 
					
						
							|  |  |  |   ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   buildPhase = ''
 | 
					
						
							| 
									
										
										
										
											2025-01-30 12:31:12 -05:00
										 |  |  |     make -j $NIX_BUILD_CORES release USE_SYSTEM_SSL=1 | 
					
						
							| 
									
										
										
										
											2024-05-12 20:12:50 +02:00
										 |  |  |   '';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   installPhase = ''
 | 
					
						
							|  |  |  |     mkdir -p $out/bin | 
					
						
							|  |  |  |     cp -r out/release/tildefriends $out/bin | 
					
						
							|  |  |  |   '';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   doCheck = false; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   meta = with pkgs; { | 
					
						
							|  |  |  |     homepage = "https://tildefriends.net"; | 
					
						
							|  |  |  |     description = "Make apps and friends from the comfort of your web browser."; | 
					
						
							|  |  |  |     mainProgram = "tildefriends"; | 
					
						
							|  |  |  |     license = with lib.licenses; [mit]; | 
					
						
							|  |  |  |     platforms = lib.platforms.all; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |