2023-08-08 03:39:41 +02:00
|
|
|
# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
{
|
2023-08-08 03:45:07 +02:00
|
|
|
description = "A silly battery parser";
|
2023-08-08 03:39:41 +02:00
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
|
|
|
haskellPackages = pkgs.haskellPackages;
|
|
|
|
|
|
|
|
jailbreakUnbreak = pkg:
|
|
|
|
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
|
|
|
|
|
|
|
|
packageName = "obtuse";
|
|
|
|
in {
|
|
|
|
packages.${packageName} =
|
|
|
|
haskellPackages.callCabal2nix packageName self rec {
|
|
|
|
# Dependency overrides go here
|
|
|
|
};
|
|
|
|
|
|
|
|
packages.default = self.packages.${system}.${packageName};
|
|
|
|
defaultPackage = self.packages.${system}.default;
|
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
haskellPackages.haskell-language-server # you must build it with your ghc to work
|
|
|
|
ghcid
|
|
|
|
cabal-install
|
|
|
|
];
|
|
|
|
inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system});
|
|
|
|
};
|
|
|
|
devShell = self.devShells.${system}.default;
|
|
|
|
});
|
|
|
|
}
|