mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 01:04:25 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
buildPackages,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "pforth";
|
|
version = "2.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "philburk";
|
|
repo = "pforth";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-vEjFeHSJl+yAtatYJEnu+r9hmOr/kZOgIbSUXR/c8WU=";
|
|
};
|
|
|
|
# We build the dictionary in a cross-compile compatible way.
|
|
# For that, we perform steps, that the Makefile would otherwise do.
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
make -C platforms/unix pfdicapp
|
|
pushd fth/
|
|
${stdenv.hostPlatform.emulator buildPackages} ../platforms/unix/pforth -i system.fth
|
|
${stdenv.hostPlatform.emulator buildPackages} ../platforms/unix/pforth -d pforth.dic <<< "include savedicd.fth sdad bye"
|
|
mv pforth.dic pfdicdat.h ../platforms/unix/
|
|
popd
|
|
make -C platforms/unix pforthapp
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm755 platforms/unix/pforth_standalone $out/bin/pforth
|
|
mkdir -p $out/share/pforth
|
|
cp -r fth/* $out/share/pforth/
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://www.softsynth.com/pforth/";
|
|
description = "Portable Portable ANS-like Forth written in ANSI 'C'";
|
|
mainProgram = "pforth";
|
|
changelog = "https://github.com/philburk/pforth/blob/v${finalAttrs.version}/RELEASES.md";
|
|
license = lib.licenses.bsd0;
|
|
maintainers = with lib.maintainers; [
|
|
AndersonTorres
|
|
yrashk
|
|
];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|
|
# TODO: option for install the non-standalone executable
|