45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
|
|
#
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
{
|
|
description = "Sheet parser hacked together in Haskell";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
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;
|
|
|
|
jailbreakUnbreak = pkg:
|
|
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
|
|
|
|
packageName = "sheet-parser-hs";
|
|
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 pkgs; [
|
|
haskellPackages.haskell-language-server # you must build it with your ghc to work
|
|
ghcid
|
|
cabal-install
|
|
stylish-haskell
|
|
];
|
|
inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system});
|
|
};
|
|
devShell = self.devShells.${system}.default;
|
|
});
|
|
}
|