Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2020-01-14 10:20:32 +01:00
commit 05962c4ad5
37 changed files with 1244 additions and 303 deletions

View File

@ -367,18 +367,6 @@ rec {
{ path = [ "services" "geoclue2" "appConfig" ];
name = "desktopID";
}
{ path = [ "home-manager" "users" anyString "programs" "ssh" "matchBlocks" ];
name = "host"; # https://github.com/rycee/home-manager/blob/e8dbc3561373b68d12decb3c0d7c1ba245f138f7/modules/programs/ssh.nix#L265
}
{ path = [ "home-manager" "users" anyString "home" "file" ];
name = "target"; # https://github.com/rycee/home-manager/blob/0e9b7aab3c6c27bf020402e0e2ef20b65c040552/modules/files.nix#L33
}
{ path = [ "home-manager" "users" anyString "xdg" "configFile" ];
name = "target"; # https://github.com/rycee/home-manager/blob/54de0e1d79a1370e57a8f23bef89f99f9b92ab67/modules/misc/xdg.nix#L41
}
{ path = [ "home-manager" "users" anyString "xdg" "dataFile" ];
name = "target"; # https://github.com/rycee/home-manager/blob/54de0e1d79a1370e57a8f23bef89f99f9b92ab67/modules/misc/xdg.nix#L58
}
];
matched = let
equals = a: b: b == anyString || a == b;

View File

@ -2439,6 +2439,12 @@
githubId = 844574;
name = "Daniel Austin";
};
flyfloh = {
email = "nix@halbmastwurf.de";
github = "flyfloh";
githubId = 74379;
name = "Florian Pester";
};
fmthoma = {
email = "f.m.thoma@googlemail.com";
github = "fmthoma";
@ -5082,6 +5088,12 @@
githubId = 7588406;
name = "Andrew R. M.";
};
nloomans = {
email = "noah@nixos.noahloomans.com";
github = "nloomans";
githubId = 7829481;
name = "Noah Loomans";
};
nmattia = {
email = "nicolas@nmattia.com";
github = "nmattia";
@ -7026,6 +7038,11 @@
github = "timbertson";
name = "Tim Cuthbertson";
};
timma = {
email = "kunduru.it.iitb@gmail.com";
github = "ktrsoft";
name = "Timma";
};
timokau = {
email = "timokau@zoho.com";
github = "timokau";

View File

@ -21,6 +21,19 @@ with lib;
###### implementation
config = mkIf config.hardware.usbWwan.enable {
# Attaches device specific handlers.
services.udev.packages = with pkgs; [ usb-modeswitch-data ];
# Triggered by udev, usb-modeswitch creates systemd services via a
# template unit in the usb-modeswitch package.
systemd.packages = with pkgs; [ usb-modeswitch ];
# The systemd service requires the usb-modeswitch-data. The
# usb-modeswitch package intends to discover this via the
# filesystem at /usr/share/usb_modeswitch, and merge it with user
# configuration in /etc/usb_modeswitch.d. Configuring the correct
# path in the package is difficult, as it would cause a cyclic
# dependency.
environment.etc."usb_modeswitch.d".source = "${pkgs.usb-modeswitch-data}/share/usb_modeswitch";
};
}

View File

@ -735,6 +735,7 @@
./services/networking/wicd.nix
./services/networking/wireguard.nix
./services/networking/wpa_supplicant.nix
./services/networking/xandikos.nix
./services/networking/xinetd.nix
./services/networking/xl2tpd.nix
./services/networking/xrdp.nix

View File

@ -0,0 +1,148 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xandikos;
in
{
options = {
services.xandikos = {
enable = mkEnableOption "Xandikos CalDAV and CardDAV server";
package = mkOption {
type = types.package;
default = pkgs.xandikos;
defaultText = "pkgs.xandikos";
description = "The Xandikos package to use.";
};
address = mkOption {
type = types.str;
default = "localhost";
description = ''
The IP address on which Xandikos will listen.
By default listens on localhost.
'';
};
port = mkOption {
type = types.port;
default = 8080;
description = "The port of the Xandikos web application";
};
routePrefix = mkOption {
type = types.str;
default = "/";
description = ''
Path to Xandikos.
Useful when Xandikos is behind a reverse proxy.
'';
};
extraOptions = mkOption {
default = [];
type = types.listOf types.str;
example = literalExample ''
[ "--autocreate"
"--defaults"
"--current-user-principal user"
"--dump-dav-xml"
]
'';
description = ''
Extra command line arguments to pass to xandikos.
'';
};
nginx = mkOption {
default = {};
description = ''
Configuration for nginx reverse proxy.
'';
type = types.submodule {
options = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Configure the nginx reverse proxy settings.
'';
};
hostName = mkOption {
type = types.str;
description = ''
The hostname use to setup the virtualhost configuration
'';
};
};
};
};
};
};
config = mkIf cfg.enable (
mkMerge [
{
meta.maintainers = [ lib.maintainers."0x4A6F" ];
systemd.services.xandikos = {
description = "A Simple Calendar and Contact Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "xandikos";
Group = "xandikos";
DynamicUser = "yes";
RuntimeDirectory = "xandikos";
StateDirectory = "xandikos";
StateDirectoryMode = "0700";
PrivateDevices = true;
# Sandboxing
CapabilityBoundingSet = "CAP_NET_RAW CAP_NET_ADMIN";
ProtectSystem = "strict";
ProtectHome = true;
PrivateTmp = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectControlGroups = true;
RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_PACKET AF_NETLINK";
RestrictNamespaces = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
ExecStart = ''
${cfg.package}/bin/xandikos \
--directory /var/lib/xandikos \
--listen_address ${cfg.address} \
--port ${toString cfg.port} \
--route-prefix ${cfg.routePrefix} \
${lib.concatStringsSep " " cfg.extraOptions}
'';
};
};
}
(
mkIf cfg.nginx.enable {
services.nginx = {
enable = true;
virtualHosts."${cfg.nginx.hostName}" = {
locations."/" = {
proxyPass = "http://${cfg.address}:${toString cfg.port}/";
};
};
};
}
)
]
);
}

View File

@ -295,6 +295,7 @@ in
wireguard-generated = handleTest ./wireguard/generated.nix {};
wireguard-namespaces = handleTest ./wireguard/namespaces.nix {};
wordpress = handleTest ./wordpress.nix {};
xandikos = handleTest ./xandikos.nix {};
xautolock = handleTest ./xautolock.nix {};
xfce = handleTest ./xfce.nix {};
xmonad = handleTest ./xmonad.nix {};

70
nixos/tests/xandikos.nix Normal file
View File

@ -0,0 +1,70 @@
import ./make-test-python.nix (
{ pkgs, lib, ... }:
{
name = "xandikos";
meta.maintainers = [ lib.maintainers."0x4A6F" ];
nodes = {
xandikos_client = {};
xandikos_default = {
networking.firewall.allowedTCPPorts = [ 8080 ];
services.xandikos.enable = true;
};
xandikos_proxy = {
networking.firewall.allowedTCPPorts = [ 80 8080 ];
services.xandikos.enable = true;
services.xandikos.address = "localhost";
services.xandikos.port = 8080;
services.xandikos.routePrefix = "/xandikos/";
services.xandikos.extraOptions = [
"--defaults"
];
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts."xandikos" = {
serverName = "xandikos.local";
basicAuth.xandikos = "snakeOilPassword";
locations."/xandikos/" = {
proxyPass = "http://localhost:8080/";
};
};
};
};
};
testScript = ''
start_all()
with subtest("Xandikos default"):
xandikos_default.wait_for_unit("multi-user.target")
xandikos_default.wait_for_unit("xandikos.service")
xandikos_default.wait_for_open_port(8080)
xandikos_default.succeed("curl --fail http://localhost:8080/")
xandikos_default.succeed(
"curl -s --fail --location http://localhost:8080/ | grep -qi Xandikos"
)
xandikos_client.wait_for_unit("network.target")
xandikos_client.fail("curl --fail http://xandikos_default:8080/")
with subtest("Xandikos proxy"):
xandikos_proxy.wait_for_unit("multi-user.target")
xandikos_proxy.wait_for_unit("xandikos.service")
xandikos_proxy.wait_for_open_port(8080)
xandikos_proxy.succeed("curl --fail http://localhost:8080/")
xandikos_proxy.succeed(
"curl -s --fail --location http://localhost:8080/ | grep -qi Xandikos"
)
xandikos_client.wait_for_unit("network.target")
xandikos_client.fail("curl --fail http://xandikos_proxy:8080/")
xandikos_client.succeed(
"curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos_proxy/xandikos/ | grep -qi Xandikos"
)
xandikos_client.succeed(
"curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos_proxy/xandikos/user/ | grep -qi Xandikos"
)
'';
}
)

View File

@ -1,5 +1,5 @@
{ fetchurl, stdenv, pkgconfig, intltool, libpulseaudio, gtkmm3
, libcanberra-gtk3, makeWrapper, gnome3 }:
, libcanberra-gtk3, gnome3, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "pavucontrol";
@ -10,16 +10,10 @@ stdenv.mkDerivation rec {
sha256 = "1qhlkl3g8d7h72xjskii3g1l7la2cavwp69909pzmbi2jyn5pi4g";
};
preFixup = ''
wrapProgram "$out/bin/pavucontrol" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
'';
buildInputs = [ libpulseaudio gtkmm3 libcanberra-gtk3 makeWrapper
buildInputs = [ libpulseaudio gtkmm3 libcanberra-gtk3
gnome3.adwaita-icon-theme ];
nativeBuildInputs = [ pkgconfig intltool ];
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
configureFlags = [ "--disable-lynx" ];

View File

@ -6,16 +6,16 @@
rustPlatform.buildRustPackage rec {
pname = "spotifyd";
version = "0.2.20";
version = "0.2.23";
src = fetchFromGitHub {
owner = "Spotifyd";
repo = "spotifyd";
rev = "v${version}";
sha256 = "1hf4wpk7r0s4jpjhxaz67y1hd8jx9ns5imd85r3cdg4lxf3j5gph";
sha256 = "0xxr21avgr4pvlr5vgb68jmad5xy5kqvaxfzh0qn1jpiax7y3avm";
};
cargoSha256 = "1h3fis47hmxvppiv1icjhgp48nd46gayfcmzfjs34q6jask90n0w";
cargoSha256 = "1ykmn7zzwn9my96bbxwkparab5lck1zzdkpafil2mmrjyvyi40da";
cargoBuildFlags = [
"--no-default-features"

View File

@ -1,32 +1,72 @@
{ stdenv, fetchurl, lib, makeWrapper,
{ stdenv, fetchurl, lib, makeWrapper, wrapGAppsHook,
# build dependencies
alsaLib, atk, cairo, cups, dbus, expat, fontconfig,
freetype, gdk-pixbuf, glib, gnome2, nspr, nss, xorg,
glibc, systemd
alsaLib, atk, at-spi2-atk, at-spi2-core, cairo, cups, dbus, expat, fontconfig,
freetype, gdk-pixbuf, glib, glibc, gtk3, libuuid, nspr, nss, pango,
xorg, systemd
}:
let
stdenv.mkDerivation rec {
version = "3.0.4";
deps = [
alsaLib
atk
at-spi2-atk
at-spi2-core
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
glibc
gtk3
libuuid
nspr
nss
pango
xorg.libX11
xorg.libxcb
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
stdenv.cc.cc.lib
stdenv.cc.cc
];
in stdenv.mkDerivation rec {
version = "3.1.0";
pname = "pencil";
src = fetchurl {
url = "http://pencil.evolus.vn/dl/V${version}/Pencil_${version}_amd64.deb";
sha256 = "58e2b794c615ea8715d8374f177e19c87f7071e359826ec34a59836d537a62fd";
url = "http://pencil.evolus.vn/dl/V${version}.ga/pencil_${version}.ga_amd64.deb";
sha256 = "01ae54b1a1351b909eb2366c6ec00816e1deba370e58f35601cf7368f10aaba3";
};
sourceRoot = ".";
unpackCmd = ''
ar p "$src" data.tar.xz | tar xJ
ar p "$src" data.tar.gz | tar xz
'';
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
buildInputs = deps;
installPhase = ''
mkdir -p $out/bin
cp -R usr/share opt $out/
mkdir -p $out/bin $out/opt $out/share/applications
cp -R usr/share $out/
cp -R opt/pencil*/ $out/opt/pencil
cp $out/opt/pencil/pencil.desktop $out/share/applications/
# fix the path in the desktop file
substituteInPlace \
@ -34,42 +74,12 @@ stdenv.mkDerivation rec {
--replace /opt/ $out/opt/
# symlink the binary to bin/
ln -s $out/opt/Pencil/pencil $out/bin/pencil
ln -s $out/opt/pencil/pencil $out/bin/pencil
'';
preFixup = let
packages = [
alsaLib
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gnome2.GConf
gnome2.gtk
gnome2.pango
nspr
nss
xorg.libX11
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
stdenv.cc.cc.lib
stdenv.cc.cc
glibc
];
packages = deps;
libPathNative = lib.makeLibraryPath packages;
libPath64 = lib.makeSearchPathOutput "lib" "lib64" packages;
libPath = "${libPathNative}:${libPath64}";
@ -77,21 +87,13 @@ stdenv.mkDerivation rec {
# patch executable
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}:$out/opt/Pencil" \
$out/opt/Pencil/pencil
# patch libnode
patchelf \
--set-rpath "${libPath}" \
$out/opt/Pencil/libnode.so
# libffmpeg is for some reason not executable
chmod a+x $out/opt/Pencil/libffmpeg.so
--set-rpath "${libPath}:$out/opt/pencil" \
$out/opt/pencil/pencil
# fix missing libudev
ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/Pencil/libudev.so.1
wrapProgram $out/opt/Pencil/pencil \
--prefix LD_LIBRARY_PATH : $out/opt/Pencil
ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/pencil/libudev.so.1
wrapProgram $out/opt/pencil/pencil \
--prefix LD_LIBRARY_PATH : $out/opt/pencil
'';
meta = with stdenv.lib; {

View File

@ -7,13 +7,13 @@ with stdenv.lib;
rustPlatform.buildRustPackage rec {
pname = "rx";
version = "0.3.1";
version = "0.3.2";
src = fetchFromGitHub {
owner = "cloudhead";
repo = pname;
rev = "v${version}";
sha256 = "1byaxbhd3q49473kcdd52rvn3xq7bmy8bdx3pz0jiw96bclzhcgq";
sha256 = "1n5s7v2z13550gkqz7w6dw62jdy60wdi8w1lfa23609b4yhg4w94";
};
cargoSha256 = "173jfjvdag97f6jvfg366hjk9v3cz301cbzpcahy51rbf1cip1w1";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja, wrapGAppsHook
, wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt, scdoc, spdlog, gtk-layer-shell
, traySupport ? true, libdbusmenu-gtk3
, pulseSupport ? false, libpulseaudio
@ -19,7 +19,7 @@
};
nativeBuildInputs = [
meson ninja pkgconfig scdoc
meson ninja pkgconfig scdoc wrapGAppsHook
];
buildInputs = with stdenv.lib;

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation {
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
patchPhase = ''
sed -i "s|local daemon=.*|local daemon=$out/bin/gitstatusd|" gitstatus.plugin.zsh
sed -i "1i GITSTATUS_DAEMON=$out/bin/gitstatusd" gitstatus.plugin.zsh
'';
installPhase = ''
install -Dm755 gitstatusd $out/bin/gitstatusd

View File

@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "Big-B";
repo = pname;
repo = "swaylock-fancy";
rev = "35618ceec70338047355b6b057825e68f16971b5";
sha256 = "06fjqwblmj0d9pq6y11rr73mizirna4ixy6xkvblf1c7sn5n8lpc";
};

View File

@ -0,0 +1,23 @@
{ lib, fetchzip, ppx_deriving, ppxfind, buildDunePackage }:
buildDunePackage rec {
pname = "lens";
version = "1.2.3";
src = fetchzip {
url = "https://github.com/pdonadeo/ocaml-lens/archive/v${version}.tar.gz";
sha256 = "09k2vhzysx91syjhgv6w1shc9mgzi0l4bhwpx1g5pi4r4ghjp07y";
};
minimumOCamlVersion = "4.04.1";
buildInputs = [ ppx_deriving ppxfind ];
meta = with lib; {
homepage = https://github.com/pdonadeo/ocaml-lens;
description = "Functional lenses";
license = licenses.bsd3;
maintainers = with maintainers; [
kazcw
];
};
}

View File

@ -0,0 +1,22 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k }:
buildPythonPackage rec {
pname = "avro-python3";
version = "1.8.2";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "f82cf0d66189600b1e6b442f650ad5aca6c189576723dcbf6f9ce096eab81bd6";
};
doCheck = false; # No such file or directory: './run_tests.py
meta = with lib; {
description = "A serialization and RPC framework";
homepage = https://pypi.python.org/pypi/avro-python3/;
license = licenses.asl20;
maintainers = [ maintainers.shlevy maintainers.timma ];
};
}

View File

@ -0,0 +1,78 @@
{ lib
, fetchpatch
, buildPythonPackage
, fetchPypi
, pythonOlder
, isPy27
, cmake
, protobuf
, numpy
, six
, typing-extensions
, typing
, pytestrunner
, pytest
, nbval
, tabulate
}:
buildPythonPackage rec {
pname = "onnx";
version = "1.6.0";
# Due to Protobuf packaging issues this build of Onnx with Python 2 gives
# errors on import
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "0ig33jl3591041lyylxp52yi20rfrcqx3i030hd6al8iabzc721v";
};
# Remove the unqualified requirement for the typing package for running the
# tests. typing is already required for the installation, where it is
# correctly qualified so as to only be required for sufficiently old Python
# versions.
# This patch should be in the next release (>1.6).
patches = [
(fetchpatch {
url = "https://github.com/onnx/onnx/commit/c963586d0f8dd5740777b2fd06f04ec60816de9f.patch";
sha256 = "1hl26cw5zckc91gmh0bdah87jyprccxiw0f4i5h1gwkq28hm6wbj";
})
];
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [
protobuf
numpy
six
typing-extensions
] ++ lib.optional (pythonOlder "3.5") [ typing ];
checkInputs = [
pytestrunner
pytest
nbval
tabulate
];
postPatch = ''
patchShebangs tools/protoc-gen-mypy.py
'';
# The executables are just utility scripts that aren't too important
postInstall = ''
rm -r $out/bin
'';
# The setup.py does all the configuration (running CMake)
dontConfigure = true;
meta = {
homepage = http://onnx.ai;
description = "Open Neural Network Exchange";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.acairncross ];
};
}

View File

@ -10,11 +10,8 @@ buildPythonPackage rec {
};
# fix the ASCII-mode LICENSE file read
# disable test_fetch and the doctests (which also invoke fetch)
patchPhase = stdenv.lib.optionalString isPy3k ''
sed -i "s/)\.read(/,encoding='utf-8'\0/" setup.py
'' + ''
postPatch = ''
sed -i -e "/def test_fetch/i\\
\\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py
'';

View File

@ -0,0 +1,39 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, appdirs
, click
, construct
, cryptography
, pytest
, zeroconf
, attrs
, pytz
, tqdm
, netifaces
}:
buildPythonPackage rec {
pname = "python-miio";
version = "0.4.8";
src = fetchPypi {
inherit pname version;
sha256 = "19423b3386b23d2e0fc94a8f6a358bcfbb44eed05376e33fd434d26d168bd18c";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ appdirs click construct cryptography zeroconf attrs pytz tqdm netifaces ];
checkPhase = ''
pytest
'';
meta = with stdenv.lib; {
description = "Python library for interfacing with Xiaomi smart appliances";
homepage = https://github.com/rytilahti/python-miio;
license = licenses.gpl3;
maintainers = with maintainers; [ flyfloh ];
};
}

View File

@ -3,7 +3,7 @@
buildPythonPackage rec {
pname = "solo-python";
version = "0.0.18";
version = "0.0.21";
format = "flit";
disabled = pythonOlder "3.6"; # only python>=3.6 is supported
@ -11,7 +11,7 @@
owner = "solokeys";
repo = pname;
rev = version;
sha256 = "01mgppjvxlr93vrgz7bzisghpg1vqyaj4cg5wngk0h499iyx4d9q";
sha256 = "07r451dp3ma1mh735b2kjv86a4jkjhmag70cjqf73z7b61dmzl1q";
};
# replaced pinned fido, with unrestricted fido version
@ -48,6 +48,5 @@
homepage = "https://github.com/solokeys/solo-python";
maintainers = with maintainers; [ wucke13 ];
license = with licenses; [ asl20 mit ];
broken = true; # no longer compatible with fido2
};
}

View File

@ -0,0 +1,47 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, requests
, stups-cli-support
, stups-zign
, pytest
, pytestcov
, hypothesis
, isPy3k
}:
buildPythonPackage rec {
pname = "stups-pierone";
version = "1.1.45";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "zalando-stups";
repo = "pierone-cli";
rev = version;
sha256 = "1ggfizw27wpcagbbk15xpfrhq6b250cx4278b5d7y8s438g128cs";
};
propagatedBuildInputs = [
requests
stups-cli-support
stups-zign
];
preCheck = "
export HOME=$TEMPDIR
";
checkInputs = [
pytest
pytestcov
hypothesis
];
meta = with lib; {
description = "Convenient command line client for STUPS' Pier One Docker registry";
homepage = "https://github.com/zalando-stups/pierone-cli";
license = licenses.asl20;
maintainers = [ maintainers.mschuwalow ];
};
}

View File

@ -0,0 +1,294 @@
diff --git a/Makefile b/Makefile
index 463a11f..f20072c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,11 +5,11 @@ CFLAGS += -Wall
LIBS = `pkg-config --libs --cflags libusb-1.0`
RM = /bin/rm -f
OBJS = usb_modeswitch.c
-PREFIX = $(DESTDIR)/usr
-ETCDIR = $(DESTDIR)/etc
+PREFIX = /usr/local
+ETCDIR = $(PREFIX)/etc
SYSDIR = $(ETCDIR)/systemd/system
UPSDIR = $(ETCDIR)/init
-UDEVDIR = $(DESTDIR)/lib/udev
+UDEVDIR = $(PREFIX)/lib/udev
SBINDIR = $(PREFIX)/sbin
MANDIR = $(PREFIX)/share/man/man1
VPATH = jimtcl
@@ -22,10 +22,17 @@ endif
JIM_CONFIGURE_OPTS = --disable-lineedit \
--with-out-jim-ext="stdlib posix load signal syslog" --prefix=/usr
+USE_UPSTART=$(shell if command -v initctl > /dev/null; then echo "true"; fi)
+USE_SYSTEMD=$(shell if command -v systemctl > /dev/null; then echo "true"; fi)
+
.PHONY: clean install install-common uninstall \
script shared static \
dispatcher-script dispatcher-shared dispatcher-static \
- install-script install-shared install-static
+ install-script install-shared install-static \
+ install-upstart install-systemd \
+ configure-dispatcher configure-script \
+ configure-upstart configure-systemd \
+ configure
all: script
@@ -46,7 +53,25 @@ jim/libjim.a:
cd jim && CFLAGS="$(CFLAGS)" CC="$(CC)" ./configure $(JIM_CONFIGURE_OPTS)
$(MAKE) -C jim lib
-dispatcher-script: usb_modeswitch.tcl
+configure-dispatcher:
+ sed -i \
+ -e 's,^\(set setup(sbindir) \).*$$,\1$(SBINDIR),' \
+ -e 's,^\(set setup(etcdir) \).*$$,\1$(ETCDIR),' \
+ usb_modeswitch.tcl
+
+configure-script:
+ sed -i -e 's,^\(SBINDIR=\).*$$,\1$(SBINDIR),' usb_modeswitch.sh
+
+configure-systemd:
+ sed -i -e 's,@sbindir@,$(SBINDIR),' usb_modeswitch@.service
+
+configure-upstart:
+ sed -i -e 's,@sbindir@,$(SBINDIR),' usb-modeswitch-upstart.conf
+
+configure: configure-dispatcher configure-script \
+ configure-systemd configure-upstart
+
+dispatcher-script: configure-dispatcher usb_modeswitch.tcl
sed 's_!/usr/bin/tclsh_!'"$(TCL)"'_' < usb_modeswitch.tcl > usb_modeswitch_dispatcher
dispatcher-shared: jim/libjim.so dispatcher.c usb_modeswitch.string
@@ -55,7 +80,7 @@ dispatcher-shared: jim/libjim.so dispatcher.c usb_modeswitch.string
dispatcher-static: jim/libjim.a dispatcher.c usb_modeswitch.string
$(CC) dispatcher.c $(LDFLAGS) jim/libjim.a -Ijim -o usb_modeswitch_dispatcher $(CFLAGS)
-usb_modeswitch.string: usb_modeswitch.tcl
+usb_modeswitch.string: configure-dispatcher usb_modeswitch.tcl
$(HOST_TCL) make_string.tcl usb_modeswitch.tcl > $@
clean:
@@ -76,16 +101,28 @@ ums-clean:
# If the systemd folder is present, install the service for starting the dispatcher
# If not, use the dispatcher directly from the udev rule as in previous versions
-install-common: $(PROG) usb_modeswitch_dispatcher
- install -D --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch
- install -D --mode=755 usb_modeswitch.sh $(UDEVDIR)/usb_modeswitch
- install -D --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf
- install -D --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1
- install -D --mode=644 usb_modeswitch_dispatcher.1 $(MANDIR)/usb_modeswitch_dispatcher.1
- install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher
+install-common: $(PROG) configure usb_modeswitch_dispatcher
+ install -D --mode=755 usb_modeswitch $(DESTDIR)$(SBINDIR)/usb_modeswitch
+ install -D --mode=755 usb_modeswitch.sh $(DESTDIR)$(UDEVDIR)/usb_modeswitch
+ install -D --mode=644 usb_modeswitch.conf $(DESTDIR)$(ETCDIR)/usb_modeswitch.conf
+ install -D --mode=644 usb_modeswitch.1 $(DESTDIR)$(MANDIR)/usb_modeswitch.1
+ install -D --mode=644 usb_modeswitch_dispatcher.1 $(DESTDIR)$(MANDIR)/usb_modeswitch_dispatcher.1
+ install -D --mode=755 usb_modeswitch_dispatcher $(DESTDIR)$(SBINDIR)/usb_modeswitch_dispatcher
install -d $(DESTDIR)/var/lib/usb_modeswitch
- test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1
- test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 usb_modeswitch@.service $(SYSDIR) || test 1
+
+install-upstart:
+ install -D --mode=644 usb-modeswitch-upstart.conf $(DESTDIR)$(UPSDIR)/usb-modeswitch-upstart.conf
+
+install-systemd:
+ install -D --mode=644 usb_modeswitch@.service $(DESTDIR)$(SYSDIR)/usb_modeswitch@.service
+
+ifeq ($(USE_UPSTART),true)
+install-common: install-upstart
+endif
+
+ifeq ($(USE_SYSTEMD),true)
+install-common: install-systemd
+endif
install: install-script
@@ -96,10 +133,10 @@ install-shared: dispatcher-shared install-common
install-static: dispatcher-static install-common
uninstall:
- $(RM) $(SBINDIR)/usb_modeswitch
- $(RM) $(SBINDIR)/usb_modeswitch_dispatcher
- $(RM) $(UDEVDIR)/usb_modeswitch
- $(RM) $(ETCDIR)/usb_modeswitch.conf
- $(RM) $(MANDIR)/usb_modeswitch.1
+ $(RM) $(DESTDIR)$(SBINDIR)/usb_modeswitch
+ $(RM) $(DESTDIR)$(SBINDIR)/usb_modeswitch_dispatcher
+ $(RM) $(DESTDIR)$(UDEVDIR)/usb_modeswitch
+ $(RM) $(DESTDIR)$(ETCDIR)/usb_modeswitch.conf
+ $(RM) $(DESTDIR)$(MANDIR)/usb_modeswitch.1
$(RM) -R $(DESTDIR)/var/lib/usb_modeswitch
- $(RM) $(SYSDIR)/usb_modeswitch@.service
+ $(RM) $(DESTDIR)$(SYSDIR)/usb_modeswitch@.service
diff --git a/usb-modeswitch-upstart.conf b/usb-modeswitch-upstart.conf
index 0d82b69..1c177b4 100644
--- a/usb-modeswitch-upstart.conf
+++ b/usb-modeswitch-upstart.conf
@@ -1,5 +1,5 @@
start on usb-modeswitch-upstart
task
script
- exec /usr/sbin/usb_modeswitch_dispatcher --switch-mode $UMS_PARAM
+ exec @sbindir@/usb_modeswitch_dispatcher --switch-mode $UMS_PARAM
end script
diff --git a/usb_modeswitch.sh b/usb_modeswitch.sh
index eb3fa3e..0e93166 100755
--- a/usb_modeswitch.sh
+++ b/usb_modeswitch.sh
@@ -1,5 +1,9 @@
#!/bin/sh
# part of usb_modeswitch 2.5.2
+
+# Compile time configuration, injected by the Makefile
+SBINDIR=/usr/sbin
+
device_in()
{
if [ ! -e /var/lib/usb_modeswitch/$1 ]; then
@@ -37,7 +41,7 @@ if [ $(expr "$1" : "--.*") ]; then
v_id=$3
fi
fi
-PATH=/sbin:/usr/sbin:$PATH
+
case "$1" in
--driver-bind)
# driver binding code removed
@@ -46,9 +50,7 @@ case "$1" in
--symlink-name)
device_in "link_list" $v_id $p_id
if [ "$?" = "1" ]; then
- if [ -e "/usr/sbin/usb_modeswitch_dispatcher" ]; then
- exec usb_modeswitch_dispatcher $1 $2 2>>/dev/null
- fi
+ exec $SBINDIR/usb_modeswitch_dispatcher $1 $2 2>>/dev/null
fi
exit 0
;;
@@ -61,15 +63,13 @@ if [ "$p2" = "" -a "$p1" != "" ]; then
p2=$p1
fi
-PATH=/bin:/sbin:/usr/bin:/usr/sbin
-init_path=`readlink -f /sbin/init`
-if [ `basename $init_path` = "systemd" ]; then
+if command -v systemctl > /dev/null; then
systemctl --no-block start usb_modeswitch@$p2.service
-elif [ -e "/etc/init/usb-modeswitch-upstart.conf" ]; then
+elif command -v initctl > /dev/null; then
initctl emit --no-wait usb-modeswitch-upstart UMS_PARAM=$p2
else
# only old distros, new udev will kill all subprocesses
exec 1<&- 2<&- 5<&- 7<&-
- exec usb_modeswitch_dispatcher --switch-mode $p2 &
+ exec $SBINDIR/usb_modeswitch_dispatcher --switch-mode $p2 &
fi
exit 0
diff --git a/usb_modeswitch.tcl b/usb_modeswitch.tcl
index d2ee50c..8a48751 100755
--- a/usb_modeswitch.tcl
+++ b/usb_modeswitch.tcl
@@ -12,6 +12,16 @@
# Part of usb-modeswitch-2.5.2 package
# (C) Josua Dietze 2009-2017
+# Compile-time configuration, injected by the Makefile.
+set setup(sbindir) /usr/sbin
+set setup(etcdir) /etc
+
+# External dependency default location
+set setup(dbdir) /usr/share/usb_modeswitch
+
+# Derived configuration
+set setup(dbdir_etc) $setup(etcdir)/usb_modeswitch.d
+
set arg0 [lindex $argv 0]
if [regexp {\.tcl$} $arg0] {
if [file exists $arg0] {
@@ -91,10 +101,8 @@ if {![regexp {(.*?):.*$} $arg1 d device]} {
}
set flags(logwrite) 1
-set setup(dbdir) /usr/share/usb_modeswitch
-set setup(dbdir_etc) /etc/usb_modeswitch.d
if {![file exists $setup(dbdir)] && ![file exists $setup(dbdir_etc)]} {
- Log "\nError: no config database found in /usr/share or /etc. Exit"
+ Log "\nError: no config database found in $setup(dbdir) or $setup(dbdir_etc). Exit"
SafeExit
}
@@ -261,7 +269,7 @@ if {$config(NoMBIMCheck)==0 && $usb(bNumConfigurations) > 1} {
if [CheckMBIM] {
Log " driver for MBIM devices is available"
Log "Find MBIM configuration number ..."
- if [catch {set cfgno [exec /usr/sbin/usb_modeswitch -j -Q $busParam $devParam -v $usb(idVendor) -p $usb(idProduct)]} err] {
+ if [catch {set cfgno [exec $setup(sbindir)/usb_modeswitch -j -Q $busParam $devParam -v $usb(idVendor) -p $usb(idProduct)]} err] {
Log "Error when trying to find MBIM configuration, switch to legacy modem mode"
} else {
set cfgno [string trim $cfgno]
@@ -297,7 +305,7 @@ if {$report == ""} {
# Now we are actually switching
if $flags(logging) {
Log "Command line:\nusb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f \$flags(config)"
- catch {set report [exec /usr/sbin/usb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report
+ catch {set report [exec $setup(sbindir)/usb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report
Log "\nVerbose debug output of usb_modeswitch and libusb follows"
Log "(Note that some USB errors are to be expected in the process)"
Log "--------------------------------"
@@ -305,7 +313,7 @@ if {$report == ""} {
Log "--------------------------------"
Log "(end of usb_modeswitch output)\n"
} else {
- catch {set report [exec /usr/sbin/usb_modeswitch -Q -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report
+ catch {set report [exec $setup(sbindir)/usb_modeswitch -Q -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report
}
}
@@ -498,9 +506,9 @@ return 1
proc {ParseGlobalConfig} {} {
-global flags
+global flags setup
set configFile ""
-set places [list /etc/usb_modeswitch.conf /etc/sysconfig/usb_modeswitch /etc/default/usb_modeswitch]
+set places [list $setup(etcdir)/usb_modeswitch.conf $setup(etcdir)/sysconfig/usb_modeswitch $setup(etcdir)/default/usb_modeswitch]
foreach cfg $places {
if [file exists $cfg] {
set configFile $cfg
@@ -897,10 +905,12 @@ proc {SysLog} {msg} {
global flags
if {![info exists flags(logger)]} {
- set flags(logger) ""
- foreach fn {/bin/logger /usr/bin/logger} {
- if [file exists $fn] {
- set flags(logger) $fn
+ set flags(logger) [exec sh -c "command -v logger || true"]
+ if {$flags(logger) == ""} {
+ foreach fn {/bin/logger /usr/bin/logger} {
+ if [file exists $fn] {
+ set flags(logger) $fn
+ }
}
}
Log "Logger is $flags(logger)"
diff --git a/usb_modeswitch@.service b/usb_modeswitch@.service
index f74a8bf..90cb96a 100644
--- a/usb_modeswitch@.service
+++ b/usb_modeswitch@.service
@@ -3,6 +3,6 @@ Description=USB_ModeSwitch_%i
[Service]
Type=oneshot
-ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-mode %i
+ExecStart=@sbindir@/usb_modeswitch_dispatcher --switch-mode %i
#ExecStart=/bin/echo %i

View File

@ -9,10 +9,13 @@ stdenv.mkDerivation rec {
sha256 = "1ygahl3r26r38ai8yyblq9nhf3v5i6n6r6672p5wf88wg5h9n0rz";
};
inherit (usb-modeswitch) makeFlags;
makeFlags = [
"PREFIX=$(out)"
"DESTDIR=$(out)"
];
prePatch = ''
sed -i 's@usb_modeswitch@${usb-modeswitch}/bin/usb_modeswitch@g' 40-usb_modeswitch.rules
sed -i 's@usb_modeswitch@${usb-modeswitch}/lib/udev/usb_modeswitch@g' 40-usb_modeswitch.rules
'';
# we add tcl here so we can patch in support for new devices by dropping config into

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, pkgconfig, libusb1 }:
{ stdenv, lib, fetchurl, pkgconfig, makeWrapper
, libusb1, tcl, utillinux, coreutils, bash }:
stdenv.mkDerivation rec {
pname = "usb-modeswitch";
@ -9,19 +10,32 @@ stdenv.mkDerivation rec {
sha256 = "18wbbxc5cfsmikba0msdvd5qlaga27b32nhrzicyd9mdddp265f2";
};
makeFlags = [
"DESTDIR=$(out)"
"PREFIX=$(out)"
];
patches = [ ./configurable-usb-modeswitch.patch ];
# make clean: we always build from source. It should be necessary on x86_64 only
preConfigure = ''
find -type f | xargs sed 's@/bin/rm@rm@g' -i
make clean
# Remove attempts to write to /etc and /var/lib.
postPatch = ''
sed -i \
-e '/^\tinstall .* usb_modeswitch.conf/s,$(ETCDIR),$(out)/etc,' \
-e '\,^\tinstall -d .*/var/lib/usb_modeswitch,d' \
Makefile
'';
buildInputs = [ libusb1 ];
nativeBuildInputs = [ pkgconfig ];
makeFlags = [
"PREFIX=$(out)"
"ETCDIR=/etc"
"USE_UPSTART=false"
"USE_SYSTEMD=true"
"SYSDIR=$(out)/lib/systemd/system"
"UDEVDIR=$(out)/lib/udev"
];
postFixup = ''
wrapProgram $out/bin/usb_modeswitch_dispatcher \
--set PATH ${lib.makeBinPath [ utillinux coreutils bash ]}
'';
buildInputs = [ libusb1 tcl ];
nativeBuildInputs = [ pkgconfig makeWrapper ];
meta = with stdenv.lib; {
description = "A mode switching tool for controlling 'multi-mode' USB devices";

View File

@ -20,16 +20,10 @@ let
getFunctorFn = fn: if builtins.typeOf fn == "set" then fn.__functor else fn;
getAttrDefault = attribute: set: default: (
if builtins.hasAttr attribute set
then builtins.getAttr attribute set
else default
);
# Map SPDX identifiers to license names
spdxLicenses = lib.listToAttrs (lib.filter (pair: pair.name != null) (builtins.map (v: { name = if lib.hasAttr "spdxId" v then v.spdxId else null; value = v; }) (lib.attrValues lib.licenses)));
# Get license by id falling back to input string
getLicenseBySpdxId = spdxId: getAttrDefault spdxId spdxLicenses spdxId;
getLicenseBySpdxId = spdxId: spdxLicenses.${spdxId} or spdxId;
#
# Returns an attrset { python, poetryPackages } for the given lockfile
@ -65,7 +59,7 @@ let
# closure as python can only ever have one version of a dependency
baseOverlay = self: super:
let
getDep = depName: if builtins.hasAttr depName self then self."${depName}" else throw "foo";
getDep = depName: self.${depName};
lockPkgs = builtins.listToAttrs (
builtins.map (
@ -74,7 +68,7 @@ let
value = self.mkPoetryDep (
pkgMeta // {
inherit pwd;
source = getAttrDefault "source" pkgMeta null;
source = pkgMeta.source or null;
files = lockFiles.${name};
pythonPackages = self;
}
@ -159,12 +153,12 @@ let
passedAttrs = builtins.removeAttrs attrs specialAttrs;
getDeps = depAttr: let
deps = getAttrDefault depAttr pyProject.tool.poetry {};
deps = pyProject.tool.poetry.${depAttr} or {};
depAttrs = builtins.map (d: lib.toLower d) (builtins.attrNames deps);
in
builtins.map (dep: py.pkgs."${dep}") depAttrs;
getInputs = attr: getAttrDefault attr attrs [];
getInputs = attr: attrs.${attr} or [];
mkInput = attr: extraInputs: getInputs attr ++ extraInputs;
buildSystemPkgs = poetryLib.getBuildSystemPkgs {
@ -189,7 +183,7 @@ let
python = py;
};
postPatch = (getAttrDefault "postPatch" passedAttrs "") + ''
postPatch = (passedAttrs.postPatch or "") + ''
# Tell poetry not to resolve the path dependencies. Any version is
# fine !
yj -tj < pyproject.toml | python ${./pyproject-without-path.py} > pyproject.json
@ -199,7 +193,7 @@ let
meta = meta // {
inherit (pyProject.tool.poetry) description homepage;
license = getLicenseBySpdxId (getAttrDefault "license" pyProject.tool.poetry "unknown");
license = getLicenseBySpdxId (pyProject.tool.poetry.license or "unknown");
};
}

View File

@ -30,22 +30,24 @@ let
in
(builtins.foldl' combine initial tokens).state;
fromTOML = toml: if builtins.hasAttr "fromTOML" builtins then builtins.fromTOML toml else
builtins.fromJSON (
builtins.readFile (
pkgs.runCommand "from-toml"
{
inherit toml;
allowSubstitutes = false;
preferLocalBuild = true;
}
''
${pkgs.remarshal}/bin/remarshal \
-if toml \
-i <(echo "$toml") \
-of json \
-o $out
''
fromTOML = builtins.fromTOML or
(
toml: builtins.fromJSON (
builtins.readFile (
pkgs.runCommand "from-toml"
{
inherit toml;
allowSubstitutes = false;
preferLocalBuild = true;
}
''
${pkgs.remarshal}/bin/remarshal \
-if toml \
-i <(echo "$toml") \
-of json \
-o $out
''
)
)
);
readTOML = path: fromTOML (builtins.readFile path);

View File

@ -16,102 +16,112 @@
, pwd
, supportedExtensions ? lib.importJSON ./extensions.json
, ...
}: let
}:
inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromPypi;
pythonPackages.callPackage (
{ preferWheel ? false
}:
inherit (import ./pep425.nix {
inherit lib python;
inherit (pkgs) stdenv;
}) selectWheel
;
fileCandidates = let
supportedRegex = ("^.*?(" + builtins.concatStringsSep "|" supportedExtensions + ")");
matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." ] [ "\\." ] version + ".*$") fname != null;
hasSupportedExtension = fname: builtins.match supportedRegex fname != null;
isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname;
in
builtins.filter (f: matchesVersion f.file && hasSupportedExtension f.file && isCompatibleEgg f.file) files;
toPath = s: pwd + "/${s}";
isSource = source != null;
isGit = isSource && source.type == "git";
isLocal = isSource && source.type == "directory";
localDepPath = toPath source.url;
pyProject = poetryLib.readTOML (localDepPath + "/pyproject.toml");
buildSystemPkgs = poetryLib.getBuildSystemPkgs {
inherit pythonPackages pyProject;
};
fileInfo = let
isBdist = f: lib.strings.hasSuffix "whl" f.file;
isSdist = f: ! isBdist f && ! isEgg f;
isEgg = f: lib.strings.hasSuffix ".egg" f.file;
binaryDist = selectWheel fileCandidates;
sourceDist = builtins.filter isSdist fileCandidates;
eggs = builtins.filter isEgg fileCandidates;
lockFileEntry = builtins.head (sourceDist ++ binaryDist ++ eggs);
_isEgg = isEgg lockFileEntry;
in
rec {
inherit (lockFileEntry) file hash;
name = file;
format =
if _isEgg then "egg"
else if lib.strings.hasSuffix ".whl" name then "wheel"
else "setuptools";
kind =
if _isEgg then python.pythonVersion
else if format == "setuptools" then "source"
else (builtins.elemAt (lib.strings.splitString "-" name) 2);
};
baseBuildInputs = lib.optional (name != "setuptools_scm" && name != "setuptools-scm") pythonPackages.setuptools_scm;
in
buildPythonPackage {
pname = name;
version = version;
doCheck = false; # We never get development deps
dontStrip = true;
format = if isLocal then "pyproject" else if isGit then "setuptools" else fileInfo.format;
nativeBuildInputs = if (!isSource && (getManyLinuxDeps fileInfo.name).str != null) then [ autoPatchelfHook ] else [];
buildInputs = baseBuildInputs ++ (if !isSource then (getManyLinuxDeps fileInfo.name).pkg else []);
propagatedBuildInputs =
let
# Some dependencies like django gets the attribute name django
# but dependencies try to access Django
deps = builtins.map (d: lib.toLower d) (builtins.attrNames dependencies);
inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromPypi;
inherit (import ./pep425.nix {
inherit lib python;
inherit (pkgs) stdenv;
}) selectWheel
;
fileCandidates = let
supportedRegex = ("^.*?(" + builtins.concatStringsSep "|" supportedExtensions + ")");
matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." ] [ "\\." ] version + ".*$") fname != null;
hasSupportedExtension = fname: builtins.match supportedRegex fname != null;
isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname;
in
builtins.filter (f: matchesVersion f.file && hasSupportedExtension f.file && isCompatibleEgg f.file) files;
toPath = s: pwd + "/${s}";
isSource = source != null;
isGit = isSource && source.type == "git";
isLocal = isSource && source.type == "directory";
localDepPath = toPath source.url;
pyProject = poetryLib.readTOML (localDepPath + "/pyproject.toml");
buildSystemPkgs = poetryLib.getBuildSystemPkgs {
inherit pythonPackages pyProject;
};
fileInfo = let
isBdist = f: lib.strings.hasSuffix "whl" f.file;
isSdist = f: ! isBdist f && ! isEgg f;
isEgg = f: lib.strings.hasSuffix ".egg" f.file;
binaryDist = selectWheel fileCandidates;
sourceDist = builtins.filter isSdist fileCandidates;
eggs = builtins.filter isEgg fileCandidates;
entries = (if preferWheel then binaryDist ++ sourceDist else sourceDist ++ binaryDist) ++ eggs;
lockFileEntry = builtins.head entries;
_isEgg = isEgg lockFileEntry;
in
rec {
inherit (lockFileEntry) file hash;
name = file;
format =
if _isEgg then "egg"
else if lib.strings.hasSuffix ".whl" name then "wheel"
else "setuptools";
kind =
if _isEgg then python.pythonVersion
else if format == "setuptools" then "source"
else (builtins.elemAt (lib.strings.splitString "-" name) 2);
};
baseBuildInputs = lib.optional (name != "setuptools_scm" && name != "setuptools-scm") pythonPackages.setuptools_scm;
in
(builtins.map (n: pythonPackages.${n}) deps) ++ (if isLocal then buildSystemPkgs else []);
meta = {
broken = ! isCompatible python.version python-versions;
license = [];
};
buildPythonPackage {
pname = name;
version = version;
# We need to retrieve kind from the interpreter and the filename of the package
# Interpreters should declare what wheel types they're compatible with (python type + ABI)
# Here we can then choose a file based on that info.
src = if isGit then (
builtins.fetchGit {
inherit (source) url;
rev = source.reference;
}
) else if isLocal then (localDepPath) else fetchFromPypi {
pname = name;
inherit (fileInfo) file hash kind;
};
}
doCheck = false; # We never get development deps
dontStrip = true;
format = if isLocal then "pyproject" else if isGit then "setuptools" else fileInfo.format;
nativeBuildInputs = if (!isSource && (getManyLinuxDeps fileInfo.name).str != null) then [ autoPatchelfHook ] else [];
buildInputs = baseBuildInputs ++ (if !isSource then (getManyLinuxDeps fileInfo.name).pkg else []);
propagatedBuildInputs =
let
# Some dependencies like django gets the attribute name django
# but dependencies try to access Django
deps = builtins.map (d: lib.toLower d) (builtins.attrNames dependencies);
in
(builtins.map (n: pythonPackages.${n}) deps) ++ (if isLocal then buildSystemPkgs else []);
meta = {
broken = ! isCompatible python.version python-versions;
license = [];
};
# We need to retrieve kind from the interpreter and the filename of the package
# Interpreters should declare what wheel types they're compatible with (python type + ABI)
# Here we can then choose a file based on that info.
src = if isGit then (
builtins.fetchGit {
inherit (source) url;
rev = source.reference;
}
) else if isLocal then (localDepPath) else fetchFromPypi {
pname = name;
inherit (fileInfo) file hash kind;
};
}
) {}

View File

@ -5,14 +5,6 @@
self: super:
let
getAttrDefault = attribute: set: default:
if builtins.hasAttr attribute set
then builtins.getAttr attribute set
else default;
in
{
av = super.av.overrideAttrs (
old: {
@ -52,7 +44,7 @@ in
django = (
super.django.overrideAttrs (
old: {
propagatedNativeBuildInputs = (getAttrDefault "propagatedNativeBuildInputs" old [])
propagatedNativeBuildInputs = (old.propagatedNativeBuildInputs or [])
++ [ pkgs.gettext ];
}
)
@ -64,7 +56,7 @@ in
if ! test -e LICENSE; then
touch LICENSE
fi
'' + (getAttrDefault "configurePhase" old "");
'' + (old.configurePhase or "");
}
);
@ -85,6 +77,13 @@ in
}
);
# importlib-metadata has an incomplete dependency specification
importlib-metadata = super.importlib-metadata.overrideAttrs (
old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ lib.optional self.python.isPy2 self.pathlib2;
}
);
lap = super.lap.overrideAttrs (
old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [
@ -154,6 +153,11 @@ in
}
);
# Calls Cargo at build time for source builds and is really tricky to package
maturin = super.maturin.override {
preferWheel = true;
};
mccabe = super.mccabe.overrideAttrs (
old: {
postPatch = ''
@ -293,6 +297,93 @@ in
}
);
pyqt5 = super.pyqt5.overridePythonAttrs (
old: {
format = "other";
nativeBuildInputs = old.nativeBuildInputs ++ [
pkgs.pkgconfig
pkgs.qt5.qmake
pkgs.xorg.lndir
pkgs.qt5.qtbase
pkgs.qt5.qtsvg
pkgs.qt5.qtdeclarative
pkgs.qt5.qtwebchannel
# self.pyqt5-sip
self.sip
];
buildInputs = old.buildInputs ++ [
pkgs.dbus
pkgs.qt5.qtbase
pkgs.qt5.qtsvg
pkgs.qt5.qtdeclarative
self.sip
];
# Fix dbus mainloop
inherit (pkgs.python3.pkgs.pyqt5) patches;
configurePhase = ''
runHook preConfigure
export PYTHONPATH=$PYTHONPATH:$out/${self.python.sitePackages}
mkdir -p $out/${self.python.sitePackages}/dbus/mainloop
${self.python.executable} configure.py -w \
--confirm-license \
--no-qml-plugin \
--bindir=$out/bin \
--destdir=$out/${self.python.sitePackages} \
--stubsdir=$out/${self.python.sitePackages}/PyQt5 \
--sipdir=$out/share/sip/PyQt5 \
--designer-plugindir=$out/plugins/designer
runHook postConfigure
'';
postInstall = ''
ln -s ${self.pyqt5-sip}/${self.python.sitePackages}/PyQt5/sip.* $out/${self.python.sitePackages}/PyQt5/
for i in $out/bin/*; do
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
done
# # Let's make it a namespace package
# cat << EOF > $out/${self.python.sitePackages}/PyQt5/__init__.py
# from pkgutil import extend_path
# __path__ = extend_path(__path__, __name__)
# EOF
'';
installCheckPhase = let
modules = [
"PyQt5"
"PyQt5.QtCore"
"PyQt5.QtQml"
"PyQt5.QtWidgets"
"PyQt5.QtGui"
];
imports = lib.concatMapStrings (module: "import ${module};") modules;
in
''
echo "Checking whether modules can be imported..."
${self.python.interpreter} -c "${imports}"
'';
doCheck = true;
enableParallelBuilding = true;
}
);
pytest-datadir = super.pytest-datadir.overrideAttrs (
old: {
postInstall = ''
rm -f $out/LICENSE
'';
}
);
python-prctl = super.python-prctl.overrideAttrs (
old: {
buildInputs = old.buildInputs ++ [
@ -340,6 +431,14 @@ in
}
);
vose-alias-method = super.pytest-datadir.overrideAttrs (
old: {
postInstall = ''
rm -f $out/LICENSE
'';
}
);
# Stop infinite recursion by using bootstrapped pkg from nixpkgs
wheel = (
pkgs.python3.pkgs.override {

View File

@ -786,10 +786,11 @@ in with stdenv.lib.licenses;
snes9x = (mkLibRetroCore rec {
core = "snes9x";
src = fetchRetro {
src = fetchFromGitHub {
owner = "snes9xgit";
repo = core;
rev = "29b78df8c9f0f48ed4605d08a187a134b3b316d6";
sha256 = "004h1pkxvbn4zlh8bqs6z17k04jw5wzbwklpgvmb7hbxshsi4qid";
rev = "04692e1ee45cc647423774ee17c63208c2713638";
sha256 = "09p9m85fxwrrrapjb08rcxknpgq5d6a87arrm1jn94r56glxlcfa";
};
description = "Port of SNES9x git to libretro";
license = "Non-commercial";

View File

@ -424,12 +424,12 @@ let
coc-metals = buildVimPluginFrom2Nix {
pname = "coc-metals";
version = "2020-01-12";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "ckipp01";
repo = "coc-metals";
rev = "569547beb3bbed8c1b882dc5ad0331f95b7d100f";
sha256 = "1s9qyks69x3nbp9nn8p2yhv3wi9s77nihcjck7l5rzmmdcg5rka8";
rev = "b2b3c6e43f8dc0a9353046faacb2cfafe0220228";
sha256 = "160y5rz1nhpdlb9j3ximn6ylj0rabkbvl0h7jil95rin60sq91d1";
};
};
@ -876,12 +876,12 @@ let
denite-nvim = buildVimPluginFrom2Nix {
pname = "denite-nvim";
version = "2020-01-11";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "Shougo";
repo = "denite.nvim";
rev = "ef50148d730a9a14b3def3fa07c6cce4917172ed";
sha256 = "1kb8gl5c1sgrs3p2x7ib01nwwnwa73kzsgzg38w6xwsrnw044d18";
rev = "22dd7524bef3468af674fb1ecfb3e55ee679ebc0";
sha256 = "03cf90kvq337mj151y5m0w5px6h3y6hanfj2bcxwnpwifmjdinij";
};
};
@ -1675,12 +1675,12 @@ let
lh-vim-lib = buildVimPluginFrom2Nix {
pname = "lh-vim-lib";
version = "2019-12-29";
version = "2020-01-12";
src = fetchFromGitHub {
owner = "LucHermitte";
repo = "lh-vim-lib";
rev = "6e60e3a6575449e08feb27fb3528b55e71fd56e3";
sha256 = "054wxj8f23ddqs3mp8rvw2lsplqfyn352zcq6biywbybjm2xphf7";
rev = "13a59968c0d76884f2ef1feb27493ba90d62deb0";
sha256 = "0g9dfg7y7znj3iiz67323jbflg6d34hq8hc8v4gcjnrinagyydnv";
};
};
@ -2498,6 +2498,17 @@ let
};
};
salt-vim = buildVimPluginFrom2Nix {
pname = "salt-vim";
version = "2017-07-01";
src = fetchFromGitHub {
owner = "saltstack";
repo = "salt-vim";
rev = "6ca9e3500cc39dd417b411435d58a1b720b331cc";
sha256 = "0r79bpl98xcsmkw6dg83cf1ghn89rzsr011zirk3v1wfxclri2c4";
};
};
self = buildVimPluginFrom2Nix {
pname = "self";
version = "2014-05-28";
@ -2886,12 +2897,12 @@ let
tsuquyomi = buildVimPluginFrom2Nix {
pname = "tsuquyomi";
version = "2019-07-17";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "Quramy";
repo = "tsuquyomi";
rev = "61e16ab1d1cb621385bc9c6a0c5e7744494ec9f5";
sha256 = "1w6m69695f4gx7d5fg3bnabhjx1680fvrz44f65jhdh2y2njm68h";
rev = "1fc47734abcb272df4321a50e2587c4c9e0a0a1a";
sha256 = "0dwc22zhzslgk60slr60rn26ww3ppl52nf6pcbnagxwfzadn5l6z";
};
};
@ -3227,12 +3238,12 @@ let
vim-airline = buildVimPluginFrom2Nix {
pname = "vim-airline";
version = "2020-01-06";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "vim-airline";
repo = "vim-airline";
rev = "c1de3d33701492a388684ffcc9899faf4b863e92";
sha256 = "0pw0laiigsbivsrxiy654jnsxjq8x855pk6y0mdilkwvinza0z0j";
rev = "8d694cba9c22efe8320a8fbc919a50bd938e7929";
sha256 = "17kjbc13rsjaxkpfj0f90v3khzid02rrkcdjss3sqa35f37wn2bz";
};
};
@ -3414,12 +3425,12 @@ let
vim-codefmt = buildVimPluginFrom2Nix {
pname = "vim-codefmt";
version = "2020-01-08";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "google";
repo = "vim-codefmt";
rev = "024911c7fede0105a3381f6bc3ed54364ecbe77d";
sha256 = "0yjvkxz6qk1yxdbjb6b0zxsab1h880l4dr6c74rcmak9m1m12r66";
rev = "af796cf4084a3d32b85313ccc82675d626d40b59";
sha256 = "0pbwirsh8nx0dgf82w1sy6az6mpwdnxzy0ycqrx6qxs6bbf1kf74";
};
};
@ -3667,12 +3678,12 @@ let
vim-easymotion = buildVimPluginFrom2Nix {
pname = "vim-easymotion";
version = "2020-01-06";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "easymotion";
repo = "vim-easymotion";
rev = "83a09a19e7a9c51c6ca2e0f90f1dd27ef4c159c6";
sha256 = "1xaliyiv80vcsl5gqj40avgdf4384d5xhnvhh0jaklk1hmrdzxgf";
rev = "d534ba0d0c211d8228408c88fa3ebde13fecec37";
sha256 = "0yc28synqrqjnzgzpmn7ji3nnidb55mm8n27d0kkd2l80bygg8n4";
};
};
@ -5131,12 +5142,12 @@ let
vim-snippets = buildVimPluginFrom2Nix {
pname = "vim-snippets";
version = "2020-01-07";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "honza";
repo = "vim-snippets";
rev = "977cc05194bdac51970bf83d0fe6fafc297012de";
sha256 = "0jj7j4mrkx0h1kcz50zs316gbppciypnv541hpsv32wzfcjj2x9m";
rev = "5279654b3e9fc280742d02c9509d4313d9da18e9";
sha256 = "0xnml4ayjwf7mzpz64alwygpgccvj4znask76ldw3hxp112fwcah";
};
};
@ -5725,12 +5736,12 @@ let
vimtex = buildVimPluginFrom2Nix {
pname = "vimtex";
version = "2020-01-11";
version = "2020-01-12";
src = fetchFromGitHub {
owner = "lervag";
repo = "vimtex";
rev = "b39262879240e699ac90618003d47857be664c2d";
sha256 = "17r6nckqqw6mcpxcvh8whv3xpmnf77ws1hyiphw2dppfmr3jpp36";
rev = "aabfcf9e0c95bc08125aefaeb9fdfc9be04913c5";
sha256 = "0d7sv6f8iafwm891vl4wlsv93jfqjckmsrg2k9rfynk737vsmvp5";
};
};
@ -5747,12 +5758,12 @@ let
vimwiki = buildVimPluginFrom2Nix {
pname = "vimwiki";
version = "2020-01-04";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "vimwiki";
repo = "vimwiki";
rev = "b90e6f2e3343277faca65156d733f725f76f1e53";
sha256 = "1z3mj73iqh4h3wx5cq4k7gp2nkbaj85v665v0phqw42c213064nb";
rev = "64c9f3d36d632b1657616c06ea8f08f14cf6438d";
sha256 = "0wwfl0bafwh9p8lzic75d0nl6v5dnpfid7fbiffr0i72agp0gcq7";
};
};
@ -5879,12 +5890,12 @@ let
yats-vim = buildVimPluginFrom2Nix {
pname = "yats-vim";
version = "2020-01-11";
version = "2020-01-13";
src = fetchFromGitHub {
owner = "HerringtonDarkholme";
repo = "yats.vim";
rev = "81137eba4f2b3ed093e60dbba7d29b6d3ae4c988";
sha256 = "04hprqqxx84lwnfnfj7x0fnsbc45xk8grf3akbzrpl1a0v36b0r3";
rev = "976d10ee24ce4d8790bcd80b3f7c6b8bbc9ec76d";
sha256 = "0f3kgb07js6pjr6p03iyspn5k852y5b90w1ylas7lbgz32a1f3hp";
fetchSubmodules = true;
};
};
@ -5936,12 +5947,12 @@ let
zig-vim = buildVimPluginFrom2Nix {
pname = "zig-vim";
version = "2020-01-09";
version = "2020-01-12";
src = fetchFromGitHub {
owner = "zig-lang";
repo = "zig.vim";
rev = "9c22f756b8d2b2e0e3557671a84a555f52aa1a87";
sha256 = "1dd0by3z1ac55fm52nvxm7qf41icm0pdhzmdpdmsizbfz75nnhwz";
rev = "2a1de0f764e42f8b76daafc24249d6cb4a743c16";
sha256 = "0lbry8s34ld97m05q091q2dmpfkn8k6nsj0q1vrbrsml5i5xig9c";
};
};

View File

@ -378,6 +378,7 @@ ryanoasis/vim-devicons
Rykka/riv.vim
ryvnf/readline.vim
sakhnik/nvim-gdb
saltstack/salt-vim
samoshkin/vim-mergetool
sbdchd/neoformat
scrooloose/nerdcommenter

View File

@ -1,8 +1,8 @@
{ stdenv, lib, fetchsvn, linux
, scripts ? fetchsvn {
url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/";
rev = "17192";
sha256 = "0hyd7wp73w4555d42xcvk4x4nxrfckbzah2ckb4d2aqzxab87789";
rev = "17198";
sha256 = "0cr7jpag6kr3iili5zmv1iimi5a1c175dcj8qvhcspwkbv7f17mp";
}
, ...
}:

View File

@ -3,7 +3,7 @@
with stdenv.lib;
buildLinux (args // rec {
version = "5.5-rc5";
version = "5.5-rc6";
extraMeta.branch = "5.5";
# modDirVersion needs to be x.y.z, will always add .0
@ -11,7 +11,7 @@ buildLinux (args // rec {
src = fetchurl {
url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
sha256 = "0h5ks0c0pdl0awiysqja6ky5ykhjcdicc01wi01wzhjklq9j0lmq";
sha256 = "0y4rsxynn0qprrsxy4v5vr4ihhavn43yqqp1qfrrxsfw15djncc2";
};
# Should the testing kernels ever be built on Hydra?

View File

@ -6,6 +6,7 @@ nixpkgs="$(git rev-parse --show-toplevel)"
path="$nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix"
old_rev="$(grep -o 'rev = ".*"' "$path" | awk -F'"' '{print $2}')"
old_sha256="$(grep -o 'sha256 = ".*"' "$path" | awk -F'"' '{print $2}')"
svn_url=https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/
rev="$(curl -s "$svn_url" | grep -Em 1 -o 'Revision [0-9]+' | awk '{print $2}')"
@ -17,10 +18,16 @@ fi
sha256="$(QUIET=1 nix-prefetch-svn "$svn_url" "$rev" | tail -1)"
if [ "$old_sha256" = "$sha256" ]; then
echo "No updates for linux-libre"
exit 0
fi
sed -i -e "s/rev = \".*\"/rev = \"$rev\"/" \
-e "s/sha256 = \".*\"/sha256 = \"$sha256\"/" "$path"
if [ -n "$COMMIT" ]; then
git commit -qm "linux_latest-libre: $old_rev -> $rev" "$path"
if [ -n "${COMMIT-}" ]; then
git commit -qm "linux_latest-libre: $old_rev -> $rev" "$path" \
$nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix
echo "Updated linux_latest-libre $old_rev -> $rev"
fi

View File

@ -1,28 +1,84 @@
{ stdenv, fetchurl, wxGTK30, openssl, curl }:
{ atomEnv
, autoPatchelfHook
, dpkg
, fetchurl
, makeDesktopItem
, makeWrapper
, udev
, stdenv
, wrapGAppsHook
}:
let
desktopItem = makeDesktopItem {
desktopName = "HakuNeko Desktop";
genericName = "Manga & Anime Downloader";
categories = "Network;FileTransfer;";
exec = "hakuneko";
icon = "hakuneko-desktop";
name = "hakuneko-desktop";
type = "Application";
};
in
stdenv.mkDerivation rec {
pname = "hakuneko";
version = "1.4.2";
version = "5.0.8";
src = fetchurl {
url = "mirror://sourceforge/hakuneko/hakuneko_${version}_src.tar.gz";
sha256 = "76a63fa05e91b082cb5a70a8abacef005354e99978ff8b1369f7aa0af7615d52";
};
src = {
"x86_64-linux" = fetchurl {
url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_amd64.deb";
sha256 = "924df1d7a0ab54b918529165317e4428b423c9045548d1e36bd634914f7957f0";
};
"i686-linux" = fetchurl {
url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_i386.deb";
sha256 = "988d8b0e8447dcd0a8d85927f5877bca9efb8e4b09ed3c80a6788390e54a48d2";
};
}."${stdenv.hostPlatform.system}";
preConfigure = ''
substituteInPlace ./configure \
--replace /bin/bash $shell
'';
dontBuild = true;
dontConfigure = true;
dontPatchELF = true;
dontWrapGApps = true;
buildInputs = [ wxGTK30 openssl curl ];
nativeBuildInputs = [
autoPatchelfHook
dpkg
makeWrapper
wrapGAppsHook
];
meta = {
description = "Manga downloader";
homepage = https://sourceforge.net/projects/hakuneko/;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
buildInputs = atomEnv.packages;
# This project was abandoned upstream.
broken = true;
unpackPhase = ''
# The deb file contains a setuid binary, so 'dpkg -x' doesn't work here
dpkg --fsys-tarfile $src | tar --extract
'';
installPhase = ''
cp -R usr "$out"
# Overwrite existing .desktop file.
cp "${desktopItem}/share/applications/hakuneko-desktop.desktop" \
"$out/share/applications/hakuneko-desktop.desktop"
'';
runtimeDependencies = [
udev.lib
];
postFixup = ''
makeWrapper $out/lib/hakuneko-desktop/hakuneko $out/bin/hakuneko \
"''${gappsWrapperArgs[@]}"
'';
meta = with stdenv.lib; {
description = "Manga & Anime Downloader";
homepage = "https://sourceforge.net/projects/hakuneko/";
license = licenses.unlicense;
maintainers = with maintainers; [
nloomans
];
platforms = [
"x86_64-linux"
"i686-linux"
];
};
}

View File

@ -468,6 +468,8 @@ let
lambdaTerm = callPackage ../development/ocaml-modules/lambda-term { };
lens = callPackage ../development/ocaml-modules/lens { };
linenoise = callPackage ../development/ocaml-modules/linenoise { };
llvm = callPackage ../development/ocaml-modules/llvm {

View File

@ -903,6 +903,8 @@ in {
oauthenticator = callPackage ../development/python-modules/oauthenticator { };
onnx = callPackage ../development/python-modules/onnx { };
ordered-set = callPackage ../development/python-modules/ordered-set { };
ortools = (toPythonModule (pkgs.or-tools.override {
@ -1392,6 +1394,8 @@ in {
stups-fullstop = callPackage ../development/python-modules/stups-fullstop { };
stups-pierone = callPackage ../development/python-modules/stups-pierone { };
stups-tokens = callPackage ../development/python-modules/stups-tokens { };
stups-zign = callPackage ../development/python-modules/stups-zign { };
@ -1669,6 +1673,8 @@ in {
avro3k = callPackage ../development/python-modules/avro3k {};
avro-python3 = callPackage ../development/python-modules/avro-python3 {};
aws-lambda-builders = callPackage ../development/python-modules/aws-lambda-builders { };
python-slugify = callPackage ../development/python-modules/python-slugify { };
@ -5009,6 +5015,8 @@ in {
python-markdown-math = callPackage ../development/python-modules/python-markdown-math { };
python-miio = callPackage ../development/python-modules/python-miio { };
python-pipedrive = callPackage ../development/python-modules/python-pipedrive { };
python-ptrace = callPackage ../development/python-modules/python-ptrace { };