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,35 +1,45 @@
{ lib,
{
lib,
mkShell,
pkgs,
stdenv,
OVMF ? null,
OVMFFull ? null,
}:
mkShell {
packages = with pkgs; ([
cdrtools
curl
gawk
gnugrep
gnused
jq
pciutils
procps
python3
qemu_full
samba
socat
spice-gtk
swtpm
unzip
util-linux
xorg.xrandr
zsync
OVMF
OVMFFull
] ++ lib.optionals stdenv.isLinux [
mesa-demos
usbutils
xdg-user-dirs
]);
packages =
with pkgs;
(
[
cdrtools
curl
gawk
gnugrep
gnused
jq
pciutils
procps
python3
qemu_full
samba
socat
spice-gtk
swtpm
unzip
util-linux
xorg.xrandr
zsync
]
++ lib.optionals stdenv.isLinux [
mesa-demos
usbutils
xdg-user-dirs
]
++ lib.optionals (OVMF != null && OVMFFull != null) [
OVMF
OVMFFull
]
);
inputsFrom = with pkgs; [
git
@ -40,8 +50,12 @@ mkShell {
echo "* 'direnv reload' to update '.direnv/bin/quickemu' for testing *"
echo "**********************************************************************"
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 's,\$(command -v smbd),${pkgs.samba}/bin/smbd,' \
quickemu > $PWD/.direnv/bin/quickemu

112
flake.nix
View File

@ -5,38 +5,92 @@
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
};
outputs = {
self,
flake-schemas,
nixpkgs,
}: let
outputs =
{
self,
flake-schemas,
nixpkgs,
}:
let
# 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 {
system = system;
pkgs = import nixpkgs { inherit system; };
});
in {
# Define schemas for the flake's outputs
schemas = flake-schemas.schemas;
forEachSupportedSystem =
f:
nixpkgs.lib.genAttrs supportedSystems (
system:
f {
system = system;
pkgs = import nixpkgs { inherit system; };
}
);
in
{
# Define schemas for the flake's outputs
schemas = flake-schemas.schemas;
# Define overlays for each supported system
overlays = {
default = final: prev: {
quickemu = final.callPackage ./package.nix { };
# Define overlays for each supported system
overlays = {
default =
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
packages = forEachSupportedSystem (
{ 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;
}
);
# Define devShells for each supported system
devShells = forEachSupportedSystem (
{ 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;
}
);
};
# Define packages for each supported system
packages = forEachSupportedSystem ({pkgs, system, ...}: rec {
quickemu = pkgs.callPackage ./package.nix { };
default = quickemu;
});
# Define devShells for each supported system
devShells = forEachSupportedSystem ({pkgs, system, ...}: {
default = pkgs.callPackage ./devshell.nix { };
});
};
}

View File

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