base nix-packages on an overlay
This commit is contained in:
parent
1b8ce7f271
commit
0c99b5e733
3 changed files with 216 additions and 81 deletions
68
default.nix
68
default.nix
|
@ -8,9 +8,75 @@
|
||||||
{pkgs ? import <nixpkgs> {}}: let
|
{pkgs ? import <nixpkgs> {}}: let
|
||||||
lib = import ./lib {inherit pkgs;}; # functions
|
lib = import ./lib {inherit pkgs;}; # functions
|
||||||
flake = (lib.importFlake {inherit (pkgs) system;}).defaultNix;
|
flake = (lib.importFlake {inherit (pkgs) system;}).defaultNix;
|
||||||
|
pkgsWithOverlay = import pkgs {
|
||||||
|
overlays = [(import ./overlay.nix pkgs.system)];
|
||||||
|
inherit (pkgs) system;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# The `lib`, `modules`, and `overlay` names are special
|
# The `lib`, `modules`, and `overlay` names are special
|
||||||
inherit (flake) lib modules overlays;
|
inherit (flake) lib modules overlays;
|
||||||
}
|
}
|
||||||
// (flake.packages.${pkgs.system})
|
// {
|
||||||
|
inherit
|
||||||
|
(pkgsWithOverlay)
|
||||||
|
akkoma
|
||||||
|
pleroma-fe
|
||||||
|
admin-fe
|
||||||
|
emoji-lotte
|
||||||
|
emoji-volpeon-blobfox
|
||||||
|
emoji-volpeon-blobfox-flip
|
||||||
|
emoji-volpeon-bunhd
|
||||||
|
emoji-volpeon-bunhd-flip
|
||||||
|
emoji-volpeon-drgn
|
||||||
|
emoji-volpeon-fox
|
||||||
|
emoji-volpeon-gphn
|
||||||
|
emoji-volpeon-raccoon
|
||||||
|
emoji-volpeon-vlpn
|
||||||
|
emoji-caro
|
||||||
|
lotte-art
|
||||||
|
alco-sans
|
||||||
|
constructium
|
||||||
|
fairfax
|
||||||
|
fairfax-hd
|
||||||
|
kreative-square
|
||||||
|
nasin-nanpa
|
||||||
|
matrix-media-repo
|
||||||
|
mautrix-discord
|
||||||
|
mautrix-whatsapp
|
||||||
|
mautrix-signal
|
||||||
|
mautrix-telegram
|
||||||
|
python-mauutrix
|
||||||
|
python-tulir-telethon
|
||||||
|
papermc
|
||||||
|
python-plover-stroke
|
||||||
|
python-rtf-tokenize
|
||||||
|
plover
|
||||||
|
python-plugins-manager
|
||||||
|
python-simplefuzzyset
|
||||||
|
python-plugin-emoji
|
||||||
|
plover-pluugin-tapey-tape
|
||||||
|
plover-plugin-yamml-dictionary
|
||||||
|
plover-plugin-machine-hid
|
||||||
|
plover-plugin-rkb1-hid
|
||||||
|
plover-dict-diddoesdigital
|
||||||
|
miifox-net
|
||||||
|
old-homepage
|
||||||
|
python-instagramn
|
||||||
|
element-web
|
||||||
|
mautrix-cleanup
|
||||||
|
woodpecker-agent
|
||||||
|
woodpecker-cli
|
||||||
|
woodpecker-frontend
|
||||||
|
woodpecker-server
|
||||||
|
hydra
|
||||||
|
hydra-unstable
|
||||||
|
;
|
||||||
|
}
|
||||||
|
// (
|
||||||
|
if pkgs.system == "riscv64-linux"
|
||||||
|
then {
|
||||||
|
inherit (pkgsWithOverlay) vf2Kernel vf2KernelPackages;
|
||||||
|
}
|
||||||
|
else {}
|
||||||
|
)
|
||||||
|
|
131
flake.nix
131
flake.nix
|
@ -29,12 +29,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
gomod2nix,
|
|
||||||
hydra,
|
|
||||||
...
|
...
|
||||||
} @ inputs:
|
}:
|
||||||
flake-utils.lib.eachSystem ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" "riscv64-linux"] (
|
flake-utils.lib.eachSystem ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" "riscv64-linux"] (
|
||||||
system: let
|
system: let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
|
@ -42,12 +41,14 @@
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
config.allowUnsupportedSystem = true;
|
config.allowUnsupportedSystem = true;
|
||||||
overlays = [
|
overlays = [
|
||||||
gomod2nix.overlays.default
|
self.overlays.${system}.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in rec {
|
in rec {
|
||||||
formatter = pkgs.alejandra;
|
formatter = pkgs.alejandra;
|
||||||
|
|
||||||
|
overlays.default = import ./overlay.nix system;
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
statix
|
statix
|
||||||
|
@ -57,77 +58,69 @@
|
||||||
|
|
||||||
packages =
|
packages =
|
||||||
{
|
{
|
||||||
akkoma = pkgs.callPackage ./akkoma {};
|
inherit
|
||||||
pleroma-fe = pkgs.callPackage ./akkoma/pleroma-fe {};
|
(pkgs)
|
||||||
admin-fe = pkgs.callPackage ./akkoma/admin-fe {};
|
akkoma
|
||||||
emoji-lotte = pkgs.callPackage ./art/emoji/lotte {};
|
pleroma-fe
|
||||||
emoji-volpeon-blobfox = pkgs.callPackage ./art/emoji/volpeon/blobfox.nix {};
|
admin-fe
|
||||||
emoji-volpeon-blobfox-flip = pkgs.callPackage ./art/emoji/volpeon/blobfox_flip.nix {};
|
emoji-lotte
|
||||||
emoji-volpeon-bunhd = pkgs.callPackage ./art/emoji/volpeon/bunhd.nix {};
|
emoji-volpeon-blobfox
|
||||||
emoji-volpeon-bunhd-flip = pkgs.callPackage ./art/emoji/volpeon/bunhd_flip.nix {};
|
emoji-volpeon-blobfox-flip
|
||||||
emoji-volpeon-drgn = pkgs.callPackage ./art/emoji/volpeon/drgn.nix {};
|
emoji-volpeon-bunhd
|
||||||
emoji-volpeon-fox = pkgs.callPackage ./art/emoji/volpeon/fox.nix {};
|
emoji-volpeon-bunhd-flip
|
||||||
emoji-volpeon-gphn = pkgs.callPackage ./art/emoji/volpeon/gphn.nix {};
|
emoji-volpeon-drgn
|
||||||
emoji-volpeon-raccoon = pkgs.callPackage ./art/emoji/volpeon/raccoon.nix {};
|
emoji-volpeon-fox
|
||||||
emoji-volpeon-vlpn = pkgs.callPackage ./art/emoji/volpeon/vlpn.nix {};
|
emoji-volpeon-gphn
|
||||||
emoji-caro = pkgs.callPackage ./art/emoji/caro {};
|
emoji-volpeon-raccoon
|
||||||
lotte-art = pkgs.callPackage ./art/lotte {};
|
emoji-volpeon-vlpn
|
||||||
alco-sans = pkgs.callPackage ./fonts/kreative/alco-sans.nix {};
|
emoji-caro
|
||||||
constructium = pkgs.callPackage ./fonts/kreative/constructium.nix {};
|
lotte-art
|
||||||
fairfax = pkgs.callPackage ./fonts/kreative/fairfax.nix {};
|
alco-sans
|
||||||
fairfax-hd = pkgs.callPackage ./fonts/kreative/fairfax-hd.nix {};
|
constructium
|
||||||
kreative-square = pkgs.callPackage ./fonts/kreative/kreative-square.nix {};
|
fairfax
|
||||||
nasin-nanpa = pkgs.callPackage ./fonts/nasin-nanpa {};
|
fairfax-hd
|
||||||
matrix-media-repo = pkgs.callPackage ./matrix/matrix-media-repo {};
|
kreative-square
|
||||||
mautrix-discord = pkgs.callPackage ./matrix/mautrix-discord {};
|
nasin-nanpa
|
||||||
mautrix-whatsapp = pkgs.callPackage ./matrix/mautrix-whatsapp {};
|
matrix-media-repo
|
||||||
mautrix-signal = pkgs.callPackage ./matrix/mautrix-signal {};
|
mautrix-discord
|
||||||
mautrix-telegram = pkgs.callPackage ./matrix/mautrix-telegram {};
|
mautrix-whatsapp
|
||||||
python-mautrix = pkgs.python3Packages.callPackage ./python/mautrix.nix {};
|
mautrix-signal
|
||||||
python-tulir-telethon = pkgs.python3Packages.callPackage ./python/tulir-telethon.nix {};
|
mautrix-telegram
|
||||||
papermc = pkgs.callPackage ./minecraft/papermc {};
|
python-mauutrix
|
||||||
python-plover-stroke = pkgs.python3Packages.callPackage ./plover/plover-stroke.nix {};
|
python-tulir-telethon
|
||||||
python-rtf-tokenize = pkgs.python3Packages.callPackage ./python/rtf-tokenize.nix {};
|
papermc
|
||||||
plover = pkgs.python3Packages.callPackage ./plover/plover {};
|
python-plover-stroke
|
||||||
plover-plugins-manager = pkgs.python3Packages.callPackage ./plover/plover-plugins-manager.nix {};
|
python-rtf-tokenize
|
||||||
python-simplefuzzyset = pkgs.python3Packages.callPackage ./python/simplefuzzyset.nix {};
|
plover
|
||||||
plover-plugin-emoji = pkgs.python3Packages.callPackage ./plover/plover-emoji.nix {};
|
python-plugins-manager
|
||||||
plover-plugin-tapey-tape = pkgs.python3Packages.callPackage ./plover/plover-tapey-tape.nix {};
|
python-simplefuzzyset
|
||||||
plover-plugin-yaml-dictionary = pkgs.python3Packages.callPackage ./plover/plover-yaml-dictionary.nix {};
|
python-plugin-emoji
|
||||||
plover-plugin-machine-hid = pkgs.python3Packages.callPackage ./plover/plover-machine-hid.nix {};
|
plover-pluugin-tapey-tape
|
||||||
plover-plugin-rkb1-hid = pkgs.python3Packages.callPackage ./plover/plover-rkb1-hid.nix {};
|
plover-plugin-yamml-dictionary
|
||||||
plover-dict-didoesdigital = pkgs.callPackage ./plover/didoesdigital-dictionary.nix {};
|
plover-plugin-machine-hid
|
||||||
miifox-net = pkgs.python3Packages.callPackage ./web/miifox-net.nix {};
|
plover-plugin-rkb1-hid
|
||||||
old-homepage = pkgs.callPackage ./web/old-homepage.nix {};
|
plover-dict-diddoesdigital
|
||||||
python-instagram = pkgs.python3Packages.callPackage ./python/instagram.nix {};
|
miifox-net
|
||||||
inherit (inputs.attic.packages.${pkgs.system}) attic attic-client attic-server;
|
old-homepage
|
||||||
element-web = pkgs.callPackage ./matrix/element-web {};
|
python-instagramn
|
||||||
mautrix-cleanup = inputs.mautrix-cleanup.packages.${pkgs.system}.default;
|
element-web
|
||||||
woodpecker-agent = pkgs.callPackage ./ci/woodpecker/agent.nix {};
|
mautrix-cleanup
|
||||||
woodpecker-cli = pkgs.callPackage ./ci/woodpecker/cli.nix {};
|
woodpecker-agent
|
||||||
woodpecker-frontend = pkgs.callPackage ./ci/woodpecker/frontend.nix {};
|
woodpecker-cli
|
||||||
woodpecker-server = pkgs.callPackage ./ci/woodpecker/server.nix {};
|
woodpecker-frontend
|
||||||
|
woodpecker-server
|
||||||
|
hydra
|
||||||
|
hydra-unstable
|
||||||
|
;
|
||||||
}
|
}
|
||||||
// (
|
// (
|
||||||
if system == "riscv64-linux"
|
if system == "riscv64-linux"
|
||||||
then rec {
|
then {
|
||||||
vf2Kernel = pkgs.callPackage ./linux/vf2 {kernelPatches = [];};
|
inherit (pkgs) vf2Kernel vf2KernelPackages;
|
||||||
vf2KernelPackages = pkgs.linuxPackagesFor vf2Kernel;
|
|
||||||
}
|
}
|
||||||
else {}
|
else {}
|
||||||
) // (if system == "aarch64-linux" || system == "x86_64-linux" then {
|
);
|
||||||
hydra = hydra.packages.${system}.hydra.overrideAttrs (super: {
|
|
||||||
doCheck = false;
|
|
||||||
patches = (super.patches or []) ++ [
|
|
||||||
./ci/hydra/add-ca-support.patch
|
|
||||||
./ci/hydra/add-gitea-push-hook.patch
|
|
||||||
./ci/hydra/jobset-inputs-for-flakes.patch
|
|
||||||
./ci/hydra/remove-hydra-size-limit.patch
|
|
||||||
];
|
|
||||||
});
|
|
||||||
} else {});
|
|
||||||
|
|
||||||
overlays = import ./overlays;
|
|
||||||
modules = import ./modules;
|
modules = import ./modules;
|
||||||
lib = import ./lib {inherit pkgs;};
|
lib = import ./lib {inherit pkgs;};
|
||||||
|
|
||||||
|
|
98
overlay.nix
98
overlay.nix
|
@ -1,15 +1,91 @@
|
||||||
# You can use this file as a nixpkgs overlay. This is useful in the
|
# You can use this file as a nixself overlay. This is useful in the
|
||||||
# case where you don't want to add the whole NUR namespace to your
|
# case where you don't want to add the whole NUR namespace to your
|
||||||
# configuration.
|
# configuration.
|
||||||
self: super: let
|
system: self: super: let
|
||||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
lib = import ./lib {pkgs = super;}; # functions
|
||||||
nameValuePair = n: v: {
|
flake = (lib.importFlake {inherit system;}).defaultNix;
|
||||||
name = n;
|
|
||||||
value = v;
|
getFlakeOverlay = flakeName: overlay: self: super: let
|
||||||
|
lib = import ./lib {pkgs = super;};
|
||||||
|
flake = (lib.importFlake {inherit system;}).defaultNix;
|
||||||
|
in
|
||||||
|
flake.inputs.${flakeName}.outputs.overlays.${overlay} self super;
|
||||||
|
|
||||||
|
riscv-overlay = self: super: {
|
||||||
|
vf2Kernel = super.callPackage ./linux/vf2 {kernelPatches = [];};
|
||||||
|
vf2KernelPackages = super.linuxPackagesFor self.vf2Kernel;
|
||||||
};
|
};
|
||||||
nurAttrs = import ./default.nix {pkgs = super;};
|
|
||||||
|
overlays = [
|
||||||
|
#(getFlakeOverlay "attic" "default")
|
||||||
|
#(getFlakeOverlay "hydra" "default")
|
||||||
|
(getFlakeOverlay "gomod2nix" "default")
|
||||||
|
|
||||||
|
(self: super: {
|
||||||
|
akkoma = super.callPackage ./akkoma {};
|
||||||
|
pleroma-fe = super.callPackage ./akkoma/pleroma-fe {};
|
||||||
|
admin-fe = super.callPackage ./akkoma/admin-fe {};
|
||||||
|
emoji-lotte = super.callPackage ./art/emoji/lotte {};
|
||||||
|
emoji-volpeon-blobfox = super.callPackage ./art/emoji/volpeon/blobfox.nix {};
|
||||||
|
emoji-volpeon-blobfox-flip = super.callPackage ./art/emoji/volpeon/blobfox_flip.nix {};
|
||||||
|
emoji-volpeon-bunhd = super.callPackage ./art/emoji/volpeon/bunhd.nix {};
|
||||||
|
emoji-volpeon-bunhd-flip = super.callPackage ./art/emoji/volpeon/bunhd_flip.nix {};
|
||||||
|
emoji-volpeon-drgn = super.callPackage ./art/emoji/volpeon/drgn.nix {};
|
||||||
|
emoji-volpeon-fox = super.callPackage ./art/emoji/volpeon/fox.nix {};
|
||||||
|
emoji-volpeon-gphn = super.callPackage ./art/emoji/volpeon/gphn.nix {};
|
||||||
|
emoji-volpeon-raccoon = super.callPackage ./art/emoji/volpeon/raccoon.nix {};
|
||||||
|
emoji-volpeon-vlpn = super.callPackage ./art/emoji/volpeon/vlpn.nix {};
|
||||||
|
emoji-caro = super.callPackage ./art/emoji/caro {};
|
||||||
|
lotte-art = super.callPackage ./art/lotte {};
|
||||||
|
alco-sans = super.callPackage ./fonts/kreative/alco-sans.nix {};
|
||||||
|
constructium = super.callPackage ./fonts/kreative/constructium.nix {};
|
||||||
|
fairfax = super.callPackage ./fonts/kreative/fairfax.nix {};
|
||||||
|
fairfax-hd = super.callPackage ./fonts/kreative/fairfax-hd.nix {};
|
||||||
|
kreative-square = super.callPackage ./fonts/kreative/kreative-square.nix {};
|
||||||
|
nasin-nanpa = super.callPackage ./fonts/nasin-nanpa {};
|
||||||
|
matrix-media-repo = super.callPackage ./matrix/matrix-media-repo {};
|
||||||
|
mautrix-discord = super.callPackage ./matrix/mautrix-discord {};
|
||||||
|
mautrix-whatsapp = super.callPackage ./matrix/mautrix-whatsapp {};
|
||||||
|
mautrix-signal = super.callPackage ./matrix/mautrix-signal {};
|
||||||
|
mautrix-telegram = super.callPackage ./matrix/mautrix-telegram {};
|
||||||
|
python-mautrix = super.python3Packages.callPackage ./python/mautrix.nix {};
|
||||||
|
python-tulir-telethon = super.python3Packages.callPackage ./python/tulir-telethon.nix {};
|
||||||
|
papermc = super.callPackage ./minecraft/papermc {};
|
||||||
|
python-plover-stroke = super.python3Packages.callPackage ./plover/plover-stroke.nix {};
|
||||||
|
python-rtf-tokenize = super.python3Packages.callPackage ./python/rtf-tokenize.nix {};
|
||||||
|
plover = super.python3Packages.callPackage ./plover/plover {};
|
||||||
|
plover-plugins-manager = super.python3Packages.callPackage ./plover/plover-plugins-manager.nix {};
|
||||||
|
python-simplefuzzyset = super.python3Packages.callPackage ./python/simplefuzzyset.nix {};
|
||||||
|
plover-plugin-emoji = super.python3Packages.callPackage ./plover/plover-emoji.nix {};
|
||||||
|
plover-plugin-tapey-tape = super.python3Packages.callPackage ./plover/plover-tapey-tape.nix {};
|
||||||
|
plover-plugin-yaml-dictionary = super.python3Packages.callPackage ./plover/plover-yaml-dictionary.nix {};
|
||||||
|
plover-plugin-machine-hid = super.python3Packages.callPackage ./plover/plover-machine-hid.nix {};
|
||||||
|
plover-plugin-rkb1-hid = super.python3Packages.callPackage ./plover/plover-rkb1-hid.nix {};
|
||||||
|
plover-dict-didoesdigital = super.callPackage ./plover/didoesdigital-dictionary.nix {};
|
||||||
|
miifox-net = super.python3Packages.callPackage ./web/miifox-net.nix {};
|
||||||
|
old-homepage = super.callPackage ./web/old-homepage.nix {};
|
||||||
|
python-instagram = super.python3Packages.callPackage ./python/instagram.nix {};
|
||||||
|
element-web = super.callPackage ./matrix/element-web {};
|
||||||
|
mautrix-cleanup = flake.inputs.mautrix-cleanup.packages.${system}.default;
|
||||||
|
woodpecker-agent = super.callPackage ./ci/woodpecker/agent.nix {};
|
||||||
|
woodpecker-cli = super.callPackage ./ci/woodpecker/cli.nix {};
|
||||||
|
woodpecker-frontend = super.callPackage ./ci/woodpecker/frontend.nix {};
|
||||||
|
woodpecker-server = super.callPackage ./ci/woodpecker/server.nix {};
|
||||||
|
hydra = super.hydra.overrideAttrs (super: {
|
||||||
|
doCheck = false;
|
||||||
|
patches =
|
||||||
|
(super.patches or [])
|
||||||
|
++ [
|
||||||
|
./ci/hydra/add-ca-support.patch
|
||||||
|
./ci/hydra/add-gitea-push-hook.patch
|
||||||
|
./ci/hydra/jobset-inputs-for-flakes.patch
|
||||||
|
./ci/hydra/remove-hydra-size-limit.patch
|
||||||
|
];
|
||||||
|
});
|
||||||
|
hydra-unstable = self.hydra;
|
||||||
|
})
|
||||||
|
|
||||||
|
riscv-overlay
|
||||||
|
];
|
||||||
in
|
in
|
||||||
builtins.listToAttrs
|
super.lib.composeManyExtensions overlays self super
|
||||||
(map (n: nameValuePair n nurAttrs.${n})
|
|
||||||
(builtins.filter (n: !isReserved n)
|
|
||||||
(builtins.attrNames nurAttrs)))
|
|
||||||
|
|
Reference in a new issue