diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix index 3c59f6b80d66c..e6c2acb736e35 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -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 + uuagc-cabal = doDistribute (unmarkBroken super.uuagc-cabal); } diff --git a/pkgs/development/haskell-modules/non-hackage-packages.nix b/pkgs/development/haskell-modules/non-hackage-packages.nix index beb81a58d8638..803b5c5dfb8ed 100644 --- a/pkgs/development/haskell-modules/non-hackage-packages.nix +++ b/pkgs/development/haskell-modules/non-hackage-packages.nix @@ -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 {}; } diff --git a/pkgs/development/tools/glualint/default.nix b/pkgs/development/tools/glualint/default.nix new file mode 100644 index 0000000000000..de773f3005ea6 --- /dev/null +++ b/pkgs/development/tools/glualint/default.nix @@ -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 + 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 ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c6ad14c097211..7f49da83400c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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"; };