push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
nix-update-script,
runCommand,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "janet";
version = "1.39.1";
src = fetchFromGitHub {
owner = "janet-lang";
repo = "janet";
rev = "v${finalAttrs.version}";
hash = "sha256-Hd8DueT9f7vmK0QFJdRx7FgZ8BYh5prQyM++5Yb6tg4=";
};
postPatch = ''
substituteInPlace janet.1 \
--replace /usr/local/ $out/
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# error: Socket is not connected
substituteInPlace meson.build \
--replace "'test/suite-ev.janet'," ""
'';
nativeBuildInputs = [
meson
ninja
];
mesonBuildType = "release";
mesonFlags = [ "-Dgit_hash=release" ];
doCheck = true;
doInstallCheck = true;
installCheckPhase = ''
$out/bin/janet -e '(+ 1 2 3)'
'';
passthru = {
tests.run =
runCommand "janet-test-run"
{
nativeBuildInputs = [ finalAttrs.finalPackage ];
}
''
echo "(+ 1 2 3)" | janet | tail -n 1 > arithmeticTest.txt;
diff -U3 --color=auto <(cat arithmeticTest.txt) <(echo "6");
echo "(print \"Hello, World!\")" | janet | tail -n 2 > ioTest.txt;
diff -U3 --color=auto <(cat ioTest.txt) <(echo -e "Hello, World!\nnil");
touch $out;
'';
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Janet programming language";
mainProgram = "janet";
homepage = "https://janet-lang.org/";
license = licenses.mit;
maintainers = with maintainers; [
andrewchambers
peterhoeg
];
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchFromGitHub,
janet,
}:
let
platformFiles = {
aarch64-darwin = "macos_config.janet";
aarch64-linux = "linux_config.janet";
x86_64-darwin = "macos_config.janet";
x86_64-linux = "linux_config.janet";
};
platformFile = platformFiles.${stdenv.hostPlatform.system};
in
stdenv.mkDerivation rec {
pname = "jpm";
version = "1.1.0";
src = fetchFromGitHub {
owner = "janet-lang";
repo = "jpm";
rev = "v${version}";
sha256 = "sha256-lPB4jew6RkJlDp8xOQ4YA9MkgLBImaBHcvv4WF/sLRc=";
};
# `auto-shebangs true` gives us a shebang line that points to janet inside the
# jpm bin folder
postPatch = ''
substituteInPlace configs/${platformFile} \
--replace 'auto-shebang true' 'auto-shebang false' \
--replace /usr/local $out
'';
dontConfigure = true;
buildInputs = [ janet ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{lib/janet,share/man/man1}
janet bootstrap.janet configs/${platformFile}
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/jpm help
'';
meta = janet.meta // {
description = "Janet Project Manager for the Janet programming language";
mainProgram = "jpm";
platforms = lib.attrNames platformFiles;
};
}