Query tankerkönig API with given apikey and station
This commit is contained in:
parent
b5d61674d8
commit
6603e65131
6 changed files with 242 additions and 48 deletions
24
flake.nix
24
flake.nix
|
|
@ -2,25 +2,27 @@
|
|||
description = "Tankerkönig-to-MQTT gateway";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
|
||||
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, pre-commit-hooks }:
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
let
|
||||
ghcv = "ghc96";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
overlay = final: prev: {
|
||||
tk2mqtt = final.callCabal2nix "tk2mqtt" ./. { };
|
||||
};
|
||||
|
||||
haskellPackages = pkgs.haskell.packages.ghc924.extend overlay;
|
||||
in {
|
||||
haskellPackages = pkgs.haskell.packages.${ghcv}.extend overlay;
|
||||
in
|
||||
{
|
||||
packages.default = haskellPackages.tk2mqtt;
|
||||
|
||||
apps = {
|
||||
|
|
@ -37,13 +39,14 @@
|
|||
checks = {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
settings = { ormolu.defaultExtensions = [ "GHC2021" ]; };
|
||||
tools.fourmolu = haskellPackages.fourmolu;
|
||||
hooks = {
|
||||
nixfmt.enable = true;
|
||||
fourmolu.enable = true;
|
||||
nixpkgs-fmt.enable = true;
|
||||
hpack.enable = true;
|
||||
hlint.enable = true;
|
||||
ormolu = {
|
||||
enable = true;
|
||||
settings.defaultExtensions = [ "GHC2021" ];
|
||||
};
|
||||
doctest = {
|
||||
enable = false;
|
||||
name = "Run documentation tests";
|
||||
|
|
@ -64,14 +67,15 @@
|
|||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
haskellPackages.haskell-language-server
|
||||
haskellPackages.fourmolu
|
||||
# haskellPackages.fourmolu
|
||||
haskellPackages.hspec-discover
|
||||
haskellPackages.doctest
|
||||
cabal-install
|
||||
ghcid
|
||||
nixfmt
|
||||
nixfmt-rfc-style
|
||||
hpack
|
||||
hlint
|
||||
yaml-language-server
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue