From 3094e12732c7308fc529c61deb6c3ccf1b7669c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 18 Apr 2022 14:31:47 +0200 Subject: [PATCH 1/3] flake: switch back to original nixpkgs --- flake.lock | 12 ++++++------ flake.nix | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index c679e3c..0f133c7 100644 --- a/flake.lock +++ b/flake.lock @@ -17,16 +17,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1647186833, - "narHash": "sha256-62CMNrhICLcI/5jNSQDAQpUUvtvTXBsYWSU6ZlhPIzs=", - "owner": "Mic92", + "lastModified": 1650161686, + "narHash": "sha256-70ZWAlOQ9nAZ08OU6WY7n4Ij2kOO199dLfNlvO/+pf8=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "de173cbbb66e9b454e0e836cec1b807856934539", + "rev": "1ffba9f2f683063c2b14c9f4d12c55ad5f4ed887", "type": "github" }, "original": { - "owner": "Mic92", - "ref": "nix-unstable", + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 5ab579e..3b0b7ff 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,7 @@ { description = "Hydra's builtin hydra-eval-jobs as a standalone"; - # switch back when https://github.com/NixOS/nixpkgs/pull/164012 is merged - #inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - inputs.nixpkgs.url = "github:Mic92/nixpkgs/nix-unstable"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, flake-utils }: From c1b86245a1b556b79b330378b88fafb827287deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 18 Apr 2022 14:45:49 +0200 Subject: [PATCH 2/3] fix for nixUnstable --- flake.nix | 8 ++++++-- src/nix-eval-jobs.cc | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 3b0b7ff..8b5bc6c 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,9 @@ checks = let mkVariant = nix: (packages.nix-eval-jobs.override { - inherit nix; + # TODO: fix to stable after next nix release + nix = pkgs.nixUnstable; + #inherit nix; }).overrideAttrs (_: { name = "nix-eval-jobs-${nix.version}"; inherit (nix) version; @@ -44,7 +46,9 @@ touch $out ''; - build = mkVariant pkgs.nix; + # TODO fix to unstable in next release + build = mkVariant pkgs.nixUnstable; + #build = mkVariant pkgs.nix; build-unstable = mkVariant pkgs.nixUnstable; }; diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index fd33320..50c99d5 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -217,7 +217,9 @@ static void worker( reply["system"] = drv->querySystem(); reply["drvPath"] = drvPath; for (auto out : outputs){ - reply["outputs"][out.first] = localStore->printStorePath(out.second); + if (out.second) { + reply["outputs"][out.first] = localStore->printStorePath(*out.second); + } } if (myArgs.meta) { From 353724df901a4a3284f53f81f3c860940970ecc9 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 22 Apr 2022 19:06:23 +1200 Subject: [PATCH 3/3] Fix querying output paths The upstream function signature changed, we no longer have to pass onlyOutputsToInstall. --- src/nix-eval-jobs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 50c99d5..628a245 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -211,7 +211,7 @@ static void worker( auto localStore = state.store.dynamic_pointer_cast(); auto drvPath = localStore->printStorePath(drv->requireDrvPath()); auto storePath = localStore->parseStorePath(drvPath); - auto outputs = drv->queryOutputs(false); + auto outputs = drv->queryOutputs(); reply["name"] = drv->queryName(); reply["system"] = drv->querySystem();