agbcc: init at unstable-2021-12-31
This commit is contained in:
parent
a6488246b2
commit
f2e86dbd50
50
agbcc/default.nix
Normal file
50
agbcc/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
{ lib, stdenv, fetchFromGitHub, bash, gcc-arm-embedded }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "agbcc";
|
||||||
|
version = "unstable-2021-12-31";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pret";
|
||||||
|
repo = pname;
|
||||||
|
rev = "bd1b2f511edfb30610b8d88f66f80323b3cc0aee";
|
||||||
|
sha256 = "sha256-+jHyRkupCge9D0CTck1w2V4SBltCVasL/WiXQPzifqw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace libc/Makefile \
|
||||||
|
--replace "/bin/bash" "${bash}/bin/bash"
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ gcc-arm-embedded ];
|
||||||
|
|
||||||
|
# toplev.c: In function 'fatal_insn':
|
||||||
|
# toplev.c:1048:5: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
|
||||||
|
# 1048 | error(message);
|
||||||
|
# | ^~~~~
|
||||||
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
./build.sh
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
./install.sh $out
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "C Compiler toolchain for the Game Boy Advance";
|
||||||
|
homepage = "https://github.com/pret/agbcc";
|
||||||
|
# The repository includes files from different sources each with different
|
||||||
|
# licenses. I added the catch-alls ‘free’ and ‘unfree’ to account for them,
|
||||||
|
# so please research for yourself if you are allowed to use the code for
|
||||||
|
# your purpose.
|
||||||
|
license = with licenses; [ bsd2 free gpl2Plus lgpl2Plus unfree ];
|
||||||
|
maintainers = with maintainers; [ sbruder ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,8 @@
|
||||||
final: prev: {
|
final: prev: {
|
||||||
|
# tools
|
||||||
|
|
||||||
|
agbcc = prev.callPackage ./agbcc { };
|
||||||
|
|
||||||
# roms
|
# roms
|
||||||
|
|
||||||
pokegb = prev.recurseIntoAttrs {
|
pokegb = prev.recurseIntoAttrs {
|
||||||
|
|
Reference in a new issue