Nix/CI: add hyprlang-with-tests

This commit is contained in:
Mihai Fufezan 2023-12-28 23:27:46 +02:00
parent 046fe8531a
commit 53d955b150
No known key found for this signature in database
3 changed files with 11 additions and 5 deletions

View File

@ -3,6 +3,12 @@ name: Build & Test
on: [push, pull_request, workflow_dispatch]
jobs:
nix:
strategy:
matrix:
package:
- hyprlang
- hyprlang-with-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@ -17,5 +23,5 @@ jobs:
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build & Test
run: nix build --print-build-logs
run: nix build .#${{ matrix.package }} --print-build-logs

View File

@ -21,11 +21,12 @@
(builtins.substring 6 2 longDate)
]);
in {
overlays.default = _: prev: {
overlays.default = _: prev: rec {
hyprlang = prev.callPackage ./nix/default.nix {
stdenv = prev.gcc13Stdenv;
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
};
hyprlang-with-tests = hyprlang.override {doCheck = true;};
};
packages = genSystems (system:

View File

@ -3,16 +3,15 @@
stdenv,
cmake,
version ? "git",
doCheck ? false,
}:
stdenv.mkDerivation {
pname = "hyprlang";
inherit version;
inherit version doCheck;
src = ../.;
nativeBuildInputs = [cmake];
doCheck = true;
meta = with lib; {
homepage = "https://github.com/hyprwm/hyprlang";
description = "The official implementation library for the hypr config language";