frink: init at 2023-01-31
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
This commit is contained in:
parent
4555ef75e4
commit
cd59cd0299
54
pkgs/development/tools/frink/default.nix
Normal file
54
pkgs/development/tools/frink/default.nix
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{ fetchurl
|
||||||
|
, frink
|
||||||
|
, jdk
|
||||||
|
, lib
|
||||||
|
, rlwrap
|
||||||
|
, stdenv
|
||||||
|
, testers
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "frink";
|
||||||
|
version = "2023-01-31";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
# Upstream does not provide versioned download links
|
||||||
|
url = "https://web.archive.org/web/20230202134810/https://frinklang.org/frinkjar/frink.jar";
|
||||||
|
sha256 = "sha256-xs1FQvFPgeAxscAiwBBP8N8aYe0OlsYbH/vbzzCbYZc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
buildInputs = [ jdk rlwrap ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/bin $out/lib
|
||||||
|
|
||||||
|
cp ${src} $out/lib/frink.jar
|
||||||
|
|
||||||
|
cat > "$out/bin/frink" << EOF
|
||||||
|
#!${stdenv.shell}
|
||||||
|
exec ${rlwrap}/bin/rlwrap ${jdk}/bin/java -classpath "$out/lib/frink.jar" frink.gui.FrinkStarter "\$@"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod a+x "$out/bin/frink"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A practical calculating tool and programming language";
|
||||||
|
homepage = "https://frinklang.org/";
|
||||||
|
license = licenses.unfree;
|
||||||
|
sourceProvenance = [ sourceTypes.binaryBytecode ];
|
||||||
|
maintainers = [ maintainers.stefanfehrenbach ];
|
||||||
|
};
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
callFrinkVersion = testers.testVersion {
|
||||||
|
package = frink;
|
||||||
|
command = "frink -e 'FrinkVersion[]'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -508,6 +508,8 @@ with pkgs;
|
||||||
|
|
||||||
frece = callPackage ../development/tools/frece { };
|
frece = callPackage ../development/tools/frece { };
|
||||||
|
|
||||||
|
frink = callPackage ../development/tools/frink { };
|
||||||
|
|
||||||
frugal = callPackage ../development/tools/frugal { };
|
frugal = callPackage ../development/tools/frugal { };
|
||||||
|
|
||||||
glade = callPackage ../development/tools/glade { };
|
glade = callPackage ../development/tools/glade { };
|
||||||
|
|
Loading…
Reference in a new issue