chore(deps): update flake, devshell and package Nix files

- Refresh flake.nix inputs and pins to align with current upstream
- Update devshell.nix to use revised development environment packages
- Adjust package.nix to match dependency and tooling changes from the
flake update
- Keep reproducible builds and developer tooling current

Signed-off-by: Martin Wimpress <martin@wimpress.org>
This commit is contained in:
Martin Wimpress 2026-01-23 13:10:55 +00:00
parent 1878a308e0
commit 5cd0149f3a
No known key found for this signature in database
3 changed files with 179 additions and 100 deletions

View File

@ -1,10 +1,16 @@
{ lib, {
lib,
mkShell, mkShell,
pkgs, pkgs,
stdenv, stdenv,
OVMF ? null,
OVMFFull ? null,
}: }:
mkShell { mkShell {
packages = with pkgs; ([ packages =
with pkgs;
(
[
cdrtools cdrtools
curl curl
gawk gawk
@ -23,13 +29,17 @@ mkShell {
util-linux util-linux
xorg.xrandr xorg.xrandr
zsync zsync
OVMF ]
OVMFFull ++ lib.optionals stdenv.isLinux [
] ++ lib.optionals stdenv.isLinux [
mesa-demos mesa-demos
usbutils usbutils
xdg-user-dirs xdg-user-dirs
]); ]
++ lib.optionals (OVMF != null && OVMFFull != null) [
OVMF
OVMFFull
]
);
inputsFrom = with pkgs; [ inputsFrom = with pkgs; [
git git
@ -40,8 +50,12 @@ mkShell {
echo "* 'direnv reload' to update '.direnv/bin/quickemu' for testing *" echo "* 'direnv reload' to update '.direnv/bin/quickemu' for testing *"
echo "**********************************************************************" echo "**********************************************************************"
sed \ sed \
-e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${pkgs.OVMFFull.firmware}","${pkgs.OVMFFull.variables}" |' \ ${
-e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${pkgs.OVMF.firmware}","${pkgs.OVMF.variables}" |' \ lib.optionalString (OVMF != null && OVMFFull != null) ''
-e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.firmware}","${OVMFFull.variables}" |' \
-e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \
''
} \
-e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \ -e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \
-e 's,\$(command -v smbd),${pkgs.samba}/bin/smbd,' \ -e 's,\$(command -v smbd),${pkgs.samba}/bin/smbd,' \
quickemu > $PWD/.direnv/bin/quickemu quickemu > $PWD/.direnv/bin/quickemu

View File

@ -5,38 +5,92 @@
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz"; nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
}; };
outputs = { outputs =
{
self, self,
flake-schemas, flake-schemas,
nixpkgs, nixpkgs,
}: let }:
let
# Define supported systems and a helper function for generating system-specific outputs # Define supported systems and a helper function for generating system-specific outputs
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ]; supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { forEachSupportedSystem =
f:
nixpkgs.lib.genAttrs supportedSystems (
system:
f {
system = system; system = system;
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
}); }
in { );
in
{
# Define schemas for the flake's outputs # Define schemas for the flake's outputs
schemas = flake-schemas.schemas; schemas = flake-schemas.schemas;
# Define overlays for each supported system # Define overlays for each supported system
overlays = { overlays = {
default = final: prev: { default =
quickemu = final.callPackage ./package.nix { }; final: prev:
let
# OVMF is only available/needed on Linux
ovmfArgs =
if final.stdenv.isLinux then
{ }
else
{
OVMF = null;
OVMFFull = null;
};
in
{
quickemu = final.callPackage ./package.nix ovmfArgs;
}; };
}; };
# Define packages for each supported system # Define packages for each supported system
packages = forEachSupportedSystem ({pkgs, system, ...}: rec { packages = forEachSupportedSystem (
quickemu = pkgs.callPackage ./package.nix { }; { pkgs, system, ... }:
let
# OVMF is only available/needed on Linux
ovmfArgs =
if pkgs.stdenv.isLinux then
{ }
else
{
OVMF = null;
OVMFFull = null;
};
in
rec {
quickemu = pkgs.callPackage ./package.nix ovmfArgs;
default = quickemu; default = quickemu;
}); }
);
# Define devShells for each supported system # Define devShells for each supported system
devShells = forEachSupportedSystem ({pkgs, system, ...}: { devShells = forEachSupportedSystem (
default = pkgs.callPackage ./devshell.nix { }; { pkgs, system, ... }:
}); let
# OVMF is only available/needed on Linux
ovmfArgs =
if pkgs.stdenv.isLinux then
{ }
else
{
OVMF = null;
OVMFFull = null;
};
in
{
default = pkgs.callPackage ./devshell.nix ovmfArgs;
}
);
}; };
} }

View File

@ -1,33 +1,34 @@
{ lib {
, fetchFromGitHub lib,
, installShellFiles fetchFromGitHub,
, makeWrapper installShellFiles,
, stdenv makeWrapper,
, testers stdenv,
, cdrtools testers,
, curl cdrtools,
, gawk curl,
, gnugrep gawk,
, gnused gnugrep,
, jq gnused,
, mesa-demos jq,
, pciutils mesa-demos,
, procps pciutils,
, python3 procps,
, qemu_full python3,
, samba qemu_full,
, socat samba,
, spice-gtk socat,
, swtpm spice-gtk,
, unzip swtpm,
, usbutils unzip,
, util-linux usbutils,
, xdg-user-dirs util-linux,
, xrandr xdg-user-dirs,
, zsync xrandr,
, OVMF zsync,
, OVMFFull OVMF ? null,
, quickemu OVMFFull ? null,
quickemu,
}: }:
let let
runtimePaths = [ runtimePaths = [
@ -48,15 +49,15 @@ let
util-linux util-linux
xrandr xrandr
zsync zsync
]
++ lib.optionals stdenv.isLinux [
mesa-demos
OVMF OVMF
OVMFFull OVMFFull
] ++ lib.optionals stdenv.isLinux [
mesa-demos
usbutils usbutils
xdg-user-dirs xdg-user-dirs
]; ];
versionMatches = versionMatches = builtins.match ''
builtins.match ''
.* .*
readonly[[:blank:]]VERSION="([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)" readonly[[:blank:]]VERSION="([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)"
.* .*
@ -69,14 +70,21 @@ stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
sed -i \ sed -i \
${
lib.optionalString (OVMF != null && OVMFFull != null) ''
-e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.firmware}","${OVMFFull.variables}" |' \ -e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.firmware}","${OVMFFull.variables}" |' \
-e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \ -e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \
''
} \
-e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \ -e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \
-e 's,\$(command -v smbd),${samba}/bin/smbd,' \ -e 's,\$(command -v smbd),${samba}/bin/smbd,' \
quickemu quickemu
''; '';
nativeBuildInputs = [ makeWrapper installShellFiles ]; nativeBuildInputs = [
makeWrapper
installShellFiles
];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -102,6 +110,9 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/quickemu-project/quickemu"; homepage = "https://github.com/quickemu-project/quickemu";
mainProgram = "quickemu"; mainProgram = "quickemu";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fedx-sudo flexiondotorg ]; maintainers = with lib.maintainers; [
fedx-sudo
flexiondotorg
];
}; };
} }