authentik-nix/poetry2nix-python-overrides.nix
WilliButz a1630aaf9f
update: 2024.6.4 -> 2024.8.1
Release notes: https://docs.goauthentik.io/docs/releases/2024.8

Still includes the same hacky workaround for one of the dependencies
that was introduced in the 2024.6.1 update. See components/docs.nix for
more information.

Also, as upstream package-lock.json files do not include source hashes
and urls for a lot of dependencies, building authentik from source is
only possible after they've been resolved. This makes it kind of a
gamble to try and reproduce a build with the same set of dependencies
that the devs use. This is why the two relevant lock files are vendored
here now. See upstream issues for more information:
- https://github.com/goauthentik/authentik/issues/6180
- https://github.com/goauthentik/authentik/issues/11169
and the npm issue for the underlying reason:
https://github.com/npm/cli/issues/4263

Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/8471fe90ad337a8074e957b69ca4d0089218391d' (2024-08-01)
  → 'github:hercules-ci/flake-parts/567b938d64d4b4112ee253b9274472dc3a346eb6' (2024-09-01)
• Updated input 'flake-parts/nixpkgs-lib':
    'https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz?narHash=sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q%3D' (2024-08-01)
  → 'https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz?narHash=sha256-Ss8QWLXdr2JCBPcYChJhz4xJm%2Bh/xjl4G0c0XlP6a74%3D' (2024-09-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c374d94f1536013ca8e92341b540eba4c22f9c62' (2024-08-21)
  → 'github:NixOS/nixpkgs/574d1eac1c200690e27b8eb4e24887f8df7ac27c' (2024-09-06)
• Updated input 'poetry2nix':
    'github:nix-community/poetry2nix/884b66152b0c625b8220b570a31dc7acc36749a3' (2024-08-21)
  → 'github:nix-community/poetry2nix/a313fd7169ae43ecd1a2ea2f1e4899fe3edba4d2' (2024-09-05)
2024-09-07 22:07:37 +02:00

115 lines
3.8 KiB
Nix

pkgs:
[
# modules missing only setuptools
(final: prev:
(builtins.listToAttrs (map (name: {
inherit name;
value = prev.${name}.overrideAttrs (oA: {
nativeBuildInputs = (oA.nativeBuildInputs or []) ++ [ final.setuptools ];
});
}) [
"django-cte"
"django-tenants"
"dumb-init"
"drf-orjson-renderer"
]))
)
(final: prev: {
xmlsec = prev.xmlsec.overridePythonAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [ final.setuptools final.pkgconfig ];
buildInputs = [ pkgs.xmlsec.dev pkgs.xmlsec pkgs.libxml2 pkgs.libtool ];
});
opencontainers = prev.opencontainers.overrideAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [
final.setuptools
final.pytest-runner final.pytest
];
});
psycopg-c = prev.psycopg-c.overrideAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [
final.setuptools
final.tomli
pkgs.postgresql
];
});
twisted = prev.twisted.overrideAttrs (oA: {
buildInputs = oA.buildInputs ++ [
final.hatchling
final.hatch-fancy-pypi-readme
];
});
#cryptography = prev.cryptography.overridePythonAttrs (oA: {
# cargoDeps = pkgs.rustPlatform.fetchCargoTarball {
# src = oA.src;
# sourceRoot = "${oA.pname}-${oA.version}/src/rust";
# name = "${oA.pname}-${oA.version}";
# sha256 = "sha256-PgxPcFocEhnQyrsNtCN8YHiMptBmk1PUhEDQFdUR1nU=";
# };
#});
dnspython = prev.dnspython.overrideAttrs (oA: {
buildInputs = oA.buildInputs ++ [
final.hatchling
];
});
sqlparse = prev.sqlparse.overrideAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [
final.hatchling
];
});
scim2-filter-parser = prev.scim2-filter-parser.overrideAttrs (oA: {
patches = [
(pkgs.fetchpatch {
name = "replace-poetry-with-poetry-core.patch";
url = "https://patch-diff.githubusercontent.com/raw/15five/scim2-filter-parser/pull/43.patch";
hash = "sha256-PjJH1S5CDe/BMI0+mB34KdpNNcHfexBFYBmHolsWH4o=";
})
];
nativeBuildInputs = oA.nativeBuildInputs ++ [
final.poetry-core
];
});
pendulum = prev.pendulum.overrideAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [
pkgs.rustPlatform.cargoSetupHook
pkgs.rustPlatform.maturinBuildHook
];
cargoRoot = "rust";
cargoDeps = pkgs.rustPlatform.fetchCargoTarball {
src = oA.src;
sourceRoot = "${oA.pname}-${oA.version}/rust";
name = "${oA.pname}-${oA.version}";
sha256 = "sha256-6fw0KgnPIMfdseWcunsGjvjVB+lJNoG3pLDqkORPJ0I=";
};
});
django-pgactivity = prev.django-pgactivity.overrideAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [
final.poetry-core
];
});
docker = prev.docker.overrideAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [
prev.hatchling
prev.hatch-vcs
];
});
django-pglock= prev.django-pglock.overrideAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [
final.poetry-core
];
});
# https://github.com/pyradius/pyrad/pull/168/files
# not included in the latest release :/
pyrad = prev.pyrad.overrideAttrs (oA: {
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "poetry.masonry.api" "poetry.core.masonry.api"
'';
});
msgraph-sdk = prev.msgraph-sdk.overrideAttrs (oA: {
nativeBuildInputs = oA.nativeBuildInputs ++ [
final.flit-core
];
});
}
)
]