From 4a1fcd0a35c0f4f40ead9e454f013042eeebc117 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 8 Jul 2024 22:56:56 +0200 Subject: [PATCH] changed: CI runs on nix shell --- .gitea/workflows/ci.yml | 13 +++++-------- shell.nix | 13 +++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 shell.nix diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 14f897c..1ed65c2 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -5,15 +5,12 @@ on: [push] jobs: run-ci-linux: runs-on: ubuntu-latest - env: - TYPST_INSTALL: /usr/local - TYPST_VERSION: 0.11.1 steps: - name: Check out repository code uses: actions/checkout@v3 - - name: Install Typst CLI - run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION" - - name: Set up Python 3 - run: apt update -y && apt install python3-pip -y + - name: Setup Nix Shell + - uses: cachix/install-nix-action@v18 + with: + nix_path: nixpkgs=channel:nixos-unstable - name: Run CI - run: bash -c ./run-ci.sh + run: nix-shell --run ./run-ci.sh diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..61ee97a --- /dev/null +++ b/shell.nix @@ -0,0 +1,13 @@ +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05"; + pkgs = import nixpkgs { config = {}; overlays = []; }; +in + +pkgs.mkShellNoCC { + packages = with pkgs; [ + python312 + python312Packages.pyyaml + typst + typstyle + ]; +}