3
0
Fork 0
forked from mirrors/nixpkgs

Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-11-16 18:01:14 +00:00 committed by GitHub
commit ca7a3ad2e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 173 additions and 47 deletions

View file

@ -1,5 +1,31 @@
# OCaml {#sec-language-ocaml}
## User guide {#sec-language-ocaml-user-guide}
OCaml libraries are available in attribute sets of the form `ocaml-ng.ocamlPackages_X_XX` where X is to be replaced with the desired compiler version. For example, ocamlgraph compiled with OCaml 4.12 can be found in `ocaml-ng.ocamlPackages_4_12.ocamlgraph`. The compiler itself is also located in this set, under the name `ocaml`.
If you don't care about the exact compiler version, `ocamlPackages` is a top-level alias pointing to a recent version of OCaml.
OCaml applications are usually available top-level, and not inside `ocamlPackages`. Notable exceptions are build tools that must be built with the same compiler version as the compiler you intend to use like `dune` or `ocaml-lsp`.
To open a shell able to build a typical OCaml project, put the dependencies in `buildInputs` and add `ocamlPackages.ocaml` and `ocamlPackages.findlib` to `nativeBuildInputs` at least.
For example:
```nix
let
pkgs = import <nixpkgs> {};
# choose the ocaml version you want to use
ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_12;
in
pkgs.mkShell {
# build tools
nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_2 ocaml-lsp ];
# dependencies
buildInputs = with ocamlPackages; [ ocamlgraph ];
}
```
## Packaging guide {#sec-language-ocaml-packaging}
OCaml libraries should be installed in `$(out)/lib/ocaml/${ocaml.version}/site-lib/`. Such directories are automatically added to the `$OCAMLPATH` environment variable when building another package that depends on them or when opening a `nix-shell`.
Given that most of the OCaml ecosystem is now built with dune, nixpkgs includes a convenience build support function called `buildDunePackage` that will build an OCaml package using dune, OCaml and findlib and any additional dependencies provided as `buildInputs` or `propagatedBuildInputs`.

View file

@ -21,13 +21,13 @@
stdenv.mkDerivation rec{
pname = "corectrl";
version = "1.1.4";
version = "1.2.2";
src = fetchFromGitLab {
owner = "corectrl";
repo = "corectrl";
rev = "v${version}";
sha256 = "sha256-o8u9WnkK/6VZ+wlJ9I5Ti6ADjV9VXraRGpSWkDQv5JQ=";
sha256 = "1zp523cgvmfjc42wx1f1jh5q3jnsnm833m2xnbbwmfrmhrzh5269";
};
nativeBuildInputs = [

View file

@ -28,11 +28,11 @@
}:
let
version = "5.8.3.145";
version = "5.8.4.210";
srcs = {
x86_64-linux = fetchurl {
url = "https://zoom.us/client/${version}/zoom_x86_64.pkg.tar.xz";
sha256 = "1p4agpbcpk95r04m775dr17fmlm18vxq9mb65pyfbhvsd1ypw6kr";
sha256 = "1qjr35wg1jk6a6c958s0hbgqqczq789iim77s02yqpy5kyjbnn1n";
};
};

View file

@ -0,0 +1,54 @@
{ lib, stdenv, fetchFromGitHub
, drat-trim, p7zip
}:
stdenv.mkDerivation rec {
pname = "kissat";
version = "2.0.1";
src = fetchFromGitHub {
owner = "arminbiere";
repo = "kissat";
# https://github.com/arminbiere/kissat/issues/18
rev = "abfa45fb782fa3b7c6e2eb6b939febe74d7270b7";
sha256 = "06pbmkjxgf2idhsrd1yzvbxr2wf8l06pjb38bzbygm6n9ami89b8";
};
outputs = [ "out" "dev" "lib" ];
checkInputs = [ drat-trim p7zip ];
doCheck = true;
# 'make test' assumes that /etc/passwd is not writable.
patches = [ ./writable-passwd-is-ok.patch ];
# the configure script is not generated by autotools and does not accept the
# arguments that the default configurePhase passes like --prefix and --libdir
dontAddPrefix = true;
setOutputFlags = false;
installPhase = ''
runHook preInstall
install -Dm0755 build/kissat "$out/bin/kissat"
install -Dm0644 src/kissat.h "$dev/include/kissat.h"
install -Dm0644 build/libkissat.a "$lib/lib/libkissat.a"
mkdir -p "$out/share/doc/kissat/"
install -Dm0644 {LICEN?E,README*,VERSION} "$out/share/doc/kissat/"
runHook postInstall
'';
meta = with lib; {
description = "A 'keep it simple and clean bare metal SAT solver' written in C";
longDescription = ''
Kissat is a "keep it simple and clean bare metal SAT solver" written in C.
It is a port of CaDiCaL back to C with improved data structures,
better scheduling of inprocessing and optimized algorithms and implementation.
'';
maintainers = with maintainers; [ shnarazk ];
platforms = platforms.unix;
license = licenses.mit;
homepage = "http://fmv.jku.at/kissat";
};
}

View file

@ -0,0 +1,13 @@
diff --git a/test/testfile.c b/test/testfile.c
index cb311d5..0726244 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -92,8 +92,6 @@ do { \
WRITABLE (true, "../test/file/non-existing");
WRITABLE (false, "/kissat-test-file-writable");
WRITABLE (false, "non-existing-directory/file-in-non-existing-directory");
- if (kissat_file_exists ("/etc/passwd"))
- WRITABLE (false, "/etc/passwd");
#undef WRITABLE
}

View file

@ -25,11 +25,6 @@
, zlib
}:
# We need multiple binaries as a given binary isn't always able to build
# (even slightly) older or newer versions.
# - 0.26.1 can build 0.25.x and 0.26.x but not 0.27.x
# - 0.27.2 can build 0.27.x but not 0.25.x, 0.26.x and 0.29.x
#
# We need to keep around at least the latest version released with a stable
# NixOS
let
@ -241,8 +236,8 @@ rec {
};
crystal_1_2 = generic {
version = "1.2.1";
sha256 = "sha256-jyNmY3n+u8WoVqHY8B5H9Vr9Ix3RogCtm8irkXZ3aek=";
version = "1.2.2";
sha256 = "sha256-nyOXhsutVBRdtJlJHe2dALl//BUXD1JeeQPgHU4SwiU=";
binary = crystal_1_1;
};

