diff --git a/Makefile b/Makefile index d9edcf6f..3275bc56 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ BINS := \ hbs2 \ hbs2-peer \ hbs2-keyman \ + hbs2-fixer \ hbs2-git-reposync \ hbs2-git-subscribe \ git-remote-hbs2 \ diff --git a/flake.nix b/flake.nix index bf04e032..03b6c0a3 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ outputs = { self, nixpkgs, haskell-flake-utils, ... }@inputs: "hbs2-keyman" "hbs2-share" "hbs21-git" + "hbs2-fixer" ]; in haskell-flake-utils.lib.simpleCabalProject2flake { @@ -53,16 +54,17 @@ outputs = { self, nixpkgs, haskell-flake-utils, ... }@inputs: inherit packageNames; packageDirs = { - "hbs2" = "./hbs2"; - "hbs2-tests" = "./hbs2-tests"; - "hbs2-core" = "./hbs2-core"; + "hbs2" = "./hbs2"; + "hbs2-tests" = "./hbs2-tests"; + "hbs2-core" = "./hbs2-core"; "hbs2-storage-simple" = "./hbs2-storage-simple"; - "hbs2-peer" = "./hbs2-peer"; + "hbs2-peer" = "./hbs2-peer"; "hbs2-keyman" = "./hbs2-keyman"; "hbs2-share" = "./hbs2-share"; "hbs2-git" = "./hbs2-git"; "hbs21-git" = "./hbs21-git"; "hbs2-git-reposync" = "./hbs2-git-reposync"; + "hbs2-fixer" = "./hbs2-fixer"; }; hpPreOverrides = {pkgs, ...}: final: prev: with pkgs; { @@ -120,8 +122,6 @@ outputs = { self, nixpkgs, haskell-flake-utils, ... }@inputs: ''; }; - }; - } diff --git a/hbs2-fixer/app/Main.hs b/hbs2-fixer/app/Main.hs new file mode 100644 index 00000000..0ade0a67 --- /dev/null +++ b/hbs2-fixer/app/Main.hs @@ -0,0 +1,6 @@ +module Main where + +main :: IO () +main = do + print "hbs2-fixer" + diff --git a/hbs2-fixer/hbs2-fixer.cabal b/hbs2-fixer/hbs2-fixer.cabal new file mode 100644 index 00000000..9dd0290b --- /dev/null +++ b/hbs2-fixer/hbs2-fixer.cabal @@ -0,0 +1,130 @@ +cabal-version: 3.0 +name: hbs2-fixer +version: 0.24.1.0 +-- synopsis: +-- description: +license: BSD-3-Clause +license-file: LICENSE +author: Dmitry Zuikov +maintainer: dzuikov@gmail.com +-- copyright: +category: Development +build-type: Simple +extra-doc-files: CHANGELOG.md +-- extra-source-files: + +common shared-properties + ghc-options: + -Wall + -Wno-type-defaults + -fprint-potential-instances + -- -fno-warn-unused-matches + -- -fno-warn-unused-do-bind + -- -Werror=missing-methods + -- -Werror=incomplete-patterns + -- -fno-warn-unused-binds + + + default-language: Haskell2010 + + default-extensions: + ApplicativeDo + , BangPatterns + , BlockArguments + , ConstraintKinds + , DataKinds + , DeriveDataTypeable + , DeriveGeneric + , DerivingStrategies + , DerivingVia + , ExtendedDefaultRules + , FlexibleContexts + , FlexibleInstances + , GADTs + , GeneralizedNewtypeDeriving + , ImportQualifiedPost + , LambdaCase + , MultiParamTypeClasses + , OverloadedStrings + , QuasiQuotes + , RecordWildCards + , ScopedTypeVariables + , StandaloneDeriving + , TupleSections + , TypeApplications + , TypeOperators + , TypeFamilies + , TemplateHaskell + + + build-depends: hbs2-core, hbs2-peer + , attoparsec + , aeson + , async + , base16-bytestring + , bytestring + , cache + , containers + , streaming + , streaming-bytestring + , streaming-commons + , streaming-utils + , cryptonite + , directory + , exceptions + , filelock + , filepath + , filepattern + , generic-lens + , hashable + , http-conduit + , interpolatedstring-perl6 + , memory + , microlens-platform + , mtl + , prettyprinter + , prettyprinter-ansi-terminal + , random + , resourcet + , safe + , saltine + , serialise + , split + , sqlite-simple + , stm + , suckless-conf + , temporary + , text + , time + , timeit + , transformers + , typed-process + , uniplate + , unliftio + , unliftio-core + , unordered-containers + , wai-app-file-cgi + , wai-extra + +executable hbs2-fixer + import: shared-properties + main-is: Main.hs + + ghc-options: + -threaded + -rtsopts + "-with-rtsopts=-N4 -A64m -AL256m -I0" + + other-modules: + + -- other-extensions: + build-depends: + base, hbs2-core, hbs2-peer + , optparse-applicative + , unliftio + + hs-source-dirs: app + default-language: GHC2021 + + +