Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 rustPlatform, 5 fetchFromGitHub, 6 pkg-config, 7 dbusSupport ? stdenv.hostPlatform.isLinux, 8 dbus, 9 # rustls will be used for TLS if useOpenSSL=false 10 useOpenSSL ? stdenv.hostPlatform.isLinux, 11 openssl, 12 notificationSupport ? stdenv.hostPlatform.isLinux, 13}: 14 15rustPlatform.buildRustPackage rec { 16 pname = "tiny"; 17 version = "0.13.0"; 18 19 src = fetchFromGitHub { 20 owner = "osa1"; 21 repo = "tiny"; 22 rev = "v${version}"; 23 hash = "sha256-phjEae2SS3zkSpuhhE4iscUM8ij8DT47YLIMATMG/+Q="; 24 }; 25 26 cargoHash = "sha256-lyjTl0kbtfQdqSqxti1181+oDVYP4U++v2JEOYvI7aM="; 27 28 nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux pkg-config; 29 buildInputs = lib.optionals dbusSupport [ dbus ] ++ lib.optionals useOpenSSL [ openssl ]; 30 31 buildFeatures = lib.optional notificationSupport "desktop-notifications"; 32 33 meta = { 34 description = "Console IRC client"; 35 homepage = "https://github.com/osa1/tiny"; 36 changelog = "https://github.com/osa1/tiny/blob/v${version}/CHANGELOG.md"; 37 license = lib.licenses.mit; 38 maintainers = with lib.maintainers; [ 39 Br1ght0ne 40 vyp 41 ]; 42 mainProgram = "tiny"; 43 }; 44}