matebeamter/flake.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

2022-09-16 14:09:48 +00:00
{
description = "A game stub written in Haskell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
2022-09-16 14:10:51 +00:00
mateamt-src.url = "git+https://gitea.nek0.eu/nek0/mateamt";
2022-09-16 14:09:48 +00:00
};
2022-09-16 14:12:27 +00:00
outputs = { self, nixpkgs, flake-utils, mateamt-src }:
2022-09-16 14:09:48 +00:00
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
2022-09-16 14:18:08 +00:00
haskellPackages = pkgs.haskellPackages.override {
overrides = hself: hsuper: {
i18n = with pkgs.haskell.lib;
doJailbreak (unmarkBroken (dontCheck hsuper.i18n));
};
};
2022-09-16 14:09:48 +00:00
jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
2022-09-16 14:10:51 +00:00
packageName = "matebeamter";
2022-09-16 14:09:48 +00:00
in {
packages.${packageName} = # (ref:haskell-package-def)
haskellPackages.callCabal2nix packageName self rec {
2022-09-16 14:12:27 +00:00
mateamt = mateamt-src.defaultPackage.${system};
2022-09-16 14:09:48 +00:00
};
defaultPackage = self.packages.${system}.${packageName};
devShell = pkgs.mkShell {
buildInputs = with haskellPackages; [
haskell-language-server
ghcid
cabal-install
];
inputsFrom = builtins.attrValues self.packages.${system};
};
});
}