diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-06 02:12:23 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-06 02:12:23 +0100 |
commit | f34a1b70eb86e4a63cfb88ea460345bb1aed88e3 (patch) | |
tree | 32834d23912250e0c4b86aa4420baacf8091c0fe /nixpkgs/pkgs/by-name/se | |
parent | 003ab91dd67b093890db1dd0bab564345db6e496 (diff) | |
parent | 7a7cfff8915e06365bc2365ff33d4d413184fa9f (diff) | |
download | nixlib-f34a1b70eb86e4a63cfb88ea460345bb1aed88e3.tar nixlib-f34a1b70eb86e4a63cfb88ea460345bb1aed88e3.tar.gz nixlib-f34a1b70eb86e4a63cfb88ea460345bb1aed88e3.tar.bz2 nixlib-f34a1b70eb86e4a63cfb88ea460345bb1aed88e3.tar.lz nixlib-f34a1b70eb86e4a63cfb88ea460345bb1aed88e3.tar.xz nixlib-f34a1b70eb86e4a63cfb88ea460345bb1aed88e3.tar.zst nixlib-f34a1b70eb86e4a63cfb88ea460345bb1aed88e3.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/se')
-rw-r--r-- | nixpkgs/pkgs/by-name/se/seabios/package.nix | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/se/seabios/package.nix b/nixpkgs/pkgs/by-name/se/seabios/package.nix new file mode 100644 index 000000000000..713f58702113 --- /dev/null +++ b/nixpkgs/pkgs/by-name/se/seabios/package.nix @@ -0,0 +1,72 @@ +{ lib +, stdenv +, fetchgit +, acpica-tools +, python3 +, writeText +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "seabios"; + version = "1.16.3"; + + src = fetchgit { + url = "https://git.seabios.org/seabios.git"; + rev = "rel-${finalAttrs.version}"; + hash = "sha256-hWemj83cxdY8p+Jhkh5GcPvI0Sy5aKYZJCsKDjHTUUk="; + }; + + outputs = [ "out" "doc" ]; + + nativeBuildInputs = [ python3 ]; + + buildInputs = [ acpica-tools ]; + + strictDeps = true; + + makeFlags = [ + # https://www.seabios.org/Build_overview#Distribution_builds + "EXTRAVERSION=\"-nixpkgs\"" + ]; + + hardeningDisable = [ "pic" "stackprotector" "fortify" ]; + + postConfigure = let + config = writeText "config.txt" (lib.generators.toKeyValue { } { + # SeaBIOS with CSM (Compatible Support Module) support; learn more at + # https://www.electronicshub.org/what-is-csm-bios/ + "CONFIG_CSM" = "y"; + "CONFIG_PERMIT_UNALIGNED_PCIROM" = "y"; + "CONFIG_QEMU_HARDWARE" = "y"; + }); + in '' + cp ${config} .config + make olddefconfig + ''; + + installPhase = '' + runHook preInstall + + mkdir -pv $doc/share/doc/seabios-${finalAttrs.version}/ + cp -v docs/* $doc/share/doc/seabios-${finalAttrs.version}/ + install -Dm644 out/Csm16.bin -t $out/share/seabios/ + + runHook postInstall + ''; + + meta = { + homepage = "https://www.seabios.org"; + description = "Open source implementation of a 16bit x86 BIOS"; + longDescription = '' + SeaBIOS is an open source implementation of a 16bit x86 BIOS. + It can run in an emulator or it can run natively on x86 hardware with the + use of coreboot. + ''; + license = with lib.licenses; [ lgpl3Plus ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.systems.inspect.patternLogicalAnd + lib.systems.inspect.patterns.isUnix + lib.systems.inspect.patterns.isx86; + badPlatforms = [ lib.systems.inspect.patterns.isDarwin ]; + }; +}) |