nix: update mkosi to v25.3

This commit is contained in:
Moritz Sanft 2025-03-28 10:52:45 +01:00
parent b52639d2b8
commit 59bddc49c0
No known key found for this signature in database
GPG key ID: 335D28368B1DA615
2 changed files with 48 additions and 15 deletions

12
flake.lock generated
View file

@ -20,16 +20,16 @@
}, },
"nixpkgsUnstable": { "nixpkgsUnstable": {
"locked": { "locked": {
"lastModified": 1733376361, "lastModified": 1743496247,
"narHash": "sha256-aLJxoTDDSqB+/3orsulE6/qdlX6MzDLIITLZqdgMpqo=", "narHash": "sha256-RtiLfqe+Wt1MC1LnG1mYNKwIlg27LnRwkr2b0vTmEIM=",
"owner": "NixOS", "owner": "msanft",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "929116e316068c7318c54eb4d827f7d9756d5e9c", "rev": "ef4cdcad9eaa74c2ff07c065e08b4017be3665c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "msanft",
"ref": "nixpkgs-unstable", "ref": "msanft/mkosi/fix",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -3,7 +3,9 @@
inputs = { inputs = {
nixpkgsUnstable = { nixpkgsUnstable = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # TODO(msanft): Go back to upstream once the following PR lands:
# https://github.com/NixOS/nixpkgs/pull/395114
url = "github:msanft/nixpkgs/msanft/mkosi/fix";
}; };
flake-utils = { flake-utils = {
url = "github:numtide/flake-utils"; url = "github:numtide/flake-utils";
@ -19,17 +21,47 @@
flake-utils.lib.eachDefaultSystem ( flake-utils.lib.eachDefaultSystem (
system: system:
let let
pkgsUnstable = import nixpkgsUnstable { inherit system; }; overlay = final: prev: {
rpm = prev.rpm.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [ prev.makeWrapper ];
postFixup = ''
wrapProgram $out/lib/rpm/sysusers.sh \
--set PATH ${
prev.lib.makeBinPath (
with prev;
[
coreutils
findutils
su.out
gnugrep
]
)
}
'';
});
# dnf5 assumes a TTY with a very small width by default, truncating its output instead of line-wrapping
# it. Force it to use more VT columns to avoid this, and make debugging errors easier.
dnf5-stub = prev.writeScriptBin "dnf5" ''
#!/usr/bin/env bash
FORCE_COLUMNS=200 ${final.dnf5}/bin/dnf5 $@
'';
};
pkgsUnstable = import nixpkgsUnstable {
inherit system;
overlays = [ overlay ];
};
callPackage = pkgsUnstable.callPackage; callPackage = pkgsUnstable.callPackage;
mkosiDev = ( mkosiDev = (
pkgsUnstable.mkosi.overrideAttrs (oldAttrs: { pkgsUnstable.mkosi.override {
propagatedBuildInputs = extraDeps = (
oldAttrs.propagatedBuildInputs with pkgsUnstable;
++ (with pkgsUnstable; [ [
# package management # package management
dnf5 dnf5-stub
rpm rpm
createrepo_c createrepo_c
@ -47,8 +79,9 @@
# utils # utils
gnused # sed gnused # sed
gnugrep # grep gnugrep # grep
]); ]
}) );
}
); );
in in
{ {