added sqlfmt
This commit is contained in:
commit
5d1d966349
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
description = "sqlfmt packaged using poetry2nix";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
||||
poetry2nix = {
|
||||
url = "github:nix-community/poetry2nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "tconbeer";
|
||||
repo = "sqlfmt";
|
||||
rev = "v0.21.3";
|
||||
sha256 = "1sx8gf13pwsw63v5hfnml18fs2lnb2piigc1d4q8hmiywzmhzf85";
|
||||
};
|
||||
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication;
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
sqlfmt = mkPoetryApplication {
|
||||
projectDir = src;
|
||||
};
|
||||
default = self.packages.${system}.sqlfmt;
|
||||
};
|
||||
});
|
||||
}
|
Reference in New Issue