mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
openbsd.boot-config: init
Co-Authored-By: Audrey Dutcher <audrey@rhelmot.io>
This commit is contained in:
parent
d48f526db3
commit
5cd3d0ef0f
32
pkgs/os-specific/bsd/openbsd/pkgs/boot-config.nix
Normal file
32
pkgs/os-specific/bsd/openbsd/pkgs/boot-config.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
mkDerivation,
|
||||||
|
lib,
|
||||||
|
flex,
|
||||||
|
byacc,
|
||||||
|
compatHook,
|
||||||
|
}:
|
||||||
|
mkDerivation {
|
||||||
|
path = "usr.sbin/config";
|
||||||
|
|
||||||
|
extraNativeBuildInputs = [
|
||||||
|
flex
|
||||||
|
byacc
|
||||||
|
compatHook
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
rm $BSDSRCDIR/usr.sbin/config/ukc.c
|
||||||
|
rm $BSDSRCDIR/usr.sbin/config/ukcutil.c
|
||||||
|
rm $BSDSRCDIR/usr.sbin/config/cmd.c
|
||||||
|
rm $BSDSRCDIR/usr.sbin/config/exec_elf.c
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
for f in *.l; do flex $f; done
|
||||||
|
for f in *.y; do yacc -H ''${f%.y}.h $f; done
|
||||||
|
for f in *.c; do $CC -I$TMP/include -DMAKE_BOOTSTRAP -c $f; done
|
||||||
|
$CC *.o -o config
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta.platforms = lib.platforms.linux;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user