From b83f3d208e91de823184a0f9b6e542ddcebc6089 Mon Sep 17 00:00:00 2001 From: till Date: Wed, 20 Dec 2023 18:11:19 +0100 Subject: [PATCH] Chore(nur): update readme, etc. For: pngmbh/issues#1564 --- .github/workflows/build.yml | 38 +++++++++----------------------- LICENSE | 22 ------------------ README.md | 38 ++++---------------------------- default.nix | 4 +--- flake.nix | 2 +- pkgs/example-package/default.nix | 9 -------- 6 files changed, 17 insertions(+), 96 deletions(-) delete mode 100644 LICENSE delete mode 100644 pkgs/example-package/default.nix diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6404f5..17bfceb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,36 +1,20 @@ name: "Build and populate cache" + on: pull_request: push: branches: - 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 * * *' + - cron: '51 4 * * *' + 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 + # FIXME(till): update when it works 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 cachixName: - nixPath: @@ -38,11 +22,11 @@ jobs: - nixpkgs=channel:nixpkgs-unstable - nixpkgs=channel:nixos-23.05 runs-on: ubuntu-latest + env: + NIXPKGS_ALLOW_UNFREE: 1 steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install nix - uses: cachix/install-nix-action@v25 + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v25 with: nix_path: "${{ matrix.nixPath }}" extra_nix_config: | @@ -50,8 +34,7 @@ jobs: 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@v14 + - uses: cachix/cachix-action@v14 # Don't replace here! if: ${{ matrix.cachixName != '' }} with: @@ -65,10 +48,11 @@ jobs: --option restrict-eval true \ --option allow-import-from-derivation true \ --drv-path --show-trace \ + --impure \ -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 + run: nix shell --impure -f '' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs - name: Trigger NUR update # Don't replace here! if: ${{ matrix.nurRepo != '' }} diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 212cbf2..0000000 --- a/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2018 Francesco Gazzetta - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/README.md b/README.md index 077cfbc..e5ed6cd 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,7 @@ -# nur-packages-template +# hostwithquantum/nur -**A template for [NUR](https://github.com/nix-community/NUR) repositories** +![Build and populate cache](https://github.com/hostwithquantum/nur/workflows/Build%20and%20populate%20cache/badge.svg) -## 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 - -**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) +[![Cachix Cache](https://img.shields.io/badge/cachix-hostwithquantun-blue.svg)](https://hostwithquantum.cachix.org) +A nix user repository to install the runway CLI. diff --git a/default.nix b/default.nix index d6497c9..f59bd37 100644 --- a/default.nix +++ b/default.nix @@ -14,7 +14,5 @@ modules = import ./modules; # NixOS modules overlays = import ./overlays; # nixpkgs overlays - example-package = pkgs.callPackage ./pkgs/example-package { }; - # some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { }; - # ... + runway = pkgs.callPackage ./pkgs/runway { }; } diff --git a/flake.nix b/flake.nix index 81a143f..6916c0a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "My personal NUR repository"; + description = "runway for nix"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; outputs = { self, nixpkgs }: let diff --git a/pkgs/example-package/default.nix b/pkgs/example-package/default.nix deleted file mode 100644 index 41e22df..0000000 --- a/pkgs/example-package/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ stdenv }: - -stdenv.mkDerivation rec { - name = "example-package-${version}"; - version = "1.0"; - src = ./.; - buildPhase = "echo echo Hello World > example"; - installPhase = "install -Dm755 example $out"; -}