10 libayatana-appindicator,
19 linux = flutter324.buildFlutterApplication rec {
21 version = "1.15.4-unstable-2024-09-25";
23 src = fetchFromGitHub {
26 rev = "61f3ffdb8dd8b1116ced2e7b585f2f6662ce7d5f";
27 hash = "sha256-s7cR5ty8bygOCzHbLwNTBNlhlQ+2y25/ijlNqWYrqVw=";
30 sourceRoot = "${src.name}/app";
32 pubspecLock = lib.importJSON ./pubspec.lock.json;
35 "permission_handler_windows" = "sha256-+TP3neqlQRZnW6BxHaXr2EbmdITIx1Yo7AEn5iwAhwM=";
38 nativeBuildInputs = [ pkg-config ];
40 buildInputs = [ libayatana-appindicator ];
43 for s in 32 128 256 512; do
44 d=$out/share/icons/hicolor/''${s}x''${s}/apps
46 ln -s $out/app/data/flutter_assets/assets/img/logo-''${s}.png $d/localsend.png
48 mkdir -p $out/share/applications
49 cp $desktopItem/share/applications/*.desktop $out/share/applications
50 substituteInPlace $out/share/applications/*.desktop --subst-var out
53 desktopItem = makeDesktopItem {
55 exec = "@out@/bin/localsend_app";
57 desktopName = "LocalSend";
58 startupWMClass = "localsend_app";
59 genericName = "An open source cross-platform alternative to AirDrop";
60 categories = [ "Network" ];
64 updateScript = ./update.sh;
65 tests.localsend = nixosTests.localsend;
68 meta = metaCommon // {
69 mainProgram = "localsend_app";
73 darwin = stdenv.mkDerivation {
74 inherit pname version;
77 url = "https://github.com/localsend/localsend/releases/download/v${version}/LocalSend-${version}.dmg";
78 hash = "sha256-ZU2aXZNKo01TnXNH0e+r0l4J5HIILmGam3T4+6GaeA4=";
89 mkdir -p $out/Applications
90 cp -r *.app $out/Applications
91 makeBinaryWrapper $out/Applications/LocalSend.app/Contents/MacOS/LocalSend $out/bin/localsend
94 meta = metaCommon // {
95 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
104 description = "Open source cross-platform alternative to AirDrop";
105 homepage = "https://localsend.org/";
106 license = lib.licenses.mit;
107 mainProgram = "localsend";
108 maintainers = with lib.maintainers; [
115 if stdenv.hostPlatform.isDarwin then darwin else linux