Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update nix lock file #773

Merged
merged 5 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/meshapi/meshapi.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/meshapi/meshapi_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/userapi/userapi.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/userapi/userapi_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions overlays/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,30 @@ final: prev: {
azure-cli = prev.azure-cli.override {
withExtensions = with final.azure-cli.extensions; [ aks-preview ];
};

pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(_pythonFinal: pythonPrev: {
# Temporary fix for azure-cli https://github.com/NixOS/nixpkgs/issues/335750
# Remove after pulling in https://github.com/NixOS/nixpkgs/pull/335225
msal = pythonPrev.msal.overrideAttrs (oldAttrs: rec {
version = "1.30.0";
src = final.fetchPypi {
inherit version;
inherit (oldAttrs) pname;
hash = "sha256-tL8AhQCS5GUVfYFO+iShj3iChMmkeUkQJNYpAwheovs=";
};
});
# Temporary fix for azure-cli https://github.com/NixOS/nixpkgs/issues/335750
# Remove after pulling in https://github.com/NixOS/nixpkgs/pull/335225
msal-extensions = pythonPrev.msal-extensions.overrideAttrs (_oldAttrs: rec {
version = "1.2.0";
src = final.fetchFromGitHub {
owner = "AzureAD";
repo = "microsoft-authentication-extensions-for-python";
rev = "refs/tags/${version}";
hash = "sha256-javYE1XDW1yrMZ/BLqIu/pUXChlBZlACctbD2RfWuis=";
};
});
})
];
}
10 changes: 5 additions & 5 deletions packages/by-name/igvmmeasure/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@

rustPlatform.buildRustPackage rec {
pname = "igvmmeasure";
version = "0.1.0-unstable-2024-03-25";
version = "0.1.0-unstable-2024-08-19";

src = fetchFromGitHub {
owner = "coconut-svsm";
repo = "svsm";
# TODO(malt3): Use a released version once available.
rev = "509bc7ca181af6981a1d50fb1cc46320553a4370";
hash = "sha256-kA5ZI+8RpG2swApPLZsWJdcUu09sUBpdSAQf844XVuU=";
rev = "aa4936afbfae394a0b7404e5080863e5dae9473d";
hash = "sha256-QHVdHVhQJhrmE8Vjg4Xw2HJmm2l9hMB0iL1KHVlh1iw=";
};

cargoBuildFlags = "-p igvmmeasure";
buildAndTestSubdir = "igvmmeasure";

cargoLock = {
lockFile = "${src}/Cargo.lock";
outputHashes = {
"packit-0.1.1" = "sha256-BLVpKYjrqTwEAPgL7V1xwMnmNn4B8bA38GSmrry0GIM=";
"packit-0.1.1" = "sha256-jrH0y1ebpUilV+nyv/kLQzcZP1lMW1fVCQo35tz5Vhs=";
};
};

Expand Down
31 changes: 19 additions & 12 deletions packages/by-name/kata/kata-agent/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
openssl,
withAgentPolicy ? true,
withStandardOCIRuntime ? false,
withGuestPull ? true,
fetchpatch,
}:

Expand Down Expand Up @@ -60,28 +61,34 @@ rustPlatform.buildRustPackage rec {
libseccomp
];

postPatch = ''
substitute src/version.rs.in src/version.rs \
--replace @@AGENT_VERSION@@ ${version} \
--replace @@API_VERSION@@ 0.0.1 \
--replace @@VERSION_COMMIT@@ ${version} \
--replace @@COMMIT@@ "" \
--replace @@AGENT_NAME@@ kata-agent \
--replace @@AGENT_DIR@@ /usr/bin \
--replace @@AGENT_PATH@@ /usr/bin/kata-agent
'';

# Build.rs writes to src
postConfigure = ''
chmod -R +w ../..
'';

buildFeatures =
lib.optional withSeccomp "seccomp"
++ lib.optional withAgentPolicy "agent-policy"
++ lib.optional withStandardOCIRuntime "standard-oci-runtime"
++ lib.optional withGuestPull "guest-pull"
++ lib.optional (!withGuestPull) "default-pull";

env = {
LIBC = "gnu";
SECCOMP = if withSeccomp then "yes" else "no";
AGENT_POLICY = if withAgentPolicy then "yes" else "no";
STANDARD_OCI_RUNTIME = if withStandardOCIRuntime then "yes" else "no";
OPENSSL_NO_VENDOR = 1;
RUST_BACKTRACE = 1;
};

buildPhase = ''
runHook preBuild

make

runHook postBuild
'';

