Merge pull request #51 from nix-community/ci

flake: switch back to original nixpkgs
This commit is contained in:
adisbladis 2022-04-22 14:17:55 +07:00 committed by GitHub
commit f72f05d81f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 13 deletions

View file

@ -17,16 +17,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1647186833, "lastModified": 1650161686,
"narHash": "sha256-62CMNrhICLcI/5jNSQDAQpUUvtvTXBsYWSU6ZlhPIzs=", "narHash": "sha256-70ZWAlOQ9nAZ08OU6WY7n4Ij2kOO199dLfNlvO/+pf8=",
"owner": "Mic92", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "de173cbbb66e9b454e0e836cec1b807856934539", "rev": "1ffba9f2f683063c2b14c9f4d12c55ad5f4ed887",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Mic92", "owner": "NixOS",
"ref": "nix-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -1,9 +1,7 @@
{ {
description = "Hydra's builtin hydra-eval-jobs as a standalone"; 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:NixOS/nixpkgs/nixos-unstable";
inputs.nixpkgs.url = "github:Mic92/nixpkgs/nix-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils }:
@ -18,7 +16,9 @@
checks = checks =
let let
mkVariant = nix: (packages.nix-eval-jobs.override { mkVariant = nix: (packages.nix-eval-jobs.override {
inherit nix; # TODO: fix to stable after next nix release
nix = pkgs.nixUnstable;
#inherit nix;
}).overrideAttrs (_: { }).overrideAttrs (_: {
name = "nix-eval-jobs-${nix.version}"; name = "nix-eval-jobs-${nix.version}";
inherit (nix) version; inherit (nix) version;
@ -46,7 +46,9 @@
touch $out 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; build-unstable = mkVariant pkgs.nixUnstable;
}; };

View file

@ -211,13 +211,15 @@ static void worker(
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>(); auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>();
auto drvPath = localStore->printStorePath(drv->requireDrvPath()); auto drvPath = localStore->printStorePath(drv->requireDrvPath());
auto storePath = localStore->parseStorePath(drvPath); auto storePath = localStore->parseStorePath(drvPath);
auto outputs = drv->queryOutputs(false); auto outputs = drv->queryOutputs();
reply["name"] = drv->queryName(); reply["name"] = drv->queryName();
reply["system"] = drv->querySystem(); reply["system"] = drv->querySystem();
reply["drvPath"] = drvPath; reply["drvPath"] = drvPath;
for (auto out : outputs){ 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) { if (myArgs.meta) {