diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-02-13 12:25:07 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-02-13 12:25:07 +0100 |
commit | a5e1520e4538e29ecfbd4b168306f890566d7bfd (patch) | |
tree | 28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/by-name/in | |
parent | 822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff) | |
parent | 3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff) | |
download | nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2 nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/in')
-rw-r--r-- | nixpkgs/pkgs/by-name/in/incus/client.nix | 53 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/in/incus/latest.nix | 5 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/in/incus/lts.nix | 3 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/in/incus/package.nix | 152 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/in/incus/unwrapped.nix (renamed from nixpkgs/pkgs/by-name/in/incus-unwrapped/package.nix) | 95 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/in/inotify-info/package.nix | 28 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/in/intune-portal/package.nix | 113 | ||||
-rwxr-xr-x | nixpkgs/pkgs/by-name/in/intune-portal/update.sh | 26 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/in/invidtui/package.nix | 6 |
9 files changed, 385 insertions, 96 deletions
diff --git a/nixpkgs/pkgs/by-name/in/incus/client.nix b/nixpkgs/pkgs/by-name/in/incus/client.nix new file mode 100644 index 000000000000..46bf691c6951 --- /dev/null +++ b/nixpkgs/pkgs/by-name/in/incus/client.nix @@ -0,0 +1,53 @@ +{ + lts ? false, + + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, +}: +let + releaseFile = if lts then ./lts.nix else ./latest.nix; + inherit (import releaseFile) version hash vendorHash; +in + +buildGoModule rec { + pname = "incus-client"; + + inherit vendorHash version; + + src = fetchFromGitHub { + owner = "lxc"; + repo = "incus"; + rev = "refs/tags/v${version}"; + inherit hash; + }; + + CGO_ENABLED = 0; + + nativeBuildInputs = [ installShellFiles ]; + + subPackages = [ "cmd/incus" ]; + + postInstall = '' + # use custom bash completion as it has extra logic for e.g. instance names + installShellCompletion --bash --name incus ./scripts/bash/incus + + installShellCompletion --cmd incus \ + --fish <($out/bin/incus completion fish) \ + --zsh <($out/bin/incus completion zsh) + ''; + + # don't run the full incus test suite + doCheck = false; + + meta = { + description = "Powerful system container and virtual machine manager"; + homepage = "https://linuxcontainers.org/incus"; + changelog = "https://github.com/lxc/incus/releases/tag/v${version}"; + license = lib.licenses.asl20; + maintainers = lib.teams.lxc.members; + platforms = lib.platforms.unix; + mainProgram = "incus"; + }; +} diff --git a/nixpkgs/pkgs/by-name/in/incus/latest.nix b/nixpkgs/pkgs/by-name/in/incus/latest.nix new file mode 100644 index 000000000000..0c0c32ba9af3 --- /dev/null +++ b/nixpkgs/pkgs/by-name/in/incus/latest.nix @@ -0,0 +1,5 @@ +{ + hash = "sha256-3eWkQT2P69ZfN62H9B4WLnmlUOGkpzRR0rctgchP+6A="; + version = "0.5.1"; + vendorHash = "sha256-2ZJU7WshN4UIbJv55bFeo9qiAQ/wxu182mnz7pE60xA="; +} diff --git a/nixpkgs/pkgs/by-name/in/incus/lts.nix b/nixpkgs/pkgs/by-name/in/incus/lts.nix new file mode 100644 index 000000000000..d70793f94dfa --- /dev/null +++ b/nixpkgs/pkgs/by-name/in/incus/lts.nix @@ -0,0 +1,3 @@ +# this release doesn't exist yet, but satisfay the by-name checks +# will be added as incus-lts in all-packages.nix once ready +{ } diff --git a/nixpkgs/pkgs/by-name/in/incus/package.nix b/nixpkgs/pkgs/by-name/in/incus/package.nix index e02876407a7b..8a10f6eef7fd 100644 --- a/nixpkgs/pkgs/by-name/in/incus/package.nix +++ b/nixpkgs/pkgs/by-name/in/incus/package.nix @@ -1,50 +1,73 @@ -{ lib -, incus-unwrapped -, linkFarm -, makeWrapper -, stdenv -, symlinkJoin -, writeShellScriptBin -, acl -, apparmor-parser -, apparmor-profiles -, attr -, bash -, btrfs-progs -, criu -, dnsmasq -, gnutar -, gptfdisk -, gzip -, iproute2 -, iptables -, OVMF -, qemu_kvm -, qemu-utils -, rsync -, spice-gtk -, squashfsTools -, util-linux -, virtiofsd -, xz +{ + lts ? false, + + lib, + callPackage, + linkFarm, + makeWrapper, + stdenv, + symlinkJoin, + writeShellScriptBin, + acl, + apparmor-parser, + apparmor-profiles, + attr, + bash, + btrfs-progs, + cdrkit, + criu, + dnsmasq, + e2fsprogs, + getent, + gnutar, + gptfdisk, + gzip, + iproute2, + iptables, + kmod, + lvm2, + minio, + nftables, + OVMF, + qemu_kvm, + qemu-utils, + rsync, + spice-gtk, + squashfsTools, + thin-provisioning-tools, + util-linux, + virtiofsd, + xz, }: let + unwrapped = callPackage ./unwrapped.nix { inherit lts; }; + client = callPackage ./client.nix { inherit lts; }; + name = "incus${lib.optionalString lts "-lts"}"; + binPath = lib.makeBinPath [ acl attr bash btrfs-progs + cdrkit criu dnsmasq + e2fsprogs + getent gnutar gptfdisk gzip iproute2 iptables + kmod + lvm2 + minio + nftables qemu_kvm qemu-utils rsync squashfsTools + thin-provisioning-tools util-linux virtiofsd xz @@ -54,9 +77,7 @@ let '') ]; - clientBinPath = [ - spice-gtk - ]; + clientBinPath = [ spice-gtk ]; ovmf-2mb = OVMF.override { secureBoot = true; @@ -82,24 +103,57 @@ let # mimic ovmf from https://github.com/canonical/incus-pkg-snap/blob/3abebe1dfeb20f9b7729556960c7e9fe6ad5e17c/snapcraft.yaml#L378 # also found in /snap/incus/current/share/qemu/ on a snap install ovmf = linkFarm "incus-ovmf" [ - { name = "OVMF_CODE.2MB.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } - { name = "OVMF_CODE.4MB.CSM.fd"; path = "${ovmf-4mb-csm.fd}/FV/${ovmf-prefix}_CODE.fd"; } - { name = "OVMF_CODE.4MB.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } - { name = "OVMF_CODE.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } - - { name = "OVMF_VARS.2MB.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.2MB.ms.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.4MB.CSM.fd"; path = "${ovmf-4mb-csm.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.4MB.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.4MB.ms.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.ms.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } + { + name = "OVMF_CODE.2MB.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; + } + { + name = "OVMF_CODE.4MB.CSM.fd"; + path = "${ovmf-4mb-csm.fd}/FV/${ovmf-prefix}_CODE.fd"; + } + { + name = "OVMF_CODE.4MB.fd"; + path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_CODE.fd"; + } + { + name = "OVMF_CODE.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; + } + + { + name = "OVMF_VARS.2MB.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.2MB.ms.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.4MB.CSM.fd"; + path = "${ovmf-4mb-csm.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.4MB.fd"; + path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.4MB.ms.fd"; + path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.ms.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } ]; in symlinkJoin { - name = "incus-${incus-unwrapped.version}"; + name = "${name}-${unwrapped.version}"; - paths = [ incus-unwrapped ]; + paths = [ unwrapped ]; nativeBuildInputs = [ makeWrapper ]; @@ -110,8 +164,10 @@ symlinkJoin { ''; passthru = { - inherit (incus-unwrapped) tests; + inherit client unwrapped; + + inherit (unwrapped) tests; }; - inherit (incus-unwrapped) meta pname version; + inherit (unwrapped) meta pname version; } diff --git a/nixpkgs/pkgs/by-name/in/incus-unwrapped/package.nix b/nixpkgs/pkgs/by-name/in/incus/unwrapped.nix index 925a485a0723..73257c583940 100644 --- a/nixpkgs/pkgs/by-name/in/incus-unwrapped/package.nix +++ b/nixpkgs/pkgs/by-name/in/incus/unwrapped.nix @@ -1,50 +1,51 @@ -{ lib -, buildGoModule -, fetchFromGitHub -, fetchpatch -, acl -, cowsql -, hwdata -, libcap -, lxc -, pkg-config -, sqlite -, udev -, installShellFiles -, nix-update-script -, nixosTests +{ + lts ? false, + + lib, + buildGoModule, + fetchFromGitHub, + writeShellScript, + acl, + cowsql, + hwdata, + libcap, + lxc, + pkg-config, + sqlite, + udev, + installShellFiles, + nixosTests, }: +let + releaseFile = if lts then ./lts.nix else ./latest.nix; + inherit (import releaseFile) version hash vendorHash; + name = "incus${lib.optionalString lts "-lts"}"; +in + buildGoModule rec { - pname = "incus-unwrapped"; - version = "0.4.0"; + pname = "${name}-unwrapped"; + + inherit vendorHash version; src = fetchFromGitHub { owner = "lxc"; repo = "incus"; - rev = "refs/tags/v${version}"; - hash = "sha256-crWepf5j3Gd1lhya2DGIh/to7l+AnjKJPR+qUd9WOzw="; + rev = "v${version}"; + inherit hash; }; - vendorHash = "sha256-YfUvkN1qUS3FFKb1wysg40WcJA8fT9SGDChSdT+xnkc="; - - patches = [ - # remove with > 0.4.0 - (fetchpatch { - url = "https://github.com/lxc/incus/commit/c0200b455a1468685d762649120ce7e2bb25adc9.patch"; - hash = "sha256-4fiSv6GcsKpdLh3iNbw3AGuDzcw1EadUvxtSjxRjtTA="; - }) - ]; - postPatch = '' substituteInPlace internal/usbid/load.go \ --replace "/usr/share/misc/usb.ids" "${hwdata}/share/hwdata/usb.ids" ''; excludedPackages = [ + # statically compile these "cmd/incus-agent" "cmd/incus-migrate" - "cmd/lxd-to-incus" + + # oidc test requires network "test/mini-oidc" ]; @@ -62,7 +63,10 @@ buildGoModule rec { udev.dev ]; - ldflags = [ "-s" "-w" ]; + ldflags = [ + "-s" + "-w" + ]; tags = [ "libsqlite3" ]; # required for go-cowsql. @@ -73,13 +77,15 @@ buildGoModule rec { ''; preCheck = - let skippedTests = [ - "TestValidateConfig" - "TestConvertNetworkConfig" - "TestConvertStorageConfig" - "TestSnapshotCommon" - "TestContainerTestSuite" - ]; in + let + skippedTests = [ + "TestValidateConfig" + "TestConvertNetworkConfig" + "TestConvertStorageConfig" + "TestSnapshotCommon" + "TestContainerTestSuite" + ]; + in '' # Disable tests requiring local operations buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]") @@ -94,21 +100,20 @@ buildGoModule rec { --zsh <($out/bin/incus completion zsh) ''; - passthru = { tests.incus = nixosTests.incus; - updateScript = nix-update-script { - extraArgs = [ - "-vr" "v\(.*\)" - ]; - }; + updateScript = writeShellScript "update-incus" '' + nix-update ${name}.unwrapped -vr 'v(.*)' --override-filename pkgs/by-name/in/incus/${ + if lts then "lts" else "latest" + }.nix + ''; }; meta = { description = "Powerful system container and virtual machine manager"; homepage = "https://linuxcontainers.org/incus"; - changelog = "https://github.com/lxc/incus/releases/tag/incus-${version}"; + changelog = "https://github.com/lxc/incus/releases/tag/v${version}"; license = lib.licenses.asl20; maintainers = lib.teams.lxc.members; platforms = lib.platforms.linux; diff --git a/nixpkgs/pkgs/by-name/in/inotify-info/package.nix b/nixpkgs/pkgs/by-name/in/inotify-info/package.nix new file mode 100644 index 000000000000..2faa45771160 --- /dev/null +++ b/nixpkgs/pkgs/by-name/in/inotify-info/package.nix @@ -0,0 +1,28 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation (finalAttrs: { + pname = "inotify-info"; + version = "unstable-2024-01-05"; + + src = fetchFromGitHub { + owner = "mikesart"; + repo = "inotify-info"; + rev = "a7ff6fa62ed96ec5d2195ef00756cd8ffbf23ae1"; + hash = "sha256-yY+hjdb5J6dpFkIMMUWvZlwoGT/jqOuQIcFp3Dv+qB8="; + }; + + installPhase = '' + runHook preInstall + install -Dm755 _release/inotify-info $out/bin/inotify-info + runHook postInstall + ''; + + meta = with lib; { + description = "Easily track down the number of inotify watches, instances, and which files are being watched."; + homepage = "https://github.com/mikesart/inotify-info"; + license = licenses.mit; + mainProgram = "inotify-info"; + maintainers = with maintainers; [ motiejus ]; + platforms = platforms.linux; + }; +}) diff --git a/nixpkgs/pkgs/by-name/in/intune-portal/package.nix b/nixpkgs/pkgs/by-name/in/intune-portal/package.nix new file mode 100644 index 000000000000..fa8e7b5871a4 --- /dev/null +++ b/nixpkgs/pkgs/by-name/in/intune-portal/package.nix @@ -0,0 +1,113 @@ +{ stdenv +, lib +, fetchurl +, dpkg +, libuuid +, xorg +, curlMinimal +, openssl +, libsecret +, webkitgtk +, libsoup +, gtk3 +, atk +, pango +, glib +, sqlite +, zlib +, systemd +, msalsdk-dbusclient +, pam +, dbus +, nixosTests +}: +stdenv.mkDerivation rec { + pname = "intune-portal"; + version = "1.2312.35-jammy"; + + src = fetchurl { + url = "https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/i/${pname}/${pname}_${version}_amd64.deb"; + hash = "sha256-mgcnqj/+4ffMf4PhMW4ovCotLilyudGOpn0qqXZCmzc="; + }; + + 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; + + passthru = { + updateScript = ./update.sh; + tests = { inherit (nixosTests) intune; }; + }; + + 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 ]; + }; +} diff --git a/nixpkgs/pkgs/by-name/in/intune-portal/update.sh b/nixpkgs/pkgs/by-name/in/intune-portal/update.sh new file mode 100755 index 000000000000..4908bcf43794 --- /dev/null +++ b/nixpkgs/pkgs/by-name/in/intune-portal/update.sh @@ -0,0 +1,26 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p curl gzip dpkg common-updater-scripts + +index_file=$(curl -sL https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/main/binary-amd64/Packages.gz | gzip -dc) + +latest_version="0" + +echo "$index_file" | while read -r line; do + if [[ "$line" =~ ^Package:[[:space:]]*(.*) ]]; then + Package="${BASH_REMATCH[1]}" + fi + if [[ "$line" =~ ^Version:[[:space:]]*(.*) ]]; then + Version="${BASH_REMATCH[1]}" + fi + + if ! [[ "$line" ]] && [[ "${Package}" == "intune-portal" ]]; then + if ( dpkg --compare-versions ${Version} gt ${latest_version} ); then + latest_version="${Version}" + + echo $latest_version + fi + + Package="" + Version="" + fi +done | tail -n 1 | (read version; update-source-version intune-portal $version) diff --git a/nixpkgs/pkgs/by-name/in/invidtui/package.nix b/nixpkgs/pkgs/by-name/in/invidtui/package.nix index a0def40e132c..859b801ea1cd 100644 --- a/nixpkgs/pkgs/by-name/in/invidtui/package.nix +++ b/nixpkgs/pkgs/by-name/in/invidtui/package.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "invidtui"; - version = "0.3.7"; + version = "0.4.1"; src = fetchFromGitHub { owner = "darkhz"; repo = "invidtui"; rev = "refs/tags/v${version}"; - hash = "sha256-bzstO6xaVdu7u1vBgwUjnJ9CEep0UHT73FbybBRd8y8="; + hash = "sha256-3F/JWdYjb3Wtd2eBkEmId3SCVapu2gCgLFowK59RXRc="; }; - vendorHash = "sha256-F0Iyy8H6ZRYiAlMdYGQS2p2hFN9ICmfTiRP/F9kpW7c="; + vendorHash = "sha256-rwKx3h0X7RfIZ9lE/4TJoK0BR6f/lPcLNFbQjUtq/Tk="; doCheck = true; |