diff --git a/doc/builders/packages/eclipse.section.md b/doc/builders/packages/eclipse.section.md new file mode 100644 index 00000000000..faabb188450 --- /dev/null +++ b/doc/builders/packages/eclipse.section.md @@ -0,0 +1,64 @@ +# Eclipse {#sec-eclipse} + +The Nix expressions related to the Eclipse platform and IDE are in [`pkgs/applications/editors/eclipse`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse). + +Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command: + +```ShellSession +$ nix-env -f '' -qaP -A eclipses --description +``` + +Once an Eclipse variant is installed it can be run using the `eclipse` command, as expected. From within Eclipse it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse. + +If you prefer to install plugins in a more declarative manner then Nixpkgs also offer a number of Eclipse plugins that can be installed in an _Eclipse environment_. This type of environment is created using the function `eclipseWithPlugins` found inside the `nixpkgs.eclipses` attribute set. This function takes as argument `{ eclipse, plugins ? [], jvmArgs ? [] }` where `eclipse` is a one of the Eclipse packages described above, `plugins` is a list of plugin derivations, and `jvmArgs` is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add + +```nix +packageOverrides = pkgs: { + myEclipse = with pkgs.eclipses; eclipseWithPlugins { + eclipse = eclipse-platform; + jvmArgs = [ "-Xmx2048m" ]; + plugins = [ plugins.color-theme ]; + }; +} +``` + +to your Nixpkgs configuration (`~/.config/nixpkgs/config.nix`) and install it by running `nix-env -f '' -iA myEclipse` and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using `eclipseWithPlugins` by running + +```ShellSession +$ nix-env -f '' -qaP -A eclipses.plugins --description +``` + +If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the `buildEclipseUpdateSite` and `buildEclipsePlugin` functions found in the `nixpkgs.eclipses.plugins` attribute set. Use the `buildEclipseUpdateSite` function to install a plugin distributed as an Eclipse update site. This function takes `{ name, src }` as argument where `src` indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available then the `buildEclipsePlugin` function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument `{ name, srcFeature, srcPlugin }` where `srcFeature` and `srcPlugin` are the feature and plugin JARs, respectively. + +Expanding the previous example with two plugins using the above functions we have + +```nix +packageOverrides = pkgs: { + myEclipse = with pkgs.eclipses; eclipseWithPlugins { + eclipse = eclipse-platform; + jvmArgs = [ "-Xmx2048m" ]; + plugins = [ + plugins.color-theme + (plugins.buildEclipsePlugin { + name = "myplugin1-1.0"; + srcFeature = fetchurl { + url = "http://…/features/myplugin1.jar"; + sha256 = "123…"; + }; + srcPlugin = fetchurl { + url = "http://…/plugins/myplugin1.jar"; + sha256 = "123…"; + }; + }); + (plugins.buildEclipseUpdateSite { + name = "myplugin2-1.0"; + src = fetchurl { + stripRoot = false; + url = "http://…/myplugin2.zip"; + sha256 = "123…"; + }; + }); + ]; + }; +} +``` diff --git a/doc/builders/packages/eclipse.xml b/doc/builders/packages/eclipse.xml deleted file mode 100644 index fc5094ed8f3..00000000000 --- a/doc/builders/packages/eclipse.xml +++ /dev/null @@ -1,72 +0,0 @@ -
- Eclipse - - - The Nix expressions related to the Eclipse platform and IDE are in pkgs/applications/editors/eclipse. - - - - Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command: - -$ nix-env -f '<nixpkgs>' -qaP -A eclipses --description - - Once an Eclipse variant is installed it can be run using the eclipse command, as expected. From within Eclipse it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse. - - - - If you prefer to install plugins in a more declarative manner then Nixpkgs also offer a number of Eclipse plugins that can be installed in an Eclipse environment. This type of environment is created using the function eclipseWithPlugins found inside the nixpkgs.eclipses attribute set. This function takes as argument { eclipse, plugins ? [], jvmArgs ? [] } where eclipse is a one of the Eclipse packages described above, plugins is a list of plugin derivations, and jvmArgs is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add - -packageOverrides = pkgs: { - myEclipse = with pkgs.eclipses; eclipseWithPlugins { - eclipse = eclipse-platform; - jvmArgs = [ "-Xmx2048m" ]; - plugins = [ plugins.color-theme ]; - }; -} - - to your Nixpkgs configuration (~/.config/nixpkgs/config.nix) and install it by running nix-env -f '<nixpkgs>' -iA myEclipse and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using eclipseWithPlugins by running - -$ nix-env -f '<nixpkgs>' -qaP -A eclipses.plugins --description - - - - - If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the buildEclipseUpdateSite and buildEclipsePlugin functions found in the nixpkgs.eclipses.plugins attribute set. Use the buildEclipseUpdateSite function to install a plugin distributed as an Eclipse update site. This function takes { name, src } as argument where src indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available then the buildEclipsePlugin function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument { name, srcFeature, srcPlugin } where srcFeature and srcPlugin are the feature and plugin JARs, respectively. - - - - Expanding the previous example with two plugins using the above functions we have - -packageOverrides = pkgs: { - myEclipse = with pkgs.eclipses; eclipseWithPlugins { - eclipse = eclipse-platform; - jvmArgs = [ "-Xmx2048m" ]; - plugins = [ - plugins.color-theme - (plugins.buildEclipsePlugin { - name = "myplugin1-1.0"; - srcFeature = fetchurl { - url = "http://…/features/myplugin1.jar"; - sha256 = "123…"; - }; - srcPlugin = fetchurl { - url = "http://…/plugins/myplugin1.jar"; - sha256 = "123…"; - }; - }); - (plugins.buildEclipseUpdateSite { - name = "myplugin2-1.0"; - src = fetchurl { - stripRoot = false; - url = "http://…/myplugin2.zip"; - sha256 = "123…"; - }; - }); - ]; - }; -} - - -
diff --git a/doc/builders/packages/index.xml b/doc/builders/packages/index.xml index e4f8a1d3120..fac82180b26 100644 --- a/doc/builders/packages/index.xml +++ b/doc/builders/packages/index.xml @@ -7,7 +7,7 @@ - + diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index 37e5f7719b7..24aea356de4 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -450,7 +450,7 @@ in { else { PORT = toString(cfg.streamingPort); } ); serviceConfig = { - ExecStart = "${pkgs.nodejs-slim}/bin/node streaming"; + ExecStart = "${cfg.package}/run-streaming.sh"; Restart = "always"; RestartSec = 20; EnvironmentFile = "/var/lib/mastodon/.secrets_env"; diff --git a/pkgs/applications/graphics/tev/default.nix b/pkgs/applications/graphics/tev/default.nix index ac8da654f05..3c48bbab0b8 100644 --- a/pkgs/applications/graphics/tev/default.nix +++ b/pkgs/applications/graphics/tev/default.nix @@ -5,14 +5,14 @@ stdenv.mkDerivation rec { pname = "tev"; - version = "1.16"; + version = "1.17"; src = fetchFromGitHub { owner = "Tom94"; repo = pname; rev = "v${version}"; fetchSubmodules = true; - sha256 = "0fn5j9klzrjvz3bq8p9yp9nqikn2fr7bp98c1sxwpwwaadkqy9xf"; + sha256 = "12wsy2zdfhg0ygkpvz58rk86qiy259fi9grb0jxiz8zcyd6x1ngk"; }; nativeBuildInputs = [ cmake wrapGAppsHook ]; @@ -26,6 +26,10 @@ stdenv.mkDerivation rec { --replace "/usr/" "''${out}/" ''; + cmakeFlags = [ + "-DTEV_DEPLOY=1" # Only relevant not to append "dev" to the version + ]; + postInstall = '' wrapProgram $out/bin/tev \ "''${gappsWrapperArgs[@]}" \ diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index 3d22dca36d9..b3d8a5b3fea 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -1,7 +1,7 @@ { callPackage, libsForQt5 }: let - stableVersion = "2.2.17"; + stableVersion = "2.2.18"; previewVersion = stableVersion; addVersion = args: let version = if args.stable then stableVersion else previewVersion; @@ -26,8 +26,8 @@ let }; mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { }; mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { }; - guiSrcHash = "0dfyxr983w6lmbcvaf32bnm9cz7y7fp9jfaz8zxp1dvr6dr06cmv"; - serverSrcHash = "0m5ajd2zkafx89hvp202m351h1dygfc3jssl3m7nd7r42csyi2vj"; + guiSrcHash = "118z6asl6hsv0777rld4plnrwzkbkh3gb9lg9i6bqrjs93p028fw"; + serverSrcHash = "0gd37zpvibhlvqqpflpwlrgg8g9rpbxwi9w9fsym00mfwf7sdd3b"; in { guiStable = mkGui { stable = true; diff --git a/pkgs/applications/networking/instant-messengers/signal-cli/default.nix b/pkgs/applications/networking/instant-messengers/signal-cli/default.nix index 601489d4532..0ef024225f6 100644 --- a/pkgs/applications/networking/instant-messengers/signal-cli/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-cli/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "signal-cli"; - version = "0.7.4"; + version = "0.8.0"; # Building from source would be preferred, but is much more involved. src = fetchurl { url = "https://github.com/AsamK/signal-cli/releases/download/v${version}/signal-cli-${version}.tar.gz"; - sha256 = "18dv2944nsryl6372jqgb52z3s1grvgfc5sb1b1rgn0y84g8g46n"; + sha256 = "sha256-0YzeGtdsCUG8N7Av/zzHoC9KKu1rqjQDToaOEXzuoJc="; }; buildInputs = lib.optionals stdenv.isLinux [ libmatthew_java dbus dbus_java ]; diff --git a/pkgs/development/ocaml-modules/janestreet/0.14.nix b/pkgs/development/ocaml-modules/janestreet/0.14.nix index 29b18e0bf98..5632cfbb7c3 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.14.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.14.nix @@ -533,6 +533,14 @@ rec { propagatedBuildInputs = [ ppxlib ]; }; + ppx_log = janePackage { + pname = "ppx_log"; + hash = "10hnr5lpww3fw0bnidzngalbgy0j1wvz1g5ki9c9h558pnpvsazr"; + minimumOCamlVersion = "4.08.0"; + meta.description = "Ppx_sexp_message-like extension nodes for lazily rendering log messages"; + propagatedBuildInputs = [ async_unix ppx_jane sexplib ]; + }; + ppx_module_timer = janePackage { pname = "ppx_module_timer"; hash = "163q1rpblwv82fxwyf0p4j9zpsj0jzvkfmzb03r0l49gqhn89mp6"; diff --git a/pkgs/development/ocaml-modules/ounit2/default.nix b/pkgs/development/ocaml-modules/ounit2/default.nix index 52676a1c88d..0b68609584d 100644 --- a/pkgs/development/ocaml-modules/ounit2/default.nix +++ b/pkgs/development/ocaml-modules/ounit2/default.nix @@ -6,6 +6,8 @@ buildDunePackage rec { pname = "ounit2"; version = "2.2.4"; + useDune2 = lib.versionAtLeast ocaml.version "4.08"; + src = fetchurl { url = "https://github.com/gildor478/ounit/releases/download/v${version}/ounit-v${version}.tbz"; sha256 = "0i9kiqbf2dp12c4qcvbn4abdpdp6h4g5z54ycsh0q8jpv6jnkh5m"; diff --git a/pkgs/development/ocaml-modules/stdint/default.nix b/pkgs/development/ocaml-modules/stdint/default.nix index bffef61956e..c849ffee479 100644 --- a/pkgs/development/ocaml-modules/stdint/default.nix +++ b/pkgs/development/ocaml-modules/stdint/default.nix @@ -1,18 +1,39 @@ -{ lib, fetchFromGitHub, buildDunePackage }: +{ lib, fetchurl, fetchpatch, buildDunePackage, qcheck }: buildDunePackage rec { pname = "stdint"; - version = "0.6.0"; + version = "0.7.0"; - minimumOCamlVersion = "4.07"; + useDune2 = true; - src = fetchFromGitHub { - owner = "andrenth"; - repo = "ocaml-stdint"; - rev = version; - sha256 = "19ccxs0vij81vyc9nqc9kbr154ralb9dgc2y2nr71a5xkx6xfn0y"; + minimumOCamlVersion = "4.03"; + + src = fetchurl { + url = "https://github.com/andrenth/ocaml-stdint/releases/download/${version}/stdint-${version}.tbz"; + sha256 = "4fcc66aef58e2b96e7af3bbca9d910aa239e045ba5fb2400aaef67d0041252dc"; }; + patches = [ + # fix test bug, remove at next release + (fetchpatch { + url = "https://github.com/andrenth/ocaml-stdint/commit/fc64293f99f597cdfd4470954da6fb323988e2af.patch"; + sha256 = "0nxck14vfjfzldsf8cdj2jg1cvhnyh37hqnrcxbdkqmpx4rxkbxs"; + }) + ]; + + # disable remaining broken tests, see + # https://github.com/andrenth/ocaml-stdint/issues/59 + postPatch = '' + substituteInPlace tests/stdint_test.ml \ + --replace 'test "An integer should perform left-shifts correctly"' \ + 'skip "An integer should perform left-shifts correctly"' \ + --replace 'test "Logical shifts must not sign-extend"' \ + 'skip "Logical shifts must not sign-extend"' + ''; + + doCheck = true; + checkInputs = [ qcheck ]; + meta = { description = "Various signed and unsigned integers for OCaml"; homepage = "https://github.com/andrenth/ocaml-stdint"; diff --git a/pkgs/development/tools/coursier/default.nix b/pkgs/development/tools/coursier/default.nix index ba96cfafe48..65077d6134b 100644 --- a/pkgs/development/tools/coursier/default.nix +++ b/pkgs/development/tools/coursier/default.nix @@ -2,7 +2,7 @@ , coreutils, git, gnused, nix, nixfmt }: let - version = "2.0.11"; + version = "2.0.12"; zshCompletion = fetchurl { url = @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/coursier/coursier/releases/download/v${version}/coursier"; - sha256 = "sha256-jmKJPBPzO8DiXuJoHWibinkaAzneXdSK85SQfJ2nWhg="; + sha256 = "sha256-SLl8pXGl9612FDEOy1vz/mXTb3+7YAJ/wq/njBL+V+I="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/servers/mastodon/default.nix b/pkgs/servers/mastodon/default.nix index 8508fbe8f78..b8582f68ebc 100644 --- a/pkgs/servers/mastodon/default.nix +++ b/pkgs/servers/mastodon/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, nodejs-slim, mkYarnPackage, fetchFromGitHub, bundlerEnv -, yarn, callPackage, imagemagick, ffmpeg, file, ruby_2_7 +, yarn, callPackage, imagemagick, ffmpeg, file, ruby_2_7, writeShellScript # Allow building a fork or custom version of Mastodon: , pname ? "mastodon" @@ -96,10 +96,18 @@ stdenv.mkDerivation rec { ln -s /var/log/mastodon log ln -s /tmp tmp ''; + propagatedBuildInputs = [ imagemagick ffmpeg file mastodon-gems.wrappedRuby ]; - installPhase = '' + + installPhase = let + run-streaming = writeShellScript "run-streaming.sh" '' + # NixOS helper script to consistently use the same NodeJS version the package was built with. + ${nodejs-slim}/bin/node ./streaming + ''; + in '' mkdir -p $out cp -r * $out/ + ln -s ${run-streaming} $out/run-streaming.sh ''; meta = with lib; { diff --git a/pkgs/tools/games/ajour/default.nix b/pkgs/tools/games/ajour/default.nix index 291c783c914..a7893ac754f 100644 --- a/pkgs/tools/games/ajour/default.nix +++ b/pkgs/tools/games/ajour/default.nix @@ -34,16 +34,16 @@ let in rustPlatform.buildRustPackage rec { pname = "Ajour"; - version = "0.7.0"; + version = "0.7.1"; src = fetchFromGitHub { owner = "casperstorm"; repo = "ajour"; rev = version; - sha256 = "1lwwj16q24k3d3vaj64zkai4cb15hxp6bzicp004q5az4gbriwih"; + sha256 = "sha256-ZN62RIQEokailZRBQUq8nX4Eq/b9GGPmxln8j5KGW+8="; }; - cargoSha256 = "17j6v796ahfn07yjj9xd9kygy0sllz93ac4gky8w0hcixdwjp3i5"; + cargoSha256 = "sha256-tcC8GfEeHaM7XcAXw56/wdygfGPj4vOgn5sZd0KuGkA="; nativeBuildInputs = [ autoPatchelfHook diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 05d14e9b101..7d0a98c0ad4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17919,7 +17919,11 @@ in mailman-web = with python3.pkgs; toPythonApplication mailman-web; - mastodon = callPackage ../servers/mastodon { }; + mastodon = callPackage ../servers/mastodon { + # With nodejs v14 the streaming endpoint breaks. Need migrate to uWebSockets.js or similar. + # https://github.com/tootsuite/mastodon/issues/15184 + nodejs-slim = nodejs-slim-12_x; + }; mattermost = callPackage ../servers/mattermost { }; matterircd = callPackage ../servers/mattermost/matterircd.nix { };