format
Some checks failed
Hydra packages.x86_64-linux.default Hydra build #48488 of flakes:matrix-media-expanded:packages.x86_64-linux.default
Hydra packages.x86_64-linux.matrix-media-expanded Hydra build #48492 of flakes:matrix-media-expanded:packages.x86_64-linux.matrix-media-expanded
Hydra checks.aarch64-darwin.treefmt Hydra build #48489 of flakes:matrix-media-expanded:checks.aarch64-darwin.treefmt
Hydra checks.x86_64-darwin.treefmt Hydra build #48491 of flakes:matrix-media-expanded:checks.x86_64-darwin.treefmt
Hydra checks.x86_64-linux.treefmt Hydra build #48493 of flakes:matrix-media-expanded:checks.x86_64-linux.treefmt
Hydra checks.aarch64-linux.treefmt Hydra build #48490 of flakes:matrix-media-expanded:checks.aarch64-linux.treefmt
Hydra packages.aarch64-linux.default Hydra build #48487 of flakes:matrix-media-expanded:packages.aarch64-linux.default
Hydra packages.aarch64-linux.matrix-media-expanded Hydra build #48494 of flakes:matrix-media-expanded:packages.aarch64-linux.matrix-media-expanded
Some checks failed
Hydra packages.x86_64-linux.default Hydra build #48488 of flakes:matrix-media-expanded:packages.x86_64-linux.default
Hydra packages.x86_64-linux.matrix-media-expanded Hydra build #48492 of flakes:matrix-media-expanded:packages.x86_64-linux.matrix-media-expanded
Hydra checks.aarch64-darwin.treefmt Hydra build #48489 of flakes:matrix-media-expanded:checks.aarch64-darwin.treefmt
Hydra checks.x86_64-darwin.treefmt Hydra build #48491 of flakes:matrix-media-expanded:checks.x86_64-darwin.treefmt
Hydra checks.x86_64-linux.treefmt Hydra build #48493 of flakes:matrix-media-expanded:checks.x86_64-linux.treefmt
Hydra checks.aarch64-linux.treefmt Hydra build #48490 of flakes:matrix-media-expanded:checks.aarch64-linux.treefmt
Hydra packages.aarch64-linux.default Hydra build #48487 of flakes:matrix-media-expanded:packages.aarch64-linux.default
Hydra packages.aarch64-linux.matrix-media-expanded Hydra build #48494 of flakes:matrix-media-expanded:packages.aarch64-linux.matrix-media-expanded
This commit is contained in:
parent
f5fda366a1
commit
a1d56f65ae
2 changed files with 114 additions and 114 deletions
201
flake.nix
201
flake.nix
|
@ -12,7 +12,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs:
|
outputs = inputs:
|
||||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
systems = import inputs.systems;
|
systems = import inputs.systems;
|
||||||
imports = [
|
imports = [
|
||||||
inputs.haskell-flake.flakeModule
|
inputs.haskell-flake.flakeModule
|
||||||
|
@ -20,125 +20,124 @@
|
||||||
inputs.flake-root.flakeModule
|
inputs.flake-root.flakeModule
|
||||||
inputs.mission-control.flakeModule
|
inputs.mission-control.flakeModule
|
||||||
];
|
];
|
||||||
perSystem = {
|
perSystem =
|
||||||
self',
|
{ self'
|
||||||
system,
|
, system
|
||||||
lib,
|
, lib
|
||||||
config,
|
, config
|
||||||
pkgs,
|
, pkgs
|
||||||
...
|
, ...
|
||||||
}: {
|
}: {
|
||||||
# Our only Haskell project. You can have multiple projects, but this template
|
# Our only Haskell project. You can have multiple projects, but this template
|
||||||
# has only one.
|
# has only one.
|
||||||
# See https://github.com/srid/haskell-flake/blob/master/example/flake.nix
|
# See https://github.com/srid/haskell-flake/blob/master/example/flake.nix
|
||||||
haskellProjects.default = {
|
haskellProjects.default = {
|
||||||
# The base package set (this value is the default)
|
# The base package set (this value is the default)
|
||||||
# basePackages = pkgs.haskellPackages;
|
# basePackages = pkgs.haskellPackages;
|
||||||
|
|
||||||
# Packages to add on top of `basePackages`
|
# Packages to add on top of `basePackages`
|
||||||
packages = {
|
packages = {
|
||||||
# Add source or Hackage overrides here
|
# Add source or Hackage overrides here
|
||||||
# (Local packages are added automatically)
|
# (Local packages are added automatically)
|
||||||
/*
|
/*
|
||||||
aeson.source = "1.5.0.0" # Hackage version
|
aeson.source = "1.5.0.0" # Hackage version
|
||||||
shower.source = inputs.shower; # Flake input
|
shower.source = inputs.shower; # Flake input
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
# Add your package overrides here
|
# Add your package overrides here
|
||||||
settings = {
|
settings = {
|
||||||
/*
|
/*
|
||||||
haskell-template = {
|
haskell-template = {
|
||||||
haddock = false;
|
haddock = false;
|
||||||
};
|
};
|
||||||
aeson = {
|
aeson = {
|
||||||
check = false;
|
check = false;
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
# Development shell configuration
|
||||||
|
devShell = {
|
||||||
|
# TODO: Remove this after https://github.com/numtide/treefmt-nix/issues/65
|
||||||
|
tools = hp:
|
||||||
|
{
|
||||||
|
treefmt = config.treefmt.build.wrapper;
|
||||||
|
}
|
||||||
|
// config.treefmt.build.programs;
|
||||||
|
hlsCheck.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# What should haskell-flake add to flake outputs?
|
||||||
|
autoWire = [ "packages" "apps" "checks" ]; # Wire all but the devShell
|
||||||
};
|
};
|
||||||
|
|
||||||
# Development shell configuration
|
# Auto formatters. This also adds a flake check to ensure that the
|
||||||
devShell = {
|
# source tree was auto formatted.
|
||||||
# TODO: Remove this after https://github.com/numtide/treefmt-nix/issues/65
|
treefmt.config = {
|
||||||
tools = hp:
|
inherit (config.flake-root) projectRootFile;
|
||||||
{
|
package = pkgs.treefmt;
|
||||||
treefmt = config.treefmt.build.wrapper;
|
|
||||||
}
|
programs.ormolu.enable = true;
|
||||||
// config.treefmt.build.programs;
|
programs.nixpkgs-fmt.enable = true;
|
||||||
hlsCheck.enable = true;
|
programs.cabal-fmt.enable = true;
|
||||||
|
programs.hlint.enable = true;
|
||||||
|
|
||||||
|
# We use fourmolu
|
||||||
|
programs.ormolu.package = pkgs.haskellPackages.fourmolu;
|
||||||
|
settings.formatter.ormolu = {
|
||||||
|
options = [
|
||||||
|
"--ghc-opt"
|
||||||
|
"-XImportQualifiedPost"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# What should haskell-flake add to flake outputs?
|
# Dev shell scripts.
|
||||||
autoWire = ["packages" "apps" "checks"]; # Wire all but the devShell
|
mission-control.scripts = {
|
||||||
};
|
docs = {
|
||||||
|
description = "Start Hoogle server for project dependencies";
|
||||||
|
exec = ''
|
||||||
|
echo http://127.0.0.1:8888
|
||||||
|
hoogle serve -p 8888 --local
|
||||||
|
'';
|
||||||
|
category = "Dev Tools";
|
||||||
|
};
|
||||||
|
repl = {
|
||||||
|
description = "Start the cabal repl";
|
||||||
|
exec = ''
|
||||||
|
cabal repl "$@"
|
||||||
|
'';
|
||||||
|
category = "Dev Tools";
|
||||||
|
};
|
||||||
|
fmt = {
|
||||||
|
description = "Format the source tree";
|
||||||
|
exec = config.treefmt.build.wrapper;
|
||||||
|
category = "Dev Tools";
|
||||||
|
};
|
||||||
|
run = {
|
||||||
|
description = "Run the project with ghcid auto-recompile";
|
||||||
|
exec = ''
|
||||||
|
ghcid -c "cabal repl exe:matrix-media-expanded" --warnings -T :main
|
||||||
|
'';
|
||||||
|
category = "Primary";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Auto formatters. This also adds a flake check to ensure that the
|
# Default package & app.
|
||||||
# source tree was auto formatted.
|
packages.default = self'.packages.matrix-media-expanded;
|
||||||
treefmt.config = {
|
apps.default = self'.apps.matrix-media-expanded;
|
||||||
inherit (config.flake-root) projectRootFile;
|
|
||||||
package = pkgs.treefmt;
|
|
||||||
|
|
||||||
programs.ormolu.enable = true;
|
# Default shell.
|
||||||
programs.nixpkgs-fmt.enable = true;
|
devShells.default = pkgs.mkShell {
|
||||||
programs.cabal-fmt.enable = true;
|
name = "matrix-media-expanded";
|
||||||
programs.hlint.enable = true;
|
inputsFrom = [
|
||||||
|
config.haskellProjects.default.outputs.devShell
|
||||||
# We use fourmolu
|
config.flake-root.devShell
|
||||||
programs.ormolu.package = pkgs.haskellPackages.fourmolu;
|
config.mission-control.devShell
|
||||||
settings.formatter.ormolu = {
|
|
||||||
options = [
|
|
||||||
"--ghc-opt"
|
|
||||||
"-XImportQualifiedPost"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Dev shell scripts.
|
|
||||||
mission-control.scripts = {
|
|
||||||
docs = {
|
|
||||||
description = "Start Hoogle server for project dependencies";
|
|
||||||
exec = ''
|
|
||||||
echo http://127.0.0.1:8888
|
|
||||||
hoogle serve -p 8888 --local
|
|
||||||
'';
|
|
||||||
category = "Dev Tools";
|
|
||||||
};
|
|
||||||
repl = {
|
|
||||||
description = "Start the cabal repl";
|
|
||||||
exec = ''
|
|
||||||
cabal repl "$@"
|
|
||||||
'';
|
|
||||||
category = "Dev Tools";
|
|
||||||
};
|
|
||||||
fmt = {
|
|
||||||
description = "Format the source tree";
|
|
||||||
exec = config.treefmt.build.wrapper;
|
|
||||||
category = "Dev Tools";
|
|
||||||
};
|
|
||||||
run = {
|
|
||||||
description = "Run the project with ghcid auto-recompile";
|
|
||||||
exec = ''
|
|
||||||
ghcid -c "cabal repl exe:matrix-media-expanded" --warnings -T :main
|
|
||||||
'';
|
|
||||||
category = "Primary";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Default package & app.
|
|
||||||
packages.default = self'.packages.matrix-media-expanded;
|
|
||||||
apps.default = self'.apps.matrix-media-expanded;
|
|
||||||
|
|
||||||
# Default shell.
|
|
||||||
devShells.default = pkgs.mkShell {
|
|
||||||
name = "matrix-media-expanded";
|
|
||||||
inputsFrom = [
|
|
||||||
config.haskellProjects.default.outputs.devShell
|
|
||||||
config.flake-root.devShell
|
|
||||||
config.mission-control.devShell
|
|
||||||
];
|
|
||||||
};
|
|
||||||
formatter = pkgs.alejandra;
|
|
||||||
};
|
|
||||||
flake = {
|
flake = {
|
||||||
hydraJobs = {
|
hydraJobs = {
|
||||||
inherit (inputs.self) packages devShells checks;
|
inherit (inputs.self) packages devShells checks;
|
||||||
|
|
|
@ -93,30 +93,31 @@ common shared
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
library
|
library
|
||||||
import: shared
|
import: shared
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
Codec.Multibase
|
Codec.Multibase
|
||||||
, Codec.Multibase.Error
|
Codec.Multibase.Error
|
||||||
, Codec.Multibase.Identity
|
Codec.Multibase.Identity
|
||||||
|
|
||||||
executable matrix-media-expanded
|
executable matrix-media-expanded
|
||||||
import: shared
|
import: shared
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
|
|
||||||
test-suite test
|
test-suite test
|
||||||
import: shared
|
import: shared
|
||||||
build-depends:
|
build-depends:
|
||||||
, tasty
|
, tasty
|
||||||
, tasty-smallcheck
|
|
||||||
, tasty-quickcheck
|
|
||||||
, tasty-hunit
|
, tasty-hunit
|
||||||
type: exitcode-stdio-1.0
|
, tasty-quickcheck
|
||||||
|
, tasty-smallcheck
|
||||||
|
|
||||||
|
type: exitcode-stdio-1.0
|
||||||
hs-source-dirs: test
|
hs-source-dirs: test
|
||||||
main-is: Test.hs
|
main-is: Test.hs
|
||||||
ghc-options: -main-is Test
|
ghc-options: -main-is Test
|
||||||
other-modules:
|
other-modules:
|
||||||
Codec.Multibase.Error
|
Codec.Multibase.Error
|
||||||
, Codec.Multibase.Identity
|
Codec.Multibase.Identity
|
||||||
, Test.Codec
|
Test.Codec
|
||||||
, Test.Codec.Multibase
|
Test.Codec.Multibase
|
||||||
, Test.Codec.Multibase.Identity
|
Test.Codec.Multibase.Identity
|
||||||
|
|
Loading…
Reference in a new issue