46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{
|
|
description = "tricu";
|
|
|
|
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};
|
|
packageName = "tricu";
|
|
containerPackageName = "${packageName}-container";
|
|
|
|
customGHC = pkgs.haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
|
|
megaparsec
|
|
]);
|
|
|
|
haskellPackages = pkgs.haskellPackages;
|
|
|
|
enableSharedExecutables = false;
|
|
enableSharedLibraries = false;
|
|
|
|
tricu = pkgs.haskell.lib.justStaticExecutables self.packages.${system}.default;
|
|
in {
|
|
|
|
packages.${packageName} =
|
|
haskellPackages.callCabal2nix packageName self rec {};
|
|
|
|
packages.default = self.packages.${system}.${packageName};
|
|
defaultPackage = self.packages.${system}.default;
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs.haskellPackages; [
|
|
cabal-install
|
|
ghcid
|
|
customGHC
|
|
];
|
|
inputsFrom = builtins.attrValues self.packages.${system};
|
|
};
|
|
devShell = self.devShells.${system}.default;
|
|
|
|
});
|
|
}
|