Compare commits

...

3 Commits

Author SHA1 Message Date
Andreas Wiese 828a26c33d modules/navidrome: enable only for <21.11 2021-09-22 13:30:05 +02:00
Andreas Wiese 7dc105d7af xmm7360-pci: init at untable-20210802
Kernel module and tools, NixOS module coming soon.
2021-09-17 00:39:45 +02:00
Andreas Wiese 5d36cfb94f snipe-it: 5.1.8 -> 5.2.0 2021-09-10 23:13:16 +02:00
7 changed files with 106 additions and 3 deletions

View File

@ -24,4 +24,10 @@ in rec {
vivaldi = callPackage ./pkgs/vivaldi { }; vivaldi = callPackage ./pkgs/vivaldi { };
} // optionalAttrs (builtins.elem pkgs.system pkgs.lib.platforms.linux) rec {
xmm7360-pci = callPackage ./pkgs/xmm7360-pci { kernel = pkgs.linux; };
xmm7360-pci-tools = callPackage ./pkgs/xmm7360-pci/tools.nix { inherit xmm7360-pci; };
} }

View File

@ -44,6 +44,11 @@
ryzen_smu ryzen_smu
vivaldi vivaldi
; ;
} // prev.lib.optionalAttrs (builtins.elem prev.system prev.lib.platforms.linux) rec {
inherit (localPkgs)
xmm7360-pci
xmm7360-pci-tools
;
}; };
}; };

View File

@ -8,7 +8,7 @@ let
package = callPackageWith pkgs ../../pkgs/navidrome-bin { }; package = callPackageWith pkgs ../../pkgs/navidrome-bin { };
settingsFormat = pkgs.formats.json {}; settingsFormat = pkgs.formats.json {};
in { in lib.optionalAttrs (lib.versionOlder lib.version "21.11pre") {
options = { options = {
services.navidrome = { services.navidrome = {

View File

@ -20,13 +20,13 @@ let
in package.override rec { in package.override rec {
name = "snipe-it"; name = "snipe-it";
version = "5.1.8"; version = "5.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "snipe"; owner = "snipe";
repo = "snipe-it"; repo = "snipe-it";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-4WOBk7DyCRQ03wCcGpThfrnqP03dzqN2EhYnKndrCbs="; sha256 = "sha256-LT1JVHwmprLS52+OWgnddTKam5dEHDSuyHKxFG9WadM=";
}; };
meta = with lib; { meta = with lib; {

View File

@ -0,0 +1,33 @@
{ lib, fetchFromGitHub, kernel }:
kernel.stdenv.mkDerivation rec {
pname = "xmm7360-pci";
version = "unstable-20210802";
src = fetchFromGitHub {
owner = "xmm7360";
repo = pname;
rev = "b28714b6fb73887ecd5c0c25ffc0613d6eab6533";
sha256 = "sha256-wNSQZvPL297pTAVT9Hj4IgcsHSc7KVNe7K0raS0bObg=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
patches = [ ./fix.patch ];
makeFlags = [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];
installPhase = ''
install -m0644 -D xmm7360.ko $out/lib/modules/${kernel.modDirVersion}/misc/xmm7360.ko
'';
meta = with lib; {
description = "PCI driver for Fibocom L850-GL modem base on Intel XMM7360 modem";
homepage = src.meta.homepage;
license = licenses.gpl2;
maintainers = with maintainers; [ aw ];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,13 @@
diff --git a/xmm7360.c b/xmm7360.c
index ccd149d..acc7fea 100644
--- a/xmm7360.c
+++ b/xmm7360.c
@@ -1272,7 +1272,7 @@ static int xmm7360_tty_write(struct tty_struct *tty,
return written;
}
-static int xmm7360_tty_write_room(struct tty_struct *tty)
+static unsigned int xmm7360_tty_write_room(struct tty_struct *tty)
{
struct queue_pair *qp = tty->driver_data;
if (!xmm7360_qp_can_write(qp))

View File

@ -0,0 +1,46 @@
{ lib, stdenv, fetchFromGitHub, xmm7360-pci, python3Packages, makeWrapper }:
let
inherit (xmm7360-pci) pname version src;
pythonPath = with python3Packages; makePythonPath [
python
configargparse
dbus-python
pyroute2
];
in stdenv.mkDerivation {
pname = "${pname}-tools";
inherit version src;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python3Packages.python ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/lib
cp -a rpc/* $out/lib
pushd $out/lib
find . -executable -type f | while read file; do
makeWrapper ${python3Packages.python.interpreter} $out/bin/''${file%.py} \
--add-flags "$out/lib/''${file}" \
--prefix NIX_PYTHONPATH : "${pythonPath}"
done
runHook postInstall
'';
meta = with lib; {
description = xmm7360-pci.meta.description + " (tools)";
homepage = src.meta.homepage;
license = licenses.gpl2;
maintainers = with maintainers; [ aw ];
platforms = platforms.linux;
};
}