diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d1b4e6..c6d024f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,41 +6,27 @@ on: - main - master schedule: - # rebuild everyday at 2:51 - # TIP: Choose a random time here so not all repositories are build at once: - # https://www.random.org/clock-times/?num=1&earliest=01%3A00&latest=08%3A00&interval=5&format=html&rnd=new - - cron: '51 2 * * *' + # rebuild everyday at 6:40 + - cron: '40 6 * * *' jobs: tests: strategy: matrix: - # Set this to notify the global nur package registry that changes are - # available. - # - # The repo name as used in - # https://github.com/nix-community/NUR/blob/master/repos.json nurRepo: - - - # Set this to cache your build results in cachix for faster builds - # in CI and for everyone who uses your cache. - # - # Format: Your cachix cache host name without the ".cachix.org" suffix. - # Example: mycache (for mycache.cachix.org) - # - # For this to work, you also need to set the CACHIX_SIGNING_KEY or - # CACHIX_AUTH_TOKEN secret in your repository secrets settings in - # Github found at - # https://github.com//nur-packages/settings/secrets + - mrtnvgr cachixName: - - + - mrtnvgr nixPath: - nixpkgs=channel:nixos-unstable - nixpkgs=channel:nixpkgs-unstable - nixpkgs=channel:nixos-23.05 + runs-on: ubuntu-latest + steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Install nix uses: cachix/install-nix-action@v23 with: @@ -48,16 +34,18 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Show nixpkgs version run: nix-instantiate --eval -E '(import {}).lib.version' + - name: Setup cachix uses: cachix/cachix-action@v12 - # Don't replace here! if: ${{ matrix.cachixName != '' }} with: name: ${{ matrix.cachixName }} signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Check evaluation run: | nix-env -f . -qa \* --meta --xml \ @@ -67,9 +55,10 @@ jobs: --drv-path --show-trace \ -I nixpkgs=$(nix-instantiate --find-file nixpkgs) \ -I $PWD + - name: Build nix packages run: nix shell -f '' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs + - name: Trigger NUR update - # Don't replace here! if: ${{ matrix.nurRepo != '' }} run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}" diff --git a/README.md b/README.md index 077cfbc..fc83167 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,7 @@ -# nur-packages-template - -**A template for [NUR](https://github.com/nix-community/NUR) repositories** - -## Setup - -1. Click on [Use this template](https://github.com/nix-community/nur-packages-template/generate) to start a repo based on this template. (Do _not_ fork it.) -2. Add your packages to the [pkgs](./pkgs) directory and to - [default.nix](./default.nix) - * Remember to mark the broken packages as `broken = true;` in the `meta` - attribute, or travis (and consequently caching) will fail! - * Library functions, modules and overlays go in the respective directories -3. Choose your CI: Depending on your preference you can use github actions (recommended) or [Travis ci](https://travis-ci.com). - - Github actions: Change your NUR repo name and optionally add a cachix name in [.github/workflows/build.yml](./.github/workflows/build.yml) and change the cron timer - to a random value as described in the file - - Travis ci: Change your NUR repo name and optionally your cachix repo name in - [.travis.yml](./.travis.yml). Than enable travis in your repo. You can add a cron job in the repository settings on travis to keep your cachix cache fresh -5. Change your travis and cachix names on the README template section and delete - the rest -6. [Add yourself to NUR](https://github.com/nix-community/NUR#how-to-add-your-own-repository) - -## README template - -# nur-packages +# nurpkgs **My personal [NUR](https://github.com/nix-community/NUR) repository** - -![Build and populate cache](https://github.com//nur-packages/workflows/Build%20and%20populate%20cache/badge.svg) - - -[![Cachix Cache](https://img.shields.io/badge/cachix--blue.svg)](https://.cachix.org) +![Build and populate cache](https://github.com/mrtnvgr/nurpkgs/workflows/Build%20and%20populate%20cache/badge.svg) +[![Cachix Cache](https://img.shields.io/badge/cachix-mrtnvgr-blue.svg)](https://mrtnvgr.cachix.org)