mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
shmig: init at 2017-07-24
This commit is contained in:
parent
a8a38feeeb
commit
02b15a418a
40
pkgs/development/tools/database/shmig/default.nix
Normal file
40
pkgs/development/tools/database/shmig/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -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 { }
|
||||
|
Loading…
Reference in New Issue
Block a user