forked from lix-project/nix-eval-jobs
Merge pull request #1 from Mic92/ci
This commit is contained in:
commit
c7d9f7a937
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
20
.github/workflows/test.yml
vendored
Normal file
20
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
name: "Test"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '51 2 * * *'
|
||||
jobs:
|
||||
tests:
|
||||
strategy:
|
||||
matrix:
|
||||
nixPath:
|
||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-20.09.tar.gz
|
||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: cachix/install-nix-action@v12
|
||||
- name: build
|
||||
run: NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz nix-build
|
33
default.nix
33
default.nix
|
@ -1,31 +1,2 @@
|
|||
{ stdenv
|
||||
, nixFlakes
|
||||
, meson
|
||||
, cmake
|
||||
, ninja
|
||||
, pkg-config
|
||||
, boost
|
||||
, nlohmann_json
|
||||
, srcDir ? ./.
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hydra-eval-jobs";
|
||||
version = "0.0.1";
|
||||
src = srcDir;
|
||||
buildInputs = [
|
||||
nlohmann_json nixFlakes boost
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
meson pkg-config ninja
|
||||
# nlohmann_json can be only discovered via cmake files
|
||||
cmake
|
||||
];
|
||||
meta = with stdenv.lib; {
|
||||
description = "Hydra's builtin hydra-eval-jobs as a standalone";
|
||||
homepage = "https://github.com/Mic92/hydra-eval-jobs";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.callPackage ./hydra.nix {}
|
||||
|
|
35
hydra.nix
Normal file
35
hydra.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ stdenv
|
||||
, nixFlakes
|
||||
, meson
|
||||
, cmake
|
||||
, ninja
|
||||
, pkg-config
|
||||
, boost
|
||||
, nlohmann_json
|
||||
, srcDir ? ./.
|
||||
}:
|
||||
|
||||
let
|
||||
filterMesonBuild = dir: builtins.filterSource
|
||||
(path: type: type != "directory" || baseNameOf path != "build") dir;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hydra-eval-jobs";
|
||||
version = "0.0.1";
|
||||
src = filterMesonBuild srcDir;
|
||||
buildInputs = [
|
||||
nlohmann_json nixFlakes boost
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
meson pkg-config ninja
|
||||
# nlohmann_json can be only discovered via cmake files
|
||||
cmake
|
||||
];
|
||||
meta = with stdenv.lib; {
|
||||
description = "Hydra's builtin hydra-eval-jobs as a standalone";
|
||||
homepage = "https://github.com/Mic92/hydra-eval-jobs";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -130,7 +130,7 @@ static void worker(
|
|||
if (myArgs.flake) {
|
||||
using namespace flake;
|
||||
|
||||
auto flakeRef = parseFlakeRef(myArgs.releaseExpr);
|
||||
auto flakeRef = parseFlakeRef(myArgs.releaseExpr, absPath("."));
|
||||
|
||||
auto vFlake = state.allocValue();
|
||||
|
||||
|
|
Loading…
Reference in a new issue