Skip to content

Commit

Permalink
Separate cabal file per directory (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
KovalevDima authored Dec 31, 2024
1 parent 1d19333 commit 9c00d9f
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 86 deletions.
80 changes: 0 additions & 80 deletions QA/QA.cabal

This file was deleted.

File renamed without changes.
29 changes: 29 additions & 0 deletions QA/contribution/contribution.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Cabal-version: 3.4


name: QA
version: 0.0.0.1
build-type: Simple
license: BSD-3-Clause
license-file: LICENSE

data-files:
*.html
documentation.lhs

executable documentation-compiler
default-language: GHC2021
hs-source-dirs: .
main-is: documentation.lhs
build-depends:
base
, hakyll
, bytestring
, filepath
, time
, pandoc
ghc-options:
-threaded -Wall
-main-is DocumentationCompiler
-pgmL markdown-unlit
build-tool-depends: markdown-unlit:markdown-unlit
30 changes: 30 additions & 0 deletions QA/testing/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Copyright (c) 2024, Kovalev Dmitry

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of Kovalev Dmitry nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions QA/testing/tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ executable tests
executable prof-simple
import: dump-core
main-is: PT1Simple.hs
hs-source-dirs: testing
hs-source-dirs: .
ghc-options:
-O2 -threaded
-main-is PT1Simple
Expand All @@ -63,7 +63,7 @@ executable prof-simple
executable prof-1bil-stream
import: dump-core
main-is: PT2OneBillionStream.hs
hs-source-dirs: testing
hs-source-dirs: .
ghc-options:
-O2 -threaded
-main-is PT2OneBillionStream
Expand Down
30 changes: 30 additions & 0 deletions QA/usage/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Copyright (c) 2024, Kovalev Dmitry

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of Kovalev Dmitry nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 changes: 35 additions & 0 deletions QA/usage/usage.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Cabal-version: 3.4


name: usage
version: 0.0.0.1
build-type: Simple
license: BSD-3-Clause
license-file: LICENSE

-- * API

executable insertInto
default-language: GHC2021
main-is: insertInto.lhs
build-depends:
ClickHaskell
, base >=4.7 && <5
, bytestring
ghc-options:
-pgmL markdown-unlit
-main-is Writing
-Wall
build-tool-depends: markdown-unlit:markdown-unlit

executable selectFromView
default-language: GHC2021
main-is: selectFromView.lhs
build-depends:
ClickHaskell
, base >=4.7 && <5
ghc-options:
-pgmL markdown-unlit
-main-is ReadingView
-Wall
build-tool-depends: markdown-unlit:markdown-unlit
4 changes: 3 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
packages:
./
./QA
./QA/contribution
./QA/usage
./QA/testing
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
in {
imports = [inputs.services-flake.processComposeModules.default];
services.clickhouse."${programName}-db" = wrapDefaultClickHouse [
(extractSqlFromMarkdown ./QA/profiling/PT1Simple.hs)
(extractSqlFromMarkdown ./QA/testing/PT1Simple.hs)
];
settings.processes.${programName} = {
command = "${self'.apps.${programName}.program}";
Expand Down Expand Up @@ -119,7 +119,7 @@
libraryProfiling = true;
haddock = true;
};
QA = {
tests = {
executableProfiling = true;
libraryProfiling = true;
};
Expand All @@ -143,7 +143,7 @@
src = pkgs.nix-gitignore.gitignoreSourcePure [] ./.;

buildPhase = ''
${lib.getExe' self'.packages.QA "documentation-compiler"} build --verbose
${lib.getExe' self'.packages.contribution "documentation-compiler"} build --verbose
'';

installPhase = ''
Expand Down

0 comments on commit 9c00d9f

Please sign in to comment.