1 { lib, stdenv, fetchurl, dpkg, buildFHSUserEnv
2 , glibc, glib, openssl, tpm2-tss
3 , gtk3, gnome, polkit, polkit_gnome
7 pname = "beyond-identity";
9 libPath = lib.makeLibraryPath ([ glib glibc openssl tpm2-tss gtk3 gnome.gnome-keyring polkit polkit_gnome ]);
11 description = "Passwordless MFA identities for workforces, customers, and developers";
12 homepage = "https://www.beyondidentity.com";
13 downloadPage = "https://app.byndid.com/downloads";
14 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
15 license = licenses.unfree;
16 maintainers = with maintainers; [ klden ];
17 platforms = [ "x86_64-linux" ];
20 beyond-identity = stdenv.mkDerivation {
21 inherit pname version meta;
24 url = "https://packages.beyondidentity.com/public/linux-authenticator/deb/ubuntu/pool/focal/main/b/be/${pname}_${version}/${pname}_${version}_amd64.deb";
25 sha512 = "sha512-JrHLf7KkJVbJLxx54OTvOSaIzY3+hjX+bpkeBHKX23YriCJssUUvEP6vlbI4r6gjMMFMhW92k0iikAgD1Tr4ug==";
37 mkdir -p $out/opt/beyond-identity
41 # https://github.com/NixOS/nixpkgs/issues/42117
42 sed -i -e 's/auth_self/yes/g' usr/share/polkit-1/actions/com.beyondidentity.endpoint.stepup.policy
44 cp -ar usr/{bin,share} $out
45 cp -ar opt/beyond-identity/bin $out/opt/beyond-identity
47 ln -s $out/opt/beyond-identity/bin/* $out/bin/
52 $out/share/applications/com.beyondidentity.endpoint.BeyondIdentity.desktop \
53 --replace /usr/bin/ $out/bin/
55 $out/share/applications/com.beyondidentity.endpoint.webserver.BeyondIdentity.desktop \
56 --replace /opt/ $out/opt/
58 $out/opt/beyond-identity/bin/byndid-web \
59 --replace /opt/ $out/opt/
61 $out/bin/beyond-identity \
62 --replace /opt/ $out/opt/ \
63 --replace /usr/bin/gtk-launch ${gtk3}/bin/gtk-launch
66 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
67 --set-rpath "${libPath}" \
72 # /usr/bin/pkcheck is hardcoded in binary - we need FHS
79 glib glibc openssl tpm2-tss
80 gtk3 gnome.gnome-keyring
84 extraInstallCommands = ''
85 ln -s ${beyond-identity}/share $out
88 runScript = "beyond-identity";