Move hydra.nix to default.nix
So it's easier to use as a classic (non-flake) Nix expression.
This commit is contained in:
parent
2a382fe9f5
commit
7550bb8cc1
39
default.nix
39
default.nix
|
@ -1,2 +1,37 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ stdenv
|
||||||
pkgs.callPackage ./hydra.nix {}
|
, lib
|
||||||
|
, nixFlakes
|
||||||
|
, meson
|
||||||
|
, cmake
|
||||||
|
, ninja
|
||||||
|
, pkg-config
|
||||||
|
, boost
|
||||||
|
, nlohmann_json
|
||||||
|
, srcDir ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
filterMesonBuild = dir: builtins.filterSource
|
||||||
|
(path: type: type != "directory" || baseNameOf path != "build") dir;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "nix-eval-jobs";
|
||||||
|
version = "0.0.1";
|
||||||
|
src = if srcDir == null then filterMesonBuild ./. else srcDir;
|
||||||
|
buildInputs = [
|
||||||
|
nlohmann_json nixFlakes boost
|
||||||
|
];
|
||||||
|
nativeBuildInputs = [
|
||||||
|
meson pkg-config ninja
|
||||||
|
# nlohmann_json can be only discovered via cmake files
|
||||||
|
cmake
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Hydra's builtin hydra-eval-jobs as a standalone";
|
||||||
|
homepage = "https://github.com/nix-community/nix-eval-jobs";
|
||||||
|
license = lib.licenses.gpl3;
|
||||||
|
maintainers = with lib.maintainers; [ adisbladis mic92 ];
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
packages.nix-eval-jobs = pkgs.callPackage ./hydra.nix {
|
packages.nix-eval-jobs = pkgs.callPackage ./default.nix {
|
||||||
srcDir = self;
|
srcDir = self;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
36
hydra.nix
36
hydra.nix
|
@ -1,36 +0,0 @@
|
||||||
{ stdenv
|
|
||||||
, lib
|
|
||||||
, nixFlakes
|
|
||||||
, meson
|
|
||||||
, cmake
|
|
||||||
, ninja
|
|
||||||
, pkg-config
|
|
||||||
, boost
|
|
||||||
, nlohmann_json
|
|
||||||
, srcDir ? null
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
filterMesonBuild = dir: builtins.filterSource
|
|
||||||
(path: type: type != "directory" || baseNameOf path != "build") dir;
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "nix-eval-jobs";
|
|
||||||
version = "0.0.1";
|
|
||||||
src = if srcDir == null then filterMesonBuild ./. else srcDir;
|
|
||||||
buildInputs = [
|
|
||||||
nlohmann_json nixFlakes boost
|
|
||||||
];
|
|
||||||
nativeBuildInputs = [
|
|
||||||
meson pkg-config ninja
|
|
||||||
# nlohmann_json can be only discovered via cmake files
|
|
||||||
cmake
|
|
||||||
];
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Hydra's builtin hydra-eval-jobs as a standalone";
|
|
||||||
homepage = "https://github.com/nix-community/nix-eval-jobs";
|
|
||||||
license = licenses.gpl3;
|
|
||||||
maintainers = with maintainers; [ mic92 ];
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue