solo5: patch solo5-virtio-mkimage to use our Syslinux, etc

main
Emery Hemingway 2 years ago committed by ehmry
parent 419272a873
commit 8ec81fafb6
  1. 13
      pkgs/os-specific/solo5/default.nix

@ -1,4 +1,5 @@
{ lib, stdenv, fetchurl, pkg-config, libseccomp, util-linux, qemu }:
{ lib, stdenv, fetchurl, dosfstools, libseccomp, makeWrapper, mtools, parted
, pkg-config, qemu, syslinux, util-linux }:
let
version = "0.6.9";
@ -15,7 +16,7 @@ in stdenv.mkDerivation {
pname = "solo5";
inherit version;
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ makeWrapper pkg-config ];
buildInputs = lib.optional (stdenv.hostPlatform.isLinux) libseccomp;
src = fetchurl {
@ -47,6 +48,14 @@ in stdenv.mkDerivation {
[ -n "$CONFIG_${lib.toUpper bind}" ] && make install-opam-${bind}
'') targets}
substituteInPlace $out/bin/solo5-virtio-mkimage \
--replace "/usr/lib/syslinux" "${syslinux}/share/syslinux" \
--replace "/usr/share/syslinux" "${syslinux}/share/syslinux" \
--replace "cp " "cp --no-preserve=mode "
wrapProgram $out/bin/solo5-virtio-mkimage \
--prefix PATH : ${lib.makeBinPath [ dosfstools mtools parted syslinux ]}
runHook postInstall
'';

Loading…
Cancel
Save