Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,7 @@ self: super: {

# Needs OneTuple for ghc < 9.2
binary-orphans = addBuildDepends [ self.OneTuple ] super.binary-orphans;

# 2023-05-212: doesn't support Cabal >= 3.8 but GHC 9 works since it ships cabal 3.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in date.

uuagc-cabal = doDistribute (unmarkBroken super.uuagc-cabal);
}
2 changes: 2 additions & 0 deletions pkgs/development/haskell-modules/non-hackage-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ self: super: {
# Unofficial fork until PRs are merged https://github.com/pcapriotti/optparse-applicative/pulls/roberth
# cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix
hercules-ci-optparse-applicative = self.callPackage ../misc/haskell/hercules-ci-optparse-applicative.nix {};

glualint = self.callPackage ../tools/glualint {};
}
75 changes: 75 additions & 0 deletions pkgs/development/tools/glualint/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{ mkDerivation
, aeson
, base
, bytestring
, containers
, deepseq
, directory
, effectful
, fetchFromGitHub
, filemanip
, filepath
, lib
, MissingH
, optparse-applicative
, parsec
, pretty
, signal
, uu-parsinglib
, uuagc
, uuagc-cabal
}:
mkDerivation rec {
pname = "glualint";
version = "1.24.3";

src = fetchFromGitHub {
owner = "FPtje";
repo = "GLuaFixer";
rev = version;
hash = "sha256-FmgQYONm1UciYa4Grmn+y1uVh9RSL90hO2rWusya0C0=";
};

isLibrary = true;
isExecutable = true;
libraryToolDepends = [ uuagc uuagc-cabal ];
libraryHaskellDepends = [
aeson
base
bytestring
containers
MissingH
parsec
pretty
uu-parsinglib
uuagc
uuagc-cabal
];
executableHaskellDepends = [
aeson
base
bytestring
containers
deepseq
directory
effectful
filemanip
filepath
optparse-applicative
signal
];

preBuild = ''
echo "Generating attribute grammar haskell files"
uuagc --haskellsyntax --data src/GLua/AG/AST.ag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that the cabal sdist command I'll use to upload glualint will already turn the UUAGC .ag files into .hs files.

When glualint is uploaded to hackage, I'm hoping that the Nixpkgs hackage script will automatically pick it up and add it to pkgs/development/haskell-modules/hackage-packages.nix, making this entire file no longer needed.

uuagc --haskellsyntax --data --strictdata src/GLua/AG/Token.ag
uuagc --catas --haskellsyntax --semfuns --wrappers --signatures src/GLua/AG/PrettyPrint.ag
uuagc --catas --haskellsyntax --semfuns --wrappers --signatures --optimize src/GLuaFixer/AG/LexLint.ag
uuagc --catas --haskellsyntax --semfuns --wrappers --signatures --optimize src/GLuaFixer/AG/ASTLint.ag
'';

homepage = "https://github.com/FPtje/GLuaFixer";
description = "Linter for Garry's mod Lua";
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [ ruby0b ];
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18391,6 +18391,8 @@ with pkgs;

global = callPackage ../development/tools/misc/global { };

glualint = haskell.lib.compose.justStaticExecutables haskell.packages.ghc90.glualint;

gnatcoll-db2ada = callPackage ../development/libraries/ada/gnatcoll/db.nix {
component = "gnatcoll_db2ada";
};
Expand Down