{"action":"closed","issue":{"url":"https://api.github.com/repos/NixOS/nixops/issues/320","labels_url":"https://api.github.com/repos/NixOS/nixops/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixops/issues/320/comments","events_url":"https://api.github.com/repos/NixOS/nixops/issues/320/events","html_url":"https://github.com/NixOS/nixops/issues/320","id":95830547,"number":320,"title":"nixops fails when using fetchgit","user":{"login":"globin","id":1447245,"avatar_url":"https://avatars.githubusercontent.com/u/1447245?v=3","gravatar_id":"","url":"https://api.github.com/users/globin","html_url":"https://github.com/globin","followers_url":"https://api.github.com/users/globin/followers","following_url":"https://api.github.com/users/globin/following{/other_user}","gists_url":"https://api.github.com/users/globin/gists{/gist_id}","starred_url":"https://api.github.com/users/globin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/globin/subscriptions","organizations_url":"https://api.github.com/users/globin/orgs","repos_url":"https://api.github.com/users/globin/repos","events_url":"https://api.github.com/users/globin/events{/privacy}","received_events_url":"https://api.github.com/users/globin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixops/labels/bug","name":"bug","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-18T14:51:52Z","updated_at":"2015-12-08T08:27:24Z","closed_at":"2015-12-08T08:27:24Z","body":"This fails if hydra hasn't been instantiated yet at https://github.com/NixOS/nixops/blob/master/nixops/deployment.py#L304 with \r\n```\r\nerror: cannot import ‘/nix/store/9gb5afcq87kmz2ylpkrd0przgc28alhb-hydra-fc16c53/hydra-module.nix’, since path ‘/nix/store/b1mnfnkgny1fbi2rlp43s8byv29c3vkz-hydra-fc16c53.drv’ is not valid, at /nix/store/jcn0fckjwisxc000xxqmh316bgl2s8hi-nixos-15.06pre65267.6ad8fab/nixos/nixpkgs/lib/modules.nix:96:73\r\n```\r\n\r\n```nix\r\n{\r\n  hydra =\r\n    { config, pkgs, ... }:\r\n    let\r\n      hydraCode = (import <nixpkgs> {}).fetchgit {\r\n        url = \"https://github.com/NixOS/hydra\";\r\n        rev = \"fc16c53886\";\r\n        sha256 = \"0dy20iimgfqpknyzs8rv78sm5yqpsxav2w3cbxf3r219wcwg437g\";\r\n      };\r\n    in {\r\n      require = [\r\n        \"${hydraCode}/hydra-module.nix\"\r\n      ];\r\n      .....\r\n      services = {\r\n        hydra = {\r\n          enable = true;\r\n          dbi = \"dbi:Pg:dbname=hydra;host=localhost;user=hydra;\";\r\n          package = (import \"${hydraCode}/release.nix\" {}).build.x86_64-linux;\r\n          hydraURL = \"https://hydra.example.com\";\r\n          port = 3000;\r\n          minimumDiskFree = 5;\r\n          minimumDiskFreeEvaluator = 2;\r\n          notificationSender = \"hydra@example.com\";\r\n          logo = null;\r\n          debugServer = false;\r\n        };\r\n        ....\r\n      };\r\n    };\r\n}\r\n```"}}