Files
nixpkgs/pkgs/by-name/kl/klong/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchurl,
fetchFromSourcehut,
installShellFiles,
makeBinaryWrapper,
gv,
}:
stdenv.mkDerivation rec {
pname = "klong";
version = "20221212";
src = fetchurl {
url = "https://t3x.org/klong/klong${version}.tgz";
hash = "sha256-XhpIdyKKPGQ6mdv9LXPmC8P6hW4mFawv54yANw5/lrQ=";
};
docs = fetchFromSourcehut {
owner = "~nut";
repo = "klong-docs";
rev = "350da558709e3728df60ddf45fafe09e3fb89139";
hash = "sha256-yfvXljjJwCETWPa70zXhaQJOHhZYR2k+BKAd0Dw/U70=";
};
nativeBuildInputs = [
makeBinaryWrapper
installShellFiles
];
installPhase = ''
runHook preInstall
install -m 555 -Dt $out/bin kg kplot
install -m 444 -Dt $out/lib/klong lib/*.kg
runHook postInstall
'';
postInstall = ''
wrapProgram $out/bin/kg --prefix KLONGPATH : $out/lib/klong
wrapProgram $out/bin/kplot --prefix PATH : ${
lib.makeBinPath [
"$out"
gv
]
}
installManPage $docs/*.1
'';
meta = {
description = "Simple Array programming language";
homepage = "https://t3x.org/klong";
mainProgram = "kg";
maintainers = [ lib.maintainers.casaca ];
platforms = lib.platforms.all;
license = with lib.licenses; [
publicDomain
cc0
];
};
}