2023-04-04 21:47:59 +00:00
|
|
|
{
|
2025-02-10 21:55:08 +00:00
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
2023-04-04 21:47:59 +00:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gen_init_cpio";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/torvalds/linux/462cd7724e2341472c9f9670ac88e250788d4c82/usr/gen_init_cpio.c";
|
|
|
|
hash = "sha256-gwKSJGiCS4v98EArNryr/sdYAfDqnGsZ1erfGMNVjpw=";
|
|
|
|
};
|
|
|
|
unpackPhase = "cp ${src} ./gen_init_cpio.c";
|
|
|
|
buildPhase = "gcc -o gen_init_cpio gen_init_cpio.c";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp gen_init_cpio $out/bin
|
|
|
|
'';
|
|
|
|
}
|