-
Notifications
You must be signed in to change notification settings - Fork 61
/
package.nix
44 lines (39 loc) · 1.04 KB
/
package.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, fetchFromGitHub
, rustPlatform
, buildNpmPackage
}:
let
pname = "sql-studio";
version = "0.1.27";
src = fetchFromGitHub {
owner = "frectonz";
repo = pname;
rev = version;
hash = "sha256-iSvxdqarHX0AvkMSzL2JFOm32OyMwVKt+Gn7odgwalU=";
};
ui = buildNpmPackage {
inherit version src;
pname = "${pname}-ui";
npmDepsHash = "sha256-kGukH0PKF7MtIO5UH+55fddj6Tv2dNLmOC6oytEhP3c=";
sourceRoot = "${src.name}/ui";
installPhase = ''
cp -pr --reflink=auto -- dist "$out/"
'';
};
in
rustPlatform.buildRustPackage {
inherit pname version src;
cargoHash = "sha256-BlYFbJEDap/k3oi9tFl4JpTyYh8ce7F3NIlOtOid59s=";
preBuild = ''
cp -pr --reflink=auto -- ${ui} ui/dist
'';
meta = {
description = "SQL Database Explorer [SQLite, libSQL, PostgreSQL, MySQL/MariaDB, DuckDB, ClickHouse]";
homepage = "https://github.com/frectonz/sql-studio";
mainProgram = "sql-studio";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.frectonz ];
platforms = lib.platforms.all;
};
}