fix(lix/flakes): get a patch for flake-compat

This commit is contained in:
catvayor 2025-02-02 11:44:30 +01:00
parent 1ed4f9cbe9
commit 0f77703b81
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
2 changed files with 37 additions and 12 deletions

View file

@ -21,6 +21,31 @@ let
unspecified
;
patched_lix = let
fetchTree-fix = pkgs.fetchurl {
url = "https://gerrit.lix.systems/changes/lix~2399/revisions/1/patch?download";
hash = "sha256-ecZOnpQmUYY2uSLwrt8QHkeLW+L5RZWVvi58h4GkGEY=";
name = "fetchTree-fix";
downloadToTemp = true;
postFetch = ''
base64 -d $downloadedFile > $out
'';
};
in pkgs.applyPatches {
src = sources.lix;
name = "lix";
patches = [
fetchTree-fix
];
};
default_overlay_paths = [
"${sources.kat-pkgs}/overlay.nix"
(pkgs.writeText "lix-overlay.nix" ''
import "${sources.lix-overlay}/overlay.nix" { lix = ${patched_lix}; }
'')
];
machine_meta =
{ config, ... }:
{
@ -86,12 +111,7 @@ let
./nginx-fallback.patch
./ocamlPackagesExtentions.patch
] ++ config.patches;
overlay-paths = [
"${sources.kat-pkgs}/overlay.nix"
(pkgs.writeText "lix-overlay.nix" ''
import "${sources.lix-overlay}/overlay.nix" { lix = ${sources.lix}; }
'')
] ++ config.overlay-paths;
overlay-paths = default_overlay_paths ++ config.overlay-paths;
nixpkgs-paths = {
nixpkgs-src = pkgs.applyPatches {
src = sources."nixpkgs-${version}";
@ -116,7 +136,14 @@ let
};
in
{
options.machines = mkOption {
type = attrsOf (submodule machine_meta);
options = {
machines = mkOption {
type = attrsOf (submodule machine_meta);
};
general_overlays = mkOption {
type = listOf unspecified;
readOnly = true;
};
};
config.general_overlays = map import default_overlay_paths;
}

View file

@ -1,10 +1,8 @@
let
sources = import ./npins;
hive = import ./hive.nix;
pkgs = import sources.nixpkgs-unstable {
overlays = [
(import "${sources.kat-pkgs}/overlay.nix")
(import "${sources.lix-overlay}/overlay.nix" { lix = "${sources.lix}"; })
];
overlays = hive.meta.nodeSpecialArgs.kat-probook.meta.general_overlays;
};
in
pkgs.mkShell {