uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{ lib, fetchurl, appimageTools, pkgs }:
let
pname = "beekeeper-studio";
version = "3.3.8";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/beekeeper-studio/beekeeper-studio/releases/download/v${version}/Beekeeper-Studio-${version}.AppImage";
name = "${pname}-${version}.AppImage";
sha512 = "sha512-riBKlvOzBovJhXUf7YX6SJKshxwGiQR0jyWHfJRkq9+WMspPkpXg4sJMXziARHaa6durXZtqCfzQ08HrfqA4Qg==";
};
appimageContents = appimageTools.extractType2 {
inherit name src;
};
in
appimageTools.wrapType2 {
inherit name src;
multiPkgs = null; # no 32bit needed
extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
extraInstallCommands = ''
ln -s $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with lib; {
description = "Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows";
homepage = "https://www.beekeeperstudio.io";
changelog = "https://github.com/beekeeper-studio/beekeeper-studio/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ milogert alexnortung ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,58 @@
{ stdenv, lib, fetchurl, fetchFromGitHub }:
let
version = "0.75";
sha256 = "1iajg55n47hqxcpdzmyq4g4aprx7bzxcp885i850h355k5vmf68r";
# Please dont forget to update the docs:
# clone https://github.com/Profpatsch/cdb-docs
# and create a pull request with the result of running
# ./update <version>
# from the repositorys root folder.
docRepo = fetchFromGitHub {
owner = "Profpatsch";
repo = "cdb-docs";
rev = "359b6c55c9e170ebfc88f3f38face8ae2315eacb";
sha256 = "1y0ivviy58i0pmavhvrpznc4yjigjknff298gnw9rkg5wxm0gbbq";
};
in stdenv.mkDerivation {
pname = "cdb";
inherit version;
src = fetchurl {
url = "https://cr.yp.to/cdb/cdb-${version}.tar.gz";
inherit sha256;
};
outputs = [ "bin" "doc" "out" ];
postPatch = ''
# A little patch, borrowed from Archlinux AUR, borrowed from Gentoo Portage
sed -e 's/^extern int errno;$/#include <errno.h>/' -i error.h
'';
postInstall = ''
# don't use make setup, but move the binaries ourselves
mkdir -p $bin/bin
install -m 755 -t $bin/bin/ cdbdump cdbget cdbmake cdbmake-12 cdbmake-sv cdbstats cdbtest
# patch paths in scripts
function cdbmake-subst {
substituteInPlace $bin/bin/$1 \
--replace /usr/local/bin/cdbmake $bin/bin/cdbmake
}
cdbmake-subst cdbmake-12
cdbmake-subst cdbmake-sv
# docs
mkdir -p $doc/share/cdb
cp -r "${docRepo}/docs" $doc/share/cdb/html
'';
meta = {
homepage = "https://cr.yp.to/cdb.html";
license = lib.licenses.publicDomain;
maintainers = [ lib.maintainers.Profpatsch ];
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,27 @@
{ buildGoModule, lib, fetchFromGitHub }:
buildGoModule rec {
pname = "clickhouse-backup";
version = "1.4.0";
src = fetchFromGitHub {
owner = "AlexAkulov";
repo = pname;
rev = "v${version}";
sha256 = "sha256-NlOYRgCsReEeP/X98fddVRLnTnkqsiwpCg6MpdRcfZ0=";
};
vendorSha256 = "sha256-F+FfZESB/m/2m4RnYzFPs0PL5+8lyxzEwAdHMykrFsw=";
postConfigure = ''
export CGO_ENABLED=0
'';
meta = with lib; {
homepage = "https://github.com/AlexAkulov/clickhouse-backup";
description = "Tool for easy ClickHouse backup and restore with cloud storages support";
license = licenses.mit;
maintainers = with maintainers; [ ma27 ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "dbmate";
version = "1.15.0";
src = fetchFromGitHub {
owner = "amacneil";
repo = "dbmate";
rev = "v${version}";
sha256 = "sha256-eBes5BqoR7K6ntCKjWECwWuoTwAodNtLqcTei5WocLU=";
};
vendorSha256 = "sha256-U9VTS0rmLHxweFiIcFyoybHMBihy5ezloDC2iLc4IMc=";
doCheck = false;
meta = with lib; {
description = "Database migration tool";
homepage = "https://github.com/amacneil/dbmate";
license = licenses.mit;
maintainers = [ maintainers.manveru ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,22 @@
{ lib, stdenv, fetchurl, postgresql, getopt, makeWrapper }:
stdenv.mkDerivation rec {
pname = "ephemeralpg";
version = "3.1";
src = fetchurl {
url = "http://ephemeralpg.org/code/${pname}-${version}.tar.gz";
sha256 = "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out
PREFIX=$out make install
wrapProgram $out/bin/pg_tmp --prefix PATH : ${lib.makeBinPath [ postgresql getopt ]}
'';
meta = with lib; {
description = "Run tests on an isolated, temporary PostgreSQL database";
license = licenses.isc;
homepage = "http://ephemeralpg.org/";
platforms = platforms.all;
maintainers = with maintainers; [ hrdinka ];
};
}

View file

@ -0,0 +1,35 @@
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, CoreFoundation
, Security
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "gobang";
version = "0.1.0-alpha.5";
src = fetchFromGitHub {
owner = "tako8ki";
repo = pname;
rev = "v${version}";
sha256 = "02glb3hlprpdc72ji0248a7g0vr36yxr0gfbbms2m25v251dyaa6";
};
cargoSha256 = "sha256-Tiefet5gLpiuYY6Scg5fjnaPiZfVl5Gy2oZFdhgNRxY=";
buildInputs = lib.optionals stdenv.isDarwin [
CoreFoundation
Security
SystemConfiguration
];
meta = with lib; {
description = "A cross-platform TUI database management tool written in Rust";
homepage = "https://github.com/tako8ki/gobang";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};
}

View file

@ -0,0 +1,56 @@
{ stdenv
, fetchFromGitHub
, lib
, rustPlatform
, rustfmt
, protobuf
}:
let
src = fetchFromGitHub {
owner = "indradb";
repo = "indradb";
rev = "06134dde5bb53eb1d2aaa52afdaf9ff3bf1aa674";
sha256 = "sha256-g4Jam7yxMc+piYQzgMvVsNTF+ce1U3thzYl/M9rKG4o=";
};
meta = with lib; {
description = "A graph database written in rust ";
homepage = "https://github.com/indradb/indradb";
license = licenses.asl20;
maintainers = with maintainers; [ happysalada ];
platforms = platforms.unix;
};
in
{
indradb-server = rustPlatform.buildRustPackage {
pname = "indradb-server";
version = "unstable-2021-01-05";
inherit src;
cargoSha256 = "sha256-3WtiW31AkyNX7HiT/zqfNo2VSKR7Q57/wCigST066Js=";
buildAndTestSubdir = "server";
PROTOC = "${protobuf}/bin/protoc";
nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ];
# test rely on libindradb and it can't be found
# failure at https://github.com/indradb/indradb/blob/master/server/tests/plugins.rs#L63
# `let _server = Server::start(&format!("../target/debug/libindradb_plugin_*.{}", LIBRARY_EXTENSION)).unwrap();`
doCheck = false;
};
indradb-client = rustPlatform.buildRustPackage {
pname = "indradb-client";
version = "unstable-2021-01-05";
inherit src;
cargoSha256 = "sha256-pxan6W/CEsOxv8DbbytEBuIqxWn/C4qT4ze/RnvESOM=";
PROTOC = "${protobuf}/bin/protoc";
nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ];
buildAndTestSubdir = "client";
};
}

View file

@ -0,0 +1,83 @@
{ lib
, stdenv
, fetchurl
, jre
, makeWrapper
, mysqlSupport ? true
, mysql_jdbc
, postgresqlSupport ? true
, postgresql_jdbc
, redshiftSupport ? true
, redshift_jdbc
, liquibase_redshift_extension
}:
let
extraJars =
lib.optional mysqlSupport mysql_jdbc
++ lib.optional postgresqlSupport postgresql_jdbc
++ lib.optionals redshiftSupport [
redshift_jdbc
liquibase_redshift_extension
];
in
stdenv.mkDerivation rec {
pname = "liquibase";
version = "4.9.0";
src = fetchurl {
url = "https://github.com/liquibase/liquibase/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-1InRJzHqikm6Jd7z54TW6JFn3FO0LtStehWNaC+rdw8=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
unpackPhase = ''
tar xfz ${src}
'';
installPhase =
let addJars = dir: ''
for jar in ${dir}/*.jar; do
CP="\$CP":"\$jar"
done
'';
in
''
mkdir -p $out
mv ./{lib,licenses,liquibase.jar} $out/
mkdir -p $out/share/doc/${pname}-${version}
mv LICENSE.txt \
README.txt \
ABOUT.txt \
changelog.txt \
$out/share/doc/${pname}-${version}
mkdir -p $out/bin
# theres a lot of escaping, but Im not sure how to improve that
cat > $out/bin/liquibase <<EOF
#!/usr/bin/env bash
# taken from the executable script in the source
CP="$out/liquibase.jar"
${addJars "$out/lib"}
${lib.concatStringsSep "\n" (map (p: addJars "${p}/share/java") extraJars)}
${lib.getBin jre}/bin/java -cp "\$CP" \$JAVA_OPTS \
liquibase.integration.commandline.LiquibaseCommandLine \''${1+"\$@"}
EOF
chmod +x $out/bin/liquibase
'';
meta = with lib; {
description = "Version Control for your database";
homepage = "https://www.liquibase.org/";
changelog = "https://raw.githubusercontent.com/liquibase/liquibase/v${version}/changelog.txt";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
maintainers = with maintainers; [ ];
platforms = with platforms; unix;
};
}

View file

@ -0,0 +1,41 @@
{ lib
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "litecli";
version = "1.8.0";
disabled = python3Packages.pythonOlder "3.4";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "sha256-AvaSdHlwRlw7rN/o8GjcXZbyXVsrEh+XF37wVTBEED4=";
};
propagatedBuildInputs = with python3Packages; [
cli-helpers
click
configobj
prompt-toolkit
pygments
sqlparse
];
checkInputs = with python3Packages; [
pytestCheckHook
mock
];
pythonImportsCheck = [ "litecli" ];
meta = with lib; {
description = "Command-line interface for SQLite";
longDescription = ''
A command-line client for SQLite databases that has auto-completion and syntax highlighting.
'';
homepage = "https://litecli.com";
changelog = "https://github.com/dbcli/litecli/blob/v${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ Scriptkiddi ];
};
}

View file

@ -0,0 +1,30 @@
{ buildGoModule
, fetchFromGitHub
, lib
}:
buildGoModule rec {
pname = "litestream";
version = "0.3.8";
src = fetchFromGitHub {
owner = "benbjohnson";
repo = pname;
rev = "v${version}";
sha256 = "sha256-0Yyx8kbpu3T868hI9tJkBIjplAoQDA4XzhraHhOp61Q=";
};
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
];
vendorSha256 = "sha256-zCz9dki87dpZCo+/KuFzwtv/0TlBcvQDTxTuLN2FiHY=";
meta = with lib; {
description = "Streaming replication for SQLite";
license = licenses.asl20;
homepage = "https://litestream.io/";
maintainers = with maintainers; [ fbrs ];
};
}

View file

@ -0,0 +1,54 @@
{ rustPlatform
, fetchFromGitHub
, lib
, stdenv
, pkg-config
, postgresql
, sqlite
, openssl
, Security
, libiconv
}:
rustPlatform.buildRustPackage rec {
pname = "movine";
version = "0.11.0";
src = fetchFromGitHub {
owner = "byronwasti";
repo = pname;
rev = "v${version}";
sha256 = "0rms8np8zd23xzrd5avhp2q1ndhdc8f49lfwpff9h0slw4rnzfnj";
};
cargoSha256 = "sha256-4ghfenwmauR4Ft9n7dvBflwIMXPdFq1vh6FpIegHnZk=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ postgresql sqlite ] ++ (
if !stdenv.isDarwin then [ openssl ] else [ Security libiconv ]
);
meta = with lib; {
description = "A migration manager written in Rust, that attempts to be smart yet minimal";
homepage = "https://github.com/byronwasti/movine";
license = licenses.mit;
longDescription = ''
Movine is a simple database migration manager that aims to be compatible
with real-world migration work. Many migration managers get confused
with complicated development strategies for migrations. Oftentimes
migration managers do not warn you if the SQL saved in git differs from
what was actually run on the database. Movine solves this issue by
keeping track of the unique hashes for the <literal>up.sql</literal> and
<literal>down.sql</literal> for each migration, and provides tools for
fixing issues. This allows users to easily keep track of whether their
local migration history matches the one on the database.
This project is currently in early stages.
Movine does not aim to be an ORM.
Consider <link xling:href="https://diesel.rs/">diesel</link> instead if
you want an ORM.
'';
maintainers = with maintainers; [ netcrns ];
};
}

View file

@ -0,0 +1,31 @@
{ python3Packages, fetchFromGitHub, lib }:
python3Packages.buildPythonApplication rec {
pname = "pg_activity";
version = "2.3.1";
disabled = python3Packages.pythonOlder "3.6";
src = fetchFromGitHub {
owner = "dalibo";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-oStoZVFf0g1Dj2m+T+8caiKS0o1CnhtQNe/GbnlVUCM=";
};
propagatedBuildInputs = with python3Packages; [
attrs
blessed
humanize
psutil
psycopg2
];
pythonImportsCheck = [ "pgactivity" ];
meta = with lib; {
description = "A top like application for PostgreSQL server activity monitoring";
homepage = "https://github.com/dalibo/pg_activity";
license = licenses.postgresql;
maintainers = with maintainers; [ mausch ];
};
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchFromGitHub, libxslt, docbook_xsl, postgresql }:
stdenv.mkDerivation rec {
pname = "pg_checksums";
version = "1.1";
src = fetchFromGitHub {
owner = "credativ";
repo = pname;
rev = version;
sha256 = "sha256-Ij+4ceQauX3tC97ftk/JS3/WlocPBf7A7PJrylpTLzw=";
};
nativeBuildInputs = [ libxslt.bin ];
buildInputs = [ postgresql ];
buildFlags = [ "all" "man" ];
preConfigure = ''
substituteInPlace doc/stylesheet-man.xsl \
--replace "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" "${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl"
'';
installPhase = ''
install -Dm755 -t $out/bin pg_checksums_ext
install -Dm644 -t $out/share/man/man1 doc/man1/pg_checksums_ext.1
'';
meta = with lib; {
description = "Activate/deactivate/verify checksums in offline PostgreSQL clusters";
homepage = "https://github.com/credativ/pg_checksums";
maintainers = [ maintainers.marsam ];
mainProgram = "pg_checksums_ext";
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
};
}

View file

@ -0,0 +1,60 @@
{ lib, stdenv
, buildPythonApplication
, fetchPypi
, isPy3k
, cli-helpers
, click
, configobj
, prompt-toolkit
, psycopg2
, pygments
, sqlparse
, pgspecial
, setproctitle
, keyring
, pendulum
, pytestCheckHook
, sshtunnel
, mock
}:
buildPythonApplication rec {
pname = "pgcli";
version = "3.4.1";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-8DkwGH4n1g32WMqKBPtgHsXXR2xzXysVQsat7Fysj+I=";
};
propagatedBuildInputs = [
cli-helpers
click
configobj
prompt-toolkit
psycopg2
pygments
sqlparse
pgspecial
setproctitle
keyring
pendulum
sshtunnel
];
checkInputs = [ pytestCheckHook mock ];
disabledTests = lib.optionals stdenv.isDarwin [ "test_application_name_db_uri" ];
meta = with lib; {
description = "Command-line interface for PostgreSQL";
longDescription = ''
Rich command-line interface for PostgreSQL with auto-completion and
syntax highlighting.
'';
homepage = "https://pgcli.com";
changelog = "https://github.com/dbcli/pgcli/raw/v${version}/changelog.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ dywedir ];
};
}

View file

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'pgsync'

View file

@ -0,0 +1,23 @@
GEM
remote: https://rubygems.org/
specs:
parallel (1.21.0)
pg (1.2.3)
pgsync (0.6.8)
parallel
pg (>= 0.18.2)
slop (>= 4.8.2)
tty-spinner
slop (4.9.1)
tty-cursor (0.7.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
PLATFORMS
ruby
DEPENDENCIES
pgsync
BUNDLED WITH
2.2.24

View file

@ -0,0 +1,16 @@
{ lib, bundlerApp, bundlerUpdateScript }:
bundlerApp rec {
gemdir = ./.;
pname = "pgsync";
exes = [ "pgsync" ];
passthru.updateScript = bundlerUpdateScript "pgsync";
meta = with lib; {
description = "Sync data from one Postgres database to another (like `pg_dump`/`pg_restore`)";
homepage = "https://github.com/ankane/pgsync";
license = with licenses; mit;
maintainers = with maintainers; [ fabianhjr ];
};
}

View file

@ -0,0 +1,64 @@
{
parallel = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1hkfpm78c2vs1qblnva3k1grijvxh87iixcnyd83s3lxrxsjvag4";
type = "gem";
};
version = "1.21.0";
};
pg = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "13mfrysrdrh8cka1d96zm0lnfs59i5x2g6ps49r2kz5p3q81xrzj";
type = "gem";
};
version = "1.2.3";
};
pgsync = {
dependencies = ["parallel" "pg" "slop" "tty-spinner"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1rsm1irmz97v1kxhnq4lbwwiapqa2zkx0n0xlcf68ca8sfcfql1z";
type = "gem";
};
version = "0.6.8";
};
slop = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "067bvjmjdjs19bvy138hkqqvw8li3732radcd4x5f5dbf30yk3a9";
type = "gem";
};
version = "4.9.1";
};
tty-cursor = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0j5zw041jgkmn605ya1zc151bxgxl6v192v2i26qhxx7ws2l2lvr";
type = "gem";
};
version = "0.7.1";
};
tty-spinner = {
dependencies = ["tty-cursor"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0hh5awmijnzw9flmh5ak610x1d00xiqagxa5mbr63ysggc26y0qf";
type = "gem";
};
version = "0.9.3";
};
}

View file

@ -0,0 +1,26 @@
{ buildGoPackage, fetchFromGitHub, lib }:
buildGoPackage rec {
pname = "pgweb";
version = "0.11.7";
src = fetchFromGitHub {
owner = "sosedoff";
repo = pname;
rev = "v${version}";
sha256 = "1df3vixxca80i040apbim80nqni94q882ykn3cglyccyl0iz59ix";
};
goPackagePath = "github.com/sosedoff/pgweb";
meta = with lib; {
description = "A web-based database browser for PostgreSQL";
longDescription = ''
A simple postgres browser that runs as a web server. You can view data,
run queries and examine tables and indexes.
'';
homepage = "https://sosedoff.github.io/pgweb/";
license = licenses.mit;
maintainers = with maintainers; [ zupo ];
};
}

View file

@ -0,0 +1,76 @@
{ fetchFromGitHub
, lib
, Security
, openssl
, pkg-config
, protobuf
, rustPlatform
, stdenv
}:
# Updating this package will force an update for nodePackages.prisma. The
# version of prisma-engines and nodePackages.prisma must be the same for them to
# function correctly.
rustPlatform.buildRustPackage rec {
pname = "prisma-engines";
version = "3.14.0";
src = fetchFromGitHub {
owner = "prisma";
repo = "prisma-engines";
rev = version;
sha256 = "sha256-UawQbVbafRpxkYFGW+y+HkkYME8qziG7tmsIjbqwHq0=";
};
# Use system openssl.
OPENSSL_NO_VENDOR = 1;
cargoSha256 = "sha256-1kR70t7vWzvV3DOrkVP6ktzKK5tB9KjJyAMpKO6gtYA=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
openssl
protobuf
] ++ lib.optionals stdenv.isDarwin [ Security ];
preBuild = ''
export OPENSSL_DIR=${lib.getDev openssl}
export OPENSSL_LIB_DIR=${lib.getLib openssl}/lib
export PROTOC=${protobuf}/bin/protoc
export PROTOC_INCLUDE="${protobuf}/include";
export SQLITE_MAX_VARIABLE_NUMBER=250000
export SQLITE_MAX_EXPR_DEPTH=10000
'';
cargoBuildFlags = "-p query-engine -p query-engine-node-api -p migration-engine-cli -p introspection-core -p prisma-fmt";
postInstall = ''
mv $out/lib/libquery_engine${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libquery_engine.node
'';
# Tests are long to compile
doCheck = false;
meta = with lib; {
description = "A collection of engines that power the core stack for Prisma";
homepage = "https://www.prisma.io/";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ pamplemousse pimeys superherointj ];
};
}
### Troubleshooting
# Here's an example application using Prisma with Nix: https://github.com/pimeys/nix-prisma-example
# At example's `flake.nix` shellHook, notice the requirement of defining environment variables for prisma, it's values will show on `prisma --version`.
# Read the example's README: https://github.com/pimeys/nix-prisma-example/blob/main/README.md
# Prisma requires 2 packages, `prisma-engines` and `nodePackages.prisma`, to be at *exact* same versions.
# Certify at `package.json` that dependencies "@prisma/client" and "prisma" are equal, meaning no caret (`^`) in version.
# Configure NPM to use exact version: `npm config set save-exact=true`
# Delete `package-lock.json`, delete `node_modules` directory and run `npm install`.
# Run prisma client from `node_modules/.bin/prisma`.
# Run `./node_modules/.bin/prisma --version` and check if both prisma packages versions are equal, current platform is `linux-nixos`, and other keys equal to the prisma environment variables you defined for prisma.
# Test prisma with `generate`, `db push`, etc. It should work. If not, open an issue.

View file

@ -0,0 +1,45 @@
{ lib, python2Packages, fetchFromGitHub }:
let
pgdbconn = python2Packages.buildPythonPackage rec {
pname = "pgdbconn";
version = "0.8.0";
src = fetchFromGitHub {
owner = "perseas";
repo = "pgdbconn";
rev = "v${version}";
sha256 = "09r4idk5kmqi3yig7ip61r6js8blnmac5n4q32cdcbp1rcwzdn6z";
};
# The tests are impure (they try to access a PostgreSQL server)
doCheck = false;
propagatedBuildInputs = [
python2Packages.psycopg2
python2Packages.pytest
];
};
in
python2Packages.buildPythonApplication {
pname = "pyrseas";
version = "0.8.0";
src = fetchFromGitHub {
owner = "perseas";
repo = "Pyrseas";
rev = "2e9be763e61168cf20d28bd69010dc5875bd7b97";
sha256 = "1h9vahplqh0rzqjsdq64qqar6hj1bpbc6nl1pqwwgca56385br8r";
};
# The tests are impure (they try to access a PostgreSQL server)
doCheck = false;
propagatedBuildInputs = [
python2Packages.psycopg2
python2Packages.pytest
python2Packages.pyyaml
pgdbconn
];
meta = {
description = "A declarative language to describe PostgreSQL databases";
homepage = "https://perseas.github.io/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ pmeunier ];
};
}

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchurl, jre, makeWrapper, graphviz }:
stdenv.mkDerivation rec {
version = "6.1.0";
pname = "schemaspy";
src = fetchurl {
url = "https://github.com/schemaspy/schemaspy/releases/download/v${version}/${pname}-${version}.jar";
sha256 = "0lgz6b17hx9857fb2l03ggz8y3n8a37vrcsylif0gmkwj1v4qgl7";
};
dontUnpack = true;
buildInputs = [
jre
];
nativeBuildInputs = [
makeWrapper
];
wrappedPath = lib.makeBinPath [
graphviz
];
installPhase = ''
install -D ${src} "$out/share/java/${pname}-${version}.jar"
makeWrapper ${jre}/bin/java $out/bin/schemaspy \
--add-flags "-jar $out/share/java/${pname}-${version}.jar" \
--prefix PATH : "$wrappedPath"
'';
meta = with lib; {
homepage = "https://schemaspy.org";
description = "Document your database simply and easily";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.mit;
maintainers = with maintainers; [ jraygauthier ];
};
}

View file

@ -0,0 +1,43 @@
{ stdenv, fetchFromGitHub
, withMySQL ? true, withPSQL ? false, withSQLite ? false
, mariadb, postgresql, sqlite, gawk, gnugrep, findutils, gnused
, lib
}:
stdenv.mkDerivation rec {
pname = "shmig";
version = "1.0.0";
src = fetchFromGitHub {
owner = "mbucc";
repo = "shmig";
rev = "v${version}";
sha256 = "15ry1d51d6dlzzzhck2x57wrq48vs4n9pp20bv2sz6nk92fva5l5";
};
makeFlags = [ "PREFIX=$(out)" ];
postPatch = ''
patchShebangs .
substituteInPlace shmig \
--replace "\`which mysql\`" "${lib.optionalString withMySQL "${mariadb.client}/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 "grep" "${gnugrep}/bin/grep" \
--replace "find" "${findutils}/bin/find" \
--replace "sed" "${gnused}/bin/sed"
'';
preBuild = ''
mkdir -p $out/bin
'';
meta = with lib; {
description = "Minimalistic database migration tool with MySQL, PostgreSQL and SQLite support";
homepage = "https://github.com/mbucc/shmig";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}

View file

@ -0,0 +1,31 @@
{ lib, buildGoModule, fetchFromGitHub }:
let
version = "1.13.0";
in
buildGoModule {
pname = "sqlc";
inherit version;
src = fetchFromGitHub {
owner = "kyleconroy";
repo = "sqlc";
rev = "v${version}";
sha256 = "sha256-HPCt47tctVV8Oz9/7AoVMezIAv6wEsaB7B4rgo9/fNU=";
};
proxyVendor = true;
vendorSha256 = "sha256-zZ0IrtfQvczoB7th9ZCUlYOtyZr3Y3yF0pKzRCqmCjo=";
subPackages = [ "cmd/sqlc" ];
meta = let
inherit (lib) licenses platforms maintainers;
in {
description = " Generate type-safe code from SQL";
homepage = "https://sqlc.dev/";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ maintainers.adisbladis ];
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "sqlcheck";
version = "1.3";
src = fetchFromGitHub {
owner = "jarulraj";
repo = "sqlcheck";
rev = "v${version}";
sha256 = "sha256-rGqCtEO2K+OT44nYU93mF1bJ07id+ixPkRSC8DcO6rY=";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake ];
doCheck = true;
meta = with lib; {
inherit (src.meta) homepage;
description = "Automatically identify anti-patterns in SQL queries";
license = licenses.asl20;
platforms = platforms.all;
maintainers = [ maintainers.marsam ];
};
}

View file

@ -0,0 +1,84 @@
{ lib, stdenv, makeDesktopItem, makeWrapper, requireFile, unzip, jdk }:
let
version = "20.4.0.379.2205";
desktopItem = makeDesktopItem {
name = "sqldeveloper";
exec = "sqldeveloper";
icon = "sqldeveloper";
desktopName = "Oracle SQL Developer";
genericName = "Oracle SQL Developer";
comment = "Oracle's Oracle DB GUI client";
categories = [ "Development" ];
};
in
stdenv.mkDerivation {
inherit version;
pname = "sqldeveloper";
src = requireFile rec {
name = "sqldeveloper-${version}-no-jre.zip";
url = "https://www.oracle.com/tools/downloads/sqldev-downloads.html";
message = ''
This Nix expression requires that ${name} already be part of the store. To
obtain it you need to
- navigate to ${url}
- make sure that it says "Version ${version}" above the list of downloads
- if it does not, click on the "Previous Version" link below the downloads
and repeat until the version is correct. This is necessarry because as the
time of this writing there exists no permanent link for the current version
yet.
Also consider updating this package yourself (you probably just need to
change the `version` variable and update the sha256 to the one of the
new file) or opening an issue at the nixpkgs repo.
- accept the license agreement
- download the file listed under "Other Platforms"
- sign in or create an oracle account if neccessary
and then add the file to the Nix store using either:
nix-store --add-fixed sha256 ${name}
or
nix-prefetch-url --type sha256 file:///path/to/${name}
'';
sha256 = "1h53gl41ydr7kim6q9ckg3xyhb0rhmwj7jnis0xz6vms52b3h59k";
};
nativeBuildInputs = [ makeWrapper unzip ];
unpackCmd = "unzip $curSrc";
installPhase = ''
mkdir -p $out/libexec $out/share/{applications,pixmaps}
mv * $out/libexec/
mv $out/libexec/icon.png $out/share/pixmaps/sqldeveloper.png
cp ${desktopItem}/share/applications/* $out/share/applications
makeWrapper $out/libexec/sqldeveloper/bin/sqldeveloper $out/bin/sqldeveloper \
--set JAVA_HOME ${jdk.home} \
--chdir "$out/libexec/sqldeveloper/bin"
'';
meta = with lib; {
description = "Oracle's Oracle DB GUI client";
longDescription = ''
Oracle SQL Developer is a free integrated development environment that
simplifies the development and management of Oracle Database in both
traditional and Cloud deployments. SQL Developer offers complete
end-to-end development of your PL/SQL applications, a worksheet for
running queries and scripts, a DBA console for managing the database,
a reports interface, a complete data modeling solution, and a migration
platform for moving your 3rd party databases to Oracle.
'';
homepage = "http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ ardumont ];
};
}

View file

@ -0,0 +1,70 @@
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "sqlfluff";
version = "0.13.2";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-tPcj4QTqO03SKyZh7OQbXvjJPheUeWGhWfqpy/IBrk4=";
};
propagatedBuildInputs = with python3.pkgs; [
appdirs
cached-property
chardet
click
colorama
configparser
diff-cover
jinja2
oyaml
pathspec
pytest
regex
tblib
toml
tqdm
typing-extensions
] ++ lib.optionals (pythonOlder "3.7") [
dataclasses
] ++ lib.optionals (pythonOlder "3.8") [
backports.cached-property
importlib_metadata
];
checkInputs = with python3.pkgs; [
hypothesis
pytestCheckHook
];
disabledTestPaths = [
# Don't run the plugin related tests
"test/core/plugin_test.py"
"plugins/sqlfluff-templater-dbt"
"plugins/sqlfluff-plugin-example/test/rules/rule_test_cases_test.py"
];
disabledTests = [
# dbt is not available yet
"test__linter__skip_dbt_model_disabled"
"test_rules__test_helper_has_variable_introspection"
"test__rules__std_file_dbt"
];
pythonImportsCheck = [
"sqlfluff"
];
meta = with lib; {
description = "SQL linter and auto-formatter";
homepage = "https://www.sqlfluff.com/";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,25 @@
{ lib
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "sqlite-web";
version = "0.3.6";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "17pymadm063358nji70xzma64zkfv26c3pai5i1whsfp9ahqzasg";
};
propagatedBuildInputs = with python3Packages; [ flask peewee pygments ];
# no tests in repository
doCheck = false;
meta = with lib; {
description = "Web-based SQLite database browser";
homepage = "https://github.com/coleifer/sqlite-web";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View file

@ -0,0 +1,35 @@
{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake
, qtbase, qttools, sqlcipher, wrapGAppsHook, qtmacextras
}:
mkDerivation rec {
pname = "sqlitebrowser";
version = "3.12.2";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-33iVic0kxemWld+SiHOWGlKFSi5fpk1RtLUiNDr7WNI=";
};
# We should be using qscintilla from nixpkgs instead of the vendored version,
# but qscintilla is currently in a bit of a mess as some consumers expect a
# -qt4 or -qt5 prefix while others do not.
# We *really* should get that cleaned up.
buildInputs = [ qtbase sqlcipher ] ++ lib.optionals stdenv.isDarwin [ qtmacextras ];
nativeBuildInputs = [ cmake qttools wrapGAppsHook ];
cmakeFlags = [
"-Dsqlcipher=1"
];
meta = with lib; {
description = "DB Browser for SQLite";
homepage = "https://sqlitebrowser.org/";
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,78 @@
# To enable specific database drivers, override this derivation and pass the
# driver packages in the drivers argument (e.g. mysql_jdbc, postgresql_jdbc).
{ lib, stdenv, fetchurl, makeDesktopItem, makeWrapper, unzip
, jre
, drivers ? []
}:
stdenv.mkDerivation rec {
pname = "squirrel-sql";
version = "4.3.0";
src = fetchurl {
url = "mirror://sourceforge/project/squirrel-sql/1-stable/${version}-plainzip/squirrelsql-${version}-standard.zip";
sha256 = "sha256-Xh6JLfk0xDqEBJiEG3WBKBEqad/O0D8aeJk5s5w8PTI=";
};
nativeBuildInputs = [ makeWrapper unzip ];
buildInputs = [ jre ];
unpackPhase = ''
runHook preUnpack
unzip ${src}
runHook postUnpack
'';
buildPhase = ''
runHook preBuild
cd squirrelsql-${version}-standard
chmod +x squirrel-sql.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/squirrel-sql
cp -r . $out/share/squirrel-sql
mkdir -p $out/bin
cp=""
for pkg in ${builtins.concatStringsSep " " drivers}; do
if test -n "$cp"; then
cp="$cp:"
fi
cp="$cp"$(echo $pkg/share/java/*.jar | tr ' ' :)
done
makeWrapper $out/share/squirrel-sql/squirrel-sql.sh $out/bin/squirrel-sql \
--set CLASSPATH "$cp" \
--set JAVA_HOME "${jre}"
# Make sure above `CLASSPATH` gets picked up
substituteInPlace $out/share/squirrel-sql/squirrel-sql.sh --replace "-cp \"\$CP\"" "-cp \"\$CLASSPATH:\$CP\""
mkdir -p $out/share/icons/hicolor/32x32/apps
ln -s $out/share/squirrel-sql/icons/acorn.png \
$out/share/icons/hicolor/32x32/apps/squirrel-sql.png
ln -s ${desktopItem}/share/applications $out/share
runHook postInstall
'';
desktopItem = makeDesktopItem {
name = "squirrel-sql";
exec = "squirrel-sql";
comment = meta.description;
desktopName = "SQuirreL SQL";
genericName = "SQL Client";
categories = [ "Development" ];
icon = "squirrel-sql";
};
meta = with lib; {
description = "Universal SQL Client";
homepage = "http://squirrel-sql.sourceforge.net/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.lgpl21Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ khumba ];
};
}

View file

@ -0,0 +1,27 @@
{ lib, fetchFromGitHub, buildGoModule }:
buildGoModule rec {
pname = "termdbms";
version = "unstable-2021-09-04";
src = fetchFromGitHub {
owner = "mathaou";
repo = "termdbms";
rev = "d46e72c796e8aee0def71b8e3499b0ebe5ca3385";
sha256 = "1c3xgidhmvlcdw7v5gcqzv27cb58f1ix8sfd4r14rfz7c8kbv37v";
};
vendorSha256 = "0h9aw68niizd9gs0i890g6ij13af04qgpfy1g5pskyr4ryx0gn26";
patches = [ ./viewer.patch ];
ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
meta = with lib; {
homepage = "https://github.com/mathaou/termdbms/";
description = "A TUI for viewing and editing database files";
license = licenses.mit;
maintainers = with maintainers; [ izorkin ];
mainProgram = "sqlite3-viewer";
};
}

View file

@ -0,0 +1,12 @@
diff --git a/viewer/viewer.go b/viewer/viewer.go
index fcf850e..b0a0f8d 100644
--- a/viewer/viewer.go
+++ b/viewer/viewer.go
@@ -5,7 +5,6 @@ import (
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
- "github.com/mattn/go-runewidth"
"math"
"runtime"
"strings"

View file

@ -0,0 +1,22 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "timescaledb-parallel-copy";
version = "0.3.0";
src = fetchFromGitHub {
owner = "timescale";
repo = pname;
rev = "v${version}";
sha256 = "0r8c78l8vg7l24c3vzs2qr2prfjpagvdkp95fh9gyz76nvik29ba";
};
vendorSha256 = "03siay3hv1sgmmp7w4f9b0xb8c6bnbx0v4wy5grjl5k04zhnj76b";
meta = with lib; {
description = "Bulk, parallel insert of CSV records into PostgreSQL";
homepage = "https://github.com/timescale/timescaledb-parallel-copy";
license = licenses.asl20;
maintainers = with maintainers; [ thoughtpolice ];
};
}

View file

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "timescaledb-tune";
version = "0.12.0";
src = fetchFromGitHub {
owner = "timescale";
repo = pname;
rev = "v${version}";
sha256 = "sha256-p1SU0wnB2XftuPMbm47EbJ2aZGV9amlk0y7FI0QOBkk=";
};
vendorSha256 = "sha256-n2jrg9FiR/gSrbds/QVV8Duf7BTEs36yYi4F3Ve+d0E=";
# Temporary fix of bug: https://github.com/timescale/timescaledb-tune/issues/95
patches = [ ./fixMinMaxConn.diff ];
meta = with lib; {
description = "A tool for tuning your TimescaleDB for better performance";
homepage = "https://github.com/timescale/timescaledb-tune";
license = licenses.asl20;
maintainers = with maintainers; [ marsam ];
};
}

View file

@ -0,0 +1,13 @@
diff --git a/pkg/pgtune/misc.go b/pkg/pgtune/misc.go
index 1fceb6e..3e76be5 100644
--- a/pkg/pgtune/misc.go
+++ b/pkg/pgtune/misc.go
@@ -35,7 +35,7 @@ const (
// If you want to lower this value, consider that Patroni will not accept anything less than 25 as
// a valid max_connections and will replace it with 100, per
// https://github.com/zalando/patroni/blob/00cc62726d6df25d31f9b0baa082c83cd3f7bef9/patroni/postgresql/config.py#L280
- minMaxConns = 25
+ minMaxConns = 20
)
// MaxConnectionsDefault is the recommended default value for max_connections.

View file

@ -0,0 +1,28 @@
{ lib, stdenv, fetchFromGitHub, hiredis, http-parser, jansson, libevent, fetchpatch }:
stdenv.mkDerivation rec {
pname = "webdis";
version = "0.1.20";
src = fetchFromGitHub {
owner = "nicolasff";
repo = pname;
rev = version;
sha256 = "sha256-QvPawRYmk5HcE4XnI4B4G7AAaN/8cFov9lOa2e++g4A=";
};
buildInputs = [ hiredis http-parser jansson libevent ];
makeFlags = [
"PREFIX=${placeholder "out"}"
"CONFDIR=${placeholder "out"}/share/webdis"
];
meta = with lib; {
description = "A Redis HTTP interface with JSON output";
homepage = "https://webd.is/";
license = licenses.bsd2;
platforms = platforms.unix;
maintainers = with maintainers; [ wucke13 ];
};
}