diff --git a/default.nix b/default.nix index b9d5163..c12ed15 100644 --- a/default.nix +++ b/default.nix @@ -1,37 +1,46 @@ -{ - pkgs ? import {} -}: - with pkgs; - let - openbsd_src = fetchFromGitHub { - owner = "rpki-client"; - repo = "rpki-client-openbsd"; - # rev = "c1363a74cc718dbbaee38488a8598cd1c26f74f0"; - rev = "rpki-client-8.2"; - hash = "sha256-oErUjZn/a/Ka70+Z8Wb2L7UIulGPjF81bYAQ2wPvWfo="; - }; - in stdenv.mkDerivation rec { - inherit openbsd_src; - buildInputs = [ git libressl expat zlib automake autoconf git libtool ]; - name = "rpki-client"; - version = "8.2"; - src = fetchFromGitHub { - owner = "rpki-client"; - repo = "rpki-client-portable"; - rev = version; - hash = "sha256-oErUjZn/a/Ka70+Z8Wb2L7UIulGPjF81bYAQ2wPvWfo="; - }; - unpackPhase = '' - echo ${src} - pwd - mkdir -p openbsd - cp -R ${openbsd_src}/* openbsd - cp -R ${src}/* . - chmod 700 -R . - sed -i 's|dir=`pwd`|dir=${src}|g' openbsd/update.sh - ''; - configurePhase = '' - ./autogen.sh - ${src}/configure --prefix=$out - ''; - } +{ pkgs ? import { } }: + +with pkgs; + +stdenv.mkDerivation rec { + + name = "rpki-client"; + version = "8.2"; + + src = fetchFromGitHub { + owner = "rpki-client"; + repo = "rpki-client-portable"; + rev = version; + hash = "sha256-oErUjZn/a/Ka70+Z8Wb2L7UIulGPjF81bYAQ2wPvWfo="; + }; + + openbsd_src = fetchFromGitHub { + owner = "rpki-client"; + repo = "rpki-client-openbsd"; + rev = "rpki-client-8.2"; + hash = "sha256-zC3vbQLLWgImS+lYNWbHzkLrZTJvgPfH+W+FiSnH8Aw="; + }; + + buildInputs = [ + git + libressl + expat + zlib + automake + autoconf + libtool + rsync + ]; + + unpackPhase = '' + mkdir -p openbsd + cp -R ${openbsd_src}/* openbsd + cp -R ${src}/* . + chmod 700 -R . + ''; + + configurePhase = '' + ./autogen.sh + ./configure --prefix=$out + ''; +}