diff options
Diffstat (limited to 'pkgs/os-specific/solo5')
-rw-r--r-- | pkgs/os-specific/solo5/default.nix | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/pkgs/os-specific/solo5/default.nix b/pkgs/os-specific/solo5/default.nix index baba0ecdf0abc..4b5c1232a864a 100644 --- a/pkgs/os-specific/solo5/default.nix +++ b/pkgs/os-specific/solo5/default.nix @@ -1,6 +1,16 @@ { lib, stdenv, fetchurl, pkg-config, libseccomp, util-linux, qemu }: -let version = "0.6.8"; +let + version = "0.6.8"; + # list of all theoretically available targets + targets = [ + "genode" + "hvt" + "muen" + "spt" + "virtio" + "xen" + ]; in stdenv.mkDerivation { pname = "solo5"; inherit version; @@ -29,9 +39,15 @@ in stdenv.mkDerivation { export DESTDIR=$out export PREFIX=$out make install-tools - ${lib.optionalString stdenv.hostPlatform.isLinux "make ${ - (lib.concatMapStringsSep " " (x: "install-opam-${x}") [ "hvt" "spt" ]) - }"} + + # get CONFIG_* vars from Makeconf which also parse in sh + grep '^CONFIG_' Makeconf > nix_tmp_targetconf + source nix_tmp_targetconf + # install opam / pkg-config files for all enabled targets + ${lib.concatMapStrings (bind: '' + [ -n "$CONFIG_${lib.toUpper bind}" ] && make install-opam-${bind} + '') targets} + runHook postInstall ''; |