From b625325487afa0f060b0c68f44e0b860ebe6adac Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sat, 27 Aug 2022 13:34:39 +0200 Subject: [PATCH] ci/modules_test: use flake-enabled nix --- .cirrus.yml | 11 +++++------ test/ci/build.sh | 4 +--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 297a74f..93a699b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,11 +7,13 @@ task: # Use the maximum timeout. Needed when rebuilding packages on a channel update. timeout_in: 120m + container: + # Defined in https://github.com/nix-community/docker-nixpkgs + image: nixpkgs/nix-flakes:nixos-22.05 + matrix: - name: modules_test container: - # Use Nix release 2.3.x, the default on NixOS stable - image: nixos/nix:2.3.12 # Besides virtualization, this also enables privileged containers which are required for # sandboxed builds kvm: true @@ -28,12 +30,9 @@ task: # This script is run as root build_script: - echo "sandbox = true" >> /etc/nix/nix.conf - - export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs)" - - nix run -f '' bash coreutils cachix -c ./test/ci/build.sh + - nix shell --inputs-from . nixpkgs#{bash,coreutils,gawk,cachix} -c ./test/ci/build.sh - name: flake - container: - image: nixpkgs/nix-flakes build_script: - nix flake check - ./test/nixos-search/ci-test.sh diff --git a/test/ci/build.sh b/test/ci/build.sh index da711b8..3d48523 100755 --- a/test/ci/build.sh +++ b/test/ci/build.sh @@ -16,6 +16,4 @@ if [[ -v CIRRUS_CI ]]; then chmod o+rw /dev/kvm fi -echo "$NIX_PATH ($(nix eval --raw nixpkgs.lib.version))" - -"${BASH_SOURCE[0]%/*}/../run-tests.sh" --ci --scenario $scenario +"${BASH_SOURCE[0]%/*}/../run-tests.sh" --ci --scenario "$scenario"