nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 77 lines 1.8 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 flutter335, 5 6 alsa-lib, 7 libdisplay-info, 8 libXpresent, 9 libXScrnSaver, 10 libepoxy, 11 mpv-unwrapped, 12 13 targetFlutterPlatform ? "web", 14 baseUrl ? null, 15}: 16 17let 18 flutter = flutter335; 19 20 media_kit_hash = "sha256-oJQ9sRQI4HpAIzoS995yfnzvx5ZzIubVANzbmxTt6LE="; 21in 22 23flutter.buildFlutterApplication rec { 24 pname = "fladder"; 25 version = "0.9.0"; 26 27 src = fetchFromGitHub { 28 owner = "DonutWare"; 29 repo = "Fladder"; 30 tag = "v${version}"; 31 hash = "sha256-IX3qbIgfi9d8rP24yIGlBzi5l28YQWnvLD+dD+7uIZc="; 32 }; 33 34 inherit targetFlutterPlatform; 35 36 pubspecLock = lib.importJSON ./pubspec.lock.json; 37 38 gitHashes = { 39 media_kit = media_kit_hash; 40 media_kit_video = media_kit_hash; 41 media_kit_libs_linux = media_kit_hash; 42 media_kit_libs_video = media_kit_hash; 43 media_kit_libs_android_video = media_kit_hash; 44 media_kit_libs_ios_video = media_kit_hash; 45 media_kit_libs_macos_video = media_kit_hash; 46 media_kit_libs_windows_video = media_kit_hash; 47 }; 48 49 buildInputs = [ 50 alsa-lib 51 libdisplay-info 52 mpv-unwrapped 53 libXpresent 54 libXScrnSaver 55 ] 56 ++ lib.optionals (targetFlutterPlatform == "linux") [ 57 libepoxy 58 ]; 59 60 postInstall = lib.optionalString (targetFlutterPlatform == "web") ( 61 '' 62 sed -i 's;base href="/";base href="$out";' $out/index.html 63 '' 64 + lib.optionalString (baseUrl != null) '' 65 echo '{"baseUrl": "${baseUrl}"}' > $out/assets/config/config.json 66 '' 67 ); 68 69 meta = { 70 description = "Simple Jellyfin Frontend built on top of Flutter"; 71 homepage = "https://github.com/DonutWare/Fladder"; 72 downloadPage = "https://github.com/DonutWare/Fladder/releases"; 73 license = lib.licenses.gpl3Only; 74 maintainers = with lib.maintainers; [ ratcornu ]; 75 mainProgram = "Fladder"; 76 }; 77}