From 9f9653e423f91b080d4d873a35e41c5bd0148fd1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= <v@cunat.cz>
Date: Wed, 13 Jul 2022 19:05:25 +0200
Subject: [PATCH 1/2] CI: remove image restriction for nix(os)

I've done this for knot-resolver CI long ago.
Also remove git collision with the base image.
---
 .gitlab-ci.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c419a9c..925de1a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -130,13 +130,12 @@ image: $CI_REGISTRY/packaging/apkg/ci/debian-10-full:apkg
     - docker
     - linux
     - amd64
-  # TODO: untag after resolving problems around https://github.com/NixOS/nix/issues/5776
-  image: nixos/nix:2.3.12
+  image: nixos/nix
   variables:
     #NIX_PATH: nixpkgs=https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz
     NIX_PATH: nixpkgs=https://github.com/vcunat/nixpkgs/archive/p/apkg.tar.gz
   before_script:
-    - nix-env -f '<nixpkgs>' -iA gitMinimal
+    # - nix-env -f '<nixpkgs>' -iA gitMinimal
     - *setup-git
     # The image auto-detects as alpine distro, and tests don't allow overriding easily :-/
     - echo 'ID=nixos' > /etc/os-release
-- 
GitLab


From 94e08ad274f40d689490b2fdebc3735b6bac56b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= <v@cunat.cz>
Date: Wed, 13 Jul 2022 19:34:37 +0200
Subject: [PATCH 2/2] distro/pkg/nix: drop restriction on jinja2 version

---
 distro/pkg/nix/default.nix | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/distro/pkg/nix/default.nix b/distro/pkg/nix/default.nix
index 47b5f80..1c67a0e 100644
--- a/distro/pkg/nix/default.nix
+++ b/distro/pkg/nix/default.nix
@@ -14,6 +14,11 @@ python3Packages.buildPythonApplication rec {
     sha256 = "FIXME"; # would be {{ src_hash }} if tarball was used
   };
 
+  # Old jinja2 isn't in nixpkgs anymore.
+  postPatch = ''
+    substituteInPlace setup.cfg --replace 'jinja2<3.1' 'jinja2'
+  '';
+
   propagatedBuildInputs = with python3Packages; [
     # copy&pasted requirements.txt (almost exactly)
     beautifulsoup4   # upstream version detection
-- 
GitLab