Skip to content

Instantly share code, notes, and snippets.

@ilyaGotfryd
Last active April 29, 2020 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilyaGotfryd/d94e6affb6e16ee0310203b065169ebe to your computer and use it in GitHub Desktop.
Save ilyaGotfryd/d94e6affb6e16ee0310203b065169ebe to your computer and use it in GitHub Desktop.
This is the issue with building pystemd from source
# generated using pypi2nix tool (version: 2.0.0)
# See more at: https://github.com/nix-community/pypi2nix
#
# COMMAND:
# pypi2nix -r requirements.txt -E snappy -V python37
#
{ pkgs ? import <nixpkgs> {},
overrides ? ({ pkgs, python }: self: super: {})
}:
let
inherit (pkgs) makeWrapper;
inherit (pkgs.stdenv.lib) fix' extends inNixShell;
pythonPackages =
import "${toString pkgs.path}/pkgs/top-level/python-packages.nix" {
inherit pkgs;
inherit (pkgs) stdenv;
python = pkgs.python37;
};
commonBuildInputs = with pkgs; [ snappy ];
commonDoCheck = false;
withPackages = pkgs':
let
pkgs = builtins.removeAttrs pkgs' ["__unfix__"];
interpreterWithPackages = selectPkgsFn: pythonPackages.buildPythonPackage {
name = "python37-interpreter";
buildInputs = [ makeWrapper ] ++ (selectPkgsFn pkgs);
buildCommand = ''
mkdir -p $out/bin
ln -s ${pythonPackages.python.interpreter} \
$out/bin/${pythonPackages.python.executable}
for dep in ${builtins.concatStringsSep " "
(selectPkgsFn pkgs)}; do
if [ -d "$dep/bin" ]; then
for prog in "$dep/bin/"*; do
if [ -x "$prog" ] && [ -f "$prog" ]; then
ln -s $prog $out/bin/`basename $prog`
fi
done
fi
done
for prog in "$out/bin/"*; do
wrapProgram "$prog" --prefix PYTHONPATH : "$PYTHONPATH"
done
pushd $out/bin
ln -s ${pythonPackages.python.executable} python
ln -s ${pythonPackages.python.executable} \
python3
popd
'';
passthru.interpreter = pythonPackages.python;
};
interpreter = interpreterWithPackages builtins.attrValues;
in {
__old = pythonPackages;
inherit interpreter;
inherit interpreterWithPackages;
mkDerivation = args: pythonPackages.buildPythonPackage (args // {
nativeBuildInputs = (args.nativeBuildInputs or []) ++ args.buildInputs;
});
packages = pkgs;
overrideDerivation = drv: f:
pythonPackages.buildPythonPackage (
drv.drvAttrs // f drv.drvAttrs // { meta = drv.meta; }
);
withPackages = pkgs'':
withPackages (pkgs // pkgs'');
};
python = withPackages {};
generated = self: {
"aiohttp" = python.mkDerivation {
name = "aiohttp-3.5.4";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/0f/58/c8b83f999da3b13e66249ea32f325be923791c0c10aee6cf16002a3effc1/aiohttp-3.5.4.tar.gz";
sha256 = "9c4c83f4fa1938377da32bc2d59379025ceeee8e24b89f72fcbccd8ca22dc9bf";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."async-timeout"
self."attrs"
self."chardet"
self."multidict"
self."yarl"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/aio-libs/aiohttp";
license = licenses.asl20;
description = "Async http client/server framework (asyncio)";
};
};
"async-timeout" = python.mkDerivation {
name = "async-timeout-3.0.1";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/a1/78/aae1545aba6e87e23ecab8d212b58bb70e72164b67eb090b81bb17ad38e3/async-timeout-3.0.1.tar.gz";
sha256 = "0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/aio-libs/async_timeout/";
license = licenses.asl20;
description = "Timeout context manager for asyncio programs";
};
};
"asyncnsq" = python.mkDerivation {
format = "wheel";
name = "asyncnsq-1.1.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/2d/85/873d884cb15cc12b1774ee52b35b52ad3dfd61ea17404f9017e8c26cafb7/asyncnsq-1.1.0-py3-none-any.whl";
sha256 = "f59d6a54036ae2aae63ee448af1d44b1d9815be2577a985ba7e44a3b79cd9702";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."python-snappy"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/aohan237/asyncnsq";
license = licenses.mit;
description = "asyncio async/await nsq support";
};
};
"attrs" = python.mkDerivation {
name = "attrs-19.1.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/cc/d9/931a24cc5394f19383fbbe3e1147a0291276afa43a0dc3ed0d6cd9fda813/attrs-19.1.0.tar.gz";
sha256 = "f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://www.attrs.org/";
license = licenses.mit;
description = "Classes Without Boilerplate";
};
};
"certifi" = python.mkDerivation {
name = "certifi-2019.9.11";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/62/85/7585750fd65599e88df0fed59c74f5075d4ea2fe611deceb95dd1c2fb25b/certifi-2019.9.11.tar.gz";
sha256 = "e4f3620cfea4f83eedc95b24abd9cd56f3c4b146dd0177e83a21b4eb49e21e50";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://certifi.io/";
license = licenses.mpl20;
description = "Python package for providing Mozilla's CA Bundle.";
};
};
"chardet" = python.mkDerivation {
name = "chardet-3.0.4";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz";
sha256 = "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/chardet/chardet";
license = licenses.lgpl3;
description = "Universal encoding detector for Python 2 and 3";
};
};
"click" = python.mkDerivation {
name = "click-7.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz";
sha256 = "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://palletsprojects.com/p/click/";
license = licenses.bsdOriginal;
description = "Composable command line interface toolkit";
};
};
"idna" = python.mkDerivation {
name = "idna-2.8";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz";
sha256 = "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/kjd/idna";
license = licenses.bsdOriginal;
description = "Internationalized Domain Names in Applications (IDNA)";
};
};
"influxdb" = python.mkDerivation {
name = "influxdb-5.2.2";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/03/5e/d528d463bca6ff7fb9441df22d65890e39ebbb503e550c1030eef0863e52/influxdb-5.2.2.tar.gz";
sha256 = "afeff28953a91b4ea1aebf9b5b8258a4488d0e49e2471db15ea43fd2c8533143";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."python-dateutil"
self."pytz"
self."requests"
self."six"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/influxdb/influxdb-python";
license = licenses.mit;
description = "InfluxDB client";
};
};
"insensitive-dict" = python.mkDerivation {
name = "insensitive-dict-0.1.10";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/da/0d/af3cb28bcbc674c26b7a1fe3b472d59312f83438ff08e6c636428ceba1da/insensitive-dict-0.1.10.tar.gz";
sha256 = "a78cdce5e1446150a30d389404a1bf4a49c3b1228df708ec5c622bcd1f31b0fa";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/timmmartin19/case_insensitive_dict";
license = licenses.mit;
description = "A case insensitive dictionary that's fully tested. Primarily broken out from the requests package";
};
};
"multidict" = python.mkDerivation {
name = "multidict-4.5.2";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/7f/8f/b3c8c5b062309e854ce5b726fc101195fbaa881d306ffa5c2ba19efa3af2/multidict-4.5.2.tar.gz";
sha256 = "024b8129695a952ebd93373e45b5d341dbb87c17ce49637b34000093f243dd4f";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/aio-libs/multidict";
license = licenses.asl20;
description = "multidict implementation";
};
};
"py-env-config" = python.mkDerivation {
name = "py-env-config-0.1.2";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/53/7a/3724d2448dddd516016ce13649a8a4ade133b4791fc1371c2dcf95ff3104/py-env-config-0.1.2.tar.gz";
sha256 = "8001c4774cac6bc623602bec1316bc74aacfc4e963df26acc406fe96caaad750";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/timmartin19/env_config";
license = licenses.mit;
description = "A tool for configuring your application via environment variables";
};
};
"python-dateutil" = python.mkDerivation {
name = "python-dateutil-2.8.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/ad/99/5b2e99737edeb28c71bcbec5b5dda19d0d9ef3ca3e92e3e925e7c0bb364c/python-dateutil-2.8.0.tar.gz";
sha256 = "c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [
self."setuptools-scm"
];
propagatedBuildInputs = [
self."six"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://dateutil.readthedocs.io";
license = "Dual License";
description = "Extensions to the standard Python datetime module";
};
};
"python-snappy" = python.mkDerivation {
name = "python-snappy-0.5.4";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/45/35/65d9f8cc537129894b4b32647d80212d1fa342877581c5b8a69872cea8be/python-snappy-0.5.4.tar.gz";
sha256 = "d9c26532cfa510f45e8d135cde140e8a5603d3fb254cfec273ebc0ecf9f668e2";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "http://github.com/andrix/python-snappy";
license = licenses.bsdOriginal;
description = "Python library for the snappy compression library from Google";
};
};
"pytz" = python.mkDerivation {
name = "pytz-2019.1";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/df/d5/3e3ff673e8f3096921b3f1b79ce04b832e0100b4741573154b72b756a681/pytz-2019.1.tar.gz";
sha256 = "d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "http://pythonhosted.org/pytz";
license = licenses.mit;
description = "World timezone definitions, modern and historical";
};
};
"pyyaml" = python.mkDerivation {
name = "pyyaml-5.3";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/3d/d9/ea9816aea31beeadccd03f1f8b625ecf8f645bd66744484d162d84803ce5/PyYAML-5.3.tar.gz";
sha256 = "e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/yaml/pyyaml";
license = licenses.mit;
description = "YAML parser and emitter for Python";
};
};
"redis" = python.mkDerivation {
name = "redis-3.2.1";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/24/d4/06486dee0f66ef8c5080dc576fdfb33131fd2e0be3747f2be4e5634088a2/redis-3.2.1.tar.gz";
sha256 = "8ca418d2ddca1b1a850afa1680a7d2fd1f3322739271de4b704e0d4668449273";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/andymccurdy/redis-py";
license = licenses.mit;
description = "Python client for Redis key-value store";
};
};
"requests" = python.mkDerivation {
name = "requests-2.22.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz";
sha256 = "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."certifi"
self."chardet"
self."idna"
self."urllib3"
];
meta = with pkgs.stdenv.lib; {
homepage = "http://python-requests.org";
license = licenses.asl20;
description = "Python HTTP for Humans.";
};
};
"setuptools-scm" = python.mkDerivation {
name = "setuptools-scm-3.3.3";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/83/44/53cad68ce686585d12222e6769682c4bdb9686808d2739671f9175e2938b/setuptools_scm-3.3.3.tar.gz";
sha256 = "bd25e1fb5e4d603dcf490f1fde40fb4c595b357795674c3e5cb7f6217ab39ea5";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/pypa/setuptools_scm/";
license = licenses.mit;
description = "the blessed package to manage your versions by scm tags";
};
};
"six" = python.mkDerivation {
name = "six-1.12.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz";
sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/benjaminp/six";
license = licenses.mit;
description = "Python 2 and 3 compatibility utilities";
};
};
"ultra-config" = python.mkDerivation {
name = "ultra-config-0.6.3";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/b4/8f/79add3516a2dd20091825bbaeb0d557760b11f2a8b620998d9d462295519/ultra_config-0.6.3.tar.gz";
sha256 = "9f8f1aa20f3216ea068bfd33494cedfef6ba8ee4b3eead139be3880240055e00";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."insensitive-dict"
self."py-env-config"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/timmmartin19/ultra_config";
license = licenses.mit;
description = "An extendable configuration that enables you to configure your application via python modules, config files, environment variables and more!";
};
};
"urllib3" = python.mkDerivation {
name = "urllib3-1.25.6";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/ff/44/29655168da441dff66de03952880c6e2d17b252836ff1aa4421fba556424/urllib3-1.25.6.tar.gz";
sha256 = "9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://urllib3.readthedocs.io/";
license = licenses.mit;
description = "HTTP library with thread-safe connection pooling, file post, and more.";
};
};
"yarl" = python.mkDerivation {
name = "yarl-1.3.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/fb/84/6d82f6be218c50b547aa29d0315e430cf8a23c52064c92d0a8377d7b7357/yarl-1.3.0.tar.gz";
sha256 = "024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."idna"
self."multidict"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/aio-libs/yarl/";
license = licenses.asl20;
description = "Yet another URL library";
};
};
};
localOverridesFile = ./requirements_override.nix;
localOverrides = import localOverridesFile { inherit pkgs python; };
commonOverrides = [
];
paramOverrides = [
(overrides { inherit pkgs python; })
];
allOverrides =
(if (builtins.pathExists localOverridesFile)
then [localOverrides] else [] ) ++ commonOverrides ++ paramOverrides;
in python.withPackages
(fix' (pkgs.lib.fold
extends
generated
allOverrides
)
)
gcc -pthread -shared -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.30.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.1-20190112/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1g/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.30.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.1-20190112/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1g/lib build/temp.linux-x86_64-3.7/pystemd/daemon.o -L/nix/store/z4y3q5nsm1hhk7g18ywpnsdgqcgsvc2i-python3-3.7.6/lib -lsystemd -lpython3.7m -o build/lib.linux-x86_64-3.7/pystemd/daemon.cpython-37m-x86_64-linux-gnu.so
/nix/store/nyhj00w339gk2gaj3faz70gjrnbmam8v-binutils-2.31.1/bin/ld: cannot find -lsystemd
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment