From 15974f58b8c216cf268f8c2302b036db701b31cd Mon Sep 17 00:00:00 2001 From: TredwellGit Date: Fri, 4 Jun 2021 09:52:11 +0000 Subject: [PATCH 01/24] wireshark: 3.4.5 -> 3.4.6 https://www.wireshark.org/docs/relnotes/wireshark-3.4.6.html --- pkgs/applications/networking/sniffers/wireshark/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index c5a38fd25001..4fe5272bc078 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -10,7 +10,7 @@ assert withQt -> qt5 != null; with lib; let - version = "3.4.5"; + version = "3.4.6"; variant = if withQt then "qt" else "cli"; in stdenv.mkDerivation { @@ -20,7 +20,7 @@ in stdenv.mkDerivation { src = fetchurl { url = "https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz"; - sha256 = "sha256-3hqv0QCh4SB8hQ0YDpfdkauNoPXra+7FRfclzbFF0zM="; + sha256 = "0a26kcj3n1a2kw1f3fc6s1x3rw3f3bj2cq6rp7k0kc4ciwh7i9hj"; }; cmakeFlags = [ @@ -93,6 +93,7 @@ in stdenv.mkDerivation { meta = with lib; { homepage = "https://www.wireshark.org/"; + changelog = "https://www.wireshark.org/docs/relnotes/wireshark-${version}.html"; description = "Powerful network protocol analyzer"; license = licenses.gpl2Plus; From 2f82f57b3dc0529ee29ca3177a44aa75506fc565 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 4 Jun 2021 12:53:21 +0200 Subject: [PATCH 02/24] python3Packages.zipstream: Remove myself as maintainer This package is only in Nixpkgs for gns3-server and I stopped maintaining that in f6e94a2e210. --- pkgs/development/python-modules/zipstream/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/zipstream/default.nix b/pkgs/development/python-modules/zipstream/default.nix index ec885c6df0f4..00c291a1c510 100644 --- a/pkgs/development/python-modules/zipstream/default.nix +++ b/pkgs/development/python-modules/zipstream/default.nix @@ -15,6 +15,6 @@ buildPythonPackage rec { description = "A zip archive generator"; homepage = "https://github.com/allanlei/python-zipstream"; license = lib.licenses.gpl3Plus; - maintainers = with lib.maintainers; [ primeos ]; + maintainers = with lib.maintainers; [ ]; }; } From f5be28bcc98e0a091c69df8d4e88a7b52452eb38 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 4 Jun 2021 21:51:55 +0200 Subject: [PATCH 03/24] signal-desktop: 5.3.0 -> 5.4.0 --- .../networking/instant-messengers/signal-desktop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix index 1c40c02243d9..a512e3a004d0 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix @@ -28,7 +28,7 @@ let else ""); in stdenv.mkDerivation rec { pname = "signal-desktop"; - version = "5.3.0"; # Please backport all updates to the stable channel. + version = "5.4.0"; # Please backport all updates to the stable channel. # All releases have a limited lifetime and "expire" 90 days after the release. # When releases "expire" the application becomes unusable until an update is # applied. The expiration date for the current release can be extracted with: @@ -38,7 +38,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb"; - sha256 = "15lclxw3njih90zlh2n90v8ljg0wnglw5w8jrpa7rbd789yagvq7"; + sha256 = "046xy033ars70ay5ryj39i5053py00xj92ajdg212pamq415z1zb"; }; nativeBuildInputs = [ From cd4ad7d2fee90fc3afb9f3f3957a7289f02f89dc Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 4 Jun 2021 21:37:35 +0200 Subject: [PATCH 04/24] ferdi: 5.6.0-beta.5 -> 5.6.0-beta.6, improve XWayland support ChangeLog: https://github.com/getferdi/ferdi/blob/1886c8abed32e33f0f547c069c674b79279cf931/CHANGELOG.md#560-beta6-2021-05-31 Even though this isn't explicitly noted in the Changelog, this seems to have fixed the Element integration for me. Additionally, I added a (hacky) `xdg-open` wrapper which removes the `GDK_BACKEND` variable to fix the XWayland integration[1]. The problem is that if a Firefox is running with Wayland (`ferdi` is running under X11) and `GDK_BACKEND=x11` is passed to the `xdg-open` (and thus `firefox`) process, Firefox refuses to start since another instance of it is running under Wayland (but attempts to start in X11 mode because of `GDK_BACKEND=x11`). [1] https://github.com/electron/electron/issues/28436 --- .../instant-messengers/ferdi/default.nix | 25 +++++++++++++++---- .../instant-messengers/franz/generic.nix | 5 ++-- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/ferdi/default.nix b/pkgs/applications/networking/instant-messengers/ferdi/default.nix index c57b58eea0d8..5d3b251089cf 100644 --- a/pkgs/applications/networking/instant-messengers/ferdi/default.nix +++ b/pkgs/applications/networking/instant-messengers/ferdi/default.nix @@ -1,18 +1,33 @@ -{ lib, mkFranzDerivation, fetchurl }: +{ lib, mkFranzDerivation, fetchurl, xorg, xdg-utils, buildEnv, writeShellScriptBin }: -mkFranzDerivation rec { +let + mkFranzDerivation' = mkFranzDerivation.override { + xdg-utils = buildEnv { + name = "xdg-utils-for-ferdi"; + paths = [ + xdg-utils + (lib.hiPrio (writeShellScriptBin "xdg-open" '' + unset GDK_BACKEND + exec ${xdg-utils}/bin/xdg-open "$@" + '')) + ]; + }; + }; +in +mkFranzDerivation' rec { pname = "ferdi"; name = "Ferdi"; - version = "5.6.0-beta.5"; + version = "5.6.0-beta.6"; src = fetchurl { url = "https://github.com/getferdi/ferdi/releases/download/v${version}/ferdi_${version}_amd64.deb"; - sha256 = "sha256-fDUzYir53OQ3O4o9eG70sGD+FJ0/4SDNsTfh97WFRnQ="; + sha256 = "sha256-Q1HSAEVcaxFyOq7oWqa6AJJpsBKRxbsKb9ydyK/gH/A="; }; + extraBuildInputs = [ xorg.libxshmfence ]; meta = with lib; { description = "Combine your favorite messaging services into one application"; homepage = "https://getferdi.com/"; license = licenses.asl20; - maintainers = [ maintainers.davidtwco ]; + maintainers = with maintainers; [ davidtwco ma27 ]; platforms = [ "x86_64-linux" ]; hydraPlatforms = [ ]; }; diff --git a/pkgs/applications/networking/instant-messengers/franz/generic.nix b/pkgs/applications/networking/instant-messengers/franz/generic.nix index 08afad8b56fa..6fac3657c7cb 100644 --- a/pkgs/applications/networking/instant-messengers/franz/generic.nix +++ b/pkgs/applications/networking/instant-messengers/franz/generic.nix @@ -28,7 +28,8 @@ # Helper function for building a derivation for Franz and forks. -{ pname, name, version, src, meta }: +{ pname, name, version, src, meta, extraBuildInputs ? [] }: + stdenv.mkDerivation rec { inherit pname version src meta; @@ -36,7 +37,7 @@ stdenv.mkDerivation rec { dontPatchELF = true; nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapGAppsHook dpkg ]; - buildInputs = (with xorg; [ + buildInputs = extraBuildInputs ++ (with xorg; [ libXi libXcursor libXdamage From e627109b60b3cf22b0f46729f8ffc84c37d0fd2d Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Fri, 4 Jun 2021 23:32:44 +0200 Subject: [PATCH 05/24] zellij: 0.12.1 -> 0.13.0 --- pkgs/tools/misc/zellij/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/zellij/default.nix b/pkgs/tools/misc/zellij/default.nix index 93d5bfc9dee3..e4fb7411a4a4 100644 --- a/pkgs/tools/misc/zellij/default.nix +++ b/pkgs/tools/misc/zellij/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "zellij"; - version = "0.12.1"; + version = "0.13.0"; src = fetchFromGitHub { owner = "zellij-org"; repo = pname; rev = "v${version}"; - sha256 = "sha256-OgpSVyXvJeRpxHWfIoJjQbbkt2RSze0IL5za3igGE6s="; + sha256 = "sha256-m7rAlFMhkX6+l+OceZ/RnusdhGew+Rjp7AmZ7vo2wr0="; }; - cargoSha256 = "sha256-LgJPhwOuzlKIw5smy4WJvC0CFoylnMlx6Re7gVPtiq8="; + cargoSha256 = "sha256-iTPOlbS3gWlJ8E2VB7z/kOsOJcngPGof7R5cH3Z0xk0="; nativeBuildInputs = [ installShellFiles ]; From 3a365e0e506068ff30a261b486942a199312dc76 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 4 Jun 2021 13:18:06 +1000 Subject: [PATCH 06/24] go: format with nixpkgs-fmt --- pkgs/development/compilers/go/1.14.nix | 32 +++++++++++++++++------ pkgs/development/compilers/go/1.15.nix | 32 +++++++++++++++++------ pkgs/development/compilers/go/1.16.nix | 33 ++++++++++++++++++------ pkgs/development/compilers/go/2-dev.nix | 34 +++++++++++++++++++------ 4 files changed, 99 insertions(+), 32 deletions(-) diff --git a/pkgs/development/compilers/go/1.14.nix b/pkgs/development/compilers/go/1.14.nix index 92c1cbdfc18b..f1b52ff1e596 100644 --- a/pkgs/development/compilers/go/1.14.nix +++ b/pkgs/development/compilers/go/1.14.nix @@ -1,6 +1,20 @@ -{ lib, stdenv, fetchurl, tzdata, iana-etc, runCommand -, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation -, mailcap, runtimeShell +{ lib +, stdenv +, fetchurl +, tzdata +, iana-etc +, runCommand +, perl +, which +, pkg-config +, patch +, procps +, pcre +, cacert +, Security +, Foundation +, mailcap +, runtimeShell , buildPackages , pkgsBuildTarget , fetchpatch @@ -15,7 +29,7 @@ let go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; - goBootstrap = runCommand "go-bootstrap" {} '' + goBootstrap = runCommand "go-bootstrap" { } '' mkdir $out cp -rf ${go_bootstrap}/* $out/ chmod -R u+w $out @@ -183,16 +197,18 @@ stdenv.mkDerivation rec { # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those # to be different from CC/CXX - CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + CC_FOR_TARGET = + if (stdenv.buildPlatform != stdenv.targetPlatform) then "${targetCC}/bin/${targetCC.targetPrefix}cc" else null; - CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + CXX_FOR_TARGET = + if (stdenv.buildPlatform != stdenv.targetPlatform) then "${targetCC}/bin/${targetCC.targetPrefix}c++" else null; - GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]); + GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]); GO386 = 387; # from Arch: don't assume sse2 on i686 CGO_ENABLED = 1; # Hopefully avoids test timeouts on Hydra @@ -202,7 +218,7 @@ stdenv.mkDerivation rec { # Some tests assume things like home directories and users exists GO_BUILDER_NAME = "nix"; - GOROOT_BOOTSTRAP="${goBootstrap}/share/go"; + GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; postConfigure = '' export GOCACHE=$TMPDIR/go-cache diff --git a/pkgs/development/compilers/go/1.15.nix b/pkgs/development/compilers/go/1.15.nix index 58cd616728c3..f5e0aed4d397 100644 --- a/pkgs/development/compilers/go/1.15.nix +++ b/pkgs/development/compilers/go/1.15.nix @@ -1,6 +1,20 @@ -{ lib, stdenv, fetchurl, tzdata, iana-etc, runCommand -, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation -, mailcap, runtimeShell +{ lib +, stdenv +, fetchurl +, tzdata +, iana-etc +, runCommand +, perl +, which +, pkg-config +, patch +, procps +, pcre +, cacert +, Security +, Foundation +, mailcap +, runtimeShell , buildPackages , pkgsBuildTarget , fetchpatch @@ -15,7 +29,7 @@ let go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; - goBootstrap = runCommand "go-bootstrap" {} '' + goBootstrap = runCommand "go-bootstrap" { } '' mkdir $out cp -rf ${go_bootstrap}/* $out/ chmod -R u+w $out @@ -186,16 +200,18 @@ stdenv.mkDerivation rec { # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those # to be different from CC/CXX - CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + CC_FOR_TARGET = + if (stdenv.buildPlatform != stdenv.targetPlatform) then "${targetCC}/bin/${targetCC.targetPrefix}cc" else null; - CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + CXX_FOR_TARGET = + if (stdenv.buildPlatform != stdenv.targetPlatform) then "${targetCC}/bin/${targetCC.targetPrefix}c++" else null; - GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]); + GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]); GO386 = 387; # from Arch: don't assume sse2 on i686 CGO_ENABLED = 1; # Hopefully avoids test timeouts on Hydra @@ -205,7 +221,7 @@ stdenv.mkDerivation rec { # Some tests assume things like home directories and users exists GO_BUILDER_NAME = "nix"; - GOROOT_BOOTSTRAP="${goBootstrap}/share/go"; + GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; postConfigure = '' export GOCACHE=$TMPDIR/go-cache diff --git a/pkgs/development/compilers/go/1.16.nix b/pkgs/development/compilers/go/1.16.nix index 93c9fa5c7788..0b8341d816b8 100644 --- a/pkgs/development/compilers/go/1.16.nix +++ b/pkgs/development/compilers/go/1.16.nix @@ -1,6 +1,21 @@ -{ lib, stdenv, fetchurl, tzdata, iana-etc, runCommand -, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation, xcbuild -, mailcap, runtimeShell +{ lib +, stdenv +, fetchurl +, tzdata +, iana-etc +, runCommand +, perl +, which +, pkg-config +, patch +, procps +, pcre +, cacert +, Security +, Foundation +, xcbuild +, mailcap +, runtimeShell , buildPackages , pkgsBuildTarget , fetchpatch @@ -15,7 +30,7 @@ let go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; - goBootstrap = runCommand "go-bootstrap" {} '' + goBootstrap = runCommand "go-bootstrap" { } '' mkdir $out cp -rf ${go_bootstrap}/* $out/ chmod -R u+w $out @@ -181,16 +196,18 @@ stdenv.mkDerivation rec { # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those # to be different from CC/CXX - CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + CC_FOR_TARGET = + if (stdenv.buildPlatform != stdenv.targetPlatform) then "${targetCC}/bin/${targetCC.targetPrefix}cc" else null; - CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + CXX_FOR_TARGET = + if (stdenv.buildPlatform != stdenv.targetPlatform) then "${targetCC}/bin/${targetCC.targetPrefix}c++" else null; - GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]); + GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]); GO386 = "softfloat"; # from Arch: don't assume sse2 on i686 CGO_ENABLED = 1; # Hopefully avoids test timeouts on Hydra @@ -200,7 +217,7 @@ stdenv.mkDerivation rec { # Some tests assume things like home directories and users exists GO_BUILDER_NAME = "nix"; - GOROOT_BOOTSTRAP="${goBootstrap}/share/go"; + GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; postConfigure = '' export GOCACHE=$TMPDIR/go-cache diff --git a/pkgs/development/compilers/go/2-dev.nix b/pkgs/development/compilers/go/2-dev.nix index 4b541e8990e2..ec4ac1037490 100644 --- a/pkgs/development/compilers/go/2-dev.nix +++ b/pkgs/development/compilers/go/2-dev.nix @@ -1,6 +1,22 @@ -{ pkgs, lib, stdenv, fetchurl, fetchgit, tzdata, iana-etc, runCommand -, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation -, mailcap, runtimeShell +{ pkgs +, lib +, stdenv +, fetchurl +, fetchgit +, tzdata +, iana-etc +, runCommand +, perl +, which +, pkg-config +, patch +, procps +, pcre +, cacert +, Security +, Foundation +, mailcap +, runtimeShell , buildPackages , pkgsBuildTarget , fetchpatch @@ -13,7 +29,7 @@ let go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; - goBootstrap = runCommand "go-bootstrap" {} '' + goBootstrap = runCommand "go-bootstrap" { } '' mkdir $out cp -rf ${go_bootstrap}/* $out/ chmod -R u+w $out @@ -178,16 +194,18 @@ stdenv.mkDerivation rec { # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those # to be different from CC/CXX - CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + CC_FOR_TARGET = + if (stdenv.buildPlatform != stdenv.targetPlatform) then "${targetCC}/bin/${targetCC.targetPrefix}cc" else null; - CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + CXX_FOR_TARGET = + if (stdenv.buildPlatform != stdenv.targetPlatform) then "${targetCC}/bin/${targetCC.targetPrefix}c++" else null; - GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]); + GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]); GO386 = "softfloat"; # from Arch: don't assume sse2 on i686 CGO_ENABLED = 1; # Hopefully avoids test timeouts on Hydra @@ -197,7 +215,7 @@ stdenv.mkDerivation rec { # Some tests assume things like home directories and users exists GO_BUILDER_NAME = "nix"; - GOROOT_BOOTSTRAP="${goBootstrap}/share/go"; + GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; postConfigure = '' export GOCACHE=$TMPDIR/go-cache From 88f1ca731cd772843c05a3395ae4eb283b1ef98d Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 4 Jun 2021 13:52:04 +1000 Subject: [PATCH 07/24] go: cleanup --- pkgs/development/compilers/go/1.14.nix | 25 +++++++++------------- pkgs/development/compilers/go/1.15.nix | 25 +++++++++------------- pkgs/development/compilers/go/1.16.nix | 28 ++++++++++--------------- pkgs/development/compilers/go/2-dev.nix | 28 ++++++++++--------------- 4 files changed, 42 insertions(+), 64 deletions(-) diff --git a/pkgs/development/compilers/go/1.14.nix b/pkgs/development/compilers/go/1.14.nix index f1b52ff1e596..e8a90ac0b8df 100644 --- a/pkgs/development/compilers/go/1.14.nix +++ b/pkgs/development/compilers/go/1.14.nix @@ -22,11 +22,6 @@ }: let - - inherit (lib) optionals optionalString; - - version = "1.14.15"; - go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; goBootstrap = runCommand "go-bootstrap" { } '' @@ -55,7 +50,7 @@ in stdenv.mkDerivation rec { pname = "go"; - inherit version; + version = "1.14.15"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; @@ -65,10 +60,10 @@ stdenv.mkDerivation rec { # perl is used for testing go vet nativeBuildInputs = [ perl which pkg-config patch procps ]; buildInputs = [ cacert pcre ] - ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] - ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; + ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ] + ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; - depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ]; + depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ]; hardeningDisable = [ "all" ]; @@ -120,14 +115,14 @@ stdenv.mkDerivation rec { # Disable cgo lookup tests not works, they depend on resolver rm src/net/cgo_unix_test.go - '' + optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.isLinux '' # prepend the nix path to the zoneinfo files but also leave the original value for static binaries # that run outside a nix server sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go - '' + optionalString stdenv.isAarch32 '' + '' + lib.optionalString stdenv.isAarch32 '' echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash - '' + optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' substituteInPlace src/race.bash --replace \ "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go @@ -227,7 +222,7 @@ stdenv.mkDerivation rec { export PATH=$(pwd)/bin:$PATH - ${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' + ${lib.optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' # Independent from host/target, CC should produce code for the building system. # We only set it when cross-compiling. export CC=${buildPackages.stdenv.cc}/bin/cc @@ -255,12 +250,12 @@ stdenv.mkDerivation rec { '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then '' mv bin/*_*/* bin rmdir bin/*_* - ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} ''} '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then '' rm -rf bin/*_* - ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH} ''} '' else ""); diff --git a/pkgs/development/compilers/go/1.15.nix b/pkgs/development/compilers/go/1.15.nix index f5e0aed4d397..0a9b0ba9b278 100644 --- a/pkgs/development/compilers/go/1.15.nix +++ b/pkgs/development/compilers/go/1.15.nix @@ -22,11 +22,6 @@ }: let - - inherit (lib) optionals optionalString; - - version = "1.15.13"; - go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; goBootstrap = runCommand "go-bootstrap" { } '' @@ -55,7 +50,7 @@ in stdenv.mkDerivation rec { pname = "go"; - inherit version; + version = "1.15.13"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; @@ -65,10 +60,10 @@ stdenv.mkDerivation rec { # perl is used for testing go vet nativeBuildInputs = [ perl which pkg-config patch procps ]; buildInputs = [ cacert pcre ] - ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] - ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; + ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ] + ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; - depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ]; + depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ]; hardeningDisable = [ "all" ]; @@ -128,14 +123,14 @@ stdenv.mkDerivation rec { # Disable cgo lookup tests not works, they depend on resolver rm src/net/cgo_unix_test.go - '' + optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.isLinux '' # prepend the nix path to the zoneinfo files but also leave the original value for static binaries # that run outside a nix server sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go - '' + optionalString stdenv.isAarch32 '' + '' + lib.optionalString stdenv.isAarch32 '' echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash - '' + optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' substituteInPlace src/race.bash --replace \ "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go @@ -230,7 +225,7 @@ stdenv.mkDerivation rec { export PATH=$(pwd)/bin:$PATH - ${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' + ${lib.optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' # Independent from host/target, CC should produce code for the building system. # We only set it when cross-compiling. export CC=${buildPackages.stdenv.cc}/bin/cc @@ -258,12 +253,12 @@ stdenv.mkDerivation rec { '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then '' mv bin/*_*/* bin rmdir bin/*_* - ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} ''} '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then '' rm -rf bin/*_* - ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH} ''} '' else ""); diff --git a/pkgs/development/compilers/go/1.16.nix b/pkgs/development/compilers/go/1.16.nix index 0b8341d816b8..26cfb898ecf0 100644 --- a/pkgs/development/compilers/go/1.16.nix +++ b/pkgs/development/compilers/go/1.16.nix @@ -18,16 +18,10 @@ , runtimeShell , buildPackages , pkgsBuildTarget -, fetchpatch , callPackage }: let - - inherit (lib) optionals optionalString; - - version = "1.16.5"; - go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; goBootstrap = runCommand "go-bootstrap" { } '' @@ -56,7 +50,7 @@ in stdenv.mkDerivation rec { pname = "go"; - inherit version; + version = "1.16.5"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; @@ -66,12 +60,12 @@ stdenv.mkDerivation rec { # perl is used for testing go vet nativeBuildInputs = [ perl which pkg-config patch procps ]; buildInputs = [ cacert pcre ] - ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] - ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; + ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ] + ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; - propagatedBuildInputs = optionals stdenv.isDarwin [ xcbuild ]; + propagatedBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ]; - depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ]; + depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ]; hardeningDisable = [ "all" ]; @@ -131,14 +125,14 @@ stdenv.mkDerivation rec { # Disable cgo lookup tests not works, they depend on resolver rm src/net/cgo_unix_test.go - '' + optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.isLinux '' # prepend the nix path to the zoneinfo files but also leave the original value for static binaries # that run outside a nix server sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go - '' + optionalString stdenv.isAarch32 '' + '' + lib.optionalString stdenv.isAarch32 '' echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash - '' + optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' substituteInPlace src/race.bash --replace \ "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go @@ -226,7 +220,7 @@ stdenv.mkDerivation rec { export PATH=$(pwd)/bin:$PATH - ${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' + ${lib.optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' # Independent from host/target, CC should produce code for the building system. # We only set it when cross-compiling. export CC=${buildPackages.stdenv.cc}/bin/cc @@ -254,12 +248,12 @@ stdenv.mkDerivation rec { '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then '' mv bin/*_*/* bin rmdir bin/*_* - ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} ''} '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then '' rm -rf bin/*_* - ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH} ''} '' else ""); diff --git a/pkgs/development/compilers/go/2-dev.nix b/pkgs/development/compilers/go/2-dev.nix index ec4ac1037490..8fd0e2e6630c 100644 --- a/pkgs/development/compilers/go/2-dev.nix +++ b/pkgs/development/compilers/go/2-dev.nix @@ -1,7 +1,5 @@ -{ pkgs -, lib +{ lib , stdenv -, fetchurl , fetchgit , tzdata , iana-etc @@ -19,14 +17,10 @@ , runtimeShell , buildPackages , pkgsBuildTarget -, fetchpatch , callPackage }: let - - inherit (lib) optionals optionalString; - go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; goBootstrap = runCommand "go-bootstrap" { } '' @@ -58,7 +52,7 @@ stdenv.mkDerivation rec { version = "2021-04-13"; src = fetchgit { - url = https://go.googlesource.com/go; + url = "https://go.googlesource.com/go"; rev = "9cd52cf2a93a958e8e001aea36886e7846c91f2f"; sha256 = "sha256:0hybm93y4i4j7bs86y7h73nc1wqnspkq75if7n1032zf9bs8sm96"; }; @@ -66,10 +60,10 @@ stdenv.mkDerivation rec { # perl is used for testing go vet nativeBuildInputs = [ perl which pkg-config patch procps ]; buildInputs = [ cacert pcre ] - ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] - ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; + ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ] + ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; - depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ]; + depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ]; hardeningDisable = [ "all" ]; @@ -130,14 +124,14 @@ stdenv.mkDerivation rec { # Disable cgo lookup tests not works, they depend on resolver rm src/net/cgo_unix_test.go - '' + optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.isLinux '' # prepend the nix path to the zoneinfo files but also leave the original value for static binaries # that run outside a nix server sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go - '' + optionalString stdenv.isAarch32 '' + '' + lib.optionalString stdenv.isAarch32 '' echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash - '' + optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' substituteInPlace src/race.bash --replace \ "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go @@ -224,7 +218,7 @@ stdenv.mkDerivation rec { export PATH=$(pwd)/bin:$PATH - ${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' + ${lib.optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' # Independent from host/target, CC should produce code for the building system. # We only set it when cross-compiling. export CC=${buildPackages.stdenv.cc}/bin/cc @@ -252,12 +246,12 @@ stdenv.mkDerivation rec { '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then '' mv bin/*_*/* bin rmdir bin/*_* - ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} ''} '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then '' rm -rf bin/*_* - ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH} ''} '' else ""); From c8261a34f80d67223589a498bc0acd4713ab21b3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 4 Jun 2021 05:26:53 +0200 Subject: [PATCH 08/24] python3Packages.aiomultiprocess: disable failing tests These tests fail from time to time and bring the whole test suite to a timeout. https://github.com/omnilib/aiomultiprocess/issues/97 --- .../python-modules/aiomultiprocess/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/aiomultiprocess/default.nix b/pkgs/development/python-modules/aiomultiprocess/default.nix index 7b84996a1c91..6403f396eaac 100644 --- a/pkgs/development/python-modules/aiomultiprocess/default.nix +++ b/pkgs/development/python-modules/aiomultiprocess/default.nix @@ -24,6 +24,14 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; pytestFlagsArray = [ "aiomultiprocess/tests/*.py" ]; + + disabledTests = [ + # tests are flaky and make the whole test suite time out + "test_pool_worker_exceptions" + "test_pool_worker_max_tasks" + "test_pool_worker_stop" + ]; + pythonImportsCheck = [ "aiomultiprocess" ]; meta = with lib; { From 64509dbd186f11a9b7213e3cce413abb5bd8f7dc Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 4 Jun 2021 19:39:28 -0700 Subject: [PATCH 09/24] all-packages: Use LLVM libunwind on RISC-V --- pkgs/top-level/all-packages.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2b52ef3ba876..bbcc8958686e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16823,8 +16823,9 @@ in libutempter = callPackage ../development/libraries/libutempter { }; - libunwind = if stdenv.isDarwin - then darwin.libunwind + libunwind = + if stdenv.isDarwin then darwin.libunwind + else if stdenv.hostPlatform.isRiscV then llvmPackages_latest.libunwind else callPackage ../development/libraries/libunwind { }; libuv = callPackage ../development/libraries/libuv { From 9a8b5d6e154f703278b68b4d8952ce2d1c791c02 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 4 Jun 2021 19:02:19 -0700 Subject: [PATCH 10/24] nongnu-libunwind: Disable package for RISC-V The author has stated that he does not have time to implement support. There is no use for the `supportsHost` passthru attribute anymore, so let's remove that as well. --- pkgs/development/libraries/libunwind/default.nix | 3 +-- pkgs/development/tools/misc/strace/default.nix | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libunwind/default.nix b/pkgs/development/libraries/libunwind/default.nix index b2b5db2309c1..bda7f72a5576 100644 --- a/pkgs/development/libraries/libunwind/default.nix +++ b/pkgs/development/libraries/libunwind/default.nix @@ -38,8 +38,7 @@ stdenv.mkDerivation rec { description = "A portable and efficient API to determine the call-chain of a program"; maintainers = with maintainers; [ orivej ]; platforms = platforms.linux; + badPlatforms = [ "riscv32-linux" "riscv64-linux" ]; license = licenses.mit; }; - - passthru.supportsHost = !stdenv.hostPlatform.isRiscV; } diff --git a/pkgs/development/tools/misc/strace/default.nix b/pkgs/development/tools/misc/strace/default.nix index 756f1b947ede..4da1a2cba09b 100644 --- a/pkgs/development/tools/misc/strace/default.nix +++ b/pkgs/development/tools/misc/strace/default.nix @@ -1,9 +1,5 @@ { lib, stdenv, fetchurl, perl, libunwind, buildPackages }: -# libunwind does not have the supportsHost attribute on darwin, thus -# when this package is evaluated it causes an evaluation error -assert stdenv.isLinux; - stdenv.mkDerivation rec { pname = "strace"; version = "5.12"; @@ -16,7 +12,9 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ perl ]; - buildInputs = [ perl.out ] ++ lib.optional libunwind.supportsHost libunwind; # support -k + # On RISC-V platforms, LLVM's libunwind implementation is unsupported by strace. + # The build will silently fall back and -k will not work on RISC-V. + buildInputs = [ perl.out libunwind ]; # support -k postPatch = "patchShebangs --host strace-graph"; From efda027ada18b933c1119f82232c8409fe106865 Mon Sep 17 00:00:00 2001 From: sveitser Date: Sat, 5 Jun 2021 15:18:25 +0800 Subject: [PATCH 11/24] python3Packages.pyls-black: 0.4.6 -> 0.4.7 Remove patch included in upstream release. --- .../python-modules/pyls-black/default.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pyls-black/default.nix b/pkgs/development/python-modules/pyls-black/default.nix index 7c8652b0a5e3..a0419d5d03f2 100644 --- a/pkgs/development/python-modules/pyls-black/default.nix +++ b/pkgs/development/python-modules/pyls-black/default.nix @@ -1,27 +1,18 @@ -{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch +{ lib, buildPythonPackage, fetchFromGitHub , black, toml, pytest, python-language-server, isPy3k }: buildPythonPackage rec { pname = "pyls-black"; - version = "0.4.6"; + version = "0.4.7"; src = fetchFromGitHub { owner = "rupert"; repo = "pyls-black"; rev = "v${version}"; - sha256 = "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"; + sha256 = "0bkhfnlik89j3yamr20br4wm8975f20v33wabi2nyxvj10whr5dj"; }; - # Fix test failure with black 21.4b0+ - # Remove if https://github.com/rupert/pyls-black/pull/39 merged. - patches = [ - (fetchpatch { - url = "https://github.com/rupert/pyls-black/commit/728207b540d9c25eb0d1cd96419ebfda2e257f63.patch"; - sha256 = "0i3w5myhjl5lq1lpkizagnmk6m8fkn3igfyv5f2qcrn5n7f119ak"; - }) - ]; - disabled = !isPy3k; checkPhase = '' From b5afbd350dc54553376bfa29e693b680be3c39bd Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Thu, 3 Jun 2021 22:55:35 +0200 Subject: [PATCH 12/24] pam_u2f: 1.1.0 -> 1.1.1 Fixes CVE-2021-31924 https://www.yubico.com/support/security-advisories/ysa-2021-03/ Changelog: https://github.com/Yubico/pam-u2f/blob/pam_u2f-1.1.1/NEWS --- pkgs/os-specific/linux/pam_u2f/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/pam_u2f/default.nix b/pkgs/os-specific/linux/pam_u2f/default.nix index 760af73fecd2..30a55f2b9c00 100644 --- a/pkgs/os-specific/linux/pam_u2f/default.nix +++ b/pkgs/os-specific/linux/pam_u2f/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "pam_u2f"; - version = "1.1.0"; + version = "1.1.1"; src = fetchurl { url = "https://developers.yubico.com/pam-u2f/Releases/${pname}-${version}.tar.gz"; - sha256 = "01fwbrfnjkv93vvqm54jywdcxa1p7d4r32azicwnx75nxfbbzhqd"; + sha256 = "12p3pkrp32vzpg7707cgx8zgvgj8iqwhy39sm761k7plqi027mmp"; }; nativeBuildInputs = [ pkg-config ]; @@ -16,6 +16,14 @@ stdenv.mkDerivation rec { configureFlagsArray+=("--with-pam-dir=$out/lib/security") ''; + # a no-op makefile to prevent building the fuzz targets + postConfigure = '' + cat > fuzz/Makefile < Date: Sat, 5 Jun 2021 15:57:44 +0800 Subject: [PATCH 13/24] python3Packages.pyls-black: use pytestCheckHook --- pkgs/development/python-modules/pyls-black/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyls-black/default.nix b/pkgs/development/python-modules/pyls-black/default.nix index a0419d5d03f2..b72d789ccfdd 100644 --- a/pkgs/development/python-modules/pyls-black/default.nix +++ b/pkgs/development/python-modules/pyls-black/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub -, black, toml, pytest, python-language-server, isPy3k +, black, toml, pytestCheckHook, python-language-server, isPy3k }: buildPythonPackage rec { @@ -15,11 +15,7 @@ buildPythonPackage rec { disabled = !isPy3k; - checkPhase = '' - pytest - ''; - - checkInputs = [ pytest ]; + checkInputs = [ pytestCheckHook ]; propagatedBuildInputs = [ black toml python-language-server ]; From 9f33e6417b60631130b158c67ecf577848aff24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 5 Jun 2021 09:59:46 +0200 Subject: [PATCH 14/24] pyls-black: reformat with nixpkgs-fmt --- pkgs/development/python-modules/pyls-black/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyls-black/default.nix b/pkgs/development/python-modules/pyls-black/default.nix index b72d789ccfdd..d10e4930ac0c 100644 --- a/pkgs/development/python-modules/pyls-black/default.nix +++ b/pkgs/development/python-modules/pyls-black/default.nix @@ -1,5 +1,11 @@ -{ lib, buildPythonPackage, fetchFromGitHub -, black, toml, pytestCheckHook, python-language-server, isPy3k +{ lib +, buildPythonPackage +, fetchFromGitHub +, black +, toml +, pytestCheckHook +, python-language-server +, isPy3k }: buildPythonPackage rec { From d05bacf1458d9b534a21f15af2eb396d4b5cd6f8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 5 Jun 2021 10:21:29 +0200 Subject: [PATCH 15/24] python3Packages.angrop: remove postPatch --- pkgs/development/python-modules/angrop/default.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/development/python-modules/angrop/default.nix b/pkgs/development/python-modules/angrop/default.nix index 0af812d49321..997cd6c401a8 100644 --- a/pkgs/development/python-modules/angrop/default.nix +++ b/pkgs/development/python-modules/angrop/default.nix @@ -25,13 +25,6 @@ buildPythonPackage rec { tqdm ]; - postPatch = '' - # https://github.com/angr/angrop/issues/35 - substituteInPlace setup.py \ - --replace "packages=['angrop']," "packages=find_packages()," \ - --replace "from distutils.core import setup" "from setuptools import find_packages, setup" - ''; - # Tests have additional requirements, e.g., angr binaries # cle is executing the tests with the angr binaries already and is a requirement of angr doCheck = false; From 394fb1d6abbaef4d8720a9070f8515d6eb37c88d Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Sat, 5 Jun 2021 10:17:38 +0200 Subject: [PATCH 16/24] sjaehn plugins: use lowercase pname --- pkgs/applications/audio/bjumblr/default.nix | 4 ++-- pkgs/applications/audio/bsequencer/default.nix | 4 ++-- pkgs/applications/audio/bshapr/default.nix | 4 ++-- pkgs/applications/audio/bslizr/default.nix | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/audio/bjumblr/default.nix b/pkgs/applications/audio/bjumblr/default.nix index 608839fc16ac..ce81415cd5db 100644 --- a/pkgs/applications/audio/bjumblr/default.nix +++ b/pkgs/applications/audio/bjumblr/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, libX11, cairo, lv2, pkg-config, libsndfile }: stdenv.mkDerivation rec { - pname = "BJumblr"; + pname = "bjumblr"; version = "1.6.6"; src = fetchFromGitHub { owner = "sjaehn"; - repo = pname; + repo = "BJumblr"; rev = version; sha256 = "1nbxi54023vck3qgmr385cjzinmdnvz62ywb6bcksmc3shl080mg"; }; diff --git a/pkgs/applications/audio/bsequencer/default.nix b/pkgs/applications/audio/bsequencer/default.nix index 58b48a581ae1..8fb646855952 100644 --- a/pkgs/applications/audio/bsequencer/default.nix +++ b/pkgs/applications/audio/bsequencer/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, xorg, cairo, lv2, pkg-config }: stdenv.mkDerivation rec { - pname = "BSEQuencer"; + pname = "bsequencer"; version = "1.8.8"; src = fetchFromGitHub { owner = "sjaehn"; - repo = pname; + repo = "BSEQuencer"; rev = version; sha256 = "sha256-OArIMf0XP9CKDdb3H4s8jMzVRjoLFQDPmTS9rS2KW3w="; }; diff --git a/pkgs/applications/audio/bshapr/default.nix b/pkgs/applications/audio/bshapr/default.nix index de8566709c1a..e1a83537a6a0 100644 --- a/pkgs/applications/audio/bshapr/default.nix +++ b/pkgs/applications/audio/bshapr/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, xorg, cairo, lv2, pkg-config }: stdenv.mkDerivation rec { - pname = "BShapr"; + pname = "bshapr"; version = "0.12"; src = fetchFromGitHub { owner = "sjaehn"; - repo = pname; + repo = "BShapr"; rev = "v${version}"; sha256 = "sha256-2DySlD5ZTxeQ2U++Dr67bek5oVbAiOHCxM6S5rTTZN0="; }; diff --git a/pkgs/applications/audio/bslizr/default.nix b/pkgs/applications/audio/bslizr/default.nix index 01dd736dc59c..743f1080854a 100644 --- a/pkgs/applications/audio/bslizr/default.nix +++ b/pkgs/applications/audio/bslizr/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, xorg, cairo, lv2, pkg-config }: stdenv.mkDerivation rec { - pname = "BSlizr"; + pname = "bslizr"; version = "1.2.14"; src = fetchFromGitHub { owner = "sjaehn"; - repo = pname; + repo = "BSlizr"; rev = version; sha256 = "sha256-dut3I68tJWQH+X6acKROqb5HywufeBQ4/HkXFKsA3hY="; }; From 93189848db3dbfa604791426f770563542882668 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 4 Jun 2021 18:49:00 +0000 Subject: [PATCH 17/24] esbuild: 0.12.5 -> 0.12.6 --- pkgs/development/tools/esbuild/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/esbuild/default.nix b/pkgs/development/tools/esbuild/default.nix index f0f8c156dbdf..2aa67483337c 100644 --- a/pkgs/development/tools/esbuild/default.nix +++ b/pkgs/development/tools/esbuild/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "esbuild"; - version = "0.12.5"; + version = "0.12.6"; src = fetchFromGitHub { owner = "evanw"; repo = "esbuild"; rev = "v${version}"; - sha256 = "sha256-9EVlmdolr189vdnuA01UUrcrmZ9W0FtvCcJuuSX1nLs="; + sha256 = "sha256-ncRHsYxG4XVT7TUJv+VgXMsLmQ52+/dXUlgMy8QnzNc="; }; vendorSha256 = "sha256-2ABWPqhK2Cf4ipQH7XvRrd+ZscJhYPc3SV2cGT0apdg="; From e2a15cd395f1e137c680d22f83cd195caf3d6c14 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 4 Jun 2021 22:31:13 +0200 Subject: [PATCH 18/24] rambox: unmaintain & mark as insecure Rambox hasn't had a stable release in a while and an increasing number of issues which is why I don't intend to use this anymore. While taking a closer look at the source I also realized that it uses Electron 7.2.4[1]. This is not only EOLed[2], it also contains a few security vulnerabilities which is why I decided to mark it as insecure. A few (most likely not all) vulnerabilities can be found by looking at the Electron 7 changelog[3]: after 7.2.4 there were a few more releases with security backports - mostly from Chromium. Security issues that were found later on (and are probably exploitable on the dependency chain of rambox) aren't listed here. I only added two issues that seemed applicable to `rambox`, but I haven't researched enough to check the other ones. [1] https://github.com/ramboxapp/community-edition/blob/0.7.7/package.json#L70 [2] https://www.electronjs.org/docs/tutorial/support#currently-supported-versions [3] https://www.electronjs.org/releases/stable?version=7 --- .../networking/instant-messengers/rambox/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/rambox/default.nix b/pkgs/applications/networking/instant-messengers/rambox/default.nix index cbec6babec3b..8782a4bc5beb 100644 --- a/pkgs/applications/networking/instant-messengers/rambox/default.nix +++ b/pkgs/applications/networking/instant-messengers/rambox/default.nix @@ -21,8 +21,11 @@ in mkRambox rec { description = "Free and Open Source messaging and emailing app that combines common web applications into one"; homepage = "https://rambox.pro"; license = licenses.mit; - maintainers = with maintainers; [ ma27 ]; + maintainers = with maintainers; [ ]; platforms = ["i686-linux" "x86_64-linux"]; hydraPlatforms = []; + knownVulnerabilities = [ + "Electron 7.2.4 is EOL and contains at least the following vulnerabilities: CVE-2020-6458, CVE-2020-6460 and more (https://www.electronjs.org/releases/stable?version=7). Consider using an alternative such as `ferdi'." + ]; }; } From 7497b4721c776cc8b2c04a93eb255d750b07b0f7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 4 Jun 2021 09:29:58 +0200 Subject: [PATCH 19/24] doc: Fix make in nix-shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running make manually, makeFlags will not be passed. Let’s just use an environment variable. --- doc/contributing/contributing-to-documentation.chapter.md | 2 +- doc/default.nix | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/contributing/contributing-to-documentation.chapter.md b/doc/contributing/contributing-to-documentation.chapter.md index 642beba74d61..7fd4b93f0d2b 100644 --- a/doc/contributing/contributing-to-documentation.chapter.md +++ b/doc/contributing/contributing-to-documentation.chapter.md @@ -7,7 +7,7 @@ You can quickly check your edits with `make`: ```ShellSession $ cd /path/to/nixpkgs/doc $ nix-shell -[nix-shell]$ make $makeFlags +[nix-shell]$ make ``` If you experience problems, run `make debug` to help understand the docbook errors. diff --git a/doc/default.nix b/doc/default.nix index 25389fa2da7e..ac382ec8519c 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -17,10 +17,6 @@ in pkgs.stdenv.mkDerivation { src = lib.cleanSource ./.; - makeFlags = [ - "PANDOC_LUA_FILTERS_DIR=${pkgs.pandoc-lua-filters}/share/pandoc/filters" - ]; - postPatch = '' ln -s ${doc-support} ./doc-support/result ''; @@ -37,4 +33,7 @@ in pkgs.stdenv.mkDerivation { echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products ''; + + # Environment variables + PANDOC_LUA_FILTERS_DIR = "${pkgs.pandoc-lua-filters}/share/pandoc/filters"; } From 759d05ce9e9f899f91d1b82e47633b00e6a975b0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 29 May 2021 15:21:54 +0200 Subject: [PATCH 20/24] ocamlPackages.stdcompat: init at 15 --- .../ocaml-modules/stdcompat/default.nix | 24 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/stdcompat/default.nix diff --git a/pkgs/development/ocaml-modules/stdcompat/default.nix b/pkgs/development/ocaml-modules/stdcompat/default.nix new file mode 100644 index 000000000000..df5c1a58b17b --- /dev/null +++ b/pkgs/development/ocaml-modules/stdcompat/default.nix @@ -0,0 +1,24 @@ +{ stdenv, lib, fetchurl +, ocaml, findlib +}: + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-stdcompat"; + version = "15"; + + src = fetchurl { + url = "https://github.com/thierry-martinez/stdcompat/releases/download/v${version}/stdcompat-${version}.tar.gz"; + sha256 = "1xcwb529m4lg9cbnxa9m3x2nnl9nxzz1x5lxpvdfflg4zxl6yx2y"; + }; + + buildInputs = [ ocaml findlib ]; + + configureFlags = "--libdir=$(OCAMLFIND_DESTDIR)"; + + meta = { + homepage = "https://github.com/thierry-martinez/stdcompat"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index fe8eee65d0c3..783a46e60813 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1169,6 +1169,8 @@ let ssl = callPackage ../development/ocaml-modules/ssl { }; + stdcompat = callPackage ../development/ocaml-modules/stdcompat { }; + stdlib-shims = callPackage ../development/ocaml-modules/stdlib-shims { }; stog = callPackage ../applications/misc/stog { }; From c3d87595f101339701fcb63dc6cb962406597fbf Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 29 May 2021 15:28:47 +0200 Subject: [PATCH 21/24] =?UTF-8?q?coccinelle:=201.0.6=20=E2=86=92=201.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/misc/coccinelle/default.nix | 26 ++++--------------- pkgs/top-level/all-packages.nix | 4 +-- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/pkgs/development/tools/misc/coccinelle/default.nix b/pkgs/development/tools/misc/coccinelle/default.nix index 40a22f18203b..8534f1e2d85a 100644 --- a/pkgs/development/tools/misc/coccinelle/default.nix +++ b/pkgs/development/tools/misc/coccinelle/default.nix @@ -2,36 +2,20 @@ stdenv.mkDerivation rec { pname = "coccinelle"; - version = "1.0.6"; + version = "1.1.0"; src = fetchurl { - url = "http://coccinelle.lip6.fr/distrib/${pname}-${version}.tgz"; - sha256 = "02g9hmwkvfl838zz690yra5jzrqjg6y6ffxkrfcsx790bhkfsll4"; + url = "https://coccinelle.gitlabpages.inria.fr/website/distrib/${pname}-${version}.tar.gz"; + sha256 = "0k0x4qnxzj8fymkp6y9irggcah070hj7hxq8l6ddj8ccpmjbhnsb"; }; buildInputs = with ocamlPackages; [ ocaml findlib menhir - ocaml_pcre pycaml + ocaml_pcre parmap stdcompat python ncurses pkg-config ]; - doCheck = !stdenv.isDarwin; - - # The build system builds two versions of spgen: - # 'spgen' with ocamlc -custom (bytecode specially linked) - # and 'spgen.opt' using ocamlopt. - # I'm not sure of the intentions here, but the way - # the 'spgen' binary is produced results in an - # invalid/incorrect interpreter path (/lib/ld-linux*). - # We could patch it, but without knowing why it's - # finding the wrong path it seems safer to use - # the .opt version that is built correctly. - # All that said, our fix here is simple: remove 'spgen'. - # The bin/spgen entrypoint is really a bash script - # and will use spgen.opt if 'spgen' doesn't exist. - postInstall = '' - rm $out/lib/coccinelle/spgen/spgen - ''; + doCheck = false; meta = { description = "Program to apply semantic patches to C code"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bbcc8958686e..1e9f9c1087c8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13072,9 +13072,7 @@ in # Does not actually depend on Qt 5 inherit (plasma5Packages) extra-cmake-modules; - coccinelle = callPackage ../development/tools/misc/coccinelle { - ocamlPackages = ocaml-ng.ocamlPackages_4_05; - }; + coccinelle = callPackage ../development/tools/misc/coccinelle { }; cpptest = callPackage ../development/libraries/cpptest { }; From 5ca9831cb101a41192919d876d82b3640d389e50 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 29 May 2021 15:50:56 +0200 Subject: [PATCH 22/24] =?UTF-8?q?ocamlPackages.menhir:=2020190626=20?= =?UTF-8?q?=E2=86=92=2020210419?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocamlPackages.menhirLib: init at 20210419 ocamlPackages.menhirSdk: init at 20210419 --- .../science/logic/acgtk/default.nix | 2 +- .../science/logic/why3/default.nix | 2 +- .../compilers/compcert/default.nix | 2 +- pkgs/development/compilers/fstar/default.nix | 2 +- pkgs/development/compilers/mezzo/default.nix | 4 +- pkgs/development/compilers/reason/default.nix | 8 ++-- .../ocaml-modules/dolmen/default.nix | 6 +-- .../ocaml-modules/earlybird/default.nix | 4 +- .../ocaml-modules/menhir/default.nix | 26 +++++------ .../ocaml-modules/menhir/generic.nix | 43 ------------------- pkgs/development/ocaml-modules/menhir/lib.nix | 29 +++++++++++++ pkgs/development/ocaml-modules/menhir/sdk.nix | 15 +++++++ .../ocaml-modules/mustache/default.nix | 6 +-- .../tools/analysis/frama-c/default.nix | 4 +- .../tools/ocaml/js_of_ocaml/compiler.nix | 4 +- pkgs/development/tools/ocaml/merlin/4.x.nix | 4 ++ .../tools/ocaml/ocamlformat/generic.nix | 8 ++++ pkgs/tools/audio/liquidsoap/full.nix | 2 +- pkgs/tools/typesetting/satysfi/default.nix | 2 +- pkgs/top-level/ocaml-packages.nix | 4 ++ 20 files changed, 97 insertions(+), 80 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/menhir/generic.nix create mode 100644 pkgs/development/ocaml-modules/menhir/lib.nix create mode 100644 pkgs/development/ocaml-modules/menhir/sdk.nix diff --git a/pkgs/applications/science/logic/acgtk/default.nix b/pkgs/applications/science/logic/acgtk/default.nix index 1cf08741206c..1de21e09f806 100644 --- a/pkgs/applications/science/logic/acgtk/default.nix +++ b/pkgs/applications/science/logic/acgtk/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { }; buildInputs = [ dune_2 ] ++ (with ocamlPackages; [ - ocaml findlib ansiterminal cairo2 cmdliner fmt logs menhir mtime yojson + ocaml findlib ansiterminal cairo2 cmdliner fmt logs menhir menhirLib mtime yojson ]); buildPhase = "dune build --profile=release"; diff --git a/pkgs/applications/science/logic/why3/default.nix b/pkgs/applications/science/logic/why3/default.nix index deb40c742847..c56e5445f0be 100644 --- a/pkgs/applications/science/logic/why3/default.nix +++ b/pkgs/applications/science/logic/why3/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { }; buildInputs = with ocamlPackages; [ - ocaml findlib ocamlgraph zarith menhir + ocaml findlib ocamlgraph zarith menhir menhirLib # Compressed Sessions # Emacs compilation of why3.el emacs diff --git a/pkgs/development/compilers/compcert/default.nix b/pkgs/development/compilers/compcert/default.nix index 4e550bac9a6a..beafd6414f43 100644 --- a/pkgs/development/compilers/compcert/default.nix +++ b/pkgs/development/compilers/compcert/default.nix @@ -5,7 +5,7 @@ }: let - ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir ]; + ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir menhirLib ]; ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux"; inherit (coqPackages) coq flocq; inherit (lib) optional optionalString; diff --git a/pkgs/development/compilers/fstar/default.nix b/pkgs/development/compilers/fstar/default.nix index 73bf001f7520..7abdf132b51e 100644 --- a/pkgs/development/compilers/fstar/default.nix +++ b/pkgs/development/compilers/fstar/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper installShellFiles ]; buildInputs = with ocamlPackages; [ - z3 ocaml findlib batteries menhir stdint + z3 ocaml findlib batteries menhir menhirLib stdint zarith camlp4 yojson pprint ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild ]; diff --git a/pkgs/development/compilers/mezzo/default.nix b/pkgs/development/compilers/mezzo/default.nix index 4c535be4d494..1710fb986ead 100644 --- a/pkgs/development/compilers/mezzo/default.nix +++ b/pkgs/development/compilers/mezzo/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, yojson, ulex, pprint, fix, functory }: +{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, menhirLib, yojson, ulex, pprint, fix, functory }: if lib.versionAtLeast ocaml.version "4.06" then throw "mezzo is not available for OCaml ${ocaml.version}" @@ -21,7 +21,7 @@ stdenv.mkDerivation { sha256 = "0yck5r6di0935s3iy2mm9538jkf77ssr789qb06ms7sivd7g3ip6"; }; - buildInputs = [ ocaml findlib ocamlbuild yojson menhir ulex pprint fix functory ]; + buildInputs = [ ocaml findlib ocamlbuild yojson menhir menhirLib ulex pprint fix functory ]; # Sets warning 3 as non-fatal prePatch = lib.optionalString (check-ocaml-version "4.02") '' diff --git a/pkgs/development/compilers/reason/default.nix b/pkgs/development/compilers/reason/default.nix index 2293c83cc02c..a65748d06422 100644 --- a/pkgs/development/compilers/reason/default.nix +++ b/pkgs/development/compilers/reason/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune_2 -, fix, menhir, merlin-extend, ppx_tools_versioned, utop, cppo +, fix, menhir, menhirLib, menhirSdk, merlin-extend, ppx_tools_versioned, utop, cppo }: stdenv.mkDerivation rec { @@ -13,11 +13,11 @@ stdenv.mkDerivation rec { sha256 = "0m6ldrci1a4j0qv1cbwh770zni3al8qxsphl353rv19f6rblplhs"; }; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper menhir ]; - propagatedBuildInputs = [ menhir merlin-extend ppx_tools_versioned ]; + propagatedBuildInputs = [ menhirLib merlin-extend ppx_tools_versioned ]; - buildInputs = [ ocaml findlib dune_2 cppo fix utop menhir ]; + buildInputs = [ ocaml findlib dune_2 cppo fix utop menhir menhirSdk ]; buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed diff --git a/pkgs/development/ocaml-modules/dolmen/default.nix b/pkgs/development/ocaml-modules/dolmen/default.nix index a1a73bfe2188..815e1acd72ac 100644 --- a/pkgs/development/ocaml-modules/dolmen/default.nix +++ b/pkgs/development/ocaml-modules/dolmen/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir }: +{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, menhirLib }: stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-dolmen-${version}"; @@ -10,8 +10,8 @@ stdenv.mkDerivation rec { sha256 = "1b9mf8p6mic0n76acx8x82hhgm2n40sdv0jri95im65l52223saf"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; - propagatedBuildInputs = [ menhir ]; + buildInputs = [ ocaml findlib ocamlbuild menhir ]; + propagatedBuildInputs = [ menhirLib ]; makeFlags = [ "-C" "src" ]; diff --git a/pkgs/development/ocaml-modules/earlybird/default.nix b/pkgs/development/ocaml-modules/earlybird/default.nix index 07e9b5a35461..a6a3648bec65 100644 --- a/pkgs/development/ocaml-modules/earlybird/default.nix +++ b/pkgs/development/ocaml-modules/earlybird/default.nix @@ -1,5 +1,5 @@ { lib, fetchurl, ocaml, buildDunePackage -, cmdliner, dap, fmt, iter, logs, lru, lwt_ppx, lwt_react, menhir, path_glob, ppx_deriving_yojson +, cmdliner, dap, fmt, iter, logs, lru, lwt_ppx, lwt_react, menhir, menhirLib, path_glob, ppx_deriving_yojson }: if lib.versionAtLeast ocaml.version "4.13" @@ -19,7 +19,7 @@ buildDunePackage rec { sha256 = "1pwzhcr3pw24ra4j4d23vz71h0psz4xkyp7b12l2wl1slxzjbrxa"; }; - buildInputs = [ cmdliner dap fmt iter logs lru lwt_ppx lwt_react menhir path_glob ppx_deriving_yojson ]; + buildInputs = [ cmdliner dap fmt iter logs lru lwt_ppx lwt_react menhir menhirLib path_glob ppx_deriving_yojson ]; meta = { homepage = "https://github.com/hackwaly/ocamlearlybird"; diff --git a/pkgs/development/ocaml-modules/menhir/default.nix b/pkgs/development/ocaml-modules/menhir/default.nix index cbb759205e03..686cf9820580 100644 --- a/pkgs/development/ocaml-modules/menhir/default.nix +++ b/pkgs/development/ocaml-modules/menhir/default.nix @@ -1,15 +1,15 @@ -{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild -, version ? if lib.versionAtLeast (lib.getVersion ocaml) "4.02" then "20190626" else "20140422" -}@args: +{ lib, fetchFromGitLab, buildDunePackage +, menhirLib, menhirSdk +}: -let - src = fetchurl ( - if version == "20140422" then { url = "http://cristal.inria.fr/~fpottier/menhir/menhir-20140422.tar.gz"; sha256 = "1ki1f2id6a14h9xpv2k8yb6px7dyw8cvwh39csyzj4qpzx7wia0d"; } - else if version == "20170712" then { url = "http://gallium.inria.fr/~fpottier/menhir/menhir-20170712.tar.gz"; sha256 = "006hq3bwj81j67f2k9cgzj5wr4hai8j36925p5n3sd2j01ljsj6a"; } - else if version == "20181113" then { url = "https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz"; sha256 = "0hl611l0gyl7b2bm7m0sk7vjz14m0i7znrnjq3gw58pylj934dx4"; } - else if version == "20190626" then { url = "https://gitlab.inria.fr/fpottier/menhir/repository/20190626/archive.tar.gz"; sha256 = "0nigjnskg89knyi2zj1w211mb1pvkrwfqpz9a0qbw80k3hm8gg0h"; } - else throw ("menhir: unknown version " ++ version) - ); -in +buildDunePackage rec { + pname = "menhir"; -import ./generic.nix (args // { inherit version src; }) + inherit (menhirLib) version src useDune2; + + buildInputs = [ menhirLib menhirSdk ]; + + meta = menhirSdk.meta // { + description = "A LR(1) parser generator for OCaml"; + }; +} diff --git a/pkgs/development/ocaml-modules/menhir/generic.nix b/pkgs/development/ocaml-modules/menhir/generic.nix deleted file mode 100644 index a917d634a19c..000000000000 --- a/pkgs/development/ocaml-modules/menhir/generic.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ version, src, lib, stdenv, ocaml, findlib, ocamlbuild, ... }: - -stdenv.mkDerivation { - pname = "menhir"; - inherit version; - - inherit src; - - buildInputs = [ ocaml findlib ocamlbuild ]; - - createFindlibDestdir = true; - - preBuild = '' - # fix makefiles. - RM=$(type -p rm) - CHMOD=$(type -p chmod) - for f in src/Makefile demos/OMakefile* demos/Makefile* - do - substituteInPlace $f \ - --replace /bin/rm $RM \ - --replace /bin/chmod $CHMOD - done - - export PREFIX=$out - ''; - - meta = with lib; { - homepage = "http://pauillac.inria.fr/~fpottier/menhir/"; - description = "A LR(1) parser generator for OCaml"; - longDescription = '' - Menhir is a LR(1) parser generator for the Objective Caml programming - language. That is, Menhir compiles LR(1) grammar specifications down - to OCaml code. Menhir was designed and implemented by François Pottier - and Yann Régis-Gianas. - ''; - license = with licenses; [ - (if versionAtLeast version "20170418" then gpl2 else qpl) /* generator */ - lgpl2 /* library */ - ]; - platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ maggesi ]; - }; -} diff --git a/pkgs/development/ocaml-modules/menhir/lib.nix b/pkgs/development/ocaml-modules/menhir/lib.nix new file mode 100644 index 000000000000..3f6660f23ee9 --- /dev/null +++ b/pkgs/development/ocaml-modules/menhir/lib.nix @@ -0,0 +1,29 @@ +{ lib, fetchFromGitLab, buildDunePackage }: + +buildDunePackage rec { + pname = "menhirLib"; + version = "20210419"; + + src = fetchFromGitLab { + domain = "gitlab.inria.fr"; + owner = "fpottier"; + repo = "menhir"; + rev = version; + sha256 = "0jcbr7s3iwfr7xxfybs3h407g76yfp5yq5r9i0wg2ahvvbqh03ky"; + }; + + useDune2 = true; + + meta = with lib; { + homepage = "http://pauillac.inria.fr/~fpottier/menhir/"; + description = "Runtime support library for parsers generated by Menhir"; + longDescription = '' + Menhir is a LR(1) parser generator for the Objective Caml programming + language. That is, Menhir compiles LR(1) grammar specifications down + to OCaml code. Menhir was designed and implemented by François Pottier + and Yann Régis-Gianas. + ''; + license = with licenses; [ lgpl2Only ]; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/menhir/sdk.nix b/pkgs/development/ocaml-modules/menhir/sdk.nix new file mode 100644 index 000000000000..0e60849494cc --- /dev/null +++ b/pkgs/development/ocaml-modules/menhir/sdk.nix @@ -0,0 +1,15 @@ +{ lib, fetchFromGitLab, buildDunePackage +, menhirLib +}: + +buildDunePackage rec { + pname = "menhirSdk"; + + inherit (menhirLib) version src useDune2; + + meta = menhirLib.meta // { + description = "Compile-time library for auxiliary tools related to Menhir"; + license = with lib.licenses; [ gpl2Only ]; + }; +} + diff --git a/pkgs/development/ocaml-modules/mustache/default.nix b/pkgs/development/ocaml-modules/mustache/default.nix index 005e26926d1a..b16dfd484814 100644 --- a/pkgs/development/ocaml-modules/mustache/default.nix +++ b/pkgs/development/ocaml-modules/mustache/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, ounit }: +{ lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, menhirLib, ounit }: buildDunePackage rec { pname = "mustache"; @@ -11,8 +11,8 @@ buildDunePackage rec { sha256 = "19v8rk8d8lkfm2rmhdawfgadji6wa267ir5dprh4w9l1sfj8a1py"; }; - buildInputs = [ ezjsonm ]; - propagatedBuildInputs = [ menhir ]; + buildInputs = [ ezjsonm menhir ]; + propagatedBuildInputs = [ menhirLib ]; doCheck = true; checkInputs = [ ounit ]; diff --git a/pkgs/development/tools/analysis/frama-c/default.nix b/pkgs/development/tools/analysis/frama-c/default.nix index 394bd6558fbf..a10d015e9ff1 100644 --- a/pkgs/development/tools/analysis/frama-c/default.nix +++ b/pkgs/development/tools/analysis/frama-c/default.nix @@ -11,7 +11,7 @@ let biniou camlzip easy-format - menhir + menhirLib mlgmpidl num ocamlgraph @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf wrapGAppsHook ]; buildInputs = with ocamlPackages; [ - ncurses ocaml findlib ltl2ba ocamlgraph yojson menhir camlzip + ncurses ocaml findlib ltl2ba ocamlgraph yojson menhirLib camlzip lablgtk coq graphviz zarith apron why3 mlgmpidl doxygen gdk-pixbuf ]; diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix index 12306d2a305a..6965d5fa0abb 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix @@ -1,6 +1,6 @@ { lib, fetchurl, buildDunePackage , ocaml, cmdliner, cppo, yojson, ppxlib -, menhir +, menhir, menhirLib }: buildDunePackage rec { @@ -14,7 +14,7 @@ buildDunePackage rec { }; nativeBuildInputs = [ cppo menhir ]; - buildInputs = [ cmdliner ]; + buildInputs = [ cmdliner menhirLib ]; configurePlatforms = []; propagatedBuildInputs = [ yojson ppxlib ]; diff --git a/pkgs/development/tools/ocaml/merlin/4.x.nix b/pkgs/development/tools/ocaml/merlin/4.x.nix index 77595169565f..76ef33f7947d 100644 --- a/pkgs/development/tools/ocaml/merlin/4.x.nix +++ b/pkgs/development/tools/ocaml/merlin/4.x.nix @@ -10,6 +10,8 @@ , dot-merlin-reader , jq , menhir +, menhirLib +, menhirSdk }: let @@ -66,6 +68,8 @@ buildDunePackage { checkInputs = [ jq menhir + menhirLib + menhirSdk ]; meta = with lib; { diff --git a/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/pkgs/development/tools/ocaml/ocamlformat/generic.nix index eb38b60f9b15..6f3ce218713e 100644 --- a/pkgs/development/tools/ocaml/ocamlformat/generic.nix +++ b/pkgs/development/tools/ocaml/ocamlformat/generic.nix @@ -58,6 +58,8 @@ buildDunePackage { uutf fix menhir + menhirLib + menhirSdk dune-build-info ocaml-version # Changed since 0.16.0: @@ -75,6 +77,8 @@ buildDunePackage { uutf fix menhir + menhirLib + menhirSdk dune-build-info ocaml-version # Changed since 0.16.0: @@ -93,6 +97,8 @@ buildDunePackage { uutf fix menhir + menhirLib + menhirSdk (ppxlib.override { version = "0.18.0"; }) dune-build-info # lib.versionAtLeast version "0.16.0" ocaml-version # lib.versionAtLeast version "0.16.0" @@ -110,6 +116,8 @@ buildDunePackage { uutf fix menhir + menhirLib + menhirSdk ] else [ base cmdliner diff --git a/pkgs/tools/audio/liquidsoap/full.nix b/pkgs/tools/audio/liquidsoap/full.nix index 811529084518..3d05461121f0 100644 --- a/pkgs/tools/audio/liquidsoap/full.nix +++ b/pkgs/tools/audio/liquidsoap/full.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation { ocamlPackages.xmlm ocamlPackages.ocaml_pcre ocamlPackages.camomile ocamlPackages.fdkaac - ocamlPackages.srt ocamlPackages.sedlex_2 ocamlPackages.menhir + ocamlPackages.srt ocamlPackages.sedlex_2 ocamlPackages.menhir ocamlPackages.menhirLib ]; hardeningDisable = [ "format" "fortify" ]; diff --git a/pkgs/tools/typesetting/satysfi/default.nix b/pkgs/tools/typesetting/satysfi/default.nix index 73370eb011e4..d18c7fc270e3 100644 --- a/pkgs/tools/typesetting/satysfi/default.nix +++ b/pkgs/tools/typesetting/satysfi/default.nix @@ -53,7 +53,7 @@ in nativeBuildInputs = [ ruby dune_2 ]; buildInputs = [ camlpdf otfm yojson-with-position ] ++ (with ocamlPackages; [ - ocaml findlib menhir + ocaml findlib menhir menhirLib batteries camlimages core_kernel ppx_deriving uutf omd cppo re ]); diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 783a46e60813..1fba72891300 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -643,6 +643,10 @@ let menhir = callPackage ../development/ocaml-modules/menhir { }; + menhirLib = callPackage ../development/ocaml-modules/menhir/lib.nix { }; + + menhirSdk = callPackage ../development/ocaml-modules/menhir/sdk.nix { }; + merlin = if lib.versionAtLeast ocaml.version "4.11" then callPackage ../development/tools/ocaml/merlin/4.x.nix { } From c3302725046eb3bd24fd208fd8f71582be83abef Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 5 Jun 2021 13:35:31 +0200 Subject: [PATCH 23/24] llvmPackages_git: Add update-git.py Not that pretty but it should get the job done. --- .../compilers/llvm/git/default.nix | 3 +- pkgs/development/compilers/llvm/update-git.py | 70 +++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100755 pkgs/development/compilers/llvm/update-git.py diff --git a/pkgs/development/compilers/llvm/git/default.nix b/pkgs/development/compilers/llvm/git/default.nix index eb068f6d4722..38de0f70cf2e 100644 --- a/pkgs/development/compilers/llvm/git/default.nix +++ b/pkgs/development/compilers/llvm/git/default.nix @@ -21,13 +21,14 @@ let release_version = "12.0.0"; candidate = ""; # empty or "rcN" dash-candidate = lib.optionalString (candidate != "") "-${candidate}"; + rev = ""; # When using a Git commit version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs targetConfig = stdenv.targetPlatform.config; src = fetchFromGitHub { owner = "llvm"; repo = "llvm-project"; - rev = "llvmorg-${version}"; + rev = if rev != "" then rev else "llvmorg-${version}"; sha256 = "07jz8pywc2qqa1srdnqg5p2y4lx3ki1inpigarzgxc3j20r4gb58"; }; diff --git a/pkgs/development/compilers/llvm/update-git.py b/pkgs/development/compilers/llvm/update-git.py new file mode 100755 index 000000000000..119a050e4701 --- /dev/null +++ b/pkgs/development/compilers/llvm/update-git.py @@ -0,0 +1,70 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i python3 -p python3 nix + +import csv +import fileinput +import json +import os +import re +import subprocess + +from codecs import iterdecode +from datetime import datetime +from urllib.request import urlopen, Request + + +def get_latest_chromium_build(): + HISTORY_URL = 'https://omahaproxy.appspot.com/history?os=linux' + print(f'GET {HISTORY_URL}') + with urlopen(HISTORY_URL) as resp: + builds = csv.DictReader(iterdecode(resp, 'utf-8')) + for build in builds: + if build['channel'] != 'dev': + continue + return build + + +def get_file_revision(revision, file_path): + """Fetches the requested Git revision of the given Chromium file.""" + url = f'https://raw.githubusercontent.com/chromium/chromium/{revision}/{file_path}' + with urlopen(url) as http_response: + return http_response.read().decode() + + +def get_commit(ref): + url = f'https://api.github.com/repos/llvm/llvm-project/commits/{ref}' + headers = {'Accept': 'application/vnd.github.v3+json'} + request = Request(url, headers=headers) + with urlopen(request) as http_response: + return json.loads(http_response.read().decode()) + + +def nix_prefetch_url(url, algo='sha256'): + """Prefetches the content of the given URL.""" + print(f'nix-prefetch-url {url}') + out = subprocess.check_output(['nix-prefetch-url', '--type', algo, '--unpack', url]) + return out.decode('utf-8').rstrip() + + +chromium_build = get_latest_chromium_build() +chromium_version = chromium_build['version'] +print(f'chromiumDev version: {chromium_version}') +print('Getting LLVM commit...') +clang_update_script = get_file_revision(chromium_version, 'tools/clang/scripts/update.py') +clang_revision = re.search(r"^CLANG_REVISION = '(.+)'$", clang_update_script, re.MULTILINE).group(1) +clang_commit_short = re.search(r"llvmorg-[0-9]+-init-[0-9]+-g([0-9a-f]{8})", clang_revision).group(1) +release_version = re.search(r"^RELEASE_VERSION = '(.+)'$", clang_update_script, re.MULTILINE).group(1) +commit = get_commit(clang_commit_short) +date = datetime.fromisoformat(commit['commit']['committer']['date'].rstrip('Z')).date().isoformat() +version = f'unstable-{date}' +print('Prefetching source tarball...') +hash = nix_prefetch_url(f'https://github.com/llvm/llvm-project/archive/{commit["sha"]}.tar.gz') +print('Updating default.nix...') +default_nix = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'git/default.nix') +with fileinput.FileInput(default_nix, inplace=True) as f: + for line in f: + result = re.sub(r'^ release_version = ".+";', f' release_version = "{release_version}";', line) + result = re.sub(r'^ version = ".+";', f' version = "{version}";', line) + result = re.sub(r'^ rev = ".*";', f' rev = "{commit["sha"]}";', result) + result = re.sub(r'^ sha256 = ".+";', f' sha256 = "{hash}";', result) + print(result, end='') From 494833dccb956b3da2b77a617ed2165233d19766 Mon Sep 17 00:00:00 2001 From: Kimat Boven Date: Fri, 4 Jun 2021 23:48:38 +0200 Subject: [PATCH 24/24] plantuml: 1.2021.3 -> 1.2021.7 --- pkgs/tools/misc/plantuml/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/plantuml/default.nix b/pkgs/tools/misc/plantuml/default.nix index 25f96d325325..270a9ef8641d 100644 --- a/pkgs/tools/misc/plantuml/default.nix +++ b/pkgs/tools/misc/plantuml/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchurl, makeWrapper, jre, graphviz }: stdenv.mkDerivation rec { - version = "1.2021.3"; + version = "1.2021.7"; pname = "plantuml"; src = fetchurl { url = "mirror://sourceforge/project/plantuml/${version}/plantuml.${version}.jar"; - sha256 = "sha256-Kx2fTx71oVkAgsytl1OFBcENMnJ1ZHmg8qvYDFTSS2M="; + sha256 = "sha256-2hQIwUpkxLHGG+kx8AekSKJ1qO8inL8xnko0dlLC1Kg="; }; nativeBuildInputs = [ makeWrapper ];