45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{
|
|
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};
|
|
|
|
haskellPackages = pkgs.haskellPackages.override {
|
|
overrides = final: prev: {
|
|
openapi3 = jailbreakUnbreak (pkgs.haskell.lib.dontCheck prev.openapi3);
|
|
};
|
|
};
|
|
|
|
jailbreakUnbreak = pkg:
|
|
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
|
|
|
|
packageName = "mateamt";
|
|
in rec {
|
|
packages.${packageName} = # (ref:haskell-package-def)
|
|
haskellPackages.callCabal2nix packageName self rec {
|
|
# Dependency overrides go here
|
|
postgresql-simple-migration = jailbreakUnbreak haskellPackages.postgresql-simple-migration;
|
|
jose = haskellPackages.jose_0_10;
|
|
};
|
|
|
|
defaultPackage = self.packages.${system}.${packageName};
|
|
|
|
devShell = haskellPackages.shellFor {
|
|
packages = p: [ defaultPackage ];
|
|
withHoogle = true;
|
|
buildInputs = with haskellPackages; [
|
|
haskell-language-server
|
|
ghcid
|
|
cabal-install
|
|
];
|
|
};
|
|
});
|
|
}
|
|
|