mateamt/flake.nix

41 lines
1.1 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};
2022-09-29 02:25:54 +00:00
haskellPackages = pkgs.haskellPackages;
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-03-05 04:35:53 +00:00
openapi3 = jailbreakUnbreak haskellPackages.openapi3;
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
});
}