Merge remote-tracking branch 'upstream/master' into staging
This commit is contained in:
commit
b60fc42130
@ -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"}
|
||||||
|
80
pkgs/development/libraries/cosmopolitan/default.nix
Normal file
80
pkgs/development/libraries/cosmopolitan/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -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 ];
|
||||||
|
@ -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}";
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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 { };
|
||||||
|
Loading…
Reference in New Issue
Block a user