View file

@ -1,29 +1,20 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "cmark";
version = "0.30.1";
version = "0.30.2";
src = fetchFromGitHub {
owner = "jgm";
repo = pname;
rev = version;
sha256 = "sha256-UjDM2N6gCwO94F1nW3qCP9JX42MYAicAuGTKAXMy1Gg=";
sha256 = "sha256-IkNybUe/XYwAvPowym3aqfVyvNdw2t/brRjhOrjVRpA=";
};
patches = [
# Fix libcmark.pc paths (should be incorporated next release)
(fetchpatch {
url = "https://github.com/commonmark/cmark/commit/15762d7d391483859c241cdf82b1615c6b6a5a19.patch";
sha256 = "sha256-wdyK1tQolgfiwYMAaWMQZdCSbMDCijug5ykpoDl/HwI=";
})
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [
# https://github.com/commonmark/cmark/releases/tag/0.30.1
# recommends distributions dynamically link
# Link the executable with the shared library
"-DCMARK_STATIC=OFF"
];

View file

@ -0,0 +1,29 @@
{ lib
, stdenv
, fetchurl
, fuse
, ncurses
, python3
}:
stdenv.mkDerivation rec {
pname = "libbde";
version = "20210605";
src = fetchurl {
url = "https://github.com/libyal/libbde/releases/download/${version}/${pname}-alpha-${version}.tar.gz";
sha256 = "0dk5h7gvp2fgg21n7k600mnayg4g4pc0lm7317k43j1q0p4hkfng";
};
buildInputs = [ fuse ncurses python3 ];
configureFlags = [ "--enable-python" ];
meta = with lib; {
description = "Library to access the BitLocker Drive Encryption (BDE) format";
homepage = "https://github.com/libyal/libbde/";
license = licenses.lgpl3;
maintainers = with maintainers; [ eliasp ];
platforms = platforms.all;
};
}

View file

@ -6,11 +6,11 @@
buildPythonPackage rec {
pname = "colorlog";
version = "6.5.0";
version = "6.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "cf62a8e389d5660d0d22be17937b25b9abef9497ddc940197d1773aa1f604339";
sha256 = "sha256-NE9zIEAJ5Mg8W2vrALPEXccPza48gNuRngpBcdAG/eg=";
};
checkInputs = [ pytestCheckHook ];

View file

@ -1,18 +1,18 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, zlib, rdkafka, yajl, avro-c, libserdes }:
{ lib, stdenv, fetchFromGitHub, pkg-config, zlib, rdkafka, yajl, avro-c, libserdes, which }:
stdenv.mkDerivation rec {
pname = "kafkacat";
pname = "kcat";
version = "1.6.0";
version = "1.7.0";
src = fetchFromGitHub {
owner = "edenhill";
repo = "kafkacat";
repo = "kcat";
rev = version;
sha256 = "0z3bw00s269myfd1xqksjyznmgp74xfs09xqlq347adsgby3cmfs";
sha256 = "sha256-koDhj/RQc9fhfqjrJylhURw6tppPELhLlBGbNVJsii8=";
};
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ pkg-config which ];
buildInputs = [ zlib rdkafka yajl avro-c libserdes ];
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "A generic non-JVM producer and consumer for Apache Kafka";
homepage = "https://github.com/edenhill/kafkacat";
homepage = "https://github.com/edenhill/kcat";
license = licenses.bsd2;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ nyarly ];

