nixpkgs/pkgs/by-name/pr/prqlc/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

60 lines
1.2 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, sqlite
, zlib
, stdenv
, darwin
, python3
}:
rustPlatform.buildRustPackage rec {
pname = "prqlc";
version = "0.13.2";
src = fetchFromGitHub {
owner = "prql";
repo = "prql";
rev = version;
hash = "sha256-DuuWeXuqOKpC4NbaQ6xhYxzZLtxOMzqDl7eOd9zTIuY=";
};
cargoHash = "sha256-ZOlbKmSHAcgYMYbeyyljltf56WbP5dK7ezpmgSA3CyQ=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs =
[
openssl
sqlite
zlib
]
++ lib.optionals stdenv.hostPlatform.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 = "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 ];
};
}