Merge pull request #188208 from dit7ya/prql

prqlc: init at 0.9.3
This commit is contained in:
Pol Dellaiera 2023-08-06 19:16:22 +02:00 committed by GitHub
commit 188599e0c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,59 @@
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, sqlite
, zlib
, stdenv
, darwin
, python3
}:
rustPlatform.buildRustPackage rec {
pname = "prqlc";
version = "0.9.3";
src = fetchFromGitHub {
owner = "prql";
repo = "prql";
rev = version;
hash = "sha256-m5W7ddGlgxaQR+nCFygfLWU6QBDUOK9POPdR2H62j9Q=";
};
cargoHash = "sha256-7vjDWiod52fuAPHbB/UmqG9YZb8GvyZGMgdYr2qI+uM=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs =
[
openssl
sqlite
zlib
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.Security
];
env = {
PYO3_PYTHON = "${python3}/bin/python3";
};
# we are only interested in the prqlc binary
postInstall = ''
rm -r $out/bin/compile-files $out/bin/mdbook-prql $out/lib
'';
meta = with lib; {
description = "A CLI for the PRQL compiler - a simple, powerful, pipelined SQL replacement";
homepage = "https://github.com/prql/prql";
changelog = "https://github.com/prql/prql/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ dit7ya ];
};
}

View File

@ -16603,6 +16603,8 @@ with pkgs;
pony-corral = callPackage ../development/compilers/ponyc/pony-corral.nix { };
prqlc = callPackage ../development/tools/database/prqlc { };
qbe = callPackage ../development/compilers/qbe { };
rasm = callPackage ../development/compilers/rasm { };