Skip to content

Commit

Permalink
chore: 0.1.27
Browse files Browse the repository at this point in the history
  • Loading branch information
frectonz committed Aug 27, 2024
1 parent f01433c commit 8bfbed7
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sql-studio"
version = "0.1.26"
version = "0.1.27"
edition = "2021"
repository = "https://github.com/frectonz/sql-studio"
description = "Single binary, single command SQL Database Explorer."
Expand Down
156 changes: 78 additions & 78 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,91 +16,91 @@
};
};
};
outputs = { self, nixpkgs, flake-utils, rust-overlay, crane }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
outputs = { self, nixpkgs, flake-utils, rust-overlay, crane }: flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};

rustToolchain = pkgs.rust-bin.stable.latest.default;
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
rustToolchain = pkgs.rust-bin.stable.latest.default;
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;

src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
(pkgs.lib.hasSuffix "\.css" path) ||
(pkgs.lib.hasSuffix "\.js" path) ||
(pkgs.lib.hasSuffix "\.svg" path) ||
(pkgs.lib.hasSuffix "\.sqlite3" path) ||
(craneLib.filterCargoSources path type)
;
};
commonArgs = {
inherit src;
buildInputs = [ pkgs.git ];
};
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
(pkgs.lib.hasSuffix "\.css" path) ||
(pkgs.lib.hasSuffix "\.js" path) ||
(pkgs.lib.hasSuffix "\.svg" path) ||
(pkgs.lib.hasSuffix "\.sqlite3" path) ||
(craneLib.filterCargoSources path type)
;
};
commonArgs = {
inherit src;
buildInputs = [ pkgs.git ];
};

ui = pkgs.buildNpmPackage {
pname = "ui";
version = "0.0.0";
src = ./ui;
npmDepsHash = "sha256-kGukH0PKF7MtIO5UH+55fddj6Tv2dNLmOC6oytEhP3c=";
installPhase = ''
cp -pr --reflink=auto -- dist "$out/"
'';
};
ui = pkgs.buildNpmPackage {
pname = "ui";
version = "0.0.0";
src = ./ui;
npmDepsHash = "sha256-kGukH0PKF7MtIO5UH+55fddj6Tv2dNLmOC6oytEhP3c=";
installPhase = ''
cp -pr --reflink=auto -- dist "$out/"
'';
};

cargoArtifacts = craneLib.buildDepsOnly commonArgs;
bin = craneLib.buildPackage (commonArgs // {
inherit cargoArtifacts;
preBuild = ''
cp -pr --reflink=auto -- ${ui} ui/dist
'';
});
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
bin = craneLib.buildPackage (commonArgs // {
inherit cargoArtifacts;
preBuild = ''
cp -pr --reflink=auto -- ${ui} ui/dist
'';
});

docker = pkgs.dockerTools.streamLayeredImage {
name = "sql-studio";
tag = "latest";
created = "now";
config.Cmd = [
"${bin}/bin/sql-studio"
"--no-browser"
"--no-shutdown"
"--address=0.0.0.0:3030"
"sqlite"
"preview"
];
config.Expose = "3030";
};
in
{
packages = {
default = bin;
docker = docker;
};
docker = pkgs.dockerTools.streamLayeredImage {
name = "sql-studio";
tag = "latest";
created = "now";
config.Cmd = [
"${bin}/bin/sql-studio"
"--no-browser"
"--no-shutdown"
"--address=0.0.0.0:3030"
"sqlite"
"preview"
];
config.Expose = "3030";
};
in
{
packages = {
default = bin;
docker = docker;
stable = pkgs.callPackage ./package.nix { };
};

devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.bacon
pkgs.emmet-ls
pkgs.cargo-dist
pkgs.cargo-watch
pkgs.rust-analyzer
rustToolchain
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.bacon
pkgs.emmet-ls
pkgs.cargo-dist
pkgs.cargo-watch
pkgs.rust-analyzer
rustToolchain

pkgs.nodejs
pkgs.nodePackages.typescript-language-server
pkgs.nodePackages.vscode-langservers-extracted
pkgs.nodePackages."@tailwindcss/language-server"
pkgs.nodejs
pkgs.nodePackages.typescript-language-server
pkgs.nodePackages.vscode-langservers-extracted
pkgs.nodePackages."@tailwindcss/language-server"

pkgs.httpie
pkgs.sqlite
];
};
pkgs.httpie
pkgs.sqlite
];
};

formatter = pkgs.nixpkgs-fmt;
}
);
formatter = pkgs.nixpkgs-fmt;
}
);
}

0 comments on commit 8bfbed7

Please sign in to comment.