mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
fix(overlays): comment-out linux-manual override as it was causing build failures + apply nixfmt
This commit is contained in:
parent
9737dfe1c0
commit
643b136863
1 changed files with 179 additions and 130 deletions
309
overlays.nix
309
overlays.nix
|
|
@ -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 = {
|
||||||
|
|
@ -21,140 +31,179 @@ in
|
||||||
traceCallPackage = mkEnableOption "printing package names each time callPackage is evaluated";
|
traceCallPackage = mkEnableOption "printing package names each time callPackage is evaluated";
|
||||||
};
|
};
|
||||||
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: {
|
||||||
let
|
callPackage =
|
||||||
_pkg = super.callPackage path overrides;
|
path: overrides:
|
||||||
_name = _pkg.name or _pkg.pname or "<unknown>";
|
let
|
||||||
in trace "callPackage ${_name}" _pkg
|
_pkg = super.callPackage path overrides;
|
||||||
;
|
_name = _pkg.name or _pkg.pname or "<unknown>";
|
||||||
})
|
in
|
||||||
++ [(self: super: {
|
trace "callPackage ${_name}" _pkg;
|
||||||
htop = super.htop.overrideAttrs (old: {
|
}
|
||||||
configureFlags = old.configureFlags ++ [
|
)
|
||||||
"--enable-affinity"
|
++ [
|
||||||
"--enable-delayacct"
|
(self: super: {
|
||||||
"--enable-capabilities"
|
htop = super.htop.overrideAttrs (old: {
|
||||||
];
|
configureFlags = old.configureFlags ++ [
|
||||||
|
"--enable-affinity"
|
||||||
nativeBuildInputs = old.nativeBuildInputs ++ (with super; [
|
"--enable-delayacct"
|
||||||
pkg-config
|
"--enable-capabilities"
|
||||||
]);
|
|
||||||
buildInputs = old.buildInputs ++ (with super; [
|
|
||||||
libcap
|
|
||||||
libunwind
|
|
||||||
libnl
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
ark = super.ark.override {
|
|
||||||
unfreeEnableUnrar = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
})
|
|
||||||
(final: prev: {
|
|
||||||
# Use our kernel for generating linux man pages
|
|
||||||
linux-manual = prev.linux-manual.override { linuxPackages_latest = config.boot.kernelPackages; };
|
|
||||||
})
|
|
||||||
|
|
||||||
(final: prev: {
|
|
||||||
lutris-fhs =
|
|
||||||
(prev.buildFHSUserEnv {
|
|
||||||
name = "lutris";
|
|
||||||
targetPkgs = pkgs: (with pkgs;
|
|
||||||
[
|
|
||||||
glibc
|
|
||||||
bashInteractive
|
|
||||||
|
|
||||||
python3Full
|
|
||||||
|
|
||||||
lutris
|
|
||||||
gamescope
|
|
||||||
wineWowPackages.waylandFull
|
|
||||||
flatpak
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
# symlink shared assets, including icons and desktop entries
|
|
||||||
extraInstallCommands = ''
|
|
||||||
ln -s "${pkgs.lutris}/share" "$out/"
|
|
||||||
'';
|
|
||||||
|
|
||||||
runScript = "/usr/bin/lutris";
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
(final: prev: let
|
|
||||||
pycharm-common = pkg:
|
|
||||||
let
|
|
||||||
myIsDerivation = x: !(myLib.derivations.isBroken x);
|
|
||||||
interpreters = pkgs: filter (x: myIsDerivation x) (attrValues pkgs.pythonInterpreters);
|
|
||||||
in prev.buildFHSUserEnv rec {
|
|
||||||
name = pkg.pname;
|
|
||||||
targetPkgs = pkgs: (with pkgs;
|
|
||||||
[
|
|
||||||
glibc
|
|
||||||
bashInteractive
|
|
||||||
zlib
|
|
||||||
|
|
||||||
python3Full
|
|
||||||
|
|
||||||
pkg
|
|
||||||
]
|
|
||||||
++ trace "Using the following interpreters: ${toString (pkgNames (interpreters pkgs))}" (interpreters pkgs)
|
|
||||||
);
|
|
||||||
|
|
||||||
# symlink shared assets, including icons and desktop entries
|
|
||||||
extraInstallCommands = ''
|
|
||||||
ln -s "${pkg}/share" "$out/"
|
|
||||||
'';
|
|
||||||
|
|
||||||
runScript = "/usr/bin/${pkg.pname}";
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
jetbrains = prev.jetbrains // {
|
|
||||||
pycharm-community-fhs = pycharm-common prev.jetbrains.pycharm-community;
|
|
||||||
pycharm-professional-fhs = pycharm-common prev.jetbrains.pycharm-professional;
|
|
||||||
|
|
||||||
clion-fhs = let
|
|
||||||
compilers = pkgs: with pkgs; with llvmPackages_17; [
|
|
||||||
(setPrio (-9) gcc13)
|
|
||||||
(hiPrio clang)
|
|
||||||
clang-unwrapped
|
|
||||||
libcxx
|
|
||||||
];
|
];
|
||||||
in prev.buildFHSUserEnv rec {
|
|
||||||
name = "clion";
|
|
||||||
targetPkgs = pkgs: (with pkgs;
|
|
||||||
[
|
|
||||||
jetbrains.clion
|
|
||||||
(hiPrio cmake)
|
|
||||||
(hiPrio ninja)
|
|
||||||
gnumake
|
|
||||||
extra-cmake-modules
|
|
||||||
]
|
|
||||||
++ trace "Using the following compilers: ${toString (pkgNames (compilers pkgs))}" (compilers pkgs)
|
|
||||||
);
|
|
||||||
# symlink shared assets, including icons and desktop entries
|
|
||||||
extraInstallCommands = ''
|
|
||||||
ln -s "${prev.jetbrains.clion}/share" "$out/"
|
|
||||||
'';
|
|
||||||
extraOutputsToInstall = [ "include" "dev" "doc" ];
|
|
||||||
|
|
||||||
runScript = "/usr/bin/clion";
|
nativeBuildInputs =
|
||||||
|
old.nativeBuildInputs
|
||||||
|
++ (with super; [
|
||||||
|
pkg-config
|
||||||
|
]);
|
||||||
|
buildInputs =
|
||||||
|
old.buildInputs
|
||||||
|
++ (with super; [
|
||||||
|
libcap
|
||||||
|
libunwind
|
||||||
|
libnl
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
ark = super.ark.override {
|
||||||
|
unfreeEnableUnrar = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
];
|
})
|
||||||
|
# (final: prev: {
|
||||||
|
# # linux-manual requires scripts/split-man.pl from the kernel source, but
|
||||||
|
# # 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: {
|
||||||
|
lutris-fhs = (
|
||||||
|
prev.buildFHSUserEnv {
|
||||||
|
name = "lutris";
|
||||||
|
targetPkgs =
|
||||||
|
pkgs:
|
||||||
|
(with pkgs; [
|
||||||
|
glibc
|
||||||
|
bashInteractive
|
||||||
|
|
||||||
|
python3Full
|
||||||
|
|
||||||
|
lutris
|
||||||
|
gamescope
|
||||||
|
wineWow64Packages.waylandFull
|
||||||
|
flatpak
|
||||||
|
]);
|
||||||
|
|
||||||
|
# symlink shared assets, including icons and desktop entries
|
||||||
|
extraInstallCommands = ''
|
||||||
|
ln -s "${pkgs.lutris}/share" "$out/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
runScript = "/usr/bin/lutris";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
|
||||||
|
(
|
||||||
|
final: prev:
|
||||||
|
let
|
||||||
|
pycharm-common =
|
||||||
|
pkg:
|
||||||
|
let
|
||||||
|
myIsDerivation = x: !(myLib.derivations.isBroken x);
|
||||||
|
interpreters = pkgs: filter (x: myIsDerivation x) (attrValues pkgs.pythonInterpreters);
|
||||||
|
in
|
||||||
|
prev.buildFHSUserEnv rec {
|
||||||
|
name = pkg.pname;
|
||||||
|
targetPkgs =
|
||||||
|
pkgs:
|
||||||
|
(
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
glibc
|
||||||
|
bashInteractive
|
||||||
|
zlib
|
||||||
|
|
||||||
|
python3Full
|
||||||
|
|
||||||
|
pkg
|
||||||
|
]
|
||||||
|
++ trace "Using the following interpreters: ${toString (pkgNames (interpreters pkgs))}" (
|
||||||
|
interpreters pkgs
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
# symlink shared assets, including icons and desktop entries
|
||||||
|
extraInstallCommands = ''
|
||||||
|
ln -s "${pkg}/share" "$out/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
runScript = "/usr/bin/${pkg.pname}";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
jetbrains = prev.jetbrains // {
|
||||||
|
pycharm-community-fhs = pycharm-common prev.jetbrains.pycharm-community;
|
||||||
|
pycharm-professional-fhs = pycharm-common prev.jetbrains.pycharm-professional;
|
||||||
|
|
||||||
|
clion-fhs =
|
||||||
|
let
|
||||||
|
compilers =
|
||||||
|
pkgs:
|
||||||
|
with pkgs;
|
||||||
|
with llvmPackages_17;
|
||||||
|
[
|
||||||
|
(setPrio (-9) gcc13)
|
||||||
|
(hiPrio clang)
|
||||||
|
clang-unwrapped
|
||||||
|
libcxx
|
||||||
|
];
|
||||||
|
in
|
||||||
|
prev.buildFHSUserEnv rec {
|
||||||
|
name = "clion";
|
||||||
|
targetPkgs =
|
||||||
|
pkgs:
|
||||||
|
(
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
jetbrains.clion
|
||||||
|
(hiPrio cmake)
|
||||||
|
(hiPrio ninja)
|
||||||
|
gnumake
|
||||||
|
extra-cmake-modules
|
||||||
|
]
|
||||||
|
++ trace "Using the following compilers: ${toString (pkgNames (compilers pkgs))}" (compilers pkgs)
|
||||||
|
);
|
||||||
|
# symlink shared assets, including icons and desktop entries
|
||||||
|
extraInstallCommands = ''
|
||||||
|
ln -s "${prev.jetbrains.clion}/share" "$out/"
|
||||||
|
'';
|
||||||
|
extraOutputsToInstall = [
|
||||||
|
"include"
|
||||||
|
"dev"
|
||||||
|
"doc"
|
||||||
|
];
|
||||||
|
|
||||||
|
runScript = "/usr/bin/clion";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
];
|
||||||
aviallon.programs.allowUnfreeList = [
|
aviallon.programs.allowUnfreeList = [
|
||||||
"unrar" "ark"
|
"unrar"
|
||||||
|
"ark"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue