This repository has been archived on 2024-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
flake-packages-Archived/sqlfmt/flake.nix

35 lines
956 B
Nix
Raw Permalink Normal View History

2024-06-03 19:10:53 +01:00
{
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;
};
});
}