diff --git a/NixSupport/haskell-packages/ihp-migrate.nix b/NixSupport/haskell-packages/ihp-migrate.nix new file mode 100644 index 000000000..86f5ed8a4 --- /dev/null +++ b/NixSupport/haskell-packages/ihp-migrate.nix @@ -0,0 +1,12 @@ +{ mkDerivation, ihp, lib, with-utf8_1_1_0_0 }: +mkDerivation { + pname = "ihp-migrate"; + version = "1.3.0"; + src = ./../../ihp-migrate; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ ihp with-utf8_1_1_0_0 ]; + description = "Provides the IHP migrate binary"; + license = lib.licenses.mit; + mainProgram = "migrate"; +} \ No newline at end of file diff --git a/devenv-module.nix b/devenv-module.nix index 20d2ac6f2..737af7554 100644 --- a/devenv-module.nix +++ b/devenv-module.nix @@ -16,7 +16,7 @@ that is defined in flake-module.nix apps.migrate = { type = "app"; - program = "${ghcCompiler.ihp}/bin/migrate"; + program = "${ghcCompiler.ihp-migrate}/bin/migrate"; }; devenv.shells.default = { @@ -118,6 +118,7 @@ that is defined in flake-module.nix default = ghcCompiler.ihp; ide = ghcCompiler.ihp-ide; ssc = ghcCompiler.ihp-ssc; + migrate = ghcCompiler.ihp-migrate; }; }; } diff --git a/ihp-ide/ihp-ide.cabal b/ihp-ide/ihp-ide.cabal index 000063aa5..e933aedb8 100644 --- a/ihp-ide/ihp-ide.cabal +++ b/ihp-ide/ihp-ide.cabal @@ -293,12 +293,6 @@ executable new-migration hs-source-dirs: exe main-is: IHP/CLI/NewMigration.hs -executable migrate - import: shared-properties - build-depends: ihp, ihp-ide - hs-source-dirs: exe - main-is: IHP/CLI/Migrate.hs - executable hash-password import: shared-properties build-depends: ihp, ihp-ide diff --git a/ihp-ide/exe/IHP/CLI/Migrate.hs b/ihp-migrate/Migrate.hs similarity index 100% rename from ihp-ide/exe/IHP/CLI/Migrate.hs rename to ihp-migrate/Migrate.hs diff --git a/ihp-migrate/ihp-migrate.cabal b/ihp-migrate/ihp-migrate.cabal new file mode 100644 index 000000000..9eaf215d4 --- /dev/null +++ b/ihp-migrate/ihp-migrate.cabal @@ -0,0 +1,50 @@ +cabal-version: 2.2 +name: ihp-migrate +version: 1.3.0 +synopsis: Provides the IHP migrate binary +description: Postgres DB migrations +license: MIT +author: digitally induced GmbH +maintainer: support@digitallyinduced.com +bug-reports: https://github.com/digitallyinduced/ihp/issues +category: Database +build-type: Simple + +executable migrate + default-extensions: + OverloadedStrings + , NoImplicitPrelude + , ImplicitParams + , Rank2Types + , NamedFieldPuns + , TypeSynonymInstances + , FlexibleInstances + , DisambiguateRecordFields + , DuplicateRecordFields + , OverloadedLabels + , FlexibleContexts + , DataKinds + , QuasiQuotes + , TypeFamilies + , PackageImports + , ScopedTypeVariables + , RecordWildCards + , TypeApplications + , DataKinds + , InstanceSigs + , DeriveGeneric + , MultiParamTypeClasses + , TypeOperators + , DeriveDataTypeable + , DefaultSignatures + , BangPatterns + , FunctionalDependencies + , PartialTypeSignatures + , BlockArguments + , LambdaCase + , StandaloneDeriving + , TemplateHaskell + , OverloadedRecordDot + build-depends: ihp, with-utf8 + hs-source-dirs: . + main-is: Migrate.hs \ No newline at end of file