haccfiles/pkgs/default.nix
stuebinm 34a147afe6 python 3.9 -> python 3.10
(nixos 22.11 changed the default version, so some of our stuff broke)
2022-12-17 15:54:31 +01:00

51 lines
1.6 KiB
Nix

{ sources, system ? builtins.currentSystem, ... }@args:
let
pkgs = import sources.nixpkgs args;
unstable = import sources.nixpkgs-unstable args;
callPackage = pkgs.lib.callPackageWith (pkgs // newpkgs);
newpkgs = {
mattermost = callPackage ./mattermost {inherit sources;};
# a version of the lounge with some extra css that
# hides things the hacc-voc doesn't need
thelounge-hacked = pkgs.stdenv.mkDerivation {
name = "thelounge-hacked";
src = pkgs.thelounge;
phases = [ "buildPhase" "installPhase" ];
buildPhase = ''
cp $src/* -r .
chmod 777 lib/node_modules/thelounge/public/css/style.css
cat ${./thelounge/css-patch.css} >> lib/node_modules/thelounge/public/css/style.css
'';
installPhase = ''
mkdir -p $out
cp * -r $out
'';
};
uffd = callPackage ./uffd {};
# netbox takes a python3, then overrides stuff on it before using it.
# since overrides don't accumulate, this does both the override we want
# and the one the netbox package would otherwise do, then disables overrides
netbox = pkgs.netbox.override rec {
python3 = (pkgs.python3.override {
packageOverrides = self: super: {
django = super.django_4;
social-auth-core = super.social-auth-core.overrideAttrs ( old: {
patches = [ ./netbox/0001-add-uffd-oauth2-backend.patch ];
} );
};
}) // { override = ignored: python3; };
};
inherit (unstable) vaultwarden vaultwarden-vault;
};
in pkgs.extend(_: _: newpkgs)