push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,174 @@
{
stdenv,
lib,
fetchzip,
autoconf,
automake,
cups,
glib,
libxml2,
libusb1,
libtool,
withDebug ? false,
}:
stdenv.mkDerivation {
pname = "cnijfilter2";
version = "6.40";
src = fetchzip {
url = "https://gdlp01.c-wss.com/gds/1/0100011381/01/cnijfilter2-source-6.40-1.tar.gz";
sha256 = "3RoG83jLOsdTEmvUkkxb7wa8oBrJA4v1mGtxTGwSowU=";
};
nativeBuildInputs = [
automake
autoconf
];
buildInputs = [
cups
glib
libxml2
libusb1
libtool
];
patches = [
./patches/get_protocol.patch
./patches/add_missing_import.patch
];
# lgmon3's --enable-libdir flag is used solely for specifying in which
# directory the cnnnet.ini cache file should reside.
# NixOS uses /var/cache/cups, and given the name, it seems like a reasonable
# place to put the cnnet.ini file, and thus we do so.
#
# Note that the drivers attempt to dlopen
# $out/lib/cups/filter/libcnbpcnclapicom2.so
buildPhase = ''
mkdir -p $out/lib
cp com/libs_bin_x86_64/* $out/lib
mkdir -p $out/lib/cups/filter
ln -s $out/lib/libcnbpcnclapicom2.so $out/lib/cups/filter
export NIX_LDFLAGS="$NIX_LDFLAGS -L$out/lib"
''
+ lib.optionalString withDebug ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D__DEBUG__ -DDEBUG_LOG"
''
+ ''
(
cd lgmon3
substituteInPlace src/Makefile.am \
--replace /usr/include/libusb-1.0 \
${libusb1.dev}/include/libusb-1.0
./autogen.sh --prefix=$out --enable-progpath=$out/bin \
--datadir=$out/share \
--enable-libdir=/var/cache/cups
make
)
(
cd cmdtocanonij2
./autogen.sh --prefix=$out
make
)
(
cd cmdtocanonij3
./autogen.sh --prefix=$out
make
)
(
cd cnijbe2
substituteInPlace src/Makefile.am \
--replace "/usr/lib/cups/backend" \
"$out/lib/cups/backend"
./autogen.sh --prefix=$out --enable-progpath=$out/bin
make
)
(
cd rastertocanonij
./autogen.sh --prefix=$out --enable-progpath=$out/bin
make
)
(
cd tocanonij
./autogen.sh --prefix=$out --enable-progpath=$out/bin
make
)
(
cd tocnpwg
./autogen.sh --prefix=$out --enable-progpath=$out/bin
make
)
'';
installPhase = ''
(
cd lgmon3
make install
)
(
cd cmdtocanonij2
make install
)
(
cd cmdtocanonij3
make install
)
(
cd cnijbe2
make install
)
(
cd rastertocanonij
make install
)
(
cd tocanonij
make install
)
(
cd tocnpwg
make install
)
mkdir -p $out/share/cups/model
cp ppd/*.ppd $out/share/cups/model
'';
meta = with lib; {
description = "Canon InkJet printer drivers for many Pixma series printers";
longDescription = ''
Canon InjKet printer drivers for series E200, E300, E3100, E3300, E4200, E450, E470, E480,
G3000, G3010, G4000, G4010, G5000, G5080, G6000, G6050, G6080, G7000, G7050, G7080, GM2000,
GM2080, GM4000, GM4080, iB4000, iB4100, iP110, MB2000, MB2100, MB2300, MB2700, MB5000,
MB5100, MB5300, MB5400, MG2900, MG3000, MG3600, MG5600, MG5700, MG6600, MG6700, MG6800,
MG6900, MG7500, MG7700, MX490, TR4500, TR703, TR7500, TR7530, TR8500, TR8530, TR8580, TR9530,
TS200, TS300, TS3100, TS3300, TS5000, TS5100, TS5300, TS5380, TS6000, TS6100, TS6130, TS6180,
TS6200, TS6230, TS6280, TS6300, TS6330, TS6380, TS700, TS708, TS7330, TS8000, TS8100, TS8130,
TS8180, TS8200, TS8230, TS8280, TS8300, TS8330, TS8380, TS9000, TS9100, TS9180, TS9500,
TS9580, XK50, XK60, XK70, XK80.
'';
homepage = "https://hk.canon/en/support/0101048401/1";
license = licenses.unfree;
platforms = [
"i686-linux"
"x86_64-linux"
];
maintainers = [ ];
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/lgmon3/src/keytext.c b/lgmon3/src/keytext.c
index 8c15ff8..b80bbe5 100644
--- a/lgmon3/src/keytext.c
+++ b/lgmon3/src/keytext.c
@@ -37,6 +37,7 @@
#include <unistd.h>
#include <libxml/parser.h> /* Ver.2.80 */
#include <string.h>
+#include <stdlib.h>
#include "keytext.h"

View File

@@ -0,0 +1,14 @@
# Resolves the compilation issue reported at https://github.com/NixOS/nixpkgs/pull/180681#issuecomment-1192304711
# An identical issue was previously reported in Gentoo: https://bugs.gentoo.org/723186
# This patch is taken from the solution of Alfredo Tupone (https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24688d64544b43f2c14be54531ad8764419dde09)
--- a/lgmon3/src/cnijlgmon3.c 2022-07-22 12:44:32.194641628 +0100
+++ b/lgmon3/src/cnijlgmon3.c 2022-07-22 12:43:53.954817724 +0100
@@ -55,7 +55,7 @@
int (*GET_STATUS)(char *, int, int *, int * , char *);
int (*GET_STATUS2)(char *, int, char *, int *, int * , char *, char *);
int (*GET_STATUS2_MAINTENANCE)(char *, int, char *, int *, int * , char *, char *);
-int (*GET_PROTOCOL)(char *, size_t);
+static int (*GET_PROTOCOL)(char *, size_t);
int main(int argc, char *argv[])

View File

@@ -0,0 +1,195 @@
{
gcc13Stdenv,
lib,
fetchzip,
autoconf,
automake,
libtool,
cups,
popt,
libtiff,
libpng,
ghostscript,
glib,
libusb1,
libxml2,
}:
/*
this derivation is basically just a transcription of the rpm .spec
file included in the tarball
*/
let
stdenv = gcc13Stdenv;
arch =
if stdenv.hostPlatform.system == "x86_64-linux" then
"64"
else if stdenv.hostPlatform.system == "i686-linux" then
"32"
else
throw "Unsupported system ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation {
pname = "cnijfilter";
/*
important note about versions: cnijfilter packages seem to use
versions in a non-standard way. the version indicates which
printers are supported in the package. so this package should
not be "upgraded" in the usual way.
instead, if you want to include another version supporting your
printer, you should try to abstract out the common things (which
should be pretty much everything except the version and the 'pr'
and 'pr_id' values to loop over).
*/
version = "4.00";
src = fetchzip {
url = "http://gdlp01.c-wss.com/gds/5/0100005515/01/cnijfilter-source-4.00-1.tar.gz";
sha256 = "1f6vpx1z3qa88590i5m0s49j9n90vpk81xmw6pvj0nfd3qbvzkya";
};
nativeBuildInputs = [
autoconf
automake
];
buildInputs = [
libtool
cups
popt
libtiff
libpng
ghostscript
glib
libusb1
libxml2
];
# patches from https://github.com/tokiclover/bar-overlay/tree/master/net-print/cnijfilter
patches = [
./patches/cnijfilter-3.80-1-cups-1.6.patch
./patches/cnijfilter-3.80-6-cups-1.6.patch
./patches/cnijfilter-4.00-4-ppd.patch
./patches/cnijfilter-4.00-5-abi_x86_32.patch
./patches/cnijfilter-4.00-6-headers.patch
./patches/cnijfilter-4.00-7-sysctl.patch
];
postPatch = ''
sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" backend/src/Makefile.am;
sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" backendnet/backend/Makefile.am;
sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" cnijbe/src/Makefile.am;
sed -i "s|/usr|$out|" backend/src/cnij_backend_common.c;
sed -i "s|/usr/bin|${ghostscript}/bin|" pstocanonij/filter/pstocanonij.c;
'';
configurePhase = ''
runHook preConfigure
cd libs
./autogen.sh --prefix=$out
cd ../bscc2sts
./autogen.sh
cd ../cnijnpr
./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib
cd ../cngpij
./autogen.sh --prefix=$out --enable-progpath=$out/bin
cd ../cngpijmnt
./autogen.sh --prefix=$out --enable-progpath=$out/bin
cd ../pstocanonij
./autogen.sh --prefix=$out --enable-progpath=$out/bin
cd ../backend
./autogen.sh --prefix=$out
cd ../backendnet
./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib --enable-progpath=$out/bin
cd ../cmdtocanonij
./autogen.sh --prefix=$out --datadir=$out/share
cd ../cnijbe
./autogen.sh --prefix=$out --enable-progpath=$out/bin
cd ../lgmon2
substituteInPlace src/Makefile.am \
--replace /usr/include/libusb-1.0 \
${libusb1.dev}/include/libusb-1.0
./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib --enable-progpath=$out/bin
cd ..;
sed -e "s,cnijlgmon2_LDADD =,cnijlgmon2_LDADD = -L../../com/libs_bin${arch}," \
-i lgmon2/src/Makefile.am || die
runHook postConfigure
'';
preInstall = ''
mkdir -p $out/bin $out/lib/cups/filter $out/share/cups/model;
'';
postInstall = ''
set -o xtrace
for pr in mg2400 mg2500 mg3500 mg5500 mg6400 mg6500 mg7100 p200; do
cd ppd;
./autogen.sh --prefix=$out --program-suffix=$pr
make clean;
make;
make install;
cd ../cnijfilter;
./autogen.sh --prefix=$out --program-suffix=$pr --enable-libpath=/var/lib/cups/path/lib/bjlib --enable-binpath=$out/bin;
make clean;
make;
make install;
cd ..;
done;
mkdir -p $out/lib/bjlib;
for pr_id in 423 424 425 426 427 428 429 430; do
install -c -m 755 $pr_id/database/* $out/lib/bjlib;
install -c -s -m 755 $pr_id/libs_bin${arch}/*.so.* $out/lib;
done;
pushd $out/lib;
for so_file in *.so.*; do
ln -s $so_file ''${so_file/.so.*/}.so;
patchelf --set-rpath $out/lib $so_file;
done;
popd;
'';
/*
the tarball includes some pre-built shared libraries. we run
'patchelf --set-rpath' on them just a few lines above, so that
they can find each other. but that's not quite enough. some of
those libraries load each other in non-standard ways -- they
don't list each other in the DT_NEEDED section. so, if the
standard 'patchelf --shrink-rpath' (from
pkgs/development/tools/misc/patchelf/setup-hook.sh) is run on
them, it undoes the --set-rpath. this prevents that.
*/
dontPatchELF = true;
meta = with lib; {
description = "Canon InkJet printer drivers for the MG2400 MG2500 MG3500 MG5500 MG6400 MG6500 MG7100 and P200 series";
homepage = "https://www.canon-europe.com/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mg_series/pixma_mg5550.aspx?type=drivers&driverdetailid=tcm:13-1094072";
sourceProvenance = with sourceTypes; [
fromSource
binaryNativeCode
];
license = licenses.unfree;
platforms = platforms.linux;
maintainers = with maintainers; [ chpatrick ];
};
}

View File

@@ -0,0 +1,62 @@
--- a/cngpij/cngpij/bjcups.c
+++ a/cngpij/cngpij/bjcups.c
@@ -698,8 +719,8 @@
else {
pRequest = ippNew();
- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
- pRequest->request.op.request_id = 1;
+ ippSetOperation(pRequest, CUPS_GET_PRINTERS);
+ ippSetRequestId(pRequest, 1);
pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
@@ -708,29 +729,29 @@
ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
+ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
fputs("ERROR: IPP ERROR\n", stderr);
goto onErr;
}
else {
- pAttribute = pResponse->attrs;
+ pAttribute = ippFirstAttribute(pResponse);
while (pAttribute != NULL) {
- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
- pAttribute = pAttribute->next;
+ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
+ pAttribute = ippNextAttribute(pResponse);
}
if (pAttribute == NULL) {
break;
}
- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
- pPrinter = pAttribute->values[0].string.text;
+ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
+ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
+ pPrinter = ippGetString(pAttribute, 0, NULL);
}
- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
- pDUri = pAttribute->values[0].string.text;
+ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
+ pDUri = ippGetString(pAttribute, 0, NULL);
}
- pAttribute = pAttribute->next;
+ pAttribute = ippNextAttribute(pResponse);
}
if (strcasecmp(pDestName, pPrinter) == 0) {
@@ -739,7 +760,7 @@
}
if (pAttribute != NULL)
- pAttribute = pAttribute->next;
+ pAttribute = ippNextAttribute(pResponse);
}
}

