From 4cd89d210706bb4597acdd9c5d3d5420d2d9a476 Mon Sep 17 00:00:00 2001 From: ruby0b <106119328+ruby0b@users.noreply.github.com> Date: Tue, 21 Mar 2023 19:28:26 +0100 Subject: [PATCH] haskellPackages.glualint: init at 1.24.1 --- .../haskell-modules/non-hackage-packages.nix | 2 + pkgs/development/tools/glualint/default.nix | 77 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 81 insertions(+) create mode 100644 pkgs/development/tools/glualint/default.nix 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..c84ad77973ead --- /dev/null +++ b/pkgs/development/tools/glualint/default.nix @@ -0,0 +1,77 @@ +{ mkDerivation +, aeson +, array +, base +, bytestring +, containers +, directory +, deepseq +, filemanip +, filepath +, ListLike +, MissingH +, mtl +, optparse-applicative +, parsec +, pretty +, signal +, lib +, uu-parsinglib +, uuagc +, uuagc-cabal +, vector +, pkgs +, fetchFromGitHub +}: +mkDerivation rec { + pname = "glualint"; + version = "1.24.1"; + + src = fetchFromGitHub { + owner = "FPtje"; + repo = "GLuaFixer"; + rev = version; + hash = "sha256-zL0GcrNihSOaw5JkDi04ipOmBq8idj2m0VCKU2J1ZbA="; + }; + + isLibrary = true; + isExecutable = true; + libraryToolDepends = [ uuagc uuagc-cabal ]; + libraryHaskellDepends = [ + aeson + array + base + bytestring + containers + directory + filemanip + filepath + ListLike + MissingH + mtl + optparse-applicative + parsec + pretty + signal + uu-parsinglib + uuagc + uuagc-cabal + deepseq + vector + ]; + executableHaskellDepends = [ base directory ]; + + 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 e257717b565cf..2e50e20123ba0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17300,6 +17300,8 @@ with pkgs; global = callPackage ../development/tools/misc/global { }; + glualint = haskell.lib.compose.justStaticExecutables haskellPackages.glualint; + gnatcoll-db2ada = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "gnatcoll_db2ada"; };