fix(overlays): comment-out linux-manual override as it was causing build failures + apply nixfmt

This commit is contained in:
Antoine Viallon 2026-03-22 21:54:37 +01:00
parent 9737dfe1c0
commit 643b136863
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -1,4 +1,11 @@
{config, pkgs, options, lib, myLib, ...}: {
config,
pkgs,
options,
lib,
myLib,
...
}:
with builtins; with builtins;
with lib; with lib;
let let
@ -8,7 +15,10 @@ in
{ {
imports = [ imports = [
(mkRenamedOptionModule [ "aviallon" "overlays" "optimizations" ] [ "aviallon" "optimizations" "enable" ]) (mkRenamedOptionModule
[ "aviallon" "overlays" "optimizations" ]
[ "aviallon" "optimizations" "enable" ]
)
]; ];
options.aviallon.overlays = { options.aviallon.overlays = {
@ -23,20 +33,23 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
nix.nixPath = nix.nixPath =
# Append our nixpkgs-overlays. # Append our nixpkgs-overlays.
[ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ] [ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ];
;
nixpkgs.overlays =
nixpkgs.overlays = [] [ ]
++ optional cfg.traceCallPackage (self: super: { ++ optional cfg.traceCallPackage (
callPackage = path: overrides: self: super: {
callPackage =
path: overrides:
let let
_pkg = super.callPackage path overrides; _pkg = super.callPackage path overrides;
_name = _pkg.name or _pkg.pname or "<unknown>"; _name = _pkg.name or _pkg.pname or "<unknown>";
in trace "callPackage ${_name}" _pkg in
; trace "callPackage ${_name}" _pkg;
}) }
++ [(self: super: { )
++ [
(self: super: {
htop = super.htop.overrideAttrs (old: { htop = super.htop.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [ configureFlags = old.configureFlags ++ [
"--enable-affinity" "--enable-affinity"
@ -44,10 +57,14 @@ in
"--enable-capabilities" "--enable-capabilities"
]; ];
nativeBuildInputs = old.nativeBuildInputs ++ (with super; [ nativeBuildInputs =
old.nativeBuildInputs
++ (with super; [
pkg-config pkg-config
]); ]);
buildInputs = old.buildInputs ++ (with super; [ buildInputs =
old.buildInputs
++ (with super; [
libcap libcap
libunwind libunwind
libnl libnl
@ -58,17 +75,24 @@ in
}; };
}) })
(final: prev: { # (final: prev: {
# Use our kernel for generating linux man pages # # linux-manual requires scripts/split-man.pl from the kernel source, but
linux-manual = prev.linux-manual.override { linuxPackages_latest = config.boot.kernelPackages; }; # # neither xanmod 6.19.7 nor vanilla 6.18.x ship it yet. Mark broken so
}) # # the build doesn't fail; man-pages and man-pages-posix still build fine.
# linux-manual = prev.linux-manual.overrideAttrs (_: {
# meta = (prev.linux-manual.meta or { }) // {
# broken = true;
# };
# });
# })
(final: prev: { (final: prev: {
lutris-fhs = lutris-fhs = (
(prev.buildFHSUserEnv { prev.buildFHSUserEnv {
name = "lutris"; name = "lutris";
targetPkgs = pkgs: (with pkgs; targetPkgs =
[ pkgs:
(with pkgs; [
glibc glibc
bashInteractive bashInteractive
@ -76,10 +100,9 @@ in
lutris lutris
gamescope gamescope
wineWowPackages.waylandFull wineWow64Packages.waylandFull
flatpak flatpak
] ]);
);
# symlink shared assets, including icons and desktop entries # symlink shared assets, including icons and desktop entries
extraInstallCommands = '' extraInstallCommands = ''
@ -87,17 +110,25 @@ in
''; '';
runScript = "/usr/bin/lutris"; runScript = "/usr/bin/lutris";
}); }
);
}) })
(final: prev: let (
pycharm-common = pkg: final: prev:
let
pycharm-common =
pkg:
let let
myIsDerivation = x: !(myLib.derivations.isBroken x); myIsDerivation = x: !(myLib.derivations.isBroken x);
interpreters = pkgs: filter (x: myIsDerivation x) (attrValues pkgs.pythonInterpreters); interpreters = pkgs: filter (x: myIsDerivation x) (attrValues pkgs.pythonInterpreters);
in prev.buildFHSUserEnv rec { in
prev.buildFHSUserEnv rec {
name = pkg.pname; name = pkg.pname;
targetPkgs = pkgs: (with pkgs; targetPkgs =
pkgs:
(
with pkgs;
[ [
glibc glibc
bashInteractive bashInteractive
@ -107,7 +138,9 @@ in
pkg pkg
] ]
++ trace "Using the following interpreters: ${toString (pkgNames (interpreters pkgs))}" (interpreters pkgs) ++ trace "Using the following interpreters: ${toString (pkgNames (interpreters pkgs))}" (
interpreters pkgs
)
); );
# symlink shared assets, including icons and desktop entries # symlink shared assets, including icons and desktop entries
@ -117,21 +150,31 @@ in
runScript = "/usr/bin/${pkg.pname}"; runScript = "/usr/bin/${pkg.pname}";
}; };
in { in
{
jetbrains = prev.jetbrains // { jetbrains = prev.jetbrains // {
pycharm-community-fhs = pycharm-common prev.jetbrains.pycharm-community; pycharm-community-fhs = pycharm-common prev.jetbrains.pycharm-community;
pycharm-professional-fhs = pycharm-common prev.jetbrains.pycharm-professional; pycharm-professional-fhs = pycharm-common prev.jetbrains.pycharm-professional;
clion-fhs = let clion-fhs =
compilers = pkgs: with pkgs; with llvmPackages_17; [ let
compilers =
pkgs:
with pkgs;
with llvmPackages_17;
[
(setPrio (-9) gcc13) (setPrio (-9) gcc13)
(hiPrio clang) (hiPrio clang)
clang-unwrapped clang-unwrapped
libcxx libcxx
]; ];
in prev.buildFHSUserEnv rec { in
prev.buildFHSUserEnv rec {
name = "clion"; name = "clion";
targetPkgs = pkgs: (with pkgs; targetPkgs =
pkgs:
(
with pkgs;
[ [
jetbrains.clion jetbrains.clion
(hiPrio cmake) (hiPrio cmake)
@ -145,16 +188,22 @@ in
extraInstallCommands = '' extraInstallCommands = ''
ln -s "${prev.jetbrains.clion}/share" "$out/" ln -s "${prev.jetbrains.clion}/share" "$out/"
''; '';
extraOutputsToInstall = [ "include" "dev" "doc" ]; extraOutputsToInstall = [
"include"
"dev"
"doc"
];
runScript = "/usr/bin/clion"; runScript = "/usr/bin/clion";
}; };
}; };
}) }
)
]; ];
aviallon.programs.allowUnfreeList = [ aviallon.programs.allowUnfreeList = [
"unrar" "ark" "unrar"
"ark"
]; ];
}; };
} }