mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 06:05:13 +00:00
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
41 lines
1.3 KiB
Nix
41 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitHub, python2Packages, openssl }:
|
|
|
|
python2Packages.buildPythonApplication rec {
|
|
pname = "pybitmessage";
|
|
|
|
version = "0.6.3.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bitmessage";
|
|
repo = "PyBitmessage";
|
|
rev = version;
|
|
sha256 = "1lmhbpwsqh1v93krlqqhafw2pc3y0qp8zby186yllbph6s8kdp35";
|
|
};
|
|
|
|
propagatedBuildInputs = with python2Packages; [ msgpack pyqt4 numpy pyopencl setuptools ] ++ [ openssl ];
|
|
|
|
preConfigure = ''
|
|
# Remove interaction and misleading output
|
|
substituteInPlace setup.py \
|
|
--replace "nothing = raw_input()" pass \
|
|
--replace 'print "It looks like building the package failed.\n" \' pass \
|
|
--replace ' "You may be missing a C++ compiler and the OpenSSL headers."' pass \
|
|
--replace 'msgpack-python' 'msgpack'
|
|
|
|
substituteInPlace src/pyelliptic/openssl.py \
|
|
--replace "libdir.append(find_library('ssl'))" "libdir.append('${openssl.out}/lib/libssl.so')"
|
|
|
|
substituteInPlace src/depends.py \
|
|
--replace "ctypes.util.find_library('ssl')" "'${openssl.out}/lib/libssl.so'"
|
|
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://bitmessage.org/";
|
|
description = "The official Bitmessage client";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jgillich ];
|
|
platforms = with platforms; linux;
|
|
};
|
|
}
|