2024-09-18 13:16:36 -05:00
|
|
|
{
|
|
|
|
description = "HELPS";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
2024-10-13 12:51:17 -05:00
|
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
packageName = "HELPS";
|
|
|
|
containerPackageName = "${packageName}-container";
|
|
|
|
|
2024-10-16 15:54:34 -05:00
|
|
|
c2n = haskellPackages.callCabal2nix packageName self rec {};
|
|
|
|
HELPS = c2n.overrideAttrs (old: {
|
|
|
|
doHaddock = true;
|
|
|
|
enableSeparateDocOutput = false;
|
|
|
|
enableSharedExecutables = false;
|
|
|
|
enableSharedLibraries = false;
|
|
|
|
});
|
2024-10-13 12:51:17 -05:00
|
|
|
|
2024-10-16 15:54:34 -05:00
|
|
|
haskellPackages = pkgs.haskellPackages;
|
2024-10-13 12:51:17 -05:00
|
|
|
in {
|
2024-10-16 15:54:34 -05:00
|
|
|
packages.${packageName} = pkgs.haskell.lib.justStaticExecutables HELPS;
|
|
|
|
packages.HELPSDocs = HELPS;
|
2024-10-13 12:51:17 -05:00
|
|
|
|
|
|
|
packages.default = self.packages.${system}.${packageName};
|
|
|
|
defaultPackage = self.packages.${system}.default;
|
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
2024-10-16 15:54:34 -05:00
|
|
|
pkgs.haskellPackages.cabal-install
|
|
|
|
pkgs.haskellPackages.ghc
|
|
|
|
pkgs.haskellPackages.ghcid
|
|
|
|
pkgs.haskellPackages.haskell-language-server
|
2024-10-13 12:51:17 -05:00
|
|
|
];
|
|
|
|
inputsFrom = builtins.attrValues self.packages.${system};
|
|
|
|
};
|
|
|
|
devShell = self.devShells.${system}.default;
|
|
|
|
|
|
|
|
packages.${containerPackageName} = pkgs.dockerTools.buildImage {
|
|
|
|
name = "HELPS";
|
|
|
|
|
|
|
|
copyToRoot = pkgs.buildEnv {
|
|
|
|
name = "image-root";
|
|
|
|
paths = [ HELPS ];
|
|
|
|
pathsToLink = [ "/bin" ];
|
2024-09-18 13:16:36 -05:00
|
|
|
};
|
2024-10-13 12:51:17 -05:00
|
|
|
tag = "latest";
|
|
|
|
config = {
|
|
|
|
Cmd = [
|
|
|
|
"/bin/Purr"
|
|
|
|
];
|
|
|
|
WorkingDir = "/app";
|
|
|
|
ExposedPorts = {
|
|
|
|
"3000/tcp" = {};
|
2024-09-18 13:16:36 -05:00
|
|
|
};
|
2024-10-13 12:51:17 -05:00
|
|
|
extraCommands = ''
|
|
|
|
'';
|
2024-09-18 13:16:36 -05:00
|
|
|
};
|
2024-10-13 12:51:17 -05:00
|
|
|
};
|
|
|
|
});
|
2024-09-18 13:16:36 -05:00
|
|
|
}
|