nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 cmake,
6 pkg-config,
7 alsa-lib,
8 gdk-pixbuf,
9 glib,
10 libnotify,
11 libopus,
12 openssl,
13 versionCheckHook,
14 nix-update-script,
15 installShellFiles,
16
17 withNotifications ? true,
18 withOgg ? true,
19}:
20
21rustPlatform.buildRustPackage (finalAttrs: {
22 pname = "mum";
23 version = "0.5.1";
24 src = fetchFromGitHub {
25 owner = "mum-rs";
26 repo = "mum";
27 tag = "v${finalAttrs.version}";
28 hash = "sha256-r2isuwXq79dOQQWB+CsofYCLQYu9VKm7kzoxw103YV4=";
29 };
30
31 cargoHash = "sha256-ey3nT6vZ5YOZGk08HykK9RxI7li+Sz+sER3HioGSXP0=";
32
33 nativeBuildInputs = [
34 cmake
35 pkg-config
36 installShellFiles
37 ];
38
39 buildInputs = [
40 alsa-lib
41 gdk-pixbuf
42 glib
43 libopus
44 openssl
45 ]
46 ++ lib.optional withNotifications libnotify;
47
48 buildNoDefaultFeatures = true;
49 buildFeatures = lib.optional withNotifications "notifications" ++ lib.optional withOgg "ogg";
50
51 postInstall = ''
52 installManPage documentation/*.{1,5}
53 '';
54
55 doInstallCheck = true;
56 nativeInstallCheckInputs = [ versionCheckHook ];
57 versionCheckProgram = "${placeholder "out"}/bin/mumctl";
58
59 passthru.updateScript = nix-update-script { };
60
61 meta = {
62 description = "Daemon/cli mumble client";
63 homepage = "https://github.com/mum-rs/mum";
64 changelog = "https://github.com/mum-rs/mum/releases/tag/v${finalAttrs.version}";
65 maintainers = with lib.maintainers; [ lykos153 ];
66 license = lib.licenses.mit;
67 };
68})