nixpkgs/pkgs/tools/text/frawk/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

45 lines
1.2 KiB
Nix

{ lib
, rustPlatform
, fetchCrate
, libxml2
, ncurses
, zlib
, features ? [ "default" ]
, llvmPackages_12
, stdenv
}:
rustPlatform.buildRustPackage rec {
pname = "frawk";
version = "0.4.8";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-wPnMJDx3aF1Slx5pjLfii366pgNU3FJBdznQLuUboYA=";
};
cargoSha256 = "sha256-Xk+iH90Nb2koCdGmVSiRl8Nq26LlFdJBuKmvcbgnkgs=";
buildInputs = [ libxml2 ncurses zlib ];
buildNoDefaultFeatures = true;
buildFeatures = features;
preBuild = lib.optionalString (lib.elem "default" features || lib.elem "llvm_backend" features) ''
export LLVM_SYS_120_PREFIX=${llvmPackages_12.llvm.dev}
'' + lib.optionalString (lib.elem "default" features || lib.elem "unstable" features) ''
export RUSTC_BOOTSTRAP=1
'';
# depends on cpu instructions that may not be available on builders
doCheck = false;
meta = with lib; {
description = "Small programming language for writing short programs processing textual data";
mainProgram = "frawk";
homepage = "https://github.com/ezrosent/frawk";
changelog = "https://github.com/ezrosent/frawk/releases/tag/v${version}";
license = with licenses; [ mit /* or */ asl20 ];
maintainers = with maintainers; [ figsoda ];
};
}