Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 replaceVars, 4 mkDerivation, 5 fetchFromGitHub, 6 gitUpdater, 7 mobile-broadband-provider-info, 8 qmake, 9 qtbase, 10 qtdeclarative, 11}: 12 13mkDerivation rec { 14 pname = "libqofono"; 15 version = "0.124"; 16 17 src = fetchFromGitHub { 18 owner = "sailfishos"; 19 repo = "libqofono"; 20 rev = version; 21 hash = "sha256-fI7RS0V8wrsJ2AZAyjVgHmG+c13DXdo6xTjIlGbOHI8="; 22 }; 23 24 patches = [ 25 (replaceVars ./0001-NixOS-provide-mobile-broadband-provider-info-path.patch { 26 mobileBroadbandProviderInfo = mobile-broadband-provider-info; 27 }) 28 ./0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch 29 ]; 30 31 # Replaces paths from the Qt store path to this library's store path. 32 postPatch = '' 33 substituteInPlace src/src.pro \ 34 --replace /usr $out \ 35 --replace '$$[QT_INSTALL_PREFIX]' "$out" \ 36 --replace 'target.path = $$[QT_INSTALL_LIBS]' "target.path = $out/lib" 37 38 substituteInPlace plugin/plugin.pro \ 39 --replace '$$[QT_INSTALL_QML]' $out'/${qtbase.qtQmlPrefix}' 40 ''; 41 42 nativeBuildInputs = [ 43 qmake 44 ]; 45 46 buildInputs = [ 47 qtbase 48 qtdeclarative 49 ]; 50 51 passthru.updateScript = gitUpdater { }; 52 53 meta = with lib; { 54 description = "Library for accessing the ofono daemon, and declarative plugin for it"; 55 homepage = "https://git.sailfishos.org/mer-core/libqofono/"; 56 license = licenses.lgpl21Plus; 57 maintainers = [ ]; 58 platforms = platforms.linux; 59 }; 60}