_4th: refactor

- Migrate to by-name
- Split outputs
- finalAttrs
This commit is contained in:
Anderson Torres 2023-09-09 17:58:05 -03:00
parent 6affb7c8d4
commit e975681deb
3 changed files with 18 additions and 14 deletions

View File

@ -1,14 +1,19 @@
{ lib, stdenv, fetchurl }:
{ lib
, stdenv
, fetchurl
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "4th";
version = "3.64.1";
src = fetchurl {
url = "https://sourceforge.net/projects/forth-4th/files/${pname}-${version}/${pname}-${version}-unix.tar.gz";
url = "https://sourceforge.net/projects/forth-4th/files/4th-${finalAttrs.version}/4th-${finalAttrs.version}-unix.tar.gz";
hash = "sha256-+W6nTNsqrf3Dvr+NbSz3uJdrXVbBI3OHR5v/rs7en+M=";
};
outputs = [ "out" "man" ];
patches = [
# Fix install manual; report this patch to upstream
./001-install-manual-fixup.diff
@ -23,24 +28,25 @@ stdenv.mkDerivation rec {
preInstall = ''
install -d ${placeholder "out"}/bin \
${placeholder "out"}/lib \
${placeholder "out"}/share/doc/${pname} \
${placeholder "out"}/share/man
${placeholder "out"}/lib \
${placeholder "out"}/share/doc/4th \
${placeholder "man"}/share/man
'';
installFlags = [
"BINARIES=${placeholder "out"}/bin"
"LIBRARIES=${placeholder "out"}/lib"
"DOCDIR=${placeholder "out"}/share/doc"
"MANDIR=${placeholder "out"}/share/man"
"MANDIR=${placeholder "man"}/share/man"
];
meta = with lib; {
meta = {
homepage = "https://thebeez.home.xs4all.nl/4tH/index.html";
description = "A portable Forth compiler";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
license = lib.licenses.lgpl3Plus;
mainProgram = "4th";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
};
}
})
# TODO: set Makefile according to platform

View File

@ -15443,8 +15443,6 @@ with pkgs;
### DEVELOPMENT / COMPILERS
_4th = callPackage ../development/compilers/4th { };
temurin-bin-20 = javaPackages.compiler.temurin-bin.jdk-20;
temurin-jre-bin-20 = javaPackages.compiler.temurin-bin.jre-20;