From ec62dc79503ec48442950d39356e9da9cc8cf0f2 Mon Sep 17 00:00:00 2001 From: xeals Date: Thu, 23 Feb 2023 10:21:52 +1100 Subject: [PATCH] ci: convert build action to full flakes --- .github/workflows/build.yml | 13 ++----------- flake.nix | 4 ++++ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fcdd722..f30ca02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,23 +28,14 @@ jobs: # in your repository settings in Github found at https://github.com//nur-packages/settings/secrets cachixName: - xeals - nixPath: - # - nixpkgs=channel:nixos-unstable - - nixpkgs=channel:nixpkgs-unstable - # Disable due to buildGoModule and buildRustPackage - # - nixpkgs=channel:nixos-20.03 runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Install nix uses: cachix/install-nix-action@v19 - with: - nix_path: "${{ matrix.nixPath }}" - extra_nix_config: | - experimental-features = nix-command flakes - name: Show nixpkgs version - run: nix-instantiate --eval -E '(import {}).lib.version' + run: nix eval --impure --expr '(import ./flake-compat.nix { src = ./.; }).lib.version' - name: Setup cachix uses: cachix/cachix-action@v12 if: ${{ matrix.cachixName != '' }} @@ -52,7 +43,7 @@ jobs: name: ${{ matrix.cachixName }} signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - name: Build nix packages - run: nix shell -f '' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs + run: nix develop .#ci -c nix-build-uncached ci.nix -A cacheOutputs - name: Trigger NUR update if: ${{ matrix.nurRepo != '' }} run: curl -XPOST "https://nur-update.herokuapp.com/update?repo=${{ matrix.nurRepo }}" diff --git a/flake.nix b/flake.nix index 3287972..fc2c6ee 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,10 @@ (_: drv: builtins.elem system (drv.meta.platforms or [ ])) (import ./pkgs/top-level/all-packages.nix { inherit pkgs; }); + devShells.ci = pkgs.mkShell { + buildInputs = [ pkgs.nix-build-uncached ]; + }; + apps = { alacritty = mkApp { drv = pkgs.alacritty-ligatures; exePath = "/bin/alacritty"; }; protonmail-bridge = mkApp { drv = pkgs.protonmail-bridge; };