Merge master into staging-next

This commit is contained in:
github-actions[bot] 2022-12-28 09:28:37 +00:00 committed by GitHub
commit 8fb6009616
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 523 additions and 92 deletions

View file

@ -558,6 +558,12 @@
githubId = 43479487;
name = "Titouan Biteau";
};
alekseysidorov = {
email = "sauron1987@gmail.com";
github = "alekseysidorov";
githubId = 83360;
name = "Aleksey Sidorov";
};
alerque = {
email = "caleb@alerque.com";
github = "alerque";

View file

@ -37,6 +37,15 @@
<link linkend="opt-programs.bash.blesh.enable">programs.bash.blesh</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/alexivkin/CUPS-PDF-to-PDF">cups-pdf-to-pdf</link>,
a pdf-generating cups backend based on
<link xlink:href="https://www.cups-pdf.de/">cups-pdf</link>.
Available as
<link linkend="opt-services.printing.cups-pdf.enable">services.printing.cups-pdf</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/junegunn/fzf">fzf</link>,

View file

@ -18,6 +18,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- [blesh](https://github.com/akinomyoga/ble.sh), a line editor written in pure bash. Available as [programs.bash.blesh](#opt-programs.bash.blesh.enable).
- [cups-pdf-to-pdf](https://github.com/alexivkin/CUPS-PDF-to-PDF), a pdf-generating cups backend based on [cups-pdf](https://www.cups-pdf.de/). Available as [services.printing.cups-pdf](#opt-services.printing.cups-pdf.enable).
- [fzf](https://github.com/junegunn/fzf), a command line fuzzyfinder. Available as [programs.fzf](#opt-programs.fzf.fuzzyCompletion).
- [atuin](https://github.com/ellie/atuin), a sync server for shell history. Available as [services.atuin](#opt-services.atuin.enable).

View file

@ -1028,6 +1028,7 @@
./services/networking/znc/default.nix
./services/printing/cupsd.nix
./services/printing/ipp-usb.nix
./services/printing/cups-pdf.nix
./services/scheduling/atd.nix
./services/scheduling/cron.nix
./services/scheduling/fcron.nix

View file

@ -0,0 +1,185 @@
{ config, lib, pkgs, ... }:
let
# cups calls its backends as user `lp` (which is good!),
# but cups-pdf wants to be called as `root`, so it can change ownership of files.
# We add a suid wrapper and a wrapper script to trick cups into calling the suid wrapper.
# Note that a symlink to the suid wrapper alone wouldn't suffice, cups would complain
# > File "/nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-cups-progs/lib/cups/backend/cups-pdf" has insecure permissions (0104554/uid=0/gid=20)
# wrapper script that redirects calls to the suid wrapper
cups-pdf-wrapper = pkgs.writeTextFile {
name = "${pkgs.cups-pdf-to-pdf.name}-wrapper.sh";
executable = true;
destination = "/lib/cups/backend/cups-pdf";
checkPhase = ''
${pkgs.stdenv.shellDryRun} "$target"
${lib.getExe pkgs.shellcheck} "$target"
'';
text = ''
#! ${pkgs.runtimeShell}
exec "${config.security.wrapperDir}/cups-pdf" "$@"
'';
};
# wrapped cups-pdf package that uses the suid wrapper
cups-pdf-wrapped = pkgs.buildEnv {
name = "${pkgs.cups-pdf-to-pdf.name}-wrapped";
# using the wrapper as first path ensures it is used
paths = [ cups-pdf-wrapper pkgs.cups-pdf-to-pdf ];
ignoreCollisions = true;
};
instanceSettings = name: {
freeformType = with lib.types; nullOr (oneOf [ int str path package ]);
# override defaults:
# inject instance name into paths,
# also avoid conflicts between user names and special dirs
options.Out = lib.mkOption {
type = with lib.types; nullOr singleLineStr;
default = "/var/spool/cups-pdf-${name}/users/\${USER}";
defaultText = "/var/spool/cups-pdf-{instance-name}/users/\${USER}";
example = "\${HOME}/cups-pdf";
description = lib.mdDoc ''
output directory;
`''${HOME}` will be expanded to the user's home directory,
`''${USER}` will be expanded to the user name.
'';
};
options.AnonDirName = lib.mkOption {
type = with lib.types; nullOr singleLineStr;
default = "/var/spool/cups-pdf-${name}/anonymous";
defaultText = "/var/spool/cups-pdf-{instance-name}/anonymous";
example = "/var/lib/cups-pdf";
description = lib.mdDoc "path for anonymously created PDF files";
};
options.Spool = lib.mkOption {
type = with lib.types; nullOr singleLineStr;
default = "/var/spool/cups-pdf-${name}/spool";
defaultText = "/var/spool/cups-pdf-{instance-name}/spool";
example = "/var/lib/cups-pdf";
description = lib.mdDoc "spool directory";
};
options.Anonuser = lib.mkOption {
type = lib.types.singleLineStr;
default = "root";
description = lib.mdDoc ''
User for anonymous PDF creation.
An empty string disables this feature.
'';
};
options.GhostScript = lib.mkOption {
type = with lib.types; nullOr path;
default = lib.getExe pkgs.ghostscript;
defaultText = lib.literalExpression "lib.getExe pkgs.ghostscript";
example = lib.literalExpression ''''${pkgs.ghostscript}/bin/ps2pdf'';
description = lib.mdDoc "location of GhostScript binary";
};
};
instanceConfig = { name, config, ... }: {
options = {
enable = (lib.mkEnableOption (lib.mdDoc "this cups-pdf instance")) // { default = true; };
installPrinter = (lib.mkEnableOption (lib.mdDoc ''
a CUPS printer queue for this instance.
The queue will be named after the instance and will use the {file}`CUPS-PDF_opt.ppd` ppd file.
If this is disabled, you need to add the queue yourself to use the instance
'')) // { default = true; };
confFileText = lib.mkOption {
type = lib.types.lines;
description = lib.mdDoc ''
This will contain the contents of {file}`cups-pdf.conf` for this instance, derived from {option}`settings`.
You can use this option to append text to the file.
'';
};
settings = lib.mkOption {
type = lib.types.submodule (instanceSettings name);
default = {};
example = {
Out = "\${HOME}/cups-pdf";
UserUMask = "0033";
};
description = lib.mdDoc ''
Settings for a cups-pdf instance, see the descriptions in the template config file in the cups-pdf package.
The key value pairs declared here will be translated into proper key value pairs for {file}`cups-pdf.conf`.
Setting a value to `null` disables the option and removes it from the file.
'';
};
};
config.confFileText = lib.pipe config.settings [
(lib.filterAttrs (key: value: value != null))
(lib.mapAttrs (key: builtins.toString))
(lib.mapAttrsToList (key: value: "${key} ${value}\n"))
lib.concatStrings
];
};
cupsPdfCfg = config.services.printing.cups-pdf;
copyConfigFileCmds = lib.pipe cupsPdfCfg.instances [
(lib.filterAttrs (name: lib.getAttr "enable"))
(lib.mapAttrs (name: lib.getAttr "confFileText"))
(lib.mapAttrs (name: pkgs.writeText "cups-pdf-${name}.conf"))
(lib.mapAttrsToList (name: confFile: "ln --symbolic --no-target-directory ${confFile} /var/lib/cups/cups-pdf-${name}.conf\n"))
lib.concatStrings
];
printerSettings = lib.pipe cupsPdfCfg.instances [
(lib.filterAttrs (name: lib.getAttr "enable"))
(lib.filterAttrs (name: lib.getAttr "installPrinter"))
(lib.mapAttrsToList (name: instance: (lib.mapAttrs (key: lib.mkDefault) {
inherit name;
model = "CUPS-PDF_opt.ppd";
deviceUri = "cups-pdf:/${name}";
description = "virtual printer for cups-pdf instance ${name}";
location = instance.settings.Out;
})))
];
in
{
options.services.printing.cups-pdf = {
enable = lib.mkEnableOption (lib.mdDoc ''
the cups-pdf virtual pdf printer backend.
By default, this will install a single printer `pdf`.
but this can be changed/extended with {option}`services.printing.cups-pdf.instances`
'');
instances = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule instanceConfig);
default.pdf = {};
example.pdf.settings = {
Out = "\${HOME}/cups-pdf";
UserUMask = "0033";
};
description = lib.mdDoc ''
Permits to raise one or more cups-pdf instances.
Each instance is named by an attribute name, and the attribute's values control the instance' configuration.
'';
};
};
config = lib.mkIf cupsPdfCfg.enable {
services.printing.enable = true;
services.printing.drivers = [ cups-pdf-wrapped ];
hardware.printers.ensurePrinters = printerSettings;
# the cups module will install the default config file,
# but we don't need it and it would confuse cups-pdf
systemd.services.cups.preStart = lib.mkAfter ''
rm -f /var/lib/cups/cups-pdf.conf
${copyConfigFileCmds}
'';
security.wrappers.cups-pdf = {
group = "lp";
owner = "root";
permissions = "+r,ug+x";
setuid = true;
source = "${pkgs.cups-pdf-to-pdf}/lib/cups/backend/cups-pdf";
};
};
meta.maintainers = [ lib.maintainers.yarny ];
}

View file

@ -155,6 +155,7 @@ in {
coturn = handleTest ./coturn.nix {};
couchdb = handleTest ./couchdb.nix {};
cri-o = handleTestOn ["aarch64-linux" "x86_64-linux"] ./cri-o.nix {};
cups-pdf = handleTest ./cups-pdf.nix {};
custom-ca = handleTest ./custom-ca.nix {};
croc = handleTest ./croc.nix {};
deluge = handleTest ./deluge.nix {};

40
nixos/tests/cups-pdf.nix Normal file
View file

@ -0,0 +1,40 @@
import ./make-test-python.nix ({ lib, pkgs, ... }: {
name = "cups-pdf";
nodes.machine = { pkgs, ... }: {
imports = [ ./common/user-account.nix ];
environment.systemPackages = [ pkgs.poppler_utils ];
fonts.fonts = [ pkgs.dejavu_fonts ]; # yields more OCR-able pdf
services.printing.cups-pdf.enable = true;
services.printing.cups-pdf.instances = {
opt = {};
noopt.installPrinter = false;
};
hardware.printers.ensurePrinters = [{
name = "noopt";
model = "CUPS-PDF_noopt.ppd";
deviceUri = "cups-pdf:/noopt";
}];
};
# we cannot check the files with pdftotext, due to
# https://github.com/alexivkin/CUPS-PDF-to-PDF/issues/7
# we need `imagemagickBig` as it has ghostscript support
testScript = ''
from subprocess import run
machine.wait_for_unit("cups.service")
for name in ("opt", "noopt"):
text = f"test text {name}".upper()
machine.wait_until_succeeds(f"lpstat -v {name}")
machine.succeed(f"su - alice -c 'echo -e \"\n {text}\" | lp -d {name}'")
# wait until the pdf files are completely produced and readable by alice
machine.wait_until_succeeds(f"su - alice -c 'pdfinfo /var/spool/cups-pdf-{name}/users/alice/*.pdf'")
machine.succeed(f"cp /var/spool/cups-pdf-{name}/users/alice/*.pdf /tmp/{name}.pdf")
machine.copy_from_vm(f"/tmp/{name}.pdf", "")
run(f"${pkgs.imagemagickBig}/bin/convert -density 300 $out/{name}.pdf $out/{name}.jpeg", shell=True, check=True)
assert text.encode() in run(f"${lib.getExe pkgs.tesseract} $out/{name}.jpeg stdout", shell=True, check=True, capture_output=True).stdout
'';
meta.maintainers = [ lib.maintainers.yarny ];
})

View file

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "motion";
version = "4.5.0";
version = "4.5.1";
src = fetchFromGitHub {
owner = "Motion-Project";
repo = "motion";
rev = "release-${version}";
sha256 = "sha256-uKEgTQhpslOCfNj8z95/DK4M1Gx4SMRjl1/KPh5KHuc=";
sha256 = "sha256-3TmmLAU/muiI90hrYrctzgVbWS4rXjxzAa0ctVYKSSY=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];

View file

@ -1,5 +1,5 @@
{ config, lib, substituteAll, stdenv, fetchurl, pkg-config, gettext, glib, atk, pango, cairo, perl, xorg
, gdk-pixbuf, xlibsWrapper, gobject-introspection
, gdk-pixbuf, gobject-introspection
, xineramaSupport ? stdenv.isLinux
, cupsSupport ? config.gtk2.cups or stdenv.isLinux, cups
, gdktarget ? if stdenv.isDarwin then "quartz" else "x11"
@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
++ optionals (stdenv.isLinux || stdenv.isDarwin) [
libXrandr libXrender libXcomposite libXi libXcursor
]
++ optionals stdenv.isDarwin [ xlibsWrapper libXdamage ]
++ optionals stdenv.isDarwin [ libXdamage ]
++ optional xineramaSupport libXinerama
++ optionals cupsSupport [ cups ]
++ optionals stdenv.isDarwin [ AppKit Cocoa ];

View file

@ -1,26 +1,26 @@
{ lib, buildDunePackage, fetchFromGitHub, alcotest, cryptokit, fmt, yojson
{ lib, buildDunePackage, fetchFromGitHub, alcotest, digestif, fmt, yojson
, ppxlib
, base64, re, ppx_deriving }:
buildDunePackage rec {
pname = "jwto";
version = "0.3.0";
version = "0.4.0";
useDune2 = true;
duneVersion = "3";
minimumOCamlVersion = "4.05";
minimalOCamlVersion = "4.08";
src = fetchFromGitHub {
owner = "sporto";
repo = "jwto";
rev = version;
sha256 = "1p799zk8j9c0002xzi2x7ndj1bzqf14744ampcqndrjnsi7mq71s";
hash = "sha256-TOWwNyrOqboCm8Y4mM6GgtmxGO3NmyDdAX7m8CifA7Y=";
};
buildInputs = [ ppxlib ];
propagatedBuildInputs =
[ cryptokit fmt yojson base64 re ppx_deriving ];
[ digestif fmt yojson base64 re ppx_deriving ];
checkInputs = [ alcotest ];

View file

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "ailment";
version = "9.2.30";
version = "9.2.31";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "v${version}";
hash = "sha256-zl4qk/cDRISzTNK+fapxGr5yzugueAD3erzzUA51BJI=";
hash = "sha256-jG7lZet15mp1ltbdcv1ZMHHa+ydFXQiNS+dl70tmluE=";
};
nativeBuildInputs = [

View file

@ -31,7 +31,7 @@
buildPythonPackage rec {
pname = "angr";
version = "9.2.30";
version = "9.2.31";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -40,7 +40,7 @@ buildPythonPackage rec {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-UCXxKCvxzGr/c4WuAAFLfEp2QOlKD3n8tqSGI4fjEDo=";
hash = "sha256-i7kIHDg1iCtEeigS2+4MTS2fmUYYEbruL7q0s1skR9k=";
};
propagatedBuildInputs = [

View file

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "archinfo";
version = "9.2.30";
version = "9.2.31";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "v${version}";
hash = "sha256-IJr5Xk/0n5AfoUAQfI6DrMJ3ulCttKZkVgFZ42C3poE=";
hash = "sha256-mrsEdVUp13XqVwrbLYbR8vAsu5wPHQcIOBBSmSPJQYY=";
};
nativeBuildInputs = [

View file

@ -6,12 +6,11 @@
, requests
, requests-oauthlib
, responses
, six
}:
buildPythonPackage rec {
pname = "asana";
version = "2.0.0";
version = "3.0.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -20,13 +19,12 @@ buildPythonPackage rec {
owner = "asana";
repo = "python-asana";
rev = "refs/tags/v${version}";
sha256 = "sha256-sY7M446krFIcyWkN2pk9FTa+VTXEOZ6xnHePx35e8IY=";
hash = "sha256-+lktPFCL2c79dNGgbsaFJRELmV6sJ2kiBSb8kd9XPIQ=";
};
propagatedBuildInputs = [
requests
requests-oauthlib
six
];
checkInputs = [
@ -41,6 +39,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python client library for Asana";
homepage = "https://github.com/asana/python-asana";
changelog = "https://github.com/Asana/python-asana/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ ];
};

View file

@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "claripy";
version = "9.2.30";
version = "9.2.31";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -24,7 +24,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "v${version}";
hash = "sha256-cN9Mfi572JFH3lfgLp9nnkO+wOUmDfiEtqZUA0U2JEw=";
hash = "sha256-hIzB6E1z3ufbHFoe2IfBTuF4uuJibaFTqDjTf5ubHDU=";
};
nativeBuildInputs = [

View file

@ -16,7 +16,7 @@
let
# The binaries are following the argr projects release cycle
version = "9.2.30";
version = "9.2.31";
# Binary files from https://github.com/angr/binaries (only used for testing and only here)
binaries = fetchFromGitHub {
@ -38,7 +38,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "v${version}";
hash = "sha256-ZLMbV4H1JWfnMlSsN1nZhQVmsEyJF2sIii0sSOxe+2E=";
hash = "sha256-ZgM1GEsmp6LOoFf33l6cZY6cyCoitPDEpFbAVuAd0p8=";
};
nativeBuildInputs = [

View file

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "ghrepo-stats";
version = "0.3.1";
version = "0.4.0";
format = "setuptools";
disabled = pythonOlder "3.8";
@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "mrbean-bremen";
repo = pname;
rev = "v${version}";
sha256 = "sha256-W6RhVnMuOgB4GNxczx3UlSeq0RWIM7yISKEvpnrE9uk=";
hash = "sha256-KFjqHrN0prcqu3wEPZpa7rLfuD0X/DN7BMo4zcHNmYo=";
};
propagatedBuildInputs = [
@ -35,6 +35,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python module and CLI tool for GitHub repo statistics";
homepage = "https://github.com/mrbean-bremen/ghrepo-stats";
changelog = "https://github.com/mrbean-bremen/ghrepo-stats/blob/v${version}/CHANGES.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};

View file

@ -16,7 +16,7 @@
buildPythonPackage rec {
pname = "google-nest-sdm";
version = "2.1.0";
version = "2.1.2";
format = "setuptools";
disabled = pythonOlder "3.8";
@ -25,7 +25,7 @@ buildPythonPackage rec {
owner = "allenporter";
repo = "python-google-nest-sdm";
rev = "refs/tags/${version}";
hash = "sha256-gT8Zrjzzunm5nt0GHYY0z2ZxtKBSc6FXndlrStbwo64=";
hash = "sha256-TuAqd9r/iExBa9uxU3386C12ZD+LEJai7DkJtcoupEs=";
};
propagatedBuildInputs = [
@ -56,6 +56,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Module for Google Nest Device Access using the Smart Device Management API";
homepage = "https://github.com/allenporter/python-google-nest-sdm";
changelog = "https://github.com/allenporter/python-google-nest-sdm/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};

View file

@ -0,0 +1,78 @@
{ lib
, buildPythonPackage
, cffi
, dos2unix
, fetchPypi
, matplotlib
, networkx
, numpy
, pytestCheckHook
, pythonOlder
, gurobi
, gurobipy
# Enable support for the commercial Gurobi solver (requires a license)
, gurobiSupport ? false
# If Gurobi has already been installed outside of the Nix store, specify its
# installation directory here
, gurobiHome ? null
}:
buildPythonPackage rec {
pname = "mip";
version = "1.14.1";
disabled = pythonOlder "3.7";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-bvpm5vUp15fbv/Sw1Lx70ihA7VHsSUzwFzoFDG+Ow1M=";
};
checkInputs = [ matplotlib networkx numpy pytestCheckHook ];
nativeBuildInputs = [ dos2unix ];
propagatedBuildInputs = [
cffi
] ++ lib.optionals gurobiSupport ([
gurobipy
] ++ lib.optional (builtins.isNull gurobiHome) gurobi);
# Source files have CRLF terminators, which make patch error out when supplied
# with diffs made on *nix machines
prePatch = ''
find . -type f -exec ${dos2unix}/bin/dos2unix {} \;
'';
patches = [
# Some tests try to be smart and dynamically construct a path to their test
# inputs. Unfortunately, since the test phase is run after installation,
# those paths point to the Nix store, which no longer contains the test
# data. This patch hardcodes the data path to point to the source directory.
./test-data-path.patch
];
postPatch = ''
# Allow cffi versions with a different patch level to be used
substituteInPlace pyproject.toml --replace "cffi==1.15.0" "cffi==1.15.*"
'';
# Make MIP use the Gurobi solver, if configured to do so
makeWrapperArgs = lib.optional gurobiSupport
"--set GUROBI_HOME ${if builtins.isNull gurobiHome then gurobi.outPath else gurobiHome}";
# Tests that rely on Gurobi are activated only when Gurobi support is enabled
disabledTests = lib.optional (!gurobiSupport) "gurobi";
passthru.optional-dependencies = {
inherit gurobipy numpy;
};
meta = with lib; {
homepage = "http://python-mip.com/";
description = "A collection of Python tools for the modeling and solution of Mixed-Integer Linear programs (MIPs)";
downloadPage = "https://github.com/coin-or/python-mip/releases";
changelog = "https://github.com/coin-or/python-mip/releases/tag/${version}";
license = licenses.epl20;
maintainers = with maintainers; [ nessdoor ];
};
}

View file

@ -0,0 +1,30 @@
diff --git a/examples/extract_features_mip.py b/examples/extract_features_mip.py
index cdc109f..90e79fa 100644
--- a/examples/extract_features_mip.py
+++ b/examples/extract_features_mip.py
@@ -9,9 +9,7 @@ import mip
lp_path = ""
# using test data, replace with your instance
-lp_path = mip.__file__.replace("mip/__init__.py", "test/data/1443_0-9.lp").replace(
- "mip\\__init__.py", "test\\data\\1443_0-9.lp"
-)
+lp_path = "test/data/1443_0-9.lp"
m = Model()
if m.solver_name.upper() in ["GRB", "GUROBI"]:
diff --git a/examples/gen_cuts_mip.py b/examples/gen_cuts_mip.py
index f71edae..2799734 100644
--- a/examples/gen_cuts_mip.py
+++ b/examples/gen_cuts_mip.py
@@ -11,9 +11,7 @@ import mip
lp_path = ""
# using test data
-lp_path = mip.__file__.replace("mip/__init__.py", "test/data/1443_0-9.lp").replace(
- "mip\\__init__.py", "test\\data\\1443_0-9.lp"
-)
+lp_path = "test/data/1443_0-9.lp"
m = Model()
if m.solver_name.upper() in ["GRB", "GUROBI"]:

View file

@ -7,15 +7,16 @@
, packaging
, poetry-core
, pytestCheckHook
, typing-extensions
, python-dateutil
, pythonOlder
, rich
, tomlkit
, typing-extensions
}:
buildPythonPackage rec {
pname = "pontos";
version = "22.12.0";
version = "22.12.1";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -24,7 +25,7 @@ buildPythonPackage rec {
owner = "greenbone";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-8enSKOVEkYPI/2d2nzDkf1GO15kpMI6xDktroK9Ti2s=";
hash = "sha256-8exFNjZWbnz6B1f7YepitIMyKdQ1KIYqthlWQr32irk=";
};
nativeBuildInputs = [
@ -35,6 +36,7 @@ buildPythonPackage rec {
colorful
httpx
packaging
python-dateutil
rich
typing-extensions
tomlkit

View file

@ -29,7 +29,7 @@
buildPythonPackage rec {
pname = "pyunifiprotect";
version = "4.5.2";
version = "4.5.3";
format = "pyproject";
disabled = pythonOlder "3.9";
@ -38,7 +38,7 @@ buildPythonPackage rec {
owner = "briis";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-xYDt/vvzI7qIK/8XE6mhcI5GPDKyHRj73Lagn0QOOz0=";
hash = "sha256-FZXnJorY7WNgDVajULZyFwJ13RBbClXK38CCyF7ASmI=";
};
postPatch = ''

View file

@ -13,14 +13,14 @@
buildPythonPackage rec {
pname = "pyvex";
version = "9.2.30";
version = "9.2.31";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-lSjO8GLJN5pAOEusw0Uak7DsEE11MVexyRvkiLbkAjA=";
hash = "sha256-Te0wFz+3/HVKlMXW5WJ6mRGh8wWiMXR6Ypi/4hvnz/8=";
};
nativeBuildInputs = [

View file

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "whois";
version = "0.9.18";
version = "0.9.19";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -16,7 +16,7 @@ buildPythonPackage rec {
owner = "DannyCork";
repo = "python-whois";
rev = "refs/tags/${version}";
sha256 = "sha256-15oa7E33VQMPtI2LJ0XVKd42m9BY9jZLL3XGXpAhv/A=";
hash = "sha256-b8OZppynDT0MCwH4ic+wMJzWqyUzsigzxD0yYGfgJmI=";
};
propagatedBuildInputs = [
@ -34,6 +34,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python module/library for retrieving WHOIS information";
homepage = "https://github.com/DannyCork/python-whois/";
changelog = "https://github.com/DannyCork/python-whois/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};

View file

@ -0,0 +1,20 @@
{ fetchCrate, lib, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "cargo2junit";
version = "0.1.12";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-wF1vDUVEume6aWzI5smTNlwc9WyZeTtUX416tYYrZPU=";
};
cargoSha256 = "sha256-GUCHWV+uPHZwhU4UhdXE2GHpeVnqbUTpfivA9Nh9MoY=";
meta = with lib; {
description = "Converts cargo's json output (from stdin) to JUnit XML (to stdout).";
homepage = "https://github.com/johnterickson/cargo2junit";
license = licenses.mit;
maintainers = with maintainers; [ alekseysidorov ];
};
}

View file

@ -1,15 +1,17 @@
{ lib, stdenv, fetchurl, nasm
, alsa-lib, curl, flac, fluidsynth, freetype, libjpeg, libmad, libmpeg2, libogg, libvorbis, libGLU, libGL, SDL2, zlib
{ lib, stdenv, fetchFromGitHub, nasm
, alsa-lib, curl, flac, fluidsynth, freetype, libjpeg, libmad, libmpeg2, libogg, libtheora, libvorbis, libGLU, libGL, SDL2, zlib
, Cocoa, AudioToolbox, Carbon, CoreMIDI, AudioUnit, cctools
}:
stdenv.mkDerivation rec {
pname = "scummvm";
version = "2.5.1";
version = "2.6.1";
src = fetchurl {
url = "http://scummvm.org/frs/scummvm/${version}/${pname}-${version}.tar.xz";
sha256 = "sha256-n9jbOORFYUS/jDTazffyBOdfGOjkSOwBzgjOgmoDXwE=";
src = fetchFromGitHub {
owner = "scummvm";
repo = "scummvm";
rev = "v${version}";
hash = "sha256-fqMMdHBVcXLsBDWxXH9UKXwfvlyIVbRsIPmrYqPGQ+g=";
};
nativeBuildInputs = [ nasm ];
@ -19,7 +21,7 @@ stdenv.mkDerivation rec {
] ++ lib.optionals stdenv.isDarwin [
Cocoa AudioToolbox Carbon CoreMIDI AudioUnit
] ++ [
curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libvorbis libGLU libGL SDL2 zlib
curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libtheora libvorbis libGLU libGL SDL2 zlib
];
dontDisableStatic = true;
@ -28,7 +30,6 @@ stdenv.mkDerivation rec {
configurePlatforms = [ "host" ];
configureFlags = [
"--enable-c++11"
"--enable-release"
];

View file

@ -0,0 +1,62 @@
{ lib
, stdenv
, fetchFromGitHub
, cups
, coreutils
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "cups-pdf-to-pdf";
version = "unstable-2021-12-22";
src = fetchFromGitHub {
owner = "alexivkin";
repo = "CUPS-PDF-to-PDF";
rev = "c14428c2ca8e95371daad7db6d11c84046b1a2d4";
hash = "sha256-pa4PFf8OAFSra0hSazmKUfbMYL/cVWvYA1lBf7c7jmY=";
};
buildInputs = [ cups ];
postPatch = ''
sed -r 's|(gscall, size, ")cp |\1${coreutils}/bin/cp |' cups-pdf.c -i
'';
# gcc command line is taken from original cups-pdf's README file
# https://fossies.org/linux/cups-pdf/README
# however, we replace gcc with $CC following
# https://nixos.org/manual/nixpkgs/stable/#sec-darwin
buildPhase = ''
runHook preBuild
$CC -O9 -s cups-pdf.c -o cups-pdf -lcups
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dt $out/lib/cups/backend cups-pdf
install -Dm 0644 -t $out/etc/cups cups-pdf.conf
install -Dm 0644 -t $out/share/cups/model *.ppd
runHook postInstall
'';
passthru.tests.vmtest = nixosTests.cups-pdf;
meta = with lib; {
description = "A CUPS backend that turns print jobs into searchable PDF files";
homepage = "https://github.com/alexivkin/CUPS-PDF-to-PDF";
license = licenses.gpl2Only;
maintainers = [ maintainers.yarny ];
longDescription = ''
cups-pdf is a CUPS backend that generates a PDF file for each print job and puts this file
into a folder on the local machine such that the print job's owner can access the file.
https://www.cups-pdf.de/
cups-pdf-to-pdf is a fork of cups-pdf which tries hard to preserve the original text of the print job by avoiding rasterization.
Note that in order to use this package, you have to make sure that the cups-pdf program is called with root privileges.
'';
};
}

View file

@ -3,7 +3,6 @@
, fetchFromGitHub
, boost
, catch2
, clasp
, cmake
, clingo
, re2c
@ -25,12 +24,12 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ boost clasp clingo re2c ];
buildInputs = [ boost clingo re2c ];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DASPCUD_GRINGO_PATH=${clingo}/bin/gringo"
"-DASPCUD_CLASP_PATH=${clasp}/bin/clasp"
"-DASPCUD_CLASP_PATH=${clingo}/bin/clasp"
];
doCheck = true;

View file

@ -1,29 +0,0 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "clasp";
version = "3.1.4";
src = fetchurl {
url = "mirror://sourceforge/project/potassco/clasp/${version}/clasp-${version}-source.tar.gz";
sha256 = "1zkjqc4gp4n9p2kf3k3z8x82g42any4p3shhhivny89z1jlxi9zn";
};
preConfigure = "patchShebangs ./configure.sh";
configureScript = "./configure.sh";
preBuild = "cd build/release";
installPhase = ''
mkdir -p $out/bin
cp bin/clasp $out/bin/clasp
'';
meta = with lib; {
description = "Answer set solver for (extended) normal and disjunctive logic programs";
homepage = "http://potassco.sourceforge.net/";
platforms = platforms.all;
maintainers = [ maintainers.hakuch ];
license = licenses.gpl2Plus;
};
}

View file

@ -1,6 +1,6 @@
{ mkDerivation, lib, fetchFromGitLab, qtbase, qtserialport, cmake }:
{ stdenv, lib, fetchFromGitLab, qtserialport, cmake, wrapQtAppsHook }:
mkDerivation rec {
stdenv.mkDerivation rec {
pname = "cutecom";
version = "0.51.0+patch";
@ -11,10 +11,17 @@ mkDerivation rec {
sha256 = "X8jeESt+x5PxK3rTNC1h1Tpvue2WH09QRnG2g1eMoEE=";
};
buildInputs = [ qtbase qtserialport ];
nativeBuildInputs = [ cmake ];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/Applications" "$out/Applications"
'';
postInstall = ''
buildInputs = [ qtserialport ];
nativeBuildInputs = [ cmake wrapQtAppsHook ];
postInstall = if stdenv.isDarwin then ''
mkdir -p $out/Applications
'' else ''
cd ..
mkdir -p "$out"/share/{applications,icons/hicolor/scalable/apps,man/man1}
cp cutecom.desktop "$out/share/applications"
@ -25,8 +32,8 @@ mkDerivation rec {
meta = with lib; {
description = "A graphical serial terminal";
homepage = "https://gitlab.com/cutecom/cutecom/";
license = licenses.gpl3;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ bennofs ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View file

@ -10,22 +10,31 @@
rustPlatform.buildRustPackage rec {
pname = "topgrade";
version = "10.2.2";
version = "10.2.4";
src = fetchFromGitHub {
owner = "topgrade-rs";
repo = "topgrade";
rev = "v${version}";
sha256 = "sha256-TDuTrtVqEy0g13zdWHz2+cQhMEMSbvameBkJUcyTfGw=";
hash = "sha256-b1nWTQ+m4b6XzDTR36ubf5nTdUuWK94F2P4Q3tUvHAw=";
};
cargoSha256 = "sha256-4uq4lksfgTI+x7E/p27gs0Zh0NQq3kIBB9KVD2tvmtQ=";
cargoHash = "sha256-7GSkFh0Fefl9VlCdPdVZ9IsyN0IKUob5c43v84PtrcI=";
nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [
installShellFiles
];
buildInputs = lib.optionals stdenv.isDarwin [ AppKit Cocoa Foundation ];
buildInputs = lib.optionals stdenv.isDarwin [
AppKit
Cocoa
Foundation
];
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-framework" "AppKit" ];
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [
"-framework"
"AppKit"
];
postInstall = ''
installShellCompletion --cmd topgrade \
@ -40,6 +49,7 @@ rustPlatform.buildRustPackage rec {
meta = with lib; {
description = "Upgrade all the things";
homepage = "https://github.com/topgrade-rs/topgrade";
changelog = "https://github.com/topgrade-rs/topgrade/releases/tag/v${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ SuperSandro2000 xyenon ];
};

View file

@ -217,6 +217,7 @@ mapAliases ({
clang13Stdenv = lowPrio llvmPackages_13.stdenv;
clangAnalyzer = throw "'clangAnalyzer' has been renamed to/replaced by 'clang-analyzer'"; # Converted to throw 2022-02-22
clasp = clingo; # added 2022-12-22
claws-mail-gtk2 = throw "claws-mail-gtk2 was removed to get rid of Python 2, please use claws-mail"; # Added 2021-12-05
claws-mail-gtk3 = claws-mail; # Added 2021-07-10
clawsMail = throw "'clawsMail' has been renamed to/replaced by 'claws-mail'"; # Converted to throw 2022-02-22

View file

@ -3877,8 +3877,6 @@ with pkgs;
clash-geoip = callPackage ../data/misc/clash-geoip { };
clasp = callPackage ../tools/misc/clasp { };
clevercsv = with python3Packages; toPythonApplication clevercsv;
clevis = callPackage ../tools/security/clevis {
@ -15297,6 +15295,8 @@ with pkgs;
buildRustCrate = callPackage ../build-support/rust/build-rust-crate { };
buildRustCrateHelpers = callPackage ../build-support/rust/build-rust-crate/helpers.nix { };
cargo2junit = callPackage ../development/tools/rust/cargo2junit { };
cargo-espflash = callPackage ../development/tools/rust/cargo-espflash {
inherit (darwin.apple_sdk.frameworks) Security;
};
@ -36716,6 +36716,8 @@ with pkgs;
cups-dymo = callPackage ../misc/cups/drivers/dymo {};
cups-pdf-to-pdf = callPackage ../misc/cups/drivers/cups-pdf-to-pdf {};
cups-toshiba-estudio = callPackage ../misc/cups/drivers/estudio {};
cups-zj-58 = callPackage ../misc/cups/drivers/zj-58 { };

View file

@ -5798,6 +5798,8 @@ self: super: with self; {
inherit (pkgs.darwin) cctools;
};
mip = callPackage ../development/python-modules/mip { };
misaka = callPackage ../development/python-modules/misaka { };
misoc = callPackage ../development/python-modules/misoc { };