From 17b138e8f0603c306fd5cc7424f4e5a08c739a9a Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Mon, 3 Oct 2022 03:15:58 +0100 Subject: [PATCH] nix/pkgs/authentik/pythonapp: pin to older nixpkgs --- nix/pkgs/authentik/pythonapp/default.nix | 10 ++++++---- third_party/default.nix | 12 +++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/nix/pkgs/authentik/pythonapp/default.nix b/nix/pkgs/authentik/pythonapp/default.nix index 2d0d1b8149..ab0ab6c2e4 100644 --- a/nix/pkgs/authentik/pythonapp/default.nix +++ b/nix/pkgs/authentik/pythonapp/default.nix @@ -1,6 +1,8 @@ -{ pkgs, src, ... }: +{ depot, src, ... }: let + pkgs = depot.third_party.nixpkgsOld; + inherit (pkgs) poetry2nix; pyproject = pkgs.runCommand "authentik-pyproject" { src = "${src}/pyproject.toml"; } '' sed 's/extras = \["standard"\],//' $src > $out ''; @@ -15,15 +17,15 @@ let cp ${pyproject} $out/pyproject.toml cp ${poetrylock} $out/poetry.lock ''; - app = pkgs.poetry2nix.mkPoetryApplication rec { + app = poetry2nix.mkPoetryApplication rec { projectDir = fixedSrc; python = pkgs.python310; - overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: { + overrides = poetry2nix.overrides.withDefaults (self: super: { click-didyoumean = super.click-didyoumean.overridePythonAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ self.poetry ]; }); xmlsec = super.xmlsec.overridePythonAttrs (old: { - nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkgs.pkg-config ]; + nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ self.pkgconfig ]; buildInputs = (old.buildInputs or []) ++ [ pkgs.xmlsec pkgs.libxslt pkgs.libxml2 pkgs.libtool ]; }); mistune = super.mistune.overridePythonAttrs (old: rec { diff --git a/third_party/default.nix b/third_party/default.nix index 5d598d3504..0d46d1c8cf 100644 --- a/third_party/default.nix +++ b/third_party/default.nix @@ -36,11 +36,21 @@ let rev = "e0fe990b478a66178a58c69cf53daec0478ca6f9"; sha256 = "sha256:0qjyfmw5v7s6ynjns4a61vlyj9cghj7vbpgrp9147ngb1f8krz2c"; }; + nixpkgsOldSrc = nixpkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nixpkgs"; + rev = "ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90"; + sha256 = "0dq22dagzk76x2ws4dz88w018i6byamd6rnzqizx68bzimg6g7xn"; + }; + nixpkgsOld = import "${nixpkgsOldSrc}" { + inherit system; + config = nixpkgsConfig; + }; tvlDepot = import ./tvl { nixpkgsBisectPath = ./nixpkgs; inherit nixpkgsConfig; }; in rec { - inherit nixpkgsConfig nixpkgs; + inherit nixpkgsConfig nixpkgs nixpkgsOld; nixos = import ./nixpkgs/nixos; nixeval = import ./nixpkgs/nixos/lib/eval-config.nix; buildGo =