checkFlags = [
"--skip=mount::tests::test_already_baremounted"
"--skip=netlink::tests::list_routes stdout"
Expand Down
28 changes: 16 additions & 12 deletions packages/by-name/microsoft/kata-agent/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,32 @@ rustPlatform.buildRustPackage rec {
libseccomp
];

postPatch = ''
substitute src/version.rs.in src/version.rs \
--replace @@AGENT_VERSION@@ ${version} \
--replace @@API_VERSION@@ 0.0.1 \
--replace @@VERSION_COMMIT@@ ${version} \
--replace @@COMMIT@@ "" \
--replace @@AGENT_NAME@@ kata-agent \
--replace @@AGENT_DIR@@ /usr/bin \
--replace @@AGENT_PATH@@ /usr/bin/kata-agent
'';

# Build.rs writes to src
postConfigure = ''
chmod -R +w ../..
'';

buildFeatures =
lib.optional withSeccomp "seccomp"
++ lib.optional withAgentPolicy "agent-policy"
++ lib.optional withStandardOCIRuntime "standard-oci-runtime";

env = {
LIBC = "gnu";
SECCOMP = if withSeccomp then "yes" else "no";
AGENT_POLICY = if withAgentPolicy then "yes" else "no";
STANDARD_OCI_RUNTIME = if withStandardOCIRuntime then "yes" else "no";
OPENSSL_NO_VENDOR = 1;
RUST_BACKTRACE = 1;
};

buildPhase = ''
runHook preBuild

make

runHook postBuild
'';

checkFlags = [
"--skip=mount::tests::test_already_baremounted"
"--skip=netlink::tests::list_routes stdout"
Expand Down
2 changes: 1 addition & 1 deletion packages/by-name/microsoft/kata-igvm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ let
dontUnpack = true;
buildInputs = [ igvmmeasure ];
buildPhase = ''
igvmmeasure -b ${igvm} | dd conv=lcase > $out
igvmmeasure ${igvm} measure -b | dd conv=lcase > $out
'';
};

Expand Down
56 changes: 10 additions & 46 deletions packages/by-name/qemu-static/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
libaio,
dtc,
fetchurl,
python3Packages,
}:
let
patchedDtc = dtc.overrideAttrs (previousAttrs: {
Expand All @@ -20,36 +21,9 @@ let
in
(qemu.override (_previous: {
dtc = patchedDtc;

# Disable a bunch of features we don't need.
guestAgentSupport = false;
numaSupport = false;
seccompSupport = false;
alsaSupport = false;
pulseSupport = false;
pipewireSupport = false;
sdlSupport = false;
jackSupport = false;
gtkSupport = false;
vncSupport = false;
smartcardSupport = false;
spiceSupport = false;
ncursesSupport = false;
usbredirSupport = false;
xenSupport = false;
cephSupport = false;
glusterfsSupport = false;
openGLSupport = false;
rutabagaSupport = false;
virglSupport = false;
libiscsiSupport = false;
smbdSupport = false;
tpmSupport = false;
minimal = true;
enableBlobs = true;
uringSupport = false;
canokeySupport = false;
capstoneSupport = false;
enableDocs = false;

# Only build for x86_64.
hostCpuOnly = true;
hostCpuTargets = [ "x86_64-softmmu" ];
Expand All @@ -62,23 +36,13 @@ in
hash = "sha256-JDcnzpkwfzwa5ofMjS1HYy7BDJ79EunIdMqW5kdfauk=";
};

propagatedBuildInputs = builtins.filter (
input: input.pname != "texinfo"
) previousAttrs.propagatedBuildInputs;
configureFlags =
(
# By the time overrideAttrs gets to see the attributes, it's too late
# for dontAddStaticConfigureFlags, so we need to manually filter out
# the flags.
builtins.filter (
flag: flag != "--enable-static" && flag != "--disable-shared"
) previousAttrs.configureFlags
)
++ [
"--static"
"-Dlinux_aio_path=${libaio}/lib"
"-Dlinux_fdt_path=${patchedDtc}/lib"
];
configureFlags = previousAttrs.configureFlags ++ [
"-Dlinux_aio_path=${libaio}/lib"
"-Dlinux_fdt_path=${patchedDtc}/lib"
];

nativeBuildInputs = previousAttrs.nativeBuildInputs ++ [ python3Packages.packaging ];

patches = [
./0001-avoid-duplicate-definitions.patch
# Based on https://github.com/NixOS/nixpkgs/pull/300070/commits/96054ca98020df125bb91e5cf49bec107bea051b#diff-7246126ac058898e6da6aadc1e831bb26afe07fa145958e55c5e112dc2c578fd.
Expand Down