Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a migrate output to the IHP flake #1762

Merged
merged 4 commits into from
Jul 21, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ ihpFlake:
optimized = false;
};


migrate =
let
projectSrc = pkgs.nix-gitignore.gitignoreSource [] cfg.projectPath;
mpscholten marked this conversation as resolved.
Show resolved Hide resolved
in
pkgs.writeScriptBin "migrate" ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest to prefix with ihp- to be on the safe side to avoid (probably unlikely) collision with nixpkgs with the same namespace

Suggested change
pkgs.writeScriptBin "migrate" ''
pkgs.writeScriptBin "ihp-migrate" ''

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as this package is build with nix build it shouldn't cause any collision. I'd prefer to not introduce two names for the same binary, otherwise it will be confusing to other people in the future 👍

${ghcCompiler.ihp}/bin/migrate
'';

ihp-schema = pkgs.stdenv.mkDerivation {
name = "ihp-schema";
src = ihp;
Expand Down
Loading