Skip to content

Commit

Permalink
Add appName To options for flake. (#1993)
Browse files Browse the repository at this point in the history
* adding appName to flake options and trying to work around hls issue.

* updated appName in mkDerivation.

* updated flake.

* removing changes to hls from appName PR.

* delted pName comments, fixed indentation and spacing around equals sign.
  • Loading branch information
Montmorency authored Aug 1, 2024
1 parent bfc37c4 commit 040d1b2
Show file tree
Hide file tree
Showing 3 changed files with 662 additions and 58 deletions.
3 changes: 2 additions & 1 deletion NixSupport/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, optimized ? false
, includeDevTools ? !optimized # Include Postgres?
, rtsFlags ? ""
, appName ? "app"
, optimizationLevel ? "2"
}:

Expand All @@ -32,7 +33,7 @@ let
else "build/bin/RunJobs";
in
pkgs.stdenv.mkDerivation {
name = "app";
name = appName;
buildPhase = ''
runHook preBuild
Expand Down
10 changes: 10 additions & 0 deletions flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ ihpFlake:
];
};

appName = lib.mkOption {
description = ''
The derivation name.
'';
type = lib.types.str;
default = "app";
};

projectPath = lib.mkOption {
description = ''
Path to the IHP project. You likely want to set this to `./.`.
Expand Down Expand Up @@ -139,6 +147,7 @@ ihpFlake:
pkgs = pkgs;
rtsFlags = cfg.rtsFlags;
optimizationLevel = cfg.optimizationLevel;
appName = cfg.appName;
};

unoptimized-prod-server = import "${ihp}/NixSupport/default.nix" {
Expand All @@ -152,6 +161,7 @@ ihpFlake:
pkgs = pkgs;
rtsFlags = cfg.rtsFlags;
optimizationLevel = "0";
appName = cfg.appName;
};

unoptimized-docker-image = pkgs.dockerTools.buildImage {
Expand Down
Loading

0 comments on commit 040d1b2

Please sign in to comment.