mateamt/flake.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

2022-09-16 13:57:37 +00:00
{
description = "A game stub written in Haskell";
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};
2023-07-07 22:16:05 +00:00
haskellPackages = pkgs.haskellPackages.override {
overrides = final: prev: {
openapi3 = jailbreakUnbreak (pkgs.haskell.lib.dontCheck prev.openapi3);
};
};
2022-09-16 13:57:37 +00:00
jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
packageName = "mateamt";
2023-03-05 04:35:53 +00:00
in rec {
2022-09-16 13:57:37 +00:00
packages.${packageName} = # (ref:haskell-package-def)
haskellPackages.callCabal2nix packageName self rec {
# Dependency overrides go here
2023-07-07 22:16:05 +00:00
postgresql-simple-migration = jailbreakUnbreak haskellPackages.postgresql-simple-migration;
2022-09-16 13:57:37 +00:00
};
defaultPackage = self.packages.${system}.${packageName};
2023-03-05 04:35:53 +00:00
devShell = haskellPackages.shellFor {
packages = p: [ defaultPackage ];
withHoogle = true;
buildInputs = with haskellPackages; [
haskell-language-server
ghcid
cabal-install
];
};
2022-09-16 13:57:37 +00:00
});
}