4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
37 lines
1.0 KiB
Nix
37 lines
1.0 KiB
Nix
{ lib, stdenv, fetchurl, bash, autoconf, automake, libtool, pkgconfig, libcangjie
|
|
, sqlite, buildPythonPackage, cython
|
|
}:
|
|
|
|
let
|
|
rev = "361bb413203fd43bab624d98edf6f7d20ce6bfd3";
|
|
in buildPythonPackage {
|
|
pname = "pycangjie";
|
|
version = "1.3_rev_${rev}";
|
|
format = "other";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/Cangjians/pycangjie/archive/${rev}.tar.gz";
|
|
sha256 = "12yi09nyffmn4va7lzk4irw349qzlbxgsnb89dh15cnw0xmrin05";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig libtool autoconf automake cython ];
|
|
buildInputs = [ libcangjie sqlite ];
|
|
|
|
preConfigure = ''
|
|
find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';'
|
|
sed -i 's@/usr@${libcangjie}@' tests/__init__.py
|
|
'';
|
|
|
|
configureScript = "./autogen.sh";
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "Python wrapper to libcangjie";
|
|
homepage = "http://cangjians.github.io/projects/pycangjie/";
|
|
license = licenses.lgpl3Plus;
|
|
maintainers = [ maintainers.linquize ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|