View File

@@ -0,0 +1,87 @@
diff --git a/cngpijmnt/src/getipc.c b/cngpijmnt/src/getipc.c
index 8688032..54c7933 100755
--- a/cngpijmnt/src/getipc.c
+++ b/cngpijmnt/src/getipc.c
@@ -42,7 +42,7 @@ int GetIPCData(LPIPCU pipc, char *sname)
int server_fd;
int client_fd;
char buf[128];
- size_t len;
+ socklen_t len;
short ret = RET_ERROR;
if( (server_fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0 )
--- a/cngpijmnt/src/main.c 2016-11-12 23:39:03.534855723 +0100
+++ b/cngpijmnt/src/main.c 2016-11-12 23:47:02.521847145 +0100
@@ -308,8 +308,8 @@
*pResponse; // Pointer to CUPS IPP response.
ipp_attribute_t *pAttribute; // Pointer to CUPS attributes.
cups_lang_t *pLanguage; // Pointer to language.
- char *pPrinter = NULL; // Pointer to printer name.
- char *pDUri = NULL; // Pointer to Device uri.
+ const char *pPrinter = NULL; // Pointer to printer name.
+ const char *pDUri = NULL; // Pointer to Device uri.
short retVal = -1; // Return value.
/*** Parameters end ***/
@@ -321,8 +321,8 @@
else {
pRequest = ippNew();
- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
- pRequest->request.op.request_id = 1;
+ ippSetOperation(pRequest, CUPS_GET_PRINTERS);
+ ippSetRequestId(pRequest, 1);
pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
@@ -331,29 +331,29 @@
ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
+ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
fputs("ERROR: IPP ERROR\n", stderr);
goto onErr;
}
else {
- pAttribute = pResponse->attrs;
+ pAttribute = ippFirstAttribute(pResponse);
while (pAttribute != NULL) {
- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
- pAttribute = pAttribute->next;
+ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
+ pAttribute = ippNextAttribute(pResponse);
}
if (pAttribute == NULL) {
break;
}
- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
- pPrinter = pAttribute->values[0].string.text;
+ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
+ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
+ pPrinter = ippGetString(pAttribute, 0, NULL);
}
- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
- pDUri = pAttribute->values[0].string.text;
+ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
+ pDUri = ippGetString(pAttribute, 0, NULL);
}
- pAttribute = pAttribute->next;
+ pAttribute = ippNextAttribute(pResponse);
}
if (strcasecmp(pDestName, pPrinter) == 0) {
@@ -362,7 +362,7 @@
}
if (pAttribute != NULL)
- pAttribute = pAttribute->next;
+ pAttribute = ippNextAttribute(pResponse);
}
}

View File

@@ -0,0 +1,10 @@
--- a/backend/src/cnij_backend_common.c 2016-11-13 00:08:34.600824006 +0100
+++ a/backend/src/cnij_backend_common.c 2016-11-13 00:08:52.037823694 +0100
@@ -37,6 +37,7 @@
// CUPS Header
#include <cups/cups.h>
#include <cups/ipp.h>
+#include <cups/ppd.h>
// Header file for CANON
#include "cnij_backend_common.h"

View File

@@ -0,0 +1,45 @@
--- a/backendnet/configure.in 2014-08-11 08:38:46.034984462 +0200
+++ a/backendnet/configure.in 2014-08-11 08:35:42.902985813 +0200
@@ -19,7 +19,11 @@
AC_DEFINE_UNQUOTED(BJLIB_PATH, "$enable_libpath")
AC_SUBST(BJLIB_PATH)
-ARC=`getconf LONG_BIT`
+case "$ABI" in
+ x86) ARC=32;;
+ amd64) ARC=64;;
+ *) ARC=`getconf LONG_BIT`;;
+esac
AC_SUBST(ARC)
# Checks for programs.
--- a/cnijfilter/configure.in 2014-08-11 08:39:44.426984031 +0200
+++ a/cnijfilter/configure.in 2014-08-11 08:35:19.788985984 +0200
@@ -43,7 +43,11 @@
esac
AC_SUBST(CNCL_LIB_ID)
-ARC=`getconf LONG_BIT`
+case "$ABI" in
+ x86) ARC=32;;
+ amd64) ARC=64;;
+ *) ARC=`getconf LONG_BIT`;;
+esac
AC_SUBST(ARC)
AC_PROG_CC
--- a/cnijnpr/configure.in 2014-08-11 08:41:12.712983380 +0200
+++ a/cnijnpr/configure.in 2014-08-11 08:40:44.354983589 +0200
@@ -37,7 +37,11 @@
CFLAGS="-O2"
-ARC=`getconf LONG_BIT`
+case "$ABI" in
+ x86) ARC=32;;
+ amd64) ARC=64;;
+ *) ARC=`getconf LONG_BIT`;;
+esac
AC_SUBST(ARC)
AC_OUTPUT(Makefile

View File

@@ -0,0 +1,11 @@
--- a/cnijnpr/src/cnijnpr.c 2016-11-13 21:51:33.844977618 +0100
+++ a/cnijnpr/src/cnijnpr.c 2016-11-13 21:52:03.129977094 +0100
@@ -34,6 +34,8 @@
#include <sys/ioctl.h>
#include <net/if.h>
#include <sys/sysctl.h>
+#include <sys/types.h>
+#include <unistd.h>
#include <config.h>
#include <fcntl.h>

View File

@@ -0,0 +1,10 @@
--- a/cnijnpr/src/cnijnpr.c
+++ b/cnijnpr/src/cnijnpr.c
@@ -33,7 +33,6 @@
#include <signal.h>
#include <sys/ioctl.h>
#include <net/if.h>
-#include <sys/sysctl.h>
#include <sys/types.h>
#include <unistd.h>
#include <config.h>

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
libglvnd,
xorg,
}:
stdenv.mkDerivation {
pname = "cnping";
version = "1.0.0-unstable-2024-02-29";
src = fetchFromGitHub {
owner = "cntools";
repo = "cnping";
rev = "2498fa4df1b4eff0df1f75b5f393e620bafd6997";
hash = "sha256-MMPLp/3GNal0AKkUgd850JrVjRO5rPHvbnOl1uogPCQ=";
fetchSubmodules = true;
};
buildInputs = [
libglvnd
xorg.libXinerama
xorg.libXext
xorg.libX11
];
# The "linuxinstall" target won't work for us:
# it tries to setcap and copy to a FHS directory
installPhase = ''
mkdir -p $out/{bin,share/man/man1}
cp cnping $out/bin/cnping
cp cnping.1 $out/share/man/man1/cnping.1
'';
meta = with lib; {
description = "Minimal Graphical IPV4 Ping Tool";
homepage = "https://github.com/cntools/cnping";
license = with licenses; [
mit
bsd3
]; # dual licensed, MIT-x11 & BSD-3-Clause
maintainers = [ ];
platforms = platforms.linux;
mainProgram = "cnping";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
boost,
libzip,
range-v3,
}:
stdenv.mkDerivation {
pname = "cnpypp";
version = "0-unstable-2025-06-22";
src = fetchFromGitHub {
owner = "mreininghaus";
repo = "cnpypp";
rev = "c6cd4e2078e4f39e862720b66fb211c45577c510";
hash = "sha256-aV57931nis0W2cwCNeMjQDip9Au7K76VpC/BqACnT5M=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
boost
libzip
range-v3
];
cmakeFlags = [
(lib.cmakeFeature "CNPYPP_SPAN_IMPL" "BOOST")
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
checkPhase = ''
runHook preCheck
./example1
./example2
./example_c
./range_example
./range_zip_example
./npz_speedtest
runHook postCheck
'';
meta = {
description = "C++17 library that allows to read and write NumPy data files";
homepage = "https://github.com/mreininghaus/cnpypp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jherland ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "cnquery";
version = "12.3.0";
src = fetchFromGitHub {
owner = "mondoohq";
repo = "cnquery";
tag = "v${version}";
hash = "sha256-/4T5Rncsk7aOS6Do2DyyLVim/dVNMTPUOnqZ6Isbj/I=";
};
subPackages = [ "apps/cnquery" ];
vendorHash = "sha256-mU3bVENWgMoD6BZzGpl8qN/MmnUUJT5s8XwvifFZ+ig=";
ldflags = [
"-w"
"-s"
];
meta = {
description = "Cloud-native, graph-based asset inventory";
longDescription = ''
cnquery is a cloud-native tool for querying your entire fleet. It answers thousands of
questions about your infrastructure and integrates with over 300 resources across cloud
accounts, Kubernetes, containers, services, VMs, APIs, and more.
'';
homepage = "https://mondoo.com/cnquery";
changelog = "https://github.com/mondoohq/cnquery/releases/tag/v${version}";
license = lib.licenses.bsl11;
maintainers = with lib.maintainers; [ mariuskimmina ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation rec {
pname = "cns11643-kai";
version = "0-unstable-2025-01-13";
src = fetchFromGitHub {
owner = "rypervenche";
repo = "cns11643-fonts";
rev = "refs/tags/${version}";
hash = "sha256-A/4iwNvyzOYEpBzxKeq1xM/6aU6EOCATAr0lQlyckKQ=";
};
installPhase = ''
runHook preInstall
install -Dm644 TW-Kai*.ttf -t $out/share/fonts/truetype/
runHook postInstall
'';
meta = {
description = "Chinese TrueType Kai font by Ministry of Education of Taiwan government";
homepage = "https://www.cns11643.gov.tw/";
license = lib.licenses.ofl;
maintainers = [ lib.maintainers.rypervenche ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "cnspec";
version = "12.4.0";
src = fetchFromGitHub {
owner = "mondoohq";
repo = "cnspec";
tag = "v${version}";
hash = "sha256-BzLQPkgvARDzpauFezD5Q7RNrReLz9lSHEb6TIGkGQY=";
};
proxyVendor = true;
vendorHash = "sha256-DaEEBZXLN6BujB56P1082D143WnUdwZPSc+JeUEZCuk=";
subPackages = [ "apps/cnspec" ];
ldflags = [
"-s"
"-w"
"-X=go.mondoo.com/cnspec.Version=${version}"
];
meta = with lib; {
description = "Open source, cloud-native security and policy project";
homepage = "https://github.com/mondoohq/cnspec";
changelog = "https://github.com/mondoohq/cnspec/releases/tag/v${version}";
license = licenses.bsl11;
maintainers = with maintainers; [
fab
mariuskimmina
];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
fetchFromSourcehut,
rustPlatform,
sqlite,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cnsprcy";
version = "0.3.2";
src = fetchFromSourcehut {
owner = "~xaos";
repo = "cnsprcy";
rev = "cnspr/v${finalAttrs.version}";
hash = "sha256-wwsemwN87YsNRLkr0UNbzSLF2WDaKY6IFXew64g4QoU=";
};
sourceRoot = "${finalAttrs.src.name}/v${finalAttrs.version}";
cargoHash = "sha256-8hNuF5tD1PwdIJB0q3wxDOGDcppo0ac+zol3AHWGv0s=";
passthru.updateScript = ./update.sh;
RUSTC_BOOTSTRAP = true;
buildInputs = [ sqlite ];
meta = {
description = "End to end encrypted connections between trusted devices";
homepage = "https://git.sr.ht/~xaos/cnsprcy";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [
supinie
oluchitheanalyst
];
teams = [ lib.teams.ngi ];
mainProgram = "cnspr";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update common-updater-scripts gnused
set -euo pipefail
version=$(list-git-tags --url="https://git.sr.ht/~xaos/cnsprcy" | sed -En 's/^cnspr\/v(.*)/\1/p' | tail -1)
nix-update cnsprcy --version="$version"

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation rec {
pname = "cnstrokeorder";
version = "0.0.4.7";
src = fetchurl {
url = "http://rtega.be/chmn/CNstrokeorder-${version}.ttf";
hash = "sha256-YYtOcUvt1V0DwAs/vf9KltcmYCFJNirvwjGyOK4JpIY=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
install -D $src $out/share/fonts/truetype/CNstrokeorder-${version}.ttf
runHook postInstall
'';
meta = with lib; {
description = "Chinese font that shows stroke order for HSK 1-4";
homepage = "http://rtega.be/chmn/index.php?subpage=68";
license = [ licenses.arphicpl ];
maintainers = with maintainers; [ johnazoidberg ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,40 @@
{
buildGoModule,
lib,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "cntb";
version = "1.5.5";
src = fetchFromGitHub {
owner = "contabo";
repo = "cntb";
rev = "v${version}";
hash = "sha256-chO59HBpMXXFMIt+7UjUxE3WtzUak8VhD/ahEXT5l/k=";
# docs contains two files with the same name but different cases,
# this leads to a different hash on case insensitive filesystems (e.g. darwin)
# https://github.com/contabo/cntb/issues/34
postFetch = ''
rm -rf $out/openapi/docs
'';
};
subPackages = [ "." ];
vendorHash = "sha256-D0B1a2qbTGpAK1PkB+wqsReft14/SoKY3/I6k+pB2D0=";
ldflags = [
"-X contabo.com/cli/cntb/cmd.version=${src.rev}"
"-X contabo.com/cli/cntb/cmd.commit=${src.rev}"
"-X contabo.com/cli/cntb/cmd.date=1970-01-01T00:00:00Z"
];
meta = with lib; {
description = "CLI tool for managing your products from Contabo like VPS and VDS";
mainProgram = "cntb";
homepage = "https://github.com/contabo/cntb";
license = licenses.gpl3Only;
maintainers = with maintainers; [ aciceri ];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchurl,
which,
}:
stdenv.mkDerivation rec {
pname = "cntlm";
version = "0.92.3";
src = fetchurl {
url = "mirror://sourceforge/cntlm/${pname}-${version}.tar.gz";
sha256 = "1632szz849wasvh5sm6rm1zbvbrkq35k7kcyvx474gyl4h4x2flw";
};
buildInputs = [ which ];
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure --replace "xlc_r gcc" "xlc_r gcc $CC"
substitute Makefile Makefile.$CC --replace "CC=gcc" "CC=$CC"
'';
installPhase = ''
mkdir -p $out/bin; cp cntlm $out/bin/;
mkdir -p $out/share/; cp COPYRIGHT README VERSION doc/cntlm.conf $out/share/;
mkdir -p $out/man/; cp doc/cntlm.1 $out/man/;
'';
meta = with lib; {
description = "NTLM/NTLMv2 authenticating HTTP proxy";
homepage = "https://cntlm.sourceforge.net/";
license = licenses.gpl2Only;
maintainers = [
maintainers.qknight
maintainers.carlosdagos
];
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "cntlm";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nixosTests,
}:
rustPlatform.buildRustPackage rec {
pname = "cntr";
version = "1.6.1";
src = fetchFromGitHub {
owner = "Mic92";
repo = "cntr";
rev = version;
sha256 = "sha256-2tqPxbi8sKoEPq0/zQFsOrStEmQGlU8s81ohTfKeOmE=";
};
cargoHash = "sha256-gWQ8seCuUSHuZUoNH9pnBTlzF9S0tHVLStnAiymLLbs=";
passthru.tests = nixosTests.cntr;
meta = with lib; {
description = "Container debugging tool based on FUSE";
homepage = "https://github.com/Mic92/cntr";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [
mic92
sigmasquadron
];
mainProgram = "cntr";
};
}