mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-12-22 09:59:48 +01:00
Nix/CI: add hyprlang-with-tests
This commit is contained in:
parent
046fe8531a
commit
53d955b150
3 changed files with 11 additions and 5 deletions
8
.github/workflows/nix.yml
vendored
8
.github/workflows/nix.yml
vendored
|
@ -3,6 +3,12 @@ name: Build & Test
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
jobs:
|
jobs:
|
||||||
nix:
|
nix:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
package:
|
||||||
|
- hyprlang
|
||||||
|
- hyprlang-with-tests
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -17,5 +23,5 @@ jobs:
|
||||||
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
|
||||||
- name: Build & Test
|
- name: Build & Test
|
||||||
run: nix build --print-build-logs
|
run: nix build .#${{ matrix.package }} --print-build-logs
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,12 @@
|
||||||
(builtins.substring 6 2 longDate)
|
(builtins.substring 6 2 longDate)
|
||||||
]);
|
]);
|
||||||
in {
|
in {
|
||||||
overlays.default = _: prev: {
|
overlays.default = _: prev: rec {
|
||||||
hyprlang = prev.callPackage ./nix/default.nix {
|
hyprlang = prev.callPackage ./nix/default.nix {
|
||||||
stdenv = prev.gcc13Stdenv;
|
stdenv = prev.gcc13Stdenv;
|
||||||
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||||
};
|
};
|
||||||
|
hyprlang-with-tests = hyprlang.override {doCheck = true;};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = genSystems (system:
|
packages = genSystems (system:
|
||||||
|
|
|
@ -3,16 +3,15 @@
|
||||||
stdenv,
|
stdenv,
|
||||||
cmake,
|
cmake,
|
||||||
version ? "git",
|
version ? "git",
|
||||||
|
doCheck ? false,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "hyprlang";
|
pname = "hyprlang";
|
||||||
inherit version;
|
inherit version doCheck;
|
||||||
src = ../.;
|
src = ../.;
|
||||||
|
|
||||||
nativeBuildInputs = [cmake];
|
nativeBuildInputs = [cmake];
|
||||||
|
|
||||||
doCheck = true;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/hyprwm/hyprlang";
|
homepage = "https://github.com/hyprwm/hyprlang";
|
||||||
description = "The official implementation library for the hypr config language";
|
description = "The official implementation library for the hypr config language";
|
||||||
|
|
Loading…
Reference in a new issue