Created
November 6, 2024 19:54
-
-
Save p1xelHer0/4907d0b95ed47321e48f3f8e507cfd09 to your computer and use it in GitHub Desktop.
Haskell flake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Haskell"; | |
inputs = { | |
nixpkgs.url = "github:nixos/nixpkgs/haskell-updates"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
haskellPackages = pkgs.haskell.packages.ghc9101; | |
packageName = "aoc"; | |
in | |
{ | |
packages.${packageName} = | |
haskellPackages.callCabal2nix packageName self rec { | |
# Dependency overrides go here | |
}; | |
packages.default = self.packages.${system}.${packageName}; | |
defaultPackage = self.packages.${system}.default; | |
devShells.default = pkgs.mkShell { | |
buildInputs = with haskellPackages; [ | |
ghc | |
haskell-language-server | |
ghcid | |
cabal-install | |
]; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment