nixpkgs/pkgs/by-name/in/intune-portal/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

114 lines
2.9 KiB
Nix
Raw Normal View History

2023-03-17 11:37:05 +03:00
{ stdenv
, lib
, fetchurl
, dpkg
, libuuid
, xorg
, curlMinimal
, openssl
, libsecret
, webkitgtk
, libsoup
, gtk3
, atk
, pango
, glib
, sqlite
, zlib
, systemd
, msalsdk-dbusclient
, pam
, dbus
2023-03-17 11:39:03 +03:00
, nixosTests
2023-03-17 11:37:05 +03:00
}:
stdenv.mkDerivation rec {
pname = "intune-portal";
version = "1.2405.17-jammy";
2023-03-17 11:37:05 +03:00
src = fetchurl {
treewide: change `${pname}` to string literal (#336172) * adwaita-icon-theme: change `${pname}` to string literal * alp: change `${pname}` to string literal * alsa-oss: change `${pname}` to string literal * alsa-plugins: change `${pname}` to string literal * alsa-ucm-conf: change `${pname}` to string literal * alsa-utils: change `${pname}` to string literal * anyrun: change `${pname}` to string literal * assemblyscript: change `${pname}` to string literal * audiobookshelf: change `${pname}` to string literal * baobab: change `${pname}` to string literal * braa: change `${pname}` to string literal * brill: change `${pname}` to string literal * centrifugo: change `${pname}` to string literal * cheese: change `${pname}` to string literal * cljfmt: change `${pname}` to string literal * coppwr: change `${pname}` to string literal * cosmic-edit: change `${pname}` to string literal * cosmic-files: change `${pname}` to string literal * cosmic-store: change `${pname}` to string literal * cosmic-term: change `${pname}` to string literal * crate2nix: change `${pname}` to string literal * cups-kyocera-3500-4500: change `${pname}` to string literal * dbqn: change `${pname}` to string literal * dconf-editor: change `${pname}` to string literal * devhelp: change `${pname}` to string literal * dmarc-report-converter: change `${pname}` to string literal * engage: change `${pname}` to string literal * eog: change `${pname}` to string literal * evolution-data-server-gtk4: change `${pname}` to string literal * find-billy: change `${pname}` to string literal * firefly-iii: change `${pname}` to string literal * fuchsia-cursor: change `${pname}` to string literal * geary: change `${pname}` to string literal * ghex: change `${pname}` to string literal * gitg: change `${pname}` to string literal * glasskube: change `${pname}` to string literal * gnome.gnome-autoar: change `${pname}` to string literal * gnome.gnome-calculator: change `${pname}` to string literal * gnome.gnome-calendar: change `${pname}` to string literal * gnome.gnome-common: change `${pname}` to string literal * gnome.gnome-dictionary: change `${pname}` to string literal * gnome.gnome-disk-utility: change `${pname}` to string literal * gnome.gnome-font-viewer: change `${pname}` to string literal * gnome.gnome-keyring: change `${pname}` to string literal * gnome.gnome-screenshot: change `${pname}` to string literal * gnome.gnome-system-monitor: change `${pname}` to string literal * gnome.seahorse: change `${pname}` to string literal * gnome.simple-scan: change `${pname}` to string literal * gnome.sushi: change `${pname}` to string literal * gnome.totem: change `${pname}` to string literal * gnome.yelp: change `${pname}` to string literal * gnome.yelp-xsl: change `${pname}` to string literal * gnucap-full: change `${pname}` to string literal * goredo: change `${pname}` to string literal * guile-semver: change `${pname}` to string literal * halo: change `${pname}` to string literal * intiface-central: change `${pname}` to string literal * intune-portal: change `${pname}` to string literal * iscc: change `${pname}` to string literal * jetbrains-toolbox: change `${pname}` to string literal * jnr-posix: change `${pname}` to string literal * keymapp: change `${pname}` to string literal * libation: change `${pname}` to string literal * libeduvpn-common: change `${pname}` to string literal * libmamba: change `${pname}` to string literal * littlefs-fuse: change `${pname}` to string literal * logseq: change `${pname}` to string literal * lxgw-wenkai-tc: change `${pname}` to string literal * microsoft-identity-broker: change `${pname}` to string literal * minetest-mapserver: change `${pname}` to string literal * msalsdk-dbusclient: change `${pname}` to string literal * neverest: change `${pname}` to string literal * nf-test: change `${pname}` to string literal * numbat: change `${pname}` to string literal * pdf2odt: change `${pname}` to string literal * plemoljp: change `${pname}` to string literal * plemoljp-hs: change `${pname}` to string literal * plemoljp-nf: change `${pname}` to string literal * pocket-updater-utility: change `${pname}` to string literal * proto: change `${pname}` to string literal * pw3270: change `${pname}` to string literal * ratchet: change `${pname}` to string literal * read-it-later: change `${pname}` to string literal * redmine: change `${pname}` to string literal * regina: change `${pname}` to string literal * regripper: change `${pname}` to string literal * revolt-desktop: change `${pname}` to string literal * rs: change `${pname}` to string literal * signaturepdf: change `${pname}` to string literal * sonarlint-ls: change `${pname}` to string literal * srgn: change `${pname}` to string literal * stackit-cli: change `${pname}` to string literal * substudy: change `${pname}` to string literal * swayosd: change `${pname}` to string literal * synthesia: change `${pname}` to string literal * tarlz: change `${pname}` to string literal * termcap: change `${pname}` to string literal * tinycompress: change `${pname}` to string literal * tracexec: change `${pname}` to string literal * treefmt2: change `${pname}` to string literal * udev-gothic: change `${pname}` to string literal * udev-gothic-nf: change `${pname}` to string literal * vvvvvv: change `${pname}` to string literal * yggdrasil: change `${pname}` to string literal * zsync: change `${pname}` to string literal
2024-08-21 01:56:55 +03:00
url = "https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/i/intune-portal/intune-portal_${version}_amd64.deb";
hash = "sha256-WpVPWzh8jN092MaY2rMXhLfpVXsflMl9hOY9nNGJlLk=";
2023-03-17 11:37:05 +03:00
};
nativeBuildInputs = [ dpkg ];
buildPhase =
let
libPath = {
intune = lib.makeLibraryPath [
stdenv.cc.cc.lib
libuuid
xorg.libX11
curlMinimal
openssl
libsecret
webkitgtk
libsoup
gtk3
atk
glib
pango
sqlite
zlib
systemd
msalsdk-dbusclient
dbus
];
pam = lib.makeLibraryPath [ pam ];
};
in
''
runHook preBuild
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath ${libPath.intune} opt/microsoft/intune/bin/intune-portal
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath ${libPath.intune} opt/microsoft/intune/bin/intune-agent
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath ${libPath.intune} opt/microsoft/intune/bin/intune-daemon
patchelf --set-rpath ${libPath.pam} ./usr/lib/x86_64-linux-gnu/security/pam_intune.so
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -a opt/microsoft/intune/bin/* $out/bin/
cp -a usr/share $out
cp -a lib $out
mkdir -p $out/lib/security
cp -a ./usr/lib/x86_64-linux-gnu/security/pam_intune.so $out/lib/security/
cp -a usr/lib/tmpfiles.d $out/lib
substituteInPlace $out/share/applications/intune-portal.desktop \
--replace /opt/microsoft/intune/bin/intune-portal $out/bin/intune-portal
substituteInPlace $out/lib/systemd/user/intune-agent.service \
--replace \
ExecStart=/opt/microsoft/intune/bin/intune-agent \
ExecStart=$out/bin/intune-agent
substituteInPlace $out/lib/systemd/system/intune-daemon.service \
--replace \
ExecStart=/opt/microsoft/intune/bin/intune-daemon \
ExecStart=$out/bin/intune-daemon
runHook postInstall
'';
# Without this network requests fail
dontPatchELF = true;
2023-03-17 11:39:03 +03:00
passthru = {
updateScript = ./update.sh;
tests = { inherit (nixosTests) intune; };
};
2023-03-17 11:37:05 +03:00
meta = with lib; {
description = "Microsoft Intune Portal allows you to securely access corporate apps, data, and resources";
homepage = "https://www.microsoft.com/";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ rhysmdnz ];
};
}