13 stdenv.mkDerivation rec {
14 pname = "microsoft-identity-broker";
18 url = "https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/m/microsoft-identity-broker/microsoft-identity-broker_${version}_amd64.deb";
19 hash = "sha256-O9zbImSWMrRsaOozj5PsCRvQ3UsaJzLfoTohmLZvLkM=";
22 nativeBuildInputs = [ dpkg makeWrapper openjdk11 zip ];
27 rm opt/microsoft/identity-broker/lib/jnr-posix-3.1.4.jar
28 jar -uf opt/microsoft/identity-broker/lib/javafx-graphics-15-linux.jar -C ${openjfx17}/modules_libs/javafx.graphics/ libglass.so
29 jar -uf opt/microsoft/identity-broker/lib/javafx-graphics-15-linux.jar -C ${openjfx17}/modules_libs/javafx.graphics/ libglassgtk3.so
30 jar -uf opt/microsoft/identity-broker/lib/javafx-graphics-15-linux.jar -C ${openjfx17}/modules_libs/javafx.graphics/ libprism_es2.so
31 zip -d opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar libavplugin-54.so
32 zip -d opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar libavplugin-56.so
33 zip -d opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar libavplugin-57.so
34 zip -d opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar libavplugin-ffmpeg-56.so
35 zip -d opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar libavplugin-ffmpeg-57.so
36 zip -d opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar libavplugin-ffmpeg-58.so
37 jar -uf opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar -C ${openjfx17}/modules_libs/javafx.media/ libavplugin.so
38 jar -uf opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar -C ${openjfx17}/modules_libs/javafx.media/ libfxplugins.so
39 jar -uf opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar -C ${openjfx17}/modules_libs/javafx.media/ libgstreamer-lite.so
40 jar -uf opt/microsoft/identity-broker/lib/javafx-media-15-linux.jar -C ${openjfx17}/modules_libs/javafx.media/ libjfxmedia.so
48 mkdir -p $out/lib/microsoft-identity-broker
49 cp -a opt/microsoft/identity-broker/lib/* $out/lib/microsoft-identity-broker
51 for jar in $out/lib/microsoft-identity-broker/*.jar; do
52 classpath="$classpath:$jar"
54 classpath="$classpath:${jnr-posix}/share/java/jnr-posix-${jnr-posix.version}.jar"
56 makeWrapper ${openjdk11}/bin/java $out/bin/microsoft-identity-broker \
57 --add-flags "-classpath $classpath com.microsoft.identity.broker.service.IdentityBrokerService" \
58 --add-flags "-verbose"
59 makeWrapper ${openjdk11}/bin/java $out/bin/microsoft-identity-device-broker \
60 --add-flags "-verbose" \
61 --add-flags "-classpath $classpath" \
62 --add-flags "com.microsoft.identity.broker.service.DeviceBrokerService" \
70 $out/lib/systemd/user/microsoft-identity-broker.service \
71 $out/lib/systemd/system/microsoft-identity-device-broker.service \
72 $out/share/dbus-1/system-services/com.microsoft.identity.devicebroker1.service \
73 $out/share/dbus-1/services/com.microsoft.identity.broker1.service \
76 ExecStartPre=${bash}/bin/sh \
79 ExecStartPre=!${bash}/bin/sh \
81 /opt/microsoft/identity-broker/bin/microsoft-identity-broker \
82 $out/bin/microsoft-identity-broker \
84 /opt/microsoft/identity-broker/bin/microsoft-identity-device-broker \
85 $out/bin/microsoft-identity-device-broker \
87 /usr/lib/jvm/java-11-openjdk-amd64 \
92 updateScript = ./update.sh;
93 tests = { inherit (nixosTests) intune; };
97 description = "Microsoft Authentication Broker for Linux";
98 homepage = "https://www.microsoft.com/";
99 license = licenses.unfree;
100 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
101 platforms = [ "x86_64-linux" ];
102 maintainers = with lib.maintainers; [ rhysmdnz ];