From 174e73518373998c48d6480c97f9a27381c8d8a6 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 24 Aug 2021 13:13:04 -0500 Subject: [PATCH] Rename project to nix-eval-jobs We are getting rid of Hydra specific hacks and making this a more generically useful component for any projects that need to run large evaluations. --- README.md | 2 +- flake.nix | 4 ++-- hydra.nix | 4 ++-- meson.build | 2 +- src/meson.build | 4 ++-- src/{hydra-eval-jobs.cc => nix-eval-jobs.cc} | 4 ++-- tests/test_eval.py | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) rename src/{hydra-eval-jobs.cc => nix-eval-jobs.cc} (99%) diff --git a/README.md b/README.md index 51ee96f..3bb7028 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# hydra-eval-jobs +# nix-eval-jobs Eval nix expressions from flakes (extracted from hydra) diff --git a/flake.nix b/flake.nix index bf87bd6..10b4427 100644 --- a/flake.nix +++ b/flake.nix @@ -10,10 +10,10 @@ pkgs = nixpkgs.legacyPackages.${system}; in rec { - packages.hydra-eval-jobs = pkgs.callPackage ./hydra.nix { + packages.nix-eval-jobs = pkgs.callPackage ./hydra.nix { srcDir = self; }; - defaultPackage = self.packages.${system}.hydra-eval-jobs; + defaultPackage = self.packages.${system}.nix-eval-jobs; devShell = defaultPackage.overrideAttrs (old: { nativeBuildInputs = old.nativeBuildInputs ++ [ (pkgs.python3.withPackages(ps: [ diff --git a/hydra.nix b/hydra.nix index dc94ddd..886be0b 100644 --- a/hydra.nix +++ b/hydra.nix @@ -14,7 +14,7 @@ let (path: type: type != "directory" || baseNameOf path != "build") dir; in stdenv.mkDerivation rec { - pname = "hydra-eval-jobs"; + pname = "nix-eval-jobs"; version = "0.0.1"; src = if srcDir == null then filterMesonBuild ./. else srcDir; buildInputs = [ @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ]; meta = with stdenv.lib; { description = "Hydra's builtin hydra-eval-jobs as a standalone"; - homepage = "https://github.com/Mic92/hydra-eval-jobs"; + homepage = "https://github.com/nix-community/nix-eval-jobs"; license = licenses.mit; maintainers = with maintainers; [ mic92 ]; platforms = platforms.unix; diff --git a/meson.build b/meson.build index c277925..1767e63 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('hydra-eval-jobs', 'cpp', +project('nix-eval-jobs', 'cpp', version : '0.1.6', license : 'GPL-3.0', ) diff --git a/src/meson.build b/src/meson.build index 50603b4..56c480d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,8 +1,8 @@ src = [ - 'hydra-eval-jobs.cc', + 'nix-eval-jobs.cc', ] -executable('hydra-eval-jobs', src, +executable('nix-eval-jobs', src, dependencies : [ nix_main_dep, nix_store_dep, diff --git a/src/hydra-eval-jobs.cc b/src/nix-eval-jobs.cc similarity index 99% rename from src/hydra-eval-jobs.cc rename to src/nix-eval-jobs.cc index 8d509ff..31eee9c 100644 --- a/src/hydra-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -38,13 +38,13 @@ struct MyArgs : MixEvalArgs, MixCommonArgs size_t maxMemorySize = 4096; pureEval evalMode = evalAuto; - MyArgs() : MixCommonArgs("hydra-eval-jobs") + MyArgs() : MixCommonArgs("nix-eval-jobs") { addFlag({ .longName = "help", .description = "show usage information", .handler = {[&]() { - printf("USAGE: hydra-eval-jobs [options] expr\n\n"); + printf("USAGE: nix-eval-jobs [options] expr\n\n"); for (const auto & [name, flag] : longFlags) { if (hiddenCategories.count(flag->category)) { continue; diff --git a/tests/test_eval.py b/tests/test_eval.py index 02eced9..fe5373a 100644 --- a/tests/test_eval.py +++ b/tests/test_eval.py @@ -8,7 +8,7 @@ from typing import List TEST_ROOT = Path(__file__).parent.resolve() PROJECT_ROOT = TEST_ROOT.parent -BIN = PROJECT_ROOT.joinpath("build", "src", "hydra-eval-jobs") +BIN = PROJECT_ROOT.joinpath("build", "src", "nix-eval-jobs") def common_test(extra_args: List[str]) -> None: