I want to add hocker to environment.systemPackages in my configuration.nix so that hocker-image
, docker2nix
, etc is available for all users.
I naively tried to create the following hocker.nix
file:
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
name = "hocker-${version}";
version = "git-2018-06-30";
src = pkgs.fetchFromGitHub {
owner = "awakesecurity";
repo = "hocker";
rev = "88150c7b8a0664a70757ffd88b2ac12b84dd0604";
sha256 = "1mb3gfg01mj7ajjl1ylw24mnwamcnnifbxkakzal2j6ibqyqw6rq";
};
buildInputs = [ pkgs.nix ];
buildPhase = ''
nix-build ${src}/release.nix
'';
}
but when running nix-build hocker.nix
it fails:
these derivations will be built:
/nix/store/spn3x38vvyfrvc86psw2v1k31mp1gay9-hocker-git-2018-06-30.drv
building '/nix/store/spn3x38vvyfrvc86psw2v1k31mp1gay9-hocker-git-2018-06-30.drv'...
unpacking sources
unpacking source archive /nix/store/br8ni51dhyb90f4v7qn00jiilb4nhh9m-source
source root is source
patching sources
configuring
no configure script, doing nothing
building
error: cannot open connection to remote store 'daemon': reading from file: Connection reset by peer
(use '--show-trace' to show detailed location information)
builder for '/nix/store/spn3x38vvyfrvc86psw2v1k31mp1gay9-hocker-git-2018-06-30.drv' failed with exit code 1
error: build of '/nix/store/spn3x38vvyfrvc86psw2v1k31mp1gay9-hocker-git-2018-06-30.drv' failed