shmig: init at 2017-07-24

This commit is contained in:
Maximilian Bosch 2017-10-18 23:24:31 +02:00
parent a8a38feeeb
commit 02b15a418a
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,40 @@
{ stdenv, fetchFromGitHub
, withMySQL ? false, withPSQL ? false, withSQLite ? false
, mariadb, postgresql, sqlite, gawk, which
, lib
}:
stdenv.mkDerivation {
name = "shmig-2017-07-24";
src = fetchFromGitHub {
owner = "mbucc";
repo = "shmig";
rev = "aff54e03d13f8f95b422cf898505490a56152a4a";
sha256 = "08q94dka5yqkzkis3w7j1q8kc7d3kk7mb2drx8ms59jcqvp847j3";
};
makeFlags = [ "PREFIX=$(out)" ];
postPatch = ''
patchShebangs .
substituteInPlace shmig \
--replace "\`which mysql\`" "${lib.optionalString withMySQL "${mariadb}/bin/mysql"}" \
--replace "\`which psql\`" "${lib.optionalString withPSQL "${postgresql}/bin/psql"}" \
--replace "\`which sqlite3\`" "${lib.optionalString withSQLite "${sqlite}/bin/sqlite3"}" \
--replace "awk" "${gawk}/bin/awk" \
--replace "which" "${which}/bin/which"
'';
preBuild = ''
mkdir -p $out/bin
'';
meta = with stdenv.lib; {
description = "Minimalistic database migration tool with MySQL, PostgreSQL and SQLite support";
homepage = "https://github.com/mbucc/shmig";
license = licenses.bsd3;
maintainers = with maintainers; [ ma27 ];
};
}

View File

@ -6263,6 +6263,8 @@ with pkgs;
serpent = callPackage ../development/compilers/serpent { };
shmig = callPackage ../development/tools/database/shmig { };
smlnjBootstrap = callPackage ../development/compilers/smlnj/bootstrap.nix { };
smlnj = if stdenv.isDarwin
then callPackage ../development/compilers/smlnj { }