Add explicit flake inputs

This commit is contained in:
Kiana Sheibani 2023-01-18 13:57:35 -05:00
parent 51f9b9244e
commit 1917fbf881
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -1,10 +1,14 @@
{ {
description = "A haskell executable"; description = "A haskell executable";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }: outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
overlays = [];
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
# package/executable name # package/executable name
@ -22,10 +26,8 @@
withHoogle = false; withHoogle = false;
overrides = self: super: with pkgs.haskell.lib; { overrides = self: super: with pkgs.haskell.lib; {
# Use callCabal2nix to override Haskell dependencies here # Use callCabal2nix to override Haskell dependencies here
# cf. https://tek.brick.do/K3VXJd8mEKO7
# Example: # Example:
# > NanoID = self.callCabal2nix "NanoID" inputs.NanoID { }; # > NanoID = self.callCabal2nix "NanoID" inputs.NanoID { };
# Assumes that you have the 'NanoID' flake input defined.
}; };
modifier = drv: modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with hp; [ pkgs.haskell.lib.addBuildTools drv (with hp; [