]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
ci/pkgtest: add nix
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 1 Jul 2021 18:33:54 +0000 (20:33 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Wed, 7 Jul 2021 04:58:11 +0000 (06:58 +0200)
For now just a simple docker-based build, atop nixos-unstable
(for now my nixpkgs branch that also adds apkg itself).

ci/pkgtest.yaml
distro/pkg/nix/top-level.nix

index 50ac1887a1c4427f3d86991c62bba37425b19102..2e5a239f117ef7184412be7ef1e8aab1d7aadf16 100644 (file)
@@ -131,6 +131,25 @@ ubuntu-21.04:pkgbuild:
     DISTROTEST_REPO: xUbuntu_21.04
   script:
     - *debpkgbuild
+
+nixos-unstable:pkgbuild:
+  <<: *pkgbuild
+  # We do NOT use LXC, for now at least.
+  tags:
+    - docker
+    - linux
+    - amd64
+  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:
+  script:
+    - nix build nixpkgs.apkg
+    # the image auto-detects as alpine distro
+    - ./result/bin/apkg install -d nix
+    - kresd --version
 # }}}
 
 # pkgtest {{{
index 911e5f0b69d8e2bc14a33ce00a7eac96b8820971..bdd336049ee7380659e2586c1ae8437834eabe68 100644 (file)
@@ -3,5 +3,10 @@ with import <nixpkgs> {};
 (callPackage ./. {
 }).overrideAttrs (attrs: {
   src = ./knot-resolver-{{ version }}.tar.xz;
+
+  # This just breaks in our GitLab CI (not locally and not on hydra.nixos.org)
+  installCheckPhase = ''
+    meson test --print-errorlogs --no-suite snowflake
+  '';
 })