summary refs log tree commit diff
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-04-15 06:05:40 +0000
committerGitHub <noreply@github.com>2021-04-15 06:05:40 +0000
commit8b35f0c117df2d8d2c7c6844733185af91fad06b (patch)
tree676aaba5ea6bdaa32fb11739fb51997eda8f31a0
parentb49be812b505e4afe8ea75056e7915b021615192 (diff)
parenta97f6bbcc40b1b1b5baeb38ff83defe0c5b47712 (diff)
downloadnixpkgs-8b35f0c117df2d8d2c7c6844733185af91fad06b.tar
nixpkgs-8b35f0c117df2d8d2c7c6844733185af91fad06b.tar.gz
nixpkgs-8b35f0c117df2d8d2c7c6844733185af91fad06b.tar.bz2
nixpkgs-8b35f0c117df2d8d2c7c6844733185af91fad06b.tar.lz
nixpkgs-8b35f0c117df2d8d2c7c6844733185af91fad06b.tar.xz
nixpkgs-8b35f0c117df2d8d2c7c6844733185af91fad06b.tar.zst
nixpkgs-8b35f0c117df2d8d2c7c6844733185af91fad06b.zip
Merge master into staging-next
-rw-r--r--lib/systems/examples.nix11
-rw-r--r--nixos/modules/programs/fish.nix18
-rw-r--r--pkgs/applications/terminal-emulators/nimmm/default.nix8
-rw-r--r--pkgs/development/libraries/cosmopolitan/default.nix80
-rw-r--r--pkgs/development/libraries/libbsd/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/safepass/default.nix6
-rw-r--r--pkgs/development/python-modules/weasyprint/default.nix10
-rw-r--r--pkgs/servers/rippled/default.nix12
-rw-r--r--pkgs/tools/admin/bash-my-aws/default.nix6
-rw-r--r--pkgs/tools/security/httpx/default.nix4
-rw-r--r--pkgs/tools/typesetting/htmldoc/default.nix28
-rw-r--r--pkgs/top-level/all-packages.nix2
12 files changed, 152 insertions, 35 deletions
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 02958f31ec8..13779a9b0cf 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -250,9 +250,18 @@ rec {
 
   # BSDs
 
-  amd64-netbsd = {
+  # Deprecate
+  amd64-netbsd = x86_64-netbsd;
+
+  x86_64-netbsd = {
+    config = "x86_64-unknown-netbsd";
+    libc = "nblibc";
+  };
+
+  x86_64-netbsd-llvm = {
     config = "x86_64-unknown-netbsd";
     libc = "nblibc";
+    useLLVM = true;
   };
 
   #
diff --git a/nixos/modules/programs/fish.nix b/nixos/modules/programs/fish.nix
index 392f06eb933..8dd7101947f 100644
--- a/nixos/modules/programs/fish.nix
+++ b/nixos/modules/programs/fish.nix
@@ -8,6 +8,11 @@ let
 
   cfg = config.programs.fish;
 
+  fishAbbrs = concatStringsSep "\n" (
+    mapAttrsFlatten (k: v: "abbr -ag ${k} ${escapeShellArg v}")
+      cfg.shellAbbrs
+  );
+
   fishAliases = concatStringsSep "\n" (
     mapAttrsFlatten (k: v: "alias ${k} ${escapeShellArg v}")
       (filterAttrs (k: v: v != null) cfg.shellAliases)
@@ -83,6 +88,18 @@ in
         '';
       };
 
+      shellAbbrs = mkOption {
+        default = {};
+        example = {
+          gco = "git checkout";
+          npu = "nix-prefetch-url";
+        };
+        description = ''
+          Set of fish abbreviations.
+        '';
+        type = with types; attrsOf str;
+      };
+
       shellAliases = mkOption {
         default = {};
         description = ''
@@ -205,6 +222,7 @@ in
         # if we haven't sourced the interactive config, do it
         status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced
         and begin
+          ${fishAbbrs}
           ${fishAliases}
 
           ${sourceEnv "interactiveShellInit"}
diff --git a/pkgs/applications/terminal-emulators/nimmm/default.nix b/pkgs/applications/terminal-emulators/nimmm/default.nix
index 648a3906fb5..bb09fa776b6 100644
--- a/pkgs/applications/terminal-emulators/nimmm/default.nix
+++ b/pkgs/applications/terminal-emulators/nimmm/default.nix
@@ -4,8 +4,8 @@ let
   noise = fetchFromGitHub {
     owner = "jangko";
     repo = "nim-noise";
-    rev = "db1e86e312413e4348fa82c02340784316a89cc1";
-    sha256 = "0n9l2dww5smrsl1xfqxjnxz3f1srb72lc1wl3pdvs6xfyf44qzlh";
+    rev = "v0.1.14";
+    sha256 = "0wndiphznfyb1pac6zysi3bqljwlfwj6ziarcwnpf00sw2zni449";
   };
 
   nimbox = fetchFromGitHub {
@@ -24,13 +24,13 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "nimmm";
-  version = "0.1.2";
+  version = "0.2.0";
 
   src = fetchFromGitHub {
     owner = "joachimschmidt557";
     repo = "nimmm";
     rev = "v${version}";
-    sha256 = "1zpq181iz6g7yfi298gjwv33b89l4fpnkjprimykah7py5cpw67w";
+    sha256 = "168n61avphbxsxfq8qzcnlqx6wgvz5yrjvs14g25cg3k46hj4xqg";
   };
 
   nativeBuildInputs = [ nim ];
diff --git a/pkgs/development/libraries/cosmopolitan/default.nix b/pkgs/development/libraries/cosmopolitan/default.nix
new file mode 100644
index 00000000000..629e5465a04
--- /dev/null
+++ b/pkgs/development/libraries/cosmopolitan/default.nix
@@ -0,0 +1,80 @@
+{ lib, gcc9Stdenv, fetchFromGitHub, runCommand, cosmopolitan }:
+
+gcc9Stdenv.mkDerivation rec {
+  pname = "cosmopolitan";
+  version = "0.3";
+
+  src = fetchFromGitHub {
+    owner = "jart";
+    repo = "cosmopolitan";
+    rev = version;
+    sha256 = "sha256-OVdOObO82W6JN63OWKHaERS7y0uvgxt+WLp6Y0LsmJk=";
+  };
+
+  postPatch = ''
+    patchShebangs build/
+    rm -r third_party/gcc
+  '';
+
+  dontConfigure = true;
+  dontFixup = true;
+  enableParallelBuilding = true;
+
+  preBuild = ''
+    makeFlagsArray=(
+      SHELL=/bin/sh
+      AS=${gcc9Stdenv.cc.targetPrefix}as
+      CC=${gcc9Stdenv.cc.targetPrefix}gcc
+      GCC=${gcc9Stdenv.cc.targetPrefix}gcc
+      CXX=${gcc9Stdenv.cc.targetPrefix}g++
+      LD=${gcc9Stdenv.cc.targetPrefix}ld
+      OBJCOPY=${gcc9Stdenv.cc.targetPrefix}objcopy
+      "MKDIR=mkdir -p"
+      )
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/{bin,lib/include}
+    install o/cosmopolitan.h $out/lib/include
+    install o/cosmopolitan.a o/libc/crt/crt.o o/ape/ape.{o,lds} $out/lib
+    cat > $out/bin/cosmoc <<EOF
+    #!${gcc9Stdenv.shell}
+    exec ${gcc9Stdenv.cc}/bin/${gcc9Stdenv.cc.targetPrefix}gcc \
+      -O -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone \
+      "\$@" \
+      -Wl,--oformat=binary -Wl,--gc-sections -Wl,-z,max-page-size=0x1000 \
+      -fuse-ld=bfd -Wl,-T,$out/lib/ape.lds \
+      -include $out/lib/{include/cosmopolitan.h,crt.o,ape.o,cosmopolitan.a}
+    EOF
+    chmod +x $out/bin/cosmoc
+    runHook postInstall
+  '';
+
+  passthru.tests = lib.optional (gcc9Stdenv.buildPlatform == gcc9Stdenv.hostPlatform) {
+    hello = runCommand "hello-world" { } ''
+      printf 'main() { printf("hello world\\n"); }\n' >hello.c
+      ${gcc9Stdenv.cc}/bin/gcc -g -O -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -o hello.com.dbg hello.c \
+        -fuse-ld=bfd -Wl,-T,${cosmopolitan}/lib/ape.lds \
+        -include ${cosmopolitan}/lib/{include/cosmopolitan.h,crt.o,ape.o,cosmopolitan.a}
+      ${gcc9Stdenv.cc.bintools.bintools_bin}/bin/objcopy -S -O binary hello.com.dbg hello.com
+      ./hello.com
+      printf "test successful" > $out
+    '';
+    cosmoc = runCommand "cosmoc-hello" { } ''
+      printf 'main() { printf("hello world\\n"); }\n' >hello.c
+      ${cosmopolitan}/bin/cosmoc hello.c
+      ./a.out
+      printf "test successful" > $out
+    '';
+  };
+
+  meta = with lib; {
+    homepage = "https://justine.lol/cosmopolitan/";
+    description = "Your build-once run-anywhere c library";
+    platforms = platforms.x86_64;
+    badPlatforms = platforms.darwin;
+    license = licenses.isc;
+    maintainers = with maintainers; [ lourkeur tomberek ];
+  };
+}
diff --git a/pkgs/development/libraries/libbsd/default.nix b/pkgs/development/libraries/libbsd/default.nix
index 778b61d8315..8754dd5f65d 100644
--- a/pkgs/development/libraries/libbsd/default.nix
+++ b/pkgs/development/libraries/libbsd/default.nix
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "11x8q45jvjvf2dvgclds64mscyg10lva33qinf2hwgc84v3svf1l";
   };
 
+  outputs = [ "out" "dev" "man" ];
+
   # darwin changes configure.ac which means we need to regenerate
   # the configure scripts
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/development/ocaml-modules/safepass/default.nix b/pkgs/development/ocaml-modules/safepass/default.nix
index 04c494403be..e8a50f45119 100644
--- a/pkgs/development/ocaml-modules/safepass/default.nix
+++ b/pkgs/development/ocaml-modules/safepass/default.nix
@@ -2,13 +2,15 @@
 
 buildDunePackage rec {
   pname = "safepass";
-  version = "3.0";
+  version = "3.1";
+
+  useDune2 = true;
 
   src = fetchFromGitHub {
     owner = "darioteixeira";
     repo = "ocaml-safepass";
     rev = "v${version}";
-    sha256 = "0i127gs9x23wzwa1q3dxa2j6hby07hvxdg1c98fc3j09rg6vy2bs";
+    sha256 = "1cwslwdb1774lfmhcclj9kymvidbcpjx1vp16jnjirqdqgl4zs5q";
   };
 
   meta = {
diff --git a/pkgs/development/python-modules/weasyprint/default.nix b/pkgs/development/python-modules/weasyprint/default.nix
index a7188a3103f..8f946c47786 100644
--- a/pkgs/development/python-modules/weasyprint/default.nix
+++ b/pkgs/development/python-modules/weasyprint/default.nix
@@ -1,5 +1,6 @@
 { buildPythonPackage,
   fetchPypi,
+  fetchpatch,
   cairosvg,
   pyphen,
   cffi,
@@ -7,7 +8,6 @@
   lxml,
   html5lib,
   tinycss,
-  pygobject2,
   glib,
   pango,
   fontconfig,
@@ -43,9 +43,15 @@ buildPythonPackage rec {
 
   FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
 
-  propagatedBuildInputs = [ cairosvg pyphen cffi cssselect lxml html5lib tinycss pygobject2 ];
+  propagatedBuildInputs = [ cairosvg pyphen cffi cssselect lxml html5lib tinycss ];
 
+  # 47043a1fd7e50a892b9836466f521df85d597c4.patch can be removed after next release of weasyprint, see:
+  # https://github.com/Kozea/WeasyPrint/issues/1333#issuecomment-818062970
   patches = [
+    (fetchpatch {
+      url = "https://github.com/Kozea/WeasyPrint/commit/47043a1fd7e50a892b9836466f521df85d597c44.patch";
+      sha256 = "0l9z0hrav3bcdajlg3vbzljq0lkw7hlj8ppzrq3v21hbj1il1nsb";
+    })
     (substituteAll {
       src = ./library-paths.patch;
       fontconfig = "${fontconfig.lib}/lib/libfontconfig${stdenv.hostPlatform.extensions.sharedLibrary}";
diff --git a/pkgs/servers/rippled/default.nix b/pkgs/servers/rippled/default.nix
index 6bedb891b57..8c5f5c0e402 100644
--- a/pkgs/servers/rippled/default.nix
+++ b/pkgs/servers/rippled/default.nix
@@ -31,8 +31,8 @@ let
 
   nudb = fetchgit rec {
     url = "https://github.com/CPPAlliance/NuDB.git";
-    rev = "2.0.3";
-    sha256 = "0imd9sh6knydwa3pxa5bbvjs3bmb8650dnsvj04qgns6bynwlqh1";
+    rev = "2.0.5";
+    sha256 = "02zbd07qvdjjsm4ivvhxah5n466bncvm6m03vmq0qdbbrlnp6s37";
     leaveDotGit = true;
     fetchSubmodules = true;
     postFetch = "cd $out && git tag ${rev}";
@@ -40,8 +40,8 @@ let
 
   rocksdb = fetchgit rec {
     url = "https://github.com/facebook/rocksdb.git";
-    rev = "v6.5.3";
-    sha256 = "11kbwqph1i3w6rbhr0kl2aq4jidhai24gw420y9qi9ab7zl0zcqg";
+    rev = "v6.7.3";
+    sha256 = "16qb636qs2yxqmz30hmvq8mllf038s80p37b0vyc0bazwlr93d9z";
     deepClone = true;
     fetchSubmodules = false;
     leaveDotGit = true;
@@ -116,12 +116,12 @@ let
   };
 in stdenv.mkDerivation rec {
   pname = "rippled";
-  version = "1.6.0";
+  version = "1.7.0";
 
   src = fetchgit {
     url = "https://github.com/ripple/rippled.git";
     rev = version;
-    sha256 = "176i3dm98zp5jllslpzfhh52bd2lapq9i8r7m45v8sg9icvsmyz7";
+    sha256 = "1rr5kxks9hsxyxrz90dw259b6fs9lywdlqv0bj2g21a6f7g60v2v";
     leaveDotGit = true;
     fetchSubmodules = true;
   };
diff --git a/pkgs/tools/admin/bash-my-aws/default.nix b/pkgs/tools/admin/bash-my-aws/default.nix
index 5214cfeee2a..7d2f878f742 100644
--- a/pkgs/tools/admin/bash-my-aws/default.nix
+++ b/pkgs/tools/admin/bash-my-aws/default.nix
@@ -1,6 +1,8 @@
 { lib, stdenv
+, makeWrapper
 , awscli
 , jq
+, unixtools
 , fetchgit
 , installShellFiles
 , bashInteractive
@@ -22,9 +24,10 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = [
     awscli
     jq
+    unixtools.column
     bashInteractive
   ];
-  nativeBuildInputs = [ installShellFiles ];
+  nativeBuildInputs = [ makeWrapper installShellFiles ];
 
   checkPhase = ''
     pushd test
@@ -50,6 +53,7 @@ stdenv.mkDerivation rec {
         --replace .bash-my-aws ""
     substituteInPlace bin/bma \
         --replace '~/.bash-my-aws' $out
+    wrapProgram $out/bin/bma --prefix PATH : ${lib.makeBinPath [awscli jq unixtools.column bashInteractive ]}
     installShellCompletion --bash --name bash-my-aws.bash bash_completion.sh
     chmod +x $out/lib/*
     patchShebangs --host $out/lib
diff --git a/pkgs/tools/security/httpx/default.nix b/pkgs/tools/security/httpx/default.nix
index 129395912f9..e8ddf6bb0bc 100644
--- a/pkgs/tools/security/httpx/default.nix
+++ b/pkgs/tools/security/httpx/default.nix
@@ -5,13 +5,13 @@
 
 buildGoModule rec {
   pname = "httpx";
-  version = "1.0.4";
+  version = "1.0.5";
 
   src = fetchFromGitHub {
     owner = "projectdiscovery";
     repo = "httpx";
     rev = "v${version}";
-    sha256 = "sha256-w5CNvtlhvm1SyAKaoA7Fw8ZSY9Z78MentrSNS4mpr1Q=";
+    sha256 = "sha256-E7HGE+ZVUF6AK+4qVsO2t+/B8hRMd14/bZW2WXA6p6E=";
   };
 
   vendorSha256 = "sha256-VBxGapvC2QE/0slsAiCBzmwOSMeGepZU0pYVDepSrwg=";
diff --git a/pkgs/tools/typesetting/htmldoc/default.nix b/pkgs/tools/typesetting/htmldoc/default.nix
index 124839ca45d..740d16c73df 100644
--- a/pkgs/tools/typesetting/htmldoc/default.nix
+++ b/pkgs/tools/typesetting/htmldoc/default.nix
@@ -1,29 +1,23 @@
-{ lib, stdenv, fetchurl
-
-, SystemConfiguration ? null, Foundation ? null
-}:
-
-assert stdenv.isDarwin -> SystemConfiguration != null
-                       && Foundation != null;
+{ lib, stdenv, fetchFromGitHub, zlib, libpng, SystemConfiguration, Foundation }:
 
 stdenv.mkDerivation rec {
-  version = "1.8.29";
   pname = "htmldoc";
-  src = fetchurl {
-    url = "https://github.com/michaelrsweet/htmldoc/releases/download"
-      + "/release-${version}/htmldoc-${version}-source.tar.gz";
-    sha256 = "15x0xdf487j4i4gfap5yr83airxnbp2v4lxaz79a4s3iirrq39p0";
+  version = "1.9.11";
+  src = fetchFromGitHub {
+    owner = "michaelrsweet";
+    repo = "htmldoc";
+    rev = "v${version}";
+    sha256 = "0660829zjfdm6vzx14z7gvsfipsb7h0z74gbkyp2ncg3g2432s4n";
   };
-  buildInputs = with stdenv;
-       lib.optional isDarwin SystemConfiguration
-    ++ lib.optional isDarwin Foundation;
+  buildInputs = [ zlib libpng ]
+    ++ lib.optionals stdenv.isDarwin [ Foundation SystemConfiguration ];
 
   meta = with lib; {
     description = "Converts HTML files to PostScript and PDF";
     homepage    = "https://michaelrsweet.github.io/htmldoc";
-    license     = licenses.gpl2;
+    license     = licenses.gpl2Only;
     maintainers = with maintainers; [ shanemikel ];
-    platforms   = with platforms; linux ++ darwin;
+    platforms   = platforms.unix;
 
     longDescription = ''
       HTMLDOC is a program that reads HTML source files or web pages and
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2a8c0368d7b..debfb711d89 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13952,6 +13952,8 @@ in
 
   cog = callPackage ../development/web/cog { };
 
+  cosmopolitan = callPackage ../development/libraries/cosmopolitan { };
+
   ctl = callPackage ../development/libraries/ctl { };
 
   ctpp2 = callPackage ../development/libraries/ctpp2 { };