View file

@ -1,26 +1,37 @@
{ pkgs, newScope, buildFHSUserEnv }:
{ lib, newScope, splicePackages, steamPackagesAttr ? "steamPackages"
, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget, pkgsHostHost, pkgsTargetTarget
, stdenv, buildFHSUserEnv, pkgsi686Linux
}:
let
callPackage = newScope self;
self = rec {
steamArch = if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if pkgs.stdenv.hostPlatform.system == "i686-linux" then "i386"
else throw "Unsupported platform: ${pkgs.stdenv.hostPlatform.system}";
steamPackagesFun = self: let
inherit (self) callPackage;
in {
steamArch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "i386"
else throw "Unsupported platform: ${stdenv.hostPlatform.system}";
steam-runtime = callPackage ./runtime.nix { };
steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { };
steam = callPackage ./steam.nix { };
steam-fonts = callPackage ./fonts.nix { };
steam-fhsenv = callPackage ./fhsenv.nix {
glxinfo-i686 = pkgs.pkgsi686Linux.glxinfo;
glxinfo-i686 = pkgsi686Linux.glxinfo;
steam-runtime-wrapped-i686 =
if steamArch == "amd64"
then pkgs.pkgsi686Linux.steamPackages.steam-runtime-wrapped
if self.steamArch == "amd64"
then pkgsi686Linux.${steamPackagesAttr}.steam-runtime-wrapped
else null;
inherit buildFHSUserEnv;
};
steamcmd = callPackage ./steamcmd.nix { };
};
in self
otherSplices = {
selfBuildBuild = pkgsBuildBuild.${steamPackagesAttr};
selfBuildHost = pkgsBuildHost.${steamPackagesAttr};
selfBuildTarget = pkgsBuildTarget.${steamPackagesAttr};
selfHostHost = pkgsHostHost.${steamPackagesAttr};
selfTargetTarget = pkgsTargetTarget.${steamPackagesAttr};
};
keep = self: { };
extra = spliced0: { };
in lib.makeScopeWithSplicing splicePackages newScope otherSplices keep extra steamPackagesFun

View file

@ -81,6 +81,8 @@ stdenv.mkDerivation rec {
inherit apr aprutil sslSupport proxySupport ldapSupport luaSupport lua5;
tests = {
acme-integration = nixosTests.acme;
proxy = nixosTests.proxy;
php = nixosTests.php.httpd;
};
};

View file

@ -379,6 +379,7 @@ mapAliases ({
joseki = apache-jena-fuseki; # added 2016-02-28
jvmci8 = throw "graalvm8 and its tools were deprecated in favor of graalvm8-ce"; # added 2021-10-15
json_glib = json-glib; # added 2018-02-25
kafkacat = kcat; # added 2021-10-07
kdecoration-viewer = throw "kdecoration-viewer has been removed from nixpkgs, as there is no upstream activity"; # 2020-06-16
k9copy = throw "k9copy has been removed from nixpkgs, as there is no upstream activity"; # 2020-11-06
kibana7-oss = throw "kibana7-oss has been removed, as the distribution is no longer provided by upstream. https://github.com/NixOS/nixpkgs/pull/114456"; # added 2021-06-09

View file

@ -14715,10 +14715,10 @@ with pkgs;
k2tf = callPackage ../development/tools/misc/k2tf { };
kafkacat = callPackage ../development/tools/kafkacat { };
kati = callPackage ../development/tools/build-managers/kati { };
kcat = callPackage ../development/tools/kcat { };
kcc = libsForQt5.callPackage ../applications/graphics/kcc { };
kconfig-frontends = callPackage ../development/tools/misc/kconfig-frontends {
@ -17236,6 +17236,8 @@ with pkgs;
libbass = (callPackage ../development/libraries/audio/libbass { }).bass;
libbass_fx = (callPackage ../development/libraries/audio/libbass { }).bass_fx;
libbde = callPackage ../development/libraries/libbde { };
libbencodetools = callPackage ../development/libraries/libbencodetools { };
libbluedevil = callPackage ../development/libraries/libbluedevil { };
@ -31549,6 +31551,8 @@ with pkgs;
honeytrap = callPackage ../tools/security/honeytrap { };
kissat = callPackage ../applications/science/logic/kissat {};
tini = callPackage ../applications/virtualization/tini {};
ifstat-legacy = callPackage ../tools/networking/ifstat-legacy { };