add more packages
This commit is contained in:
parent
08466464e5
commit
e6af863285
|
@ -3,10 +3,18 @@ self: super:
|
||||||
{
|
{
|
||||||
buildNimblePackage = super.callPackage ./pkgs/nim-packages/generic.nix { };
|
buildNimblePackage = super.callPackage ./pkgs/nim-packages/generic.nix { };
|
||||||
|
|
||||||
|
c2nim = super.callPackage ./pkgs/nim-packages/c2nim.nix { };
|
||||||
|
|
||||||
|
freetz-tools = super.callPackage ./pkgs/freetz-tools/default.nix { };
|
||||||
|
|
||||||
gintro = super.callPackage ./pkgs/nim-packages/gintro/default.nix { };
|
gintro = super.callPackage ./pkgs/nim-packages/gintro/default.nix { };
|
||||||
|
|
||||||
groupchat = super.callPackage ./pkgs/nim-packages/groupchat.nix { };
|
groupchat = super.callPackage ./pkgs/nim-packages/groupchat.nix { };
|
||||||
|
|
||||||
|
hid = super.callPackage ./pkgs/hid/default.nix { };
|
||||||
|
easyhid = super.callPackage ./pkgs/easyhid/default.nix { };
|
||||||
|
openphone = super.callPackage ./pkgs/openphone/default.nix { };
|
||||||
|
|
||||||
shinto-cli = super.callPackage ./pkgs/shinto-cli { };
|
shinto-cli = super.callPackage ./pkgs/shinto-cli { };
|
||||||
|
|
||||||
ui = super.callPackage ./pkgs/nim-packages/ui.nix { };
|
ui = super.callPackage ./pkgs/nim-packages/ui.nix { };
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ stdenv, python3, hidapi }:
|
||||||
|
|
||||||
|
with python3.pkgs;
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "easyhid";
|
||||||
|
version = "0.0.10";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "02f6csdlv61yns017zxshx2scyvw99g490svfih2g0w80b65v84m";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
cffi hidapi
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
{ stdenv, pkgconfig, autoconf, automake, file, git, libtool, perl, python,
|
||||||
|
unzip, imagemagick, bash, which, glibc, gettext, bison, flex, ncurses,
|
||||||
|
readline, acl, zlib, libcap }:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
ncursesInc = makeSearchPathOutput "dev" "include" [ ncurses ];
|
||||||
|
zlibInc = makeSearchPathOutput "dev" "include" [ zlib ];
|
||||||
|
readlineInc = makeSearchPathOutput "dev" "include" [ readline ];
|
||||||
|
aclInc = makeSearchPathOutput "dev" "include" [ acl ];
|
||||||
|
libcapInc = makeSearchPathOutput "dev" "include" [ libcap ];
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "freetz-tools";
|
||||||
|
version = "0.1";
|
||||||
|
|
||||||
|
src = /home/christian/Downloads/Openwrt-Router/freetz;
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
patchShebangs tools
|
||||||
|
|
||||||
|
substituteInPlace tools/check_prerequisites \
|
||||||
|
--replace "/sbin/ldconfig" "${glibc}/bin/ldconfig" \
|
||||||
|
--replace "/usr/include/ /usr/local/include/" "${ncursesInc} \
|
||||||
|
${zlibInc} \
|
||||||
|
${readlineInc} \
|
||||||
|
${aclInc} \
|
||||||
|
${libcapInc}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
which
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
file
|
||||||
|
git
|
||||||
|
libtool
|
||||||
|
perl
|
||||||
|
python
|
||||||
|
unzip
|
||||||
|
imagemagick
|
||||||
|
gettext
|
||||||
|
pkgconfig
|
||||||
|
bison
|
||||||
|
flex
|
||||||
|
ncurses
|
||||||
|
readline
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
make tools
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -D tools/unsquashfs4-avm-be $out/bin/unsquashfs4-avm-be
|
||||||
|
install -D tools/unsquashfs4-avm-le $out/bin/unsquashfs4-avm-le
|
||||||
|
install -D tools/mksquashfs4-avm-be $out/bin/mksquashfs4-avm-be
|
||||||
|
install -D tools/mksquashfs4-avm-le $out/bin/mksquashfs4-avm-le
|
||||||
|
'';
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ stdenv, python3, hidapi }:
|
||||||
|
|
||||||
|
with python3.pkgs;
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "hid";
|
||||||
|
version = "1.0.3";
|
||||||
|
|
||||||
|
NIX_HIDAPI_PATH = "${hidapi}/lib/";
|
||||||
|
|
||||||
|
patches = [ ./paths.patch ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace hid/__init__.py \
|
||||||
|
--subst-var NIX_HIDAPI_PATH
|
||||||
|
'';
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "0w2ns88garrk6vjz3i91v6xzmlavyscifx4vm49303khgl2dqgvl";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
hidapi
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/hid/__init__.py b/hid/__init__.py
|
||||||
|
index 0fcd3ba..d4f3f54 100644
|
||||||
|
--- a/hid/__init__.py
|
||||||
|
+++ b/hid/__init__.py
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
|
||||||
|
for lib in library_paths:
|
||||||
|
try:
|
||||||
|
- hidapi = ctypes.cdll.LoadLibrary(lib)
|
||||||
|
+ hidapi = ctypes.cdll.LoadLibrary(os.path.join('@NIX_HIDAPI_PATH@', lib))
|
||||||
|
break
|
||||||
|
except OSError:
|
||||||
|
pass
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ stdenv, buildNimblePackage, fetchfromGitHub }:
|
||||||
|
|
||||||
|
buildNimblePackage rec {
|
||||||
|
name = "c2nim-${version}";
|
||||||
|
version = "0.9.14";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "nim-lang";
|
||||||
|
repo = "c2nim";
|
||||||
|
rev = "774e48fbd4c9884389079ddf8427fdebefd0313d";
|
||||||
|
sha256 = "1rrabvlr703fmsz4rm12mq81bc2njm0wb36w24vclcyz5cd26191";
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ stdenv, python3, hid }:
|
||||||
|
|
||||||
|
with python3.pkgs;
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "openphone";
|
||||||
|
version = "0.1";
|
||||||
|
src = /home/christian/projects/OpenPhone2;
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
hid
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = "https://ulrich.earth/code/OpenPhone";
|
||||||
|
description = "Open source desk telephone";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
maintainers = with maintainers; [ royneary ];
|
||||||
|
};
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
}
|
Loading…
Reference in New Issue