diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9068c07..c0e5893 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,12 @@ jobs: ci: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v22 - with: - nix_path: nixpkgs=channel:nixos-23.05 + - uses: cachix/install-nix-action@v24 - # build without systemd support for now, since the closure becomes larger - - run: nix-build --arg withSystemd false + - run: nix build --no-update-lock-file + - run: nix flake check --no-update-lock-file - name: Prepare artifacts run: | diff --git a/default.nix b/build.nix similarity index 94% rename from default.nix rename to build.nix index c01cd71..42024e8 100644 --- a/default.nix +++ b/build.nix @@ -1,9 +1,7 @@ -{ pkgs ? import {}, withSystemd ? true }: +{ pkgs, ttRss, withSystemd ? true }: let - ttRss = (import ./tt-rss.nix { inherit pkgs; }); - php = (pkgs.php.override { embedSupport = true; cliSupport = true; diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5864714 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1702233072, + "narHash": "sha256-H5G2wgbim2Ku6G6w+NSaQaauv6B6DlPhY9fMvArKqRo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "781e2a9797ecf0f146e81425c822dca69fe4a348", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..48db773 --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + description = ''Portable "Tiny Tiny Rss" service run by uwsgi-php and built with Nix''; + + inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11; + + outputs = { self, nixpkgs, ... }: + let + pkgs = import nixpkgs { system = "x86_64-linux"; }; + ttRss = (import ./tt-rss.nix { inherit pkgs; }); + in { + packages.x86_64-linux.default = (import ./build.nix { inherit pkgs ttRss; withSystemd = false; }); + }; +}