Files
lix/subprojects/nix-eval-jobs/default.nix
T
Maximilian Bosch 110b5ebd04 subprojects/nix-eval-jobs: clean up package metadata
* Point `meta.homepage` to the correct location
* Remove `meta.maintainers` field: the folks listed in there maintain
  the upstream package. I decided to remove it since we don't use
  `meta.maintainers` in this repository to indicate maintainership of a
  component.

Change-Id: Iec7b0eb463bc8f41907909e87ec9280c19dc86f5
2025-02-27 09:57:48 +01:00

89 lines
1.9 KiB
Nix

{
stdenv,
lib,
nix,
pkgs,
srcDir ? ./.,
callPackage,
}:
let
sourceBase = if srcDir == null then ./. else srcDir;
package = stdenv.mkDerivation (finalAttrs: {
pname = "nix-eval-jobs";
version = "2.93.0-dev";
src = lib.fileset.toSource {
root = sourceBase;
fileset = lib.fileset.unions [
./meson.build
./src
];
};
buildInputs = with pkgs; [
nlohmann_json
nix
boost
];
nativeBuildInputs =
with pkgs;
[
meson
pkg-config
ninja
# nlohmann_json can be only discovered via cmake files
cmake
# XXX: ew
nix.passthru.capnproto-lix
]
++ (lib.optional stdenv.cc.isClang [ pkgs.clang-tools ]);
passthru = {
inherit nix;
tests.nix-eval-jobs = callPackage (
{
stdenv,
python3Packages,
path,
}:
let
nejAttrs = finalAttrs;
in
stdenv.mkDerivation (finalAttrs: {
pname = "nix-eval-jobs-tests";
inherit (nejAttrs) version;
src = lib.fileset.toSource {
root = sourceBase;
fileset = lib.fileset.unions [
./pyproject.toml
./tests
];
};
nativeBuildInputs = [
python3Packages.pytest
package
];
env.NEJ_NIXPKGS_PATH = "${path}";
dontConfigure = true;
buildPhase = ''
export NIX_REMOTE="$NIX_BUILD_TOP"
export HOME="$(mktemp -d)"
pytest
'';
installPhase = "touch $out";
})
) { };
};
meta = {
description = "Hydra's builtin hydra-eval-jobs as a standalone";
homepage = "https://git.lix.systems/lix-project/lix/src/branch/main/subprojects/nix-eval-jobs";
license = lib.licenses.gpl3;
platforms = lib.platforms.unix;
};
});
in
package