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
89 lines
2.2 KiB
Nix
89 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
clangStdenv,
|
|
fetchFromGitHub,
|
|
fetchurl,
|
|
mill,
|
|
which,
|
|
}:
|
|
|
|
let
|
|
# we need to lock the mill version, because an update will change the
|
|
# fetched internal dependencies, thus breaking the deps FOD
|
|
lockedMill = mill.overrideAttrs (oldAttrs: rec {
|
|
# should ideally match the version listed inside the `.mill-version` file of the source
|
|
version = "0.11.12";
|
|
src = fetchurl {
|
|
url = "https://github.com/com-lihaoyi/mill/releases/download/${version}/${version}-assembly";
|
|
hash = "sha256-k4/oMHvtq5YXY8hRlX4gWN16ClfjXEAn6mRIoEBHNJo=";
|
|
};
|
|
});
|
|
in
|
|
clangStdenv.mkDerivation (finalAttrs: {
|
|
pname = "vyxal";
|
|
version = "3.4.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Vyxal";
|
|
repo = "Vyxal";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-8hA4u9zz8jm+tlSZ88z69/PUFNYk7+i3jtgUntgDgPE=";
|
|
};
|
|
|
|
# make sure to resolve all dependencies needed
|
|
deps = stdenvNoCC.mkDerivation {
|
|
name = "vyxal-${finalAttrs.version}-deps";
|
|
inherit (finalAttrs) src;
|
|
|
|
nativeBuildInputs = [ lockedMill ];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
export JAVA_TOOL_OPTIONS="-Duser.home=$(mktemp -d)"
|
|
export COURSIER_CACHE=$out/.coursier
|
|
|
|
mill native.prepareOffline --all
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
outputHashAlgo = "sha256";
|
|
outputHashMode = "recursive";
|
|
outputHash = "sha256-yXKzntb498b8ZLYq7w+s1Brj+pvPN9otdkdY8QGVHPs=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
lockedMill
|
|
which
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
export JAVA_TOOL_OPTIONS="-Duser.home=$(mktemp -d)"
|
|
export COURSIER_CACHE=${finalAttrs.deps}/.coursier
|
|
|
|
mill native.nativeLink
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm755 out/native/nativeLink.dest/out $out/bin/vyxal
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/Vyxal/Vyxal/releases/tag/v${finalAttrs.version}";
|
|
description = "Code-golfing language that has aspects of traditional programming languages";
|
|
homepage = "https://github.com/Vyxal/Vyxal";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "vyxal";
|
|
maintainers = with lib.maintainers; [ tomasajt ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|