mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, gforth
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "gbforth";
|
|
version = "unstable-2023-03-02";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ams-hackers";
|
|
repo = "gbforth";
|
|
rev = "428fcf5054fe301e90ac74b1d920ee3ecc375b5b";
|
|
hash = "sha256-v1bdwT15Wg1VKpo74Cc3tsTl1uOKvKdlHWtbZkJ/qbA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
];
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/share/gbforth $out/bin
|
|
cp -r lib shared src gbforth.fs $out/share/gbforth/
|
|
makeWrapper ${gforth}/bin/gforth $out/bin/gbforth \
|
|
--set GBFORTH_PATH $out/share/gbforth/lib \
|
|
--add-flags $out/share/gbforth/gbforth.fs
|
|
runHook postInstall
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
$out/bin/gbforth examples/simon/simon.fs
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://gbforth.org/";
|
|
description = "Forth-based Game Boy development kit";
|
|
mainProgram = "gbforth";
|
|
longDescription = ''
|
|
A Forth-based Game Boy development kit.
|
|
It features a Forth-based assembler, a cross-compiler with support for
|
|
lazy code generation and a library of useful words.
|
|
'';
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ fgaz ];
|
|
};
|
|
}
|