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"; } 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="; }; 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 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'." + ]; }; } 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 = [ 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; 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/go/1.14.nix b/pkgs/development/compilers/go/1.14.nix index 92c1cbdfc18b..e8a90ac0b8df 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 @@ -8,14 +22,9 @@ }: let - - inherit (lib) optionals optionalString; - - version = "1.14.15"; - 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 @@ -41,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"; @@ -51,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" ]; @@ -106,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 @@ -183,16 +192,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 +213,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 @@ -211,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 @@ -239,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 58cd616728c3..0a9b0ba9b278 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 @@ -8,14 +22,9 @@ }: let - - inherit (lib) optionals optionalString; - - version = "1.15.13"; - 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 @@ -41,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"; @@ -51,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" ]; @@ -114,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 @@ -186,16 +195,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 +216,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 @@ -214,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 @@ -242,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 93c9fa5c7788..26cfb898ecf0 100644 --- a/pkgs/development/compilers/go/1.16.nix +++ b/pkgs/development/compilers/go/1.16.nix @@ -1,21 +1,30 @@ -{ 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 , callPackage }: let - - inherit (lib) optionals optionalString; - - version = "1.16.5"; - 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 @@ -41,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"; @@ -51,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" ]; @@ -116,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 @@ -181,16 +190,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 +211,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 @@ -209,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 @@ -237,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 4b541e8990e2..8fd0e2e6630c 100644 --- a/pkgs/development/compilers/go/2-dev.nix +++ b/pkgs/development/compilers/go/2-dev.nix @@ -1,19 +1,29 @@ -{ pkgs, lib, stdenv, fetchurl, fetchgit, tzdata, iana-etc, runCommand -, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation -, mailcap, runtimeShell +{ lib +, stdenv +, fetchgit +, tzdata +, iana-etc +, runCommand +, perl +, which +, pkg-config +, patch +, procps +, pcre +, cacert +, Security +, Foundation +, mailcap +, runtimeShell , buildPackages , pkgsBuildTarget -, fetchpatch , callPackage }: let - - inherit (lib) optionals optionalString; - 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 @@ -42,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"; }; @@ -50,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" ]; @@ -114,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 @@ -178,16 +188,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 +209,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 @@ -206,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 @@ -234,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 ""); 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='') 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/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/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/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/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; { 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; diff --git a/pkgs/development/python-modules/pyls-black/default.nix b/pkgs/development/python-modules/pyls-black/default.nix index 7c8652b0a5e3..d10e4930ac0c 100644 --- a/pkgs/development/python-modules/pyls-black/default.nix +++ b/pkgs/development/python-modules/pyls-black/default.nix @@ -1,34 +1,27 @@ -{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch -, black, toml, pytest, python-language-server, isPy3k +{ lib +, buildPythonPackage +, fetchFromGitHub +, black +, toml +, pytestCheckHook +, 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 = '' - pytest - ''; - - checkInputs = [ pytest ]; + checkInputs = [ pytestCheckHook ]; propagatedBuildInputs = [ black toml python-language-server ]; 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; [ ]; }; } 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/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="; 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/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"; 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/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 <