Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-04-15 06:05:40 +00:00 committed by GitHub
commit 8b35f0c117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 152 additions and 35 deletions

View File

@ -250,11 +250,20 @@ rec {
# BSDs # BSDs
amd64-netbsd = { # Deprecate
amd64-netbsd = x86_64-netbsd;
x86_64-netbsd = {
config = "x86_64-unknown-netbsd"; config = "x86_64-unknown-netbsd";
libc = "nblibc"; libc = "nblibc";
}; };
x86_64-netbsd-llvm = {
config = "x86_64-unknown-netbsd";
libc = "nblibc";
useLLVM = true;
};
# #
# WASM # WASM
# #

View File

@ -8,6 +8,11 @@ let
cfg = config.programs.fish; cfg = config.programs.fish;
fishAbbrs = concatStringsSep "\n" (
mapAttrsFlatten (k: v: "abbr -ag ${k} ${escapeShellArg v}")
cfg.shellAbbrs
);
fishAliases = concatStringsSep "\n" ( fishAliases = concatStringsSep "\n" (
mapAttrsFlatten (k: v: "alias ${k} ${escapeShellArg v}") mapAttrsFlatten (k: v: "alias ${k} ${escapeShellArg v}")
(filterAttrs (k: v: v != null) cfg.shellAliases) (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 { shellAliases = mkOption {
default = {}; default = {};
description = '' description = ''
@ -205,6 +222,7 @@ in
# if we haven't sourced the interactive config, do it # if we haven't sourced the interactive config, do it
status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced
and begin and begin
${fishAbbrs}
${fishAliases} ${fishAliases}
${sourceEnv "interactiveShellInit"} ${sourceEnv "interactiveShellInit"}

View File

@ -4,8 +4,8 @@ let
noise = fetchFromGitHub { noise = fetchFromGitHub {
owner = "jangko"; owner = "jangko";
repo = "nim-noise"; repo = "nim-noise";
rev = "db1e86e312413e4348fa82c02340784316a89cc1"; rev = "v0.1.14";
sha256 = "0n9l2dww5smrsl1xfqxjnxz3f1srb72lc1wl3pdvs6xfyf44qzlh"; sha256 = "0wndiphznfyb1pac6zysi3bqljwlfwj6ziarcwnpf00sw2zni449";
}; };
nimbox = fetchFromGitHub { nimbox = fetchFromGitHub {
@ -24,13 +24,13 @@ let
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "nimmm"; pname = "nimmm";
version = "0.1.2"; version = "0.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "joachimschmidt557"; owner = "joachimschmidt557";
repo = "nimmm"; repo = "nimmm";
rev = "v${version}"; rev = "v${version}";
sha256 = "1zpq181iz6g7yfi298gjwv33b89l4fpnkjprimykah7py5cpw67w"; sha256 = "168n61avphbxsxfq8qzcnlqx6wgvz5yrjvs14g25cg3k46hj4xqg";
}; };
nativeBuildInputs = [ nim ]; nativeBuildInputs = [ nim ];

View File

@ -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 ];
};
}

View File

@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "11x8q45jvjvf2dvgclds64mscyg10lva33qinf2hwgc84v3svf1l"; sha256 = "11x8q45jvjvf2dvgclds64mscyg10lva33qinf2hwgc84v3svf1l";
}; };
outputs = [ "out" "dev" "man" ];
# darwin changes configure.ac which means we need to regenerate # darwin changes configure.ac which means we need to regenerate
# the configure scripts # the configure scripts
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];

View File

@ -2,13 +2,15 @@
buildDunePackage rec { buildDunePackage rec {
pname = "safepass"; pname = "safepass";
version = "3.0"; version = "3.1";
useDune2 = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "darioteixeira"; owner = "darioteixeira";
repo = "ocaml-safepass"; repo = "ocaml-safepass";
rev = "v${version}"; rev = "v${version}";
sha256 = "0i127gs9x23wzwa1q3dxa2j6hby07hvxdg1c98fc3j09rg6vy2bs"; sha256 = "1cwslwdb1774lfmhcclj9kymvidbcpjx1vp16jnjirqdqgl4zs5q";
}; };
meta = { meta = {

View File

@ -1,5 +1,6 @@
{ buildPythonPackage, { buildPythonPackage,
fetchPypi, fetchPypi,
fetchpatch,
cairosvg, cairosvg,
pyphen, pyphen,
cffi, cffi,
@ -7,7 +8,6 @@
lxml, lxml,
html5lib, html5lib,
tinycss, tinycss,
pygobject2,
glib, glib,
pango, pango,
fontconfig, fontconfig,
@ -43,9 +43,15 @@ buildPythonPackage rec {
FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf"; 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 = [ patches = [
(fetchpatch {
url = "https://github.com/Kozea/WeasyPrint/commit/47043a1fd7e50a892b9836466f521df85d597c44.patch";
sha256 = "0l9z0hrav3bcdajlg3vbzljq0lkw7hlj8ppzrq3v21hbj1il1nsb";
})
(substituteAll { (substituteAll {
src = ./library-paths.patch; src = ./library-paths.patch;
fontconfig = "${fontconfig.lib}/lib/libfontconfig${stdenv.hostPlatform.extensions.sharedLibrary}"; fontconfig = "${fontconfig.lib}/lib/libfontconfig${stdenv.hostPlatform.extensions.sharedLibrary}";

View File

@ -31,8 +31,8 @@ let
nudb = fetchgit rec { nudb = fetchgit rec {
url = "https://github.com/CPPAlliance/NuDB.git"; url = "https://github.com/CPPAlliance/NuDB.git";
rev = "2.0.3"; rev = "2.0.5";
sha256 = "0imd9sh6knydwa3pxa5bbvjs3bmb8650dnsvj04qgns6bynwlqh1"; sha256 = "02zbd07qvdjjsm4ivvhxah5n466bncvm6m03vmq0qdbbrlnp6s37";
leaveDotGit = true; leaveDotGit = true;
fetchSubmodules = true; fetchSubmodules = true;
postFetch = "cd $out && git tag ${rev}"; postFetch = "cd $out && git tag ${rev}";
@ -40,8 +40,8 @@ let
rocksdb = fetchgit rec { rocksdb = fetchgit rec {
url = "https://github.com/facebook/rocksdb.git"; url = "https://github.com/facebook/rocksdb.git";
rev = "v6.5.3"; rev = "v6.7.3";
sha256 = "11kbwqph1i3w6rbhr0kl2aq4jidhai24gw420y9qi9ab7zl0zcqg"; sha256 = "16qb636qs2yxqmz30hmvq8mllf038s80p37b0vyc0bazwlr93d9z";
deepClone = true; deepClone = true;
fetchSubmodules = false; fetchSubmodules = false;
leaveDotGit = true; leaveDotGit = true;
@ -116,12 +116,12 @@ let
}; };
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "rippled"; pname = "rippled";
version = "1.6.0"; version = "1.7.0";
src = fetchgit { src = fetchgit {
url = "https://github.com/ripple/rippled.git"; url = "https://github.com/ripple/rippled.git";
rev = version; rev = version;
sha256 = "176i3dm98zp5jllslpzfhh52bd2lapq9i8r7m45v8sg9icvsmyz7"; sha256 = "1rr5kxks9hsxyxrz90dw259b6fs9lywdlqv0bj2g21a6f7g60v2v";
leaveDotGit = true; leaveDotGit = true;
fetchSubmodules = true; fetchSubmodules = true;
}; };

View File

@ -1,6 +1,8 @@
{ lib, stdenv { lib, stdenv
, makeWrapper
, awscli , awscli
, jq , jq
, unixtools
, fetchgit , fetchgit
, installShellFiles , installShellFiles
, bashInteractive , bashInteractive
@ -22,9 +24,10 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
awscli awscli
jq jq
unixtools.column
bashInteractive bashInteractive
]; ];
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ makeWrapper installShellFiles ];
checkPhase = '' checkPhase = ''
pushd test pushd test
@ -50,6 +53,7 @@ stdenv.mkDerivation rec {
--replace .bash-my-aws "" --replace .bash-my-aws ""
substituteInPlace bin/bma \ substituteInPlace bin/bma \
--replace '~/.bash-my-aws' $out --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 installShellCompletion --bash --name bash-my-aws.bash bash_completion.sh
chmod +x $out/lib/* chmod +x $out/lib/*
patchShebangs --host $out/lib patchShebangs --host $out/lib

View File

@ -5,13 +5,13 @@
buildGoModule rec { buildGoModule rec {
pname = "httpx"; pname = "httpx";
version = "1.0.4"; version = "1.0.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "projectdiscovery"; owner = "projectdiscovery";
repo = "httpx"; repo = "httpx";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-w5CNvtlhvm1SyAKaoA7Fw8ZSY9Z78MentrSNS4mpr1Q="; sha256 = "sha256-E7HGE+ZVUF6AK+4qVsO2t+/B8hRMd14/bZW2WXA6p6E=";
}; };
vendorSha256 = "sha256-VBxGapvC2QE/0slsAiCBzmwOSMeGepZU0pYVDepSrwg="; vendorSha256 = "sha256-VBxGapvC2QE/0slsAiCBzmwOSMeGepZU0pYVDepSrwg=";

View File

@ -1,29 +1,23 @@
{ lib, stdenv, fetchurl { lib, stdenv, fetchFromGitHub, zlib, libpng, SystemConfiguration, Foundation }:
, SystemConfiguration ? null, Foundation ? null
}:
assert stdenv.isDarwin -> SystemConfiguration != null
&& Foundation != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.8.29";
pname = "htmldoc"; pname = "htmldoc";
src = fetchurl { version = "1.9.11";
url = "https://github.com/michaelrsweet/htmldoc/releases/download" src = fetchFromGitHub {
+ "/release-${version}/htmldoc-${version}-source.tar.gz"; owner = "michaelrsweet";
sha256 = "15x0xdf487j4i4gfap5yr83airxnbp2v4lxaz79a4s3iirrq39p0"; repo = "htmldoc";
rev = "v${version}";
sha256 = "0660829zjfdm6vzx14z7gvsfipsb7h0z74gbkyp2ncg3g2432s4n";
}; };
buildInputs = with stdenv; buildInputs = [ zlib libpng ]
lib.optional isDarwin SystemConfiguration ++ lib.optionals stdenv.isDarwin [ Foundation SystemConfiguration ];
++ lib.optional isDarwin Foundation;
meta = with lib; { meta = with lib; {
description = "Converts HTML files to PostScript and PDF"; description = "Converts HTML files to PostScript and PDF";
homepage = "https://michaelrsweet.github.io/htmldoc"; homepage = "https://michaelrsweet.github.io/htmldoc";
license = licenses.gpl2; license = licenses.gpl2Only;
maintainers = with maintainers; [ shanemikel ]; maintainers = with maintainers; [ shanemikel ];
platforms = with platforms; linux ++ darwin; platforms = platforms.unix;
longDescription = '' longDescription = ''
HTMLDOC is a program that reads HTML source files or web pages and HTMLDOC is a program that reads HTML source files or web pages and

View File

@ -13952,6 +13952,8 @@ in
cog = callPackage ../development/web/cog { }; cog = callPackage ../development/web/cog { };
cosmopolitan = callPackage ../development/libraries/cosmopolitan { };
ctl = callPackage ../development/libraries/ctl { }; ctl = callPackage ../development/libraries/ctl { };
ctpp2 = callPackage ../development/libraries/ctpp2 { }; ctpp2 = callPackage ../development/libraries/ctpp2 { };