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,85 @@
# This file has been autogenerated with cabal2nix.
# Update via ./update.sh
{
mkDerivation,
ansi-wl-pprint,
base,
base64-bytestring,
binary,
bytestring,
containers,
directory,
edit-distance,
fetchgit,
filepath,
ghc-prim,
haskeline,
hspec,
hspec-discover,
indexed-traversable,
lib,
mtl,
prettyprinter,
process,
raw-strings-qq,
scientific,
text,
utf8-string,
vector,
}:
mkDerivation {
pname = "gren";
version = "0.6.3";
src = fetchgit {
url = "https://github.com/gren-lang/compiler.git";
sha256 = "0p93wamff539pb242lib2wyfr6alqz96rpyh9xb0a61ix0j3miiz";
rev = "54277a25d47b5c20816550ff6deab89026797526";
fetchSubmodules = true;
};
isLibrary = false;
isExecutable = true;
libraryHaskellDepends = [
ansi-wl-pprint
base
base64-bytestring
binary
bytestring
containers
directory
edit-distance
filepath
ghc-prim
indexed-traversable
mtl
prettyprinter
raw-strings-qq
scientific
text
utf8-string
vector
];
executableHaskellDepends = [
base
bytestring
containers
directory
filepath
haskeline
mtl
process
utf8-string
];
testHaskellDepends = [
base
bytestring
hspec
utf8-string
];
testToolDepends = [ hspec-discover ];
doHaddock = false;
jailbreak = true;
homepage = "https://gren-lang.org";
description = "The `gren` command line interface";
license = lib.licenses.bsd3;
mainProgram = "gren";
}

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
makeBinaryWrapper,
nodejs,
git,
haskellPackages,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gren";
version = "0.6.3";
src = fetchFromGitHub {
owner = "gren-lang";
repo = "compiler";
tag = finalAttrs.version;
hash = "sha256-P8Y6JOgxGAVWT9DfbNLHVJnsPBcrUkHEumkU56riI10=";
};
buildInputs = [ nodejs ];
nativeBuildInputs = [ makeBinaryWrapper ];
installPhase = ''
runHook preInstall
# install the precompiled frontend into the proper location
install -Dm755 bin/compiler $out/bin/gren
wrapProgram $out/bin/gren \
--set-default GREN_BIN ${lib.getExe finalAttrs.passthru.backend} \
--suffix PATH : ${lib.makeBinPath [ git ]}
runHook postInstall
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/gren";
versionCheckProgramArg = "--version";
passthru = {
backend = haskellPackages.callPackage ./generated-backend-package.nix { };
updateScript = ./update.sh;
};
meta = {
description = "Programming language for simple and correct applications";
homepage = "https://gren-lang.org";
license = lib.licenses.bsd3;
platforms = lib.intersectLists haskellPackages.ghc.meta.platforms nodejs.meta.platforms;
mainProgram = "gren";
maintainers = with lib.maintainers; [
robinheghan
tomasajt
];
};
})

28
pkgs/by-name/gr/gren/update.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p cabal2nix curl jq nix-update nixfmt
set -euo pipefail
# This is the directory of this update.sh script.
script_dir="$(dirname "${BASH_SOURCE[0]}")"
backend_derivation_file="${script_dir}/generated-backend-package.nix"
latest_version="$(curl --silent 'https://api.github.com/repos/gren-lang/compiler/releases/latest' | jq --raw-output '.tag_name')"
echo "Updating gren backend to version ${latest_version}."
echo "Running cabal2nix and outputting to ${backend_derivation_file}..."
cat > "${backend_derivation_file}" << EOF
# This file has been autogenerated with cabal2nix.
# Update via ./update.sh
EOF
cabal2nix 'https://github.com/gren-lang/compiler.git' --revision "${latest_version}" --jailbreak >> "${backend_derivation_file}"
nixfmt "${backend_derivation_file}"
echo 'Finished backend generation.'
echo "Updating frontend to version ${latest_version}"
nix-update gren --version "${latest_version}"