nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 56 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 makeWrapper, 6 gforth, 7}: 8 9stdenv.mkDerivation { 10 pname = "gbforth"; 11 version = "unstable-2023-03-02"; 12 13 src = fetchFromGitHub { 14 owner = "ams-hackers"; 15 repo = "gbforth"; 16 rev = "428fcf5054fe301e90ac74b1d920ee3ecc375b5b"; 17 hash = "sha256-v1bdwT15Wg1VKpo74Cc3tsTl1uOKvKdlHWtbZkJ/qbA="; 18 }; 19 20 nativeBuildInputs = [ 21 makeWrapper 22 ]; 23 24 dontBuild = true; 25 26 installPhase = '' 27 runHook preInstall 28 mkdir -p $out/share/gbforth $out/bin 29 cp -r lib shared src gbforth.fs $out/share/gbforth/ 30 makeWrapper ${gforth}/bin/gforth $out/bin/gbforth \ 31 --set GBFORTH_PATH $out/share/gbforth/lib \ 32 --add-flags $out/share/gbforth/gbforth.fs 33 runHook postInstall 34 ''; 35 36 doInstallCheck = true; 37 installCheckPhase = '' 38 runHook preInstallCheck 39 $out/bin/gbforth examples/simon/simon.fs 40 runHook postInstallCheck 41 ''; 42 43 meta = with lib; { 44 homepage = "https://gbforth.org/"; 45 description = "Forth-based Game Boy development kit"; 46 mainProgram = "gbforth"; 47 longDescription = '' 48 A Forth-based Game Boy development kit. 49 It features a Forth-based assembler, a cross-compiler with support for 50 lazy code generation and a library of useful words. 51 ''; 52 license = licenses.mit; 53 platforms = platforms.all; 54 maintainers = with maintainers; [ fgaz ]; 55 }; 56}