|
| 1 | +{ |
| 2 | + lib, |
| 3 | + stdenv, |
| 4 | + fetchurl, |
| 5 | + appimageTools, |
| 6 | + makeDesktopItem, |
| 7 | +}: |
| 8 | +let |
| 9 | + pname = "filen-desktop"; |
| 10 | + version = "3.0.41"; |
| 11 | + |
| 12 | + arch = builtins.head (builtins.split "-" stdenv.hostPlatform.system); |
| 13 | + |
| 14 | + src = fetchurl { |
| 15 | + url = "https://github.com/FilenCloudDienste/filen-desktop/releases/download/v${version}/Filen_linux_${arch}.AppImage"; |
| 16 | + hash = "sha256-Nao5By8Z8lMbRcp2Mgw+xaiiFzUxCm6S3SAE5FfDZpk="; |
| 17 | + }; |
| 18 | + |
| 19 | + desktopItem = makeDesktopItem { |
| 20 | + name = "filen-desktop"; |
| 21 | + desktopName = "Filen Desktop"; |
| 22 | + comment = "Encrypted Cloud Storage"; |
| 23 | + icon = "filen-desktop"; |
| 24 | + exec = "filen-desktop %u"; |
| 25 | + categories = [ "Office" ]; |
| 26 | + }; |
| 27 | + |
| 28 | + appimageContents = appimageTools.extract { inherit pname version src; }; |
| 29 | +in |
| 30 | +appimageTools.wrapType2 { |
| 31 | + inherit pname version src; |
| 32 | + |
| 33 | + extraInstallCommands = '' |
| 34 | + mkdir -p $out/share |
| 35 | + cp -rt $out/share ${desktopItem}/share/applications ${appimageContents}/usr/share/icons |
| 36 | + chmod -R +w $out/share |
| 37 | + find $out/share/icons -type f -iname "*.png" -execdir mv {} "$pname.png" \; |
| 38 | + ''; |
| 39 | + |
| 40 | + meta = { |
| 41 | + homepage = "https://filen.io/products/desktop"; |
| 42 | + downloadPage = "https://github.com/FilenCloudDienste/filen-desktop/releases/"; |
| 43 | + description = "Filen Desktop Client for Linux"; |
| 44 | + longDescription = '' |
| 45 | + Encrypted Cloud Storage built for your Desktop. |
| 46 | + Sync your data, mount network drives, collaborate with others and access files natively — powered by robust encryption and seamless integration. |
| 47 | + ''; |
| 48 | + mainProgram = "filen-desktop"; |
| 49 | + platforms = [ "x86_64-linux" ]; |
| 50 | + license = lib.licenses.agpl3Only; |
| 51 | + maintainers = with lib.maintainers; [ smissingham ]; |
| 52 | + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; |
| 53 | + }; |
| 54 | +} |
0 commit comments