Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2018-11-10 11:08:54 +01:00
540 changed files with 11238 additions and 7081 deletions

View File

@@ -1,15 +1,15 @@
{ stdenv, fetchFromGitHub, substituteAll, udev
, pkgconfig, qtbase, qmake, zlib, kmod }:
, pkgconfig, qtbase, cmake, zlib, kmod }:
stdenv.mkDerivation rec {
version = "0.2.9";
version = "0.3.2";
name = "ckb-next-${version}";
src = fetchFromGitHub {
owner = "ckb-next";
repo = "ckb-next";
rev = "v${version}";
sha256 = "0hl41znyhp3k5l9rcgz0gig36gsg95ivrs1dyngv45q9jkr6fchm";
sha256 = "0ri5n7r1vhsgk6s64abvqcdrs5fmlwprw0rxiwfy0j8a9qcic1dr";
};
buildInputs = [
@@ -20,29 +20,19 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
pkgconfig
qmake
cmake
];
patches = [
./ckb-animations-location.patch
./install-dirs.patch
./systemd-service.patch
(substituteAll {
name = "ckb-modprobe.patch";
src = ./ckb-modprobe.patch;
name = "ckb-next-modprobe.patch";
src = ./modprobe.patch;
inherit kmod;
})
];
doCheck = false;
installPhase = ''
runHook preInstall
install -D --mode 0755 --target-directory $out/bin bin/ckb-daemon bin/ckb
install -D --mode 0755 --target-directory $out/libexec/ckb-animations bin/ckb-animations/*
runHook postInstall
'';
meta = with stdenv.lib; {
description = "Driver and configuration tool for Corsair keyboards and mice";
homepage = https://github.com/ckb-next/ckb-next;

View File

@@ -0,0 +1,32 @@
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
index 09056a7..1bb4595 100644
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -456,7 +456,7 @@ endif ()
if (LINUX)
install(
FILES "${CMAKE_SOURCE_DIR}/linux/udev/99-ckb-daemon.rules"
- DESTINATION "/etc/udev/rules.d"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d"
PERMISSIONS
OWNER_READ OWNER_WRITE
GROUP_READ
diff --git a/src/libs/ckb-next/CMakeLists.txt b/src/libs/ckb-next/CMakeLists.txt
index ecc591c..35de563 100644
--- a/src/libs/ckb-next/CMakeLists.txt
+++ b/src/libs/ckb-next/CMakeLists.txt
@@ -75,12 +75,12 @@ if(NOT MACOS)
NAMESPACE
${CMAKE_PROJECT_NAME}::
DESTINATION
- "/usr/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}")
+ "${CMAKE_INSTALL_PREFIX}/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}")
install(
FILES
"cmake/${PROJECT_NAME}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION
- "/usr/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}")
+ "${CMAKE_INSTALL_PREFIX}/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}")
endif()

View File

@@ -0,0 +1,26 @@
diff --git a/src/daemon/input_linux.c b/src/daemon/input_linux.c
index 1cedb07..8e0b24b 100644
--- a/src/daemon/input_linux.c
+++ b/src/daemon/input_linux.c
@@ -58,7 +58,7 @@ int os_inputopen(usbdevice* kb){
/// First check whether the uinput module is loaded by the kernel.
///
// Load the uinput module (if it's not loaded already)
- if(system("modprobe uinput") != 0) {
+ if(system("@kmod@/bin/modprobe uinput") != 0) {
ckb_fatal("Failed to load uinput module\n");
return 1;
}
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
index 3601146..3f2f78f 100644
--- a/src/gui/mainwindow.cpp
+++ b/src/gui/mainwindow.cpp
@@ -251,7 +251,7 @@ void MainWindow::updateVersion(){
daemonWarning.append(tr("<br /><b>Warning:</b> System Extension by \"Fumihiko Takayama\" is not allowed in Security & Privacy. Please allow it and then unplug and replug your devices."));
#elif defined(Q_OS_LINUX)
QProcess modprobe;
- modprobe.start("modprobe", QStringList("uinput"));
+ modprobe.start("@kmod@/bin/modprobe", QStringList("uinput"));
if(!modprobe.waitForFinished())
qDebug() << "Modprobe error";

View File

@@ -0,0 +1,45 @@
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
index 09056a7..72a7249 100644
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -249,12 +249,7 @@ elseif (LINUX)
# but it is not enabled by default and systemd is used instead. (Ubuntu 15.04+)
# A way to check for upstart
- execute_process(
- COMMAND initctl --version
- OUTPUT_VARIABLE initctl_output
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
- if ("${initctl_output}" MATCHES "upstart")
+ if (FALSE)
message(STATUS "upstart detected")
set(CKB_NEXT_INIT_SYSTEM "upstart" CACHE INTERNAL "")
set(DISALLOW_SYSVINIT TRUE)
@@ -292,7 +287,7 @@ elseif (LINUX)
endif ()
# A way to check for systemd
- if (EXISTS "/run/systemd/system")
+ if (TRUE)
message(STATUS "systemd detected")
set(CKB_NEXT_INIT_SYSTEM "systemd" CACHE INTERNAL "")
set(DISALLOW_SYSVINIT TRUE)
@@ -328,7 +323,7 @@ elseif (LINUX)
endif ()
# A way to check for OpenRC
- if (EXISTS "/run/openrc/softlevel")
+ if (FALSE)
message(STATUS "OpenRC detected")
set(CKB_NEXT_INIT_SYSTEM "OpenRC" CACHE INTERNAL "")
set(DISALLOW_SYSVINIT TRUE)
@@ -419,7 +414,7 @@ if ("${CKB_NEXT_INIT_SYSTEM}" STREQUAL "launchd")
elseif ("${CKB_NEXT_INIT_SYSTEM}" STREQUAL "systemd")
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/service/ckb-next-daemon.service"
- DESTINATION "/usr/lib/systemd/system"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
PERMISSIONS
OWNER_READ OWNER_WRITE
GROUP_READ

View File

@@ -1,12 +0,0 @@
diff --git a/src/ckb/animscript.cpp b/src/ckb/animscript.cpp
index f49a64c..d7a3459 100644
--- a/src/ckb/animscript.cpp
+++ b/src/ckb/animscript.cpp
@@ -30,7 +30,7 @@ QString AnimScript::path(){
#ifdef __APPLE__
return QDir(QApplication::applicationDirPath() + "/../Resources").absoluteFilePath("ckb-animations");
#else
- return QDir("/usr/lib").absoluteFilePath("ckb-animations");
+ return QDir(QApplication::applicationDirPath() + "/../libexec").absoluteFilePath("ckb-animations");
#endif
}

View File

@@ -1,13 +0,0 @@
diff --git a/src/ckb-daemon/usb_linux.c b/src/ckb-daemon/usb_linux.c
index 8673f86..4714305 100644
--- a/src/ckb-daemon/usb_linux.c
+++ b/src/ckb-daemon/usb_linux.c
@@ -440,7 +440,7 @@ static void udev_enum(){
int usbmain(){
// Load the uinput module (if it's not loaded already)
- if(system("modprobe uinput") != 0)
+ if(system("@kmod@/bin/modprobe uinput") != 0)
ckb_warn("Failed to load uinput module\n");
// Create the udev object

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, xcbuildHook, Foundation, AddressBook }:
{ stdenv, fetchurl, xcbuildHook, cf-private, Foundation, AddressBook }:
stdenv.mkDerivation rec {
version = "1.1a-3";
@@ -10,16 +10,18 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ xcbuildHook ];
buildInputs = [ Foundation AddressBook ];
buildInputs = [
Foundation AddressBook
# Needed for OBJC_CLASS_$_NSArray symbols.
cf-private
];
installPhase = ''
mkdir -p $out/bin
cp Products/Default/contacts $out/bin
'';
## FIXME: the framework setup hook isn't adding these correctly
NIX_LDFLAGS = " -F${Foundation}/Library/Frameworks/ -F${AddressBook}/Library/Frameworks/";
meta = with stdenv.lib; {
description = "Access contacts from the Mac address book from command-line";
homepage = http://www.gnufoo.org/contacts/contacts.html;

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "jdupes-${version}";
version = "1.10.4";
version = "1.11";
src = fetchFromGitHub {
owner = "jbruchon";
repo = "jdupes";
rev = "v${version}";
sha256 = "03a2jxv634xy5qwjrk784k3y3pd8f94pndf5m84yg2y7i8dvppnk";
sha256 = "124n9vgnqqhnwgnms7dqmndp25xrcjaykxrzbi4v4as98kxxi3j1";
# Unicode file names lead to different checksums on HFS+ vs. other
# filesystems because of unicode normalisation. The testdir
# directories have such files and will be removed.

View File

@@ -3,7 +3,7 @@
with ocamlPackages;
janePackage {
name = "patdiff";
pname = "patdiff";
hash = "02cdn5j5brbp4n2rpxprzxfakjbl7n2llixg7m632bih3ppmfcq1";
buildInputs = [ core_extended expect_test_helpers patience_diff ocaml_pcre ];
meta = {

View File

@@ -0,0 +1,24 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "pgmetrics-${version}";
version = "1.5.0";
goPackagePath = "github.com/rapidloop/pgmetrics";
src = fetchFromGitHub {
owner = "rapidloop";
repo = "pgmetrics";
rev = "refs/tags/v${version}";
sha256 = "1l3vd1lvp4a6irx0zpjb5bkskkb9krx9j7pwii8jy9dcjy4gj24f";
};
goDeps = ./deps.nix;
meta = with stdenv.lib; {
homepage = https://pgmetrics.io/;
description = "Collect and display information and stats from a running PostgreSQL server";
license = licenses.asl20;
maintainers = [ maintainers.marsam ];
};
}

84
pkgs/tools/misc/pgmetrics/deps.nix generated Normal file
View File

@@ -0,0 +1,84 @@
# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
[
{
goPackagePath = "github.com/dustin/go-humanize";
fetch = {
type = "git";
url = "https://github.com/dustin/go-humanize";
rev = "bb3d318650d48840a39aa21a027c6630e198e626";
sha256 = "1lqd8ix3cb164j5iazjby2jpa6bdsflhy0h9mi4yldvvcvrc194c";
};
}
{
goPackagePath = "github.com/howeyc/gopass";
fetch = {
type = "git";
url = "https://github.com/howeyc/gopass";
rev = "bf9dde6d0d2c004a008c27aaee91170c786f6db8";
sha256 = "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45";
};
}
{
goPackagePath = "github.com/lib/pq";
fetch = {
type = "git";
url = "https://github.com/lib/pq";
rev = "88edab0803230a3898347e77b474f8c1820a1f20";
sha256 = "02y7c8xy33x5q4167x2drzrys41nfi7wxxp9hy4vpazfws88al9p";
};
}
{
goPackagePath = "github.com/pborman/getopt";
fetch = {
type = "git";
url = "https://github.com/pborman/getopt";
rev = "7148bc3a4c3008adfcab60cbebfd0576018f330b";
sha256 = "0zhvvmv671r1fbdd5hbv3flx8k2rb60giqx115w0553c56qkqfpj";
};
}
{
goPackagePath = "github.com/rapidloop/pq";
fetch = {
type = "git";
url = "https://github.com/rapidloop/pq";
rev = "f379fd34d14f11337c3945aa665f7718c0213317";
sha256 = "0svhissh6v1qdj9zypvj6jpjrx9g56gq8sf1pila41mczglmni05";
};
}
{
goPackagePath = "github.com/xdg-go/stringprep";
fetch = {
type = "git";
url = "https://github.com/xdg-go/stringprep";
rev = "bd625b8dc1e3b0f57412280ccbcc317f0c69d8db";
sha256 = "03nard51zgzbaq64p6gsvrz8fps3yazl3ydd115y0bppkdx2i4ji";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "432090b8f568c018896cd8a0fb0345872bbac6ce";
sha256 = "1i8616qqwih6g5nx8c1hfqhp0kb110ml3xkgsn6qvc36q04amjmq";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "37707fdb30a5b38865cfb95e5aab41707daec7fd";
sha256 = "1abrr2507a737hdqv4q7pw7hv6ls9pdiq9crhdi52r3gcz6hvizg";
};
}
{
goPackagePath = "golang.org/x/text";
fetch = {
type = "git";
url = "https://go.googlesource.com/text";
rev = "f21a4dfb5e38f5895301dc265a8def02365cc3d0";
sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
};
}
]

View File

@@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
name = "snapper-${version}";
version = "0.7.2";
version = "0.8.0";
src = fetchFromGitHub {
owner = "openSUSE";
repo = "snapper";
rev = "v${version}";
sha256 = "1dm1kf4wrbcaaagxgbc8q0f5j9dq3bmp6ycl7zx8p70s4nv3xnbc";
sha256 = "1blllmkwh13pnf3hxi1p2az5i77arbm2661n0rd0569s6kf5brb7";
};
nativeBuildInputs = [

View File

@@ -1,22 +1,22 @@
{ stdenv, fetchFromGitHub, makeWrapper, python3Packages, perl, zip
, rtmpdump }:
, rtmpdump, gitMinimal }:
let
inherit (python3Packages) python nose pycrypto requests mock;
inherit (python3Packages) python nose pycrypto pyyaml requests mock;
in stdenv.mkDerivation rec {
name = "svtplay-dl-${version}";
version = "1.9.11";
version = "2.1";
src = fetchFromGitHub {
owner = "spaam";
repo = "svtplay-dl";
rev = version;
sha256 = "14p2362rzyblma9321z4zrcbzfs9m269ry6sz44ly0bv5fik7gdy";
sha256 = "1cnc32gbhs955391hs1x1jpjsl3b6pqy7ysdydmp9q1i2rw105ln";
};
pythonPaths = [ pycrypto requests ];
pythonPaths = [ pycrypto pyyaml requests ];
buildInputs = [ python perl nose mock rtmpdump makeWrapper ] ++ pythonPaths;
nativeBuildInputs = [ zip ];
nativeBuildInputs = [ gitMinimal zip ];
postPatch = ''
substituteInPlace lib/svtplay_dl/fetcher/rtmp.py \

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "tio-${version}";
version = "1.31";
version = "1.32";
src = fetchzip {
url = "https://github.com/tio/tio/archive/v${version}.tar.gz";
sha256 = "1164ida1vxvm0z76nmkk2d5y9i3wj8rni9sl1mid6c09gi4k2slk";
sha256 = "0lwqdm73kshi9qs8pks1b4by6yb9jf3bbyw3bv52xmggnr5s1hcv";
};
nativeBuildInputs = [ autoreconfHook ];

View File

@@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "tmux";
repo = "tmux";
rev = version;
sha256 = "0n8sjddy00xgh1rvvw968hh72pyslg1gahmzajfc4b3xax87drpi";
rev = "01918cb0170e07288d3aec624516e6470bf5b7fc";
sha256 = "1fy87wvxn7r7jzqapvjisc1iizic3kxqk2lv83giqmw1y4g3s7rl";
};
postPatch = ''

View File

@@ -1,4 +1,4 @@
{ stdenv, rustPlatform, fetchFromGitHub }:
{ stdenv, rustPlatform, fetchFromGitHub, CoreServices, CoreFoundation }:
rustPlatform.buildRustPackage rec {
name = "watchexec-${version}";
@@ -13,11 +13,19 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "1li84kq9myaw0zwx69y72f3lx01s7i9p8yays4rwvl1ymr614y1l";
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
# FIXME: Use impure version of CoreFoundation because of missing symbols.
# Undefined symbols for architecture x86_64: "_CFURLResourceIsReachable"
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS"
'';
meta = with stdenv.lib; {
description = "Executes commands in response to file modifications";
homepage = https://github.com/watchexec/watchexec;
license = with licenses; [ asl20 ];
maintainers = [ maintainers.michalrus ];
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
owner = "mptre";
repo = "yank";
rev = "v${meta.version}";
sha256 = "03h99i59kq8jlmshfwas1qm4y5ksw9lxaf9kr14l2mp028g7930n";
sha256 = "0jhr4ywn5x5s15sczhdyyaqy3xh5z4zsx3g42ma26prpnr4gjczz";
inherit name;
};
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
'';
downloadPage = "https://github.com/mptre/yank/releases";
license = licenses.mit;
version = "1.0.0";
version = "1.1.0";
maintainers = [ maintainers.dochang ];
platforms = platforms.unix;
};

View File

@@ -2,7 +2,7 @@
buildPythonApplication rec {
pname = "you-get";
version = "0.4.1148";
version = "0.4.1167";
# Tests aren't packaged, but they all hit the real network so
# probably aren't suitable for a build environment anyway.
@@ -10,7 +10,7 @@ buildPythonApplication rec {
src = fetchPypi {
inherit pname version;
sha256 = "1ypgqaxf5qn5b3c2n4hcsiixyvvpvmpx5gny523cd5igb7h0yja5";
sha256 = "0lvddm62c0pwx4cksbwh2n0xzz80p26lz1xsvb4z40h7hlwaf41w";
};
meta = with stdenv.lib; {

View File

@@ -19,11 +19,11 @@ buildPythonPackage rec {
# The websites youtube-dl deals with are a very moving target. That means that
# downloads break constantly. Because of that, updates should always be backported
# to the latest stable release.
version = "2018.10.29";
version = "2018.11.07";
src = fetchurl {
url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
sha256 = "1ndkkpnmjdyz5gjjmvaf18761lxa2c0kypicm9bpqpaj7sdr9s27";
sha256 = "1rvc2m2kbm2kycqsa7fkcg5gql9f0w3hn1a7jg48zzl06ayggxk9";
};
nativeBuildInputs = [ makeWrapper ];