Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-01-24 06:44:02 +00:00 committed by GitHub
commit a2994c588a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 570 additions and 190 deletions

View file

@ -37,7 +37,7 @@ under the terms of [COPYING](../COPYING), which is an MIT-like license.
* Not start with the package name.
* Not have a period at the end.
* `meta.license` must be set and fit the upstream license.
* If there is no upstream license, `meta.license` should default to `stdenv.lib.licenses.unfree`.
* If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`.
* `meta.maintainers` must be set.
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes) and on how to [submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).

View file

@ -179,8 +179,8 @@ rec {
iphone64 = {
config = "aarch64-apple-ios";
# config = "aarch64-apple-darwin14";
sdkVer = "13.2";
xcodeVer = "11.3.1";
sdkVer = "14.3";
xcodeVer = "12.3";
xcodePlatform = "iPhoneOS";
useiOSPrebuilt = true;
};
@ -188,8 +188,8 @@ rec {
iphone32 = {
config = "armv7a-apple-ios";
# config = "arm-apple-darwin10";
sdkVer = "13.2";
xcodeVer = "11.3.1";
sdkVer = "14.3";
xcodeVer = "12.3";
xcodePlatform = "iPhoneOS";
useiOSPrebuilt = true;
};
@ -197,8 +197,8 @@ rec {
iphone64-simulator = {
config = "x86_64-apple-ios";
# config = "x86_64-apple-darwin14";
sdkVer = "13.2";
xcodeVer = "11.3.1";
sdkVer = "14.3";
xcodeVer = "12.3";
xcodePlatform = "iPhoneSimulator";
useiOSPrebuilt = true;
};
@ -206,8 +206,8 @@ rec {
iphone32-simulator = {
config = "i686-apple-ios";
# config = "i386-apple-darwin11";
sdkVer = "13.2";
xcodeVer = "11.3.1";
sdkVer = "14.3";
xcodeVer = "12.3";
xcodePlatform = "iPhoneSimulator";
useiOSPrebuilt = true;
};

View file

@ -1084,6 +1084,12 @@
githubId = 75972;
name = "Ben Booth";
};
berberman = {
email = "berberman@yandex.com";
github = "berberman";
githubId = 26041945;
name = "Potato Hatsue";
};
berce = {
email = "bert.moens@gmail.com";
github = "berce";

View file

@ -6,7 +6,7 @@ basexx,,,,,
binaryheap,,,,,vcunat
bit32,,,,lua5_1,lblasc
busted,,,,,
cassowary,,,,,marsam
cassowary,,,,,marsam alerque
cjson,lua-cjson,,,,
compat53,,,,,vcunat
cosmo,,,,,marsam

1 # nix name luarocks name server version luaversion maintainers
6 binaryheap vcunat
7 bit32 lua5_1 lblasc
8 busted
9 cassowary marsam marsam alerque
10 cjson lua-cjson
11 compat53 vcunat
12 cosmo marsam

View file

@ -66,7 +66,7 @@ nixpkgs$ ${0} ${GENERATED_NIXFILE}
These packages are manually refined in lua-overrides.nix
*/
{ self, stdenv, fetchurl, fetchgit, pkgs, ... } @ args:
{ self, stdenv, lib, fetchurl, fetchgit, pkgs, ... } @ args:
self: super:
with self;
{

View file

@ -1,7 +1,7 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-contributing">
<title>Contributing to this documentation</title>
<title>Contributing to this manual</title>
<para>
The DocBook sources of NixOS' manual are in the <filename
xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual">

View file

@ -21,7 +21,11 @@
xlink:href="https://discourse.nixos.org">Discourse</literal> or
on the <link
xlink:href="irc://irc.freenode.net/#nixos">
<literal>#nixos</literal> channel on Freenode</link>. Bugs should be
<literal>#nixos</literal> channel on Freenode</link>, or
consider
<link
xlink:href="#chap-contributing">
contributing to this manual</link>. Bugs should be
reported in
<link
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS

View file

@ -42,6 +42,7 @@ in
<itemizedlist>
<listitem><para>ibus: The intelligent input bus, extra input engines can be added using <literal>i18n.inputMethod.ibus.engines</literal>.</para></listitem>
<listitem><para>fcitx: A customizable lightweight input method, extra input engines can be added using <literal>i18n.inputMethod.fcitx.engines</literal>.</para></listitem>
<listitem><para>fcitx5: The next generation of fcitx, addons (including engines, dictionaries, skins) can be added using <literal>i18n.inputMethod.fcitx5.addons</literal>.</para></listitem>
<listitem><para>nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5.</para></listitem>
<listitem><para>uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean.</para></listitem>
<listitem><para>hime: An extremely easy-to-use input method framework.</para></listitem>

View file

@ -1,6 +1,6 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "usbguard";
meta = with pkgs.stdenv.lib.maintainers; {
meta = with pkgs.lib.maintainers; {
maintainers = [ tnias ];
};

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchpatch
{ lib, stdenv, fetchFromGitHub, fetchpatch
, cmake, halide
, libpng, libjpeg, libtiff, libraw
}:
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
done
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Burst photography pipeline based on Google's HDR+";
homepage = "https://www.timothybrooks.com/tech/hdr-plus/";
license = licenses.mit;

View file

@ -11,12 +11,12 @@
let font-droid = nerdfonts.override { fonts = [ "DroidSansMono" ]; };
in stdenv.mkDerivation rec {
pname = "koreader";
version = "2020.12";
version = "2021.01";
src = fetchurl {
url =
"https://github.com/koreader/koreader/releases/download/v${version}/koreader-${version}-amd64.deb";
sha256 = "0x97mm7h8kr1jps0hzdgl9irakma85ikrhzr18wc1plmffgv6kwm";
sha256 = "0cc7pk27wlvziihggzlrb3wsjmndafa13cy1snqr5x71bb81fv6r";
};
sourceRoot = ".";

View file

@ -38,10 +38,10 @@ in mkDerivation rec {
passthru.updateScript = writeScript "${pname}-updater" ''
#!${stdenv.shell}
set -eu -o pipefail
PATH=${stdenv.lib.makeBinPath [curl pup common-updater-scripts]}:$PATH
PATH=${lib.makeBinPath [curl pup common-updater-scripts]}:$PATH
latestVersion="$(curl -sS https://www.rescuetime.com/release-notes/linux | pup '.release:first-of-type h2 strong text{}' | tr -d '\n')"
for platform in ${stdenv.lib.concatStringsSep " " meta.platforms}; do
for platform in ${lib.concatStringsSep " " meta.platforms}; do
# The script will not perform an update when the version attribute is up to date from previous platform run
# We need to clear it before each run
update-source-version ${pname} 0 $(yes 0 | head -64 | tr -d "\n") --system=$platform

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, hamlib, pkg-config, qt5, qtbase, qttools, qtserialport, qtcharts, qmake, wrapQtAppsHook }:
{ lib, stdenv, fetchurl, hamlib, pkg-config, qt5, qtbase, qttools, qtserialport, qtcharts, qmake, wrapQtAppsHook }:
stdenv.mkDerivation rec {
pname = "klog";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
qmakeFlags = [ "KLog.pro" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "A multiplatform free hamradio logger";
longDescription = ''
KLog provides QSO management, useful QSL management DX-Cluster client, DXCC management,

View file

@ -1,4 +1,4 @@
{ gccStdenv, fetchurl, zlib, mpi }:
{ lib, gccStdenv, fetchurl, zlib, mpi }:
gccStdenv.mkDerivation rec {
version = "3.7.2";
@ -14,7 +14,7 @@ gccStdenv.mkDerivation rec {
buildFlags = [ "thread" "mpis" ];
preInstall = "mkdir -p $out/man/man1";
meta = with gccStdenv.lib; {
meta = with lib; {
description = "Estimates population size, migration, population splitting parameters using genetic/genomic data";
homepage = "https://peterbeerli.com/migrate-html5/index.html";
license = licenses.mit;

View file

@ -132,7 +132,7 @@ Description: BLAS C implementation
Cflags: -I$dev/include
Libs: -L$out/lib -lcblas
EOF
'' + stdenv.lib.optionalString (blasImplementation == "mkl") ''
'' + lib.optionalString (blasImplementation == "mkl") ''
mkdir -p $out/nix-support
echo 'export MKL_INTERFACE_LAYER=${lib.optionalString isILP64 "I"}LP64,GNU' > $out/nix-support/setup-hook
ln -s $out/lib/libblas${canonicalExtension} $out/lib/libmkl_rt${stdenv.hostPlatform.extensions.sharedLibrary}

View file

@ -98,7 +98,7 @@ Description: LAPACK C implementation
Cflags: -I$dev/include
Libs: -L$out/lib -llapacke
EOF
'' + stdenv.lib.optionalString (lapackImplementation == "mkl") ''
'' + lib.optionalString (lapackImplementation == "mkl") ''
mkdir -p $out/nix-support
echo 'export MKL_INTERFACE_LAYER=${lib.optionalString isILP64 "I"}LP64,GNU' > $out/nix-support/setup-hook
ln -s $out/lib/liblapack${canonicalExtension} $out/lib/libmkl_rt${stdenv.hostPlatform.extensions.sharedLibrary}

View file

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, bash
, binutils-unwrapped
, coreutils
@ -15,7 +16,7 @@ rec {
src = ./appimage-exec.sh;
isExecutable = true;
dir = "bin";
path = with pkgs; stdenv.lib.makeBinPath [
path = lib.makeBinPath [
bash
binutils-unwrapped
coreutils

View file

@ -94,7 +94,7 @@ rec {
inherit imageDigest;
imageName = finalImageName;
imageTag = finalImageTag;
impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
outputHashMode = "flat";
outputHashAlgo = "sha256";
outputHash = sha256;

View file

@ -1,6 +1,4 @@
{ stdenv, makeWrapper, nix, skopeo, jq }:
with stdenv.lib;
{ lib, stdenv, makeWrapper, nix, skopeo, jq }:
stdenv.mkDerivation {
name = "nix-prefetch-docker";
@ -12,13 +10,13 @@ stdenv.mkDerivation {
installPhase = ''
install -vD ${./nix-prefetch-docker} $out/bin/$name;
wrapProgram $out/bin/$name \
--prefix PATH : ${makeBinPath [ nix skopeo jq ]} \
--prefix PATH : ${lib.makeBinPath [ nix skopeo jq ]} \
--set HOME /homeless-shelter
'';
preferLocalBuild = true;
meta = {
meta = with lib; {
description = "Script used to obtain source hashes for dockerTools.pullImage";
maintainers = with maintainers; [ offline ];
platforms = platforms.unix;

View file

@ -1,4 +1,4 @@
{stdenv, dotnetfx}:
{ lib, stdenv, dotnetfx }:
{ name
, src
, baseDir ? "."
@ -24,7 +24,7 @@ stdenv.mkDerivation {
'';
preBuild = ''
${stdenv.lib.optionalString modifyPublicMain ''
${lib.optionalString modifyPublicMain ''
sed -i -e "s|static void Main|public static void Main|" ${mainClassFile}
''}
${preBuild}

View file

@ -1,9 +1,9 @@
{stdenv, dotnetfx}:
{ lib, stdenv, dotnetfx }:
let dotnetenv =
{
buildSolution = import ./build-solution.nix {
inherit stdenv;
inherit lib stdenv;
dotnetfx = dotnetfx.pkg;
};

View file

@ -1,6 +1,6 @@
# Adaptation of the MIT-licensed work on `sbt2nix` done by Charles O'Farrell
{ fetchurl, stdenv }:
{ lib, fetchurl, stdenv }:
let
defaultRepos = [
"https://repo1.maven.org/maven2"
@ -36,21 +36,20 @@ assert (url == "") || (urls == []);
# if repos is empty, then url or urls must be specified.
assert (repos != []) || (url != "") || (urls != []);
let
name_ =
with stdenv.lib; concatStrings [
(replaceChars ["."] ["_"] groupId) "_"
(replaceChars ["."] ["_"] artifactId) "-"
lib.concatStrings [
(lib.replaceChars ["."] ["_"] groupId) "_"
(lib.replaceChars ["."] ["_"] artifactId) "-"
version
];
mkJarUrl = repoUrl:
with stdenv.lib; concatStringsSep "/" [
(removeSuffix "/" repoUrl)
(replaceChars ["."] ["/"] groupId)
lib.concatStringsSep "/" [
(lib.removeSuffix "/" repoUrl)
(lib.replaceChars ["."] ["/"] groupId)
artifactId
version
"${artifactId}-${version}${optionalString (!isNull classifier) "-${classifier}"}.jar"
"${artifactId}-${version}${lib.optionalString (!isNull classifier) "-${classifier}"}.jar"
];
urls_ =
if url != "" then [url]

View file

@ -1,4 +1,4 @@
{ stdenv, icoutils }:
{ lib, stdenv, icoutils }:
stdenv.mkDerivation {
name = "icon-conv-tools-0.0.0";
@ -23,9 +23,9 @@ stdenv.mkDerivation {
dontPatchELF = true;
dontStrip = true;
meta = {
meta = with lib; {
description = "Tools for icon conversion specific to nix package manager";
maintainers = with stdenv.lib.maintainers; [ jraygauthier ];
platforms = with stdenv.lib.platforms; linux;
maintainers = with maintainers; [ jraygauthier ];
platforms = platforms.linux;
};
}

View file

@ -46,8 +46,8 @@ stdenv.mkDerivation {
)
'';
meta = {
platforms = stdenv.lib.platforms.unix;
meta = with lib; {
platforms = platforms.unix;
description = "An LD_PRELOAD library to intercept and rewrite the paths in glibc calls";
longDescription = ''
libredirect is an LD_PRELOAD library to intercept and rewrite the paths in

View file

@ -1,4 +1,4 @@
{ stdenv, writeText, ocaml, findlib, ocamlbuild, camlp4 }:
{ lib, stdenv, writeText, ocaml, findlib, ocamlbuild, camlp4 }:
{ name, version, buildInputs ? [],
createFindlibDestdir ? true,
@ -14,7 +14,7 @@ let
};
in
assert minimumSupportedOcamlVersion != null ->
stdenv.lib.versionOlder minimumSupportedOcamlVersion ocaml.version;
lib.versionOlder minimumSupportedOcamlVersion ocaml.version;
stdenv.mkDerivation (args // {
name = "ocaml-${name}-${version}";

View file

@ -1,11 +1,11 @@
{ stdenv, ocaml, findlib, dune, dune_2 }:
{ lib, stdenv, ocaml, findlib, dune, dune_2 }:
{ pname, version, buildInputs ? [], enableParallelBuilding ? true, ... }@args:
let Dune = if args.useDune2 or false then dune_2 else dune; in
if args ? minimumOCamlVersion &&
! stdenv.lib.versionAtLeast ocaml.version args.minimumOCamlVersion
! lib.versionAtLeast ocaml.version args.minimumOCamlVersion
then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
else

View file

@ -1,4 +1,4 @@
{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:
{ lib, stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:
{ pname, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
minimumOCamlVersion ? null,
@ -8,7 +8,7 @@
}@args:
if args ? minimumOCamlVersion &&
! stdenv.lib.versionAtLeast ocaml.version args.minimumOCamlVersion
! lib.versionAtLeast ocaml.version args.minimumOCamlVersion
then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
else

View file

@ -2,6 +2,7 @@
# PKG_CONFIG_PATH_FOR_BUILD work properly.
{ stdenvNoCC
, lib
, buildPackages
, pkg-config
, baseBinName ? "pkg-config"
@ -19,7 +20,7 @@ let
#
# TODO(@Ericson2314) Make unconditional, or optional but always true by
# default.
targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform)
targetPrefix = lib.optionalString (targetPlatform != hostPlatform)
(targetPlatform.config + "-");
# See description in cc-wrapper.
@ -119,7 +120,7 @@ stdenv.mkDerivation {
let pkg-config_ = if pkg-config != null then pkg-config else {}; in
(if pkg-config_ ? meta then removeAttrs pkg-config.meta ["priority"] else {}) //
{ description =
stdenv.lib.attrByPath ["meta" "description"] "pkg-config" pkg-config_
lib.attrByPath ["meta" "description"] "pkg-config" pkg-config_
+ " (wrapper script)";
priority = 10;
};

View file

@ -1,4 +1,4 @@
{ stdenv }:
{ lib, stdenv }:
# helper functions for packaging programs with plugin systems
{
@ -13,7 +13,7 @@
diffPlugins = expectedPlugins: foundPluginsFilePath: ''
# sort both lists first
plugins_expected=$(mktemp)
(${stdenv.lib.concatMapStrings (s: "echo \"${s}\";") expectedPlugins}) \
(${lib.concatMapStrings (s: "echo \"${s}\";") expectedPlugins}) \
| sort -u > "$plugins_expected"
plugins_found=$(mktemp)
sort -u "${foundPluginsFilePath}" > "$plugins_found"

View file

@ -2,6 +2,7 @@
# that contains a Debian-like (i.e. dpkg-based) OS.
{ name ? "debian-build"
, lib
, diskImage
, src, stdenv, vmTools, checkinstall
, fsTranslation ? false
@ -11,8 +12,6 @@
debRequires ? []
, ... } @ args:
with stdenv.lib;
vmTools.runInLinuxImage (stdenv.mkDerivation (
{
@ -59,8 +58,8 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
export PAGER=cat
${checkinstall}/sbin/checkinstall --nodoc -y -D \
--fstrans=${if fsTranslation then "yes" else "no"} \
--requires="${concatStringsSep "," debRequires}" \
--provides="${concatStringsSep "," debProvides}" \
--requires="${lib.concatStringsSep "," debRequires}" \
--provides="${lib.concatStringsSep "," debProvides}" \
${if (src ? version) then "--pkgversion=$(echo ${src.version} | tr _ -)"
else "--pkgversion=0.0.0"} \
''${debMaintainer:+--maintainer="'$debMaintainer'"} \

View file

@ -1,4 +1,4 @@
{ pkgs }:
{ lib, pkgs }:
with pkgs;
@ -23,7 +23,7 @@ rec {
} // args);
nixBuild = args: import ./nix-build.nix (
{ inherit stdenv;
{ inherit lib stdenv;
} // args);
coverageAnalysis = args: nixBuild (
@ -46,7 +46,7 @@ rec {
} // args);
debBuild = args: import ./debian-build.nix (
{ inherit stdenv vmTools checkinstall;
{ inherit lib stdenv vmTools checkinstall;
} // args);
aggregate =
@ -94,7 +94,7 @@ rec {
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
patchPhase = stdenv.lib.optionalString isNixOS ''
patchPhase = lib.optionalString isNixOS ''
touch .update-on-nixos-rebuild
'';

View file

@ -12,7 +12,7 @@
, doCoverityAnalysis ? false
, lcovFilter ? []
, lcovExtraTraceFiles ? []
, src, stdenv
, src, lib, stdenv
, name ? if doCoverageAnalysis then "nix-coverage" else "nix-build"
, failureHook ? null
, prePhases ? []
@ -69,7 +69,7 @@ stdenv.mkDerivation (
fi
'';
failureHook = (stdenv.lib.optionalString (failureHook != null) failureHook) +
failureHook = (lib.optionalString (failureHook != null) failureHook) +
''
if test -n "$succeedOnFailure"; then
if test -n "$keepBuildDirectory"; then
@ -136,10 +136,10 @@ stdenv.mkDerivation (
buildInputs =
buildInputs ++
(stdenv.lib.optional doCoverageAnalysis args.makeGCOVReport) ++
(stdenv.lib.optional doClangAnalysis args.clang-analyzer) ++
(stdenv.lib.optional doCoverityAnalysis args.cov-build) ++
(stdenv.lib.optional doCoverityAnalysis args.xz);
(lib.optional doCoverageAnalysis args.makeGCOVReport) ++
(lib.optional doClangAnalysis args.clang-analyzer) ++
(lib.optional doCoverityAnalysis args.cov-build) ++
(lib.optional doCoverityAnalysis args.xz);
lcovFilter = ["/nix/store/*"] ++ lcovFilter;

View file

@ -1,4 +1,4 @@
{ stdenv, pkg-config, curl, darwin, libiconv, libgit2, libssh2,
{ lib, stdenv, pkg-config, curl, darwin, libiconv, libgit2, libssh2,
openssl, sqlite, zlib, dbus, dbus-glib, gdk-pixbuf, cairo, python3,
libsodium, postgresql, gmp, foundationdb, capnproto, nettle, clang,
llvmPackages, ... }:
@ -17,7 +17,7 @@ in
cargo = attrs: {
buildInputs = [ openssl zlib curl ]
++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ];
++ lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ];
};
libz-sys = attrs: {
@ -149,7 +149,7 @@ in
};
serde_derive = attrs: {
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
buildInputs = lib.optional stdenv.isDarwin Security;
};
thrussh-libsodium = attrs: {

View file

@ -1,4 +1,5 @@
{ stdenv
, lib
, buildPackages
, cacert
, cargo
@ -83,13 +84,13 @@ let
cargoDepsCopy="$sourceRoot/${cargoVendorDir}"
'';
targetIsJSON = stdenv.lib.hasSuffix ".json" target;
targetIsJSON = lib.hasSuffix ".json" target;
useSysroot = targetIsJSON && !__internal_dontAddSysroot;
# see https://github.com/rust-lang/cargo/blob/964a16a28e234a3d397b2a7031d4ab4a428b1391/src/cargo/core/compiler/compile_kind.rs#L151-L168
# the "${}" is needed to transform the path into a /nix/store path before baseNameOf
shortTarget = if targetIsJSON then
(stdenv.lib.removeSuffix ".json" (builtins.baseNameOf "${target}"))
(lib.removeSuffix ".json" (builtins.baseNameOf "${target}"))
else target;
sysroot = (callPackage ./sysroot {}) {
@ -116,7 +117,7 @@ in
# See https://os.phil-opp.com/testing/ for more information.
assert useSysroot -> !(args.doCheck or true);
stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optionalAttrs useSysroot {
stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // lib.optionalAttrs useSysroot {
RUSTFLAGS = "--sysroot ${sysroot} " + (args.RUSTFLAGS or "");
} // {
inherit cargoDeps;
@ -124,7 +125,7 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
patchRegistryDeps = ./patch-registry-deps;
nativeBuildInputs = nativeBuildInputs ++ [ cacert git cargo rustc ];
buildInputs = buildInputs ++ stdenv.lib.optional stdenv.hostPlatform.isMinGW windows.pthreads;
buildInputs = buildInputs ++ lib.optional stdenv.hostPlatform.isMinGW windows.pthreads;
patches = cargoPatches ++ patches;
@ -147,11 +148,11 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
cat >> .cargo/config <<'EOF'
[target."${rust.toRustTarget stdenv.buildPlatform}"]
"linker" = "${ccForBuild}"
${stdenv.lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
${lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
[target."${shortTarget}"]
"linker" = "${ccForHost}"
${# https://github.com/rust-lang/rust/issues/46651#issuecomment-433611633
stdenv.lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) ''
lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) ''
"rustflags" = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ]
''}
''}
@ -163,7 +164,7 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
# After unpacking and applying patches, check that the Cargo.lock matches our
# src package. Note that we do this after the patchPhase, because the
# patchPhase may create the Cargo.lock if upstream has not shipped one.
postPatch = (args.postPatch or "") + stdenv.lib.optionalString validateCargoDeps ''
postPatch = (args.postPatch or "") + lib.optionalString validateCargoDeps ''
cargoDepsLockfile=$NIX_BUILD_TOP/$cargoDepsCopy/Cargo.lock
srcLockfile=$NIX_BUILD_TOP/$sourceRoot/Cargo.lock
@ -206,7 +207,7 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
'';
buildPhase = with builtins; args.buildPhase or ''
${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}
${lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}
runHook preBuild
(
@ -217,14 +218,14 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
"CC_${rust.toRustTarget stdenv.hostPlatform}"="${ccForHost}" \
"CXX_${rust.toRustTarget stdenv.hostPlatform}"="${cxxForHost}" \
cargo build -j $NIX_BUILD_CORES \
${stdenv.lib.optionalString (buildType == "release") "--release"} \
${lib.optionalString (buildType == "release") "--release"} \
--target ${target} \
--frozen ${concatStringsSep " " cargoBuildFlags}
)
runHook postBuild
${stdenv.lib.optionalString (buildAndTestSubdir != null) "popd"}
${lib.optionalString (buildAndTestSubdir != null) "popd"}
# This needs to be done after postBuild: packages like `cargo` do a pushd/popd in
# the pre/postBuild-hooks that need to be taken into account before gathering
@ -238,15 +239,15 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
'';
checkPhase = args.checkPhase or (let
argstr = "${stdenv.lib.optionalString (checkType == "release") "--release"} --target ${target} --frozen";
argstr = "${lib.optionalString (checkType == "release") "--release"} --target ${target} --frozen";
threads = if cargoParallelTestThreads then "$NIX_BUILD_CORES" else "1";
in ''
${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}
${lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}
runHook preCheck
echo "Running cargo test ${argstr} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
cargo test -j $NIX_BUILD_CORES ${argstr} -- --test-threads=${threads} ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"}
runHook postCheck
${stdenv.lib.optionalString (buildAndTestSubdir != null) "popd"}
${lib.optionalString (buildAndTestSubdir != null) "popd"}
'');
doCheck = args.doCheck or true;

View file

@ -1,4 +1,4 @@
{ stdenv, cacert, git, cargo, python3 }:
{ lib, stdenv, cacert, git, cargo, python3 }:
let cargo-vendor-normalise = stdenv.mkDerivation {
name = "cargo-vendor-normalise";
src = ./cargo-vendor-normalise.py;
@ -80,7 +80,7 @@ in stdenv.mkDerivation ({
inherit (hash_) outputHashAlgo outputHash;
impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
} // (builtins.removeAttrs args [
"name" "sha256" "cargoUpdateHook"
]))

View file

@ -1,4 +1,5 @@
{ runCommand
, lib
, stdenv
, storeDir ? builtins.storeDir
, writeScript
@ -64,7 +65,7 @@ rec {
mkdir proc sys dev
# Run root script
${stdenv.lib.optionalString (runAsRoot != null) ''
${lib.optionalString (runAsRoot != null) ''
mkdir -p ./${storeDir}
mount --rbind ${storeDir} ./${storeDir}
unshare -imnpuf --mount-proc chroot ./ ${runAsRootFile}

View file

@ -1,6 +1,5 @@
{ stdenv, cleanPackaging, fetchurl }:
let lib = stdenv.lib;
in {
{ lib, stdenv, cleanPackaging, fetchurl }:
{
# : string
pname
# : string
@ -98,7 +97,7 @@ in stdenv.mkDerivation {
meta = {
homepage = "https://skarnet.org/software/${pname}/";
inherit description platforms;
license = stdenv.lib.licenses.isc;
license = lib.licenses.isc;
maintainers = with lib.maintainers;
[ pmahoney Profpatsch ] ++ maintainers;
};

View file

@ -3,10 +3,10 @@
# files were either discarded or moved to outputs.
# This ensures nothing is forgotten and new files
# are correctly handled on update.
{ stdenv, file, writeScript }:
{ lib, stdenv, file, writeScript }:
let
globWith = stdenv.lib.concatMapStringsSep "\n";
globWith = lib.concatMapStringsSep "\n";
rmNoise = noiseGlobs: globWith (f:
''rm -rf ${f}'') noiseGlobs;
mvDoc = docGlobs: globWith

View file

@ -1,10 +1,10 @@
{ stdenv }:
{ lib, stdenv }:
args:
stdenv.mkDerivation ({
name = if args ? name then args.name else baseNameOf (toString args.src);
builder = with stdenv.lib; builtins.toFile "builder.sh" ''
builder = builtins.toFile "builder.sh" ''
source $stdenv/setup
set -o pipefail
@ -13,7 +13,7 @@ stdenv.mkDerivation ({
args=
pushd "$src"
echo -ne "${concatStringsSep "\\0" args.files}" | xargs -0 -n1 -I {} -- find {} -type f -print0 | while read -d "" line; do
echo -ne "${lib.concatStringsSep "\\0" args.files}" | xargs -0 -n1 -I {} -- find {} -type f -print0 | while read -d "" line; do
mkdir -p "$out/$(dirname "$line")"
substituteAll "$line" "$out/$line"
done

View file

@ -18,7 +18,7 @@ stdenv.mkDerivation {
meta = with lib; {
description = "Create templates of nix expressions from RPM .spec files";
maintainers = with maintainers; [ tstrobel ];
platforms = with stdenv.lib.platforms; unix;
platforms = platforms.unix;
hydraPlatforms = [];
};
}

View file

@ -1,4 +1,5 @@
{ pkgs
{ lib
, pkgs
, kernel ? pkgs.linux
, img ? pkgs.stdenv.hostPlatform.linux-kernel.target
, storeDir ? builtins.storeDir
@ -572,7 +573,7 @@ rec {
buildCommand = ''
${createRootFS}
PATH=$PATH:${stdenv.lib.makeBinPath [ dpkg dpkg glibc lzma ]}
PATH=$PATH:${lib.makeBinPath [ dpkg dpkg glibc lzma ]}
# Unpack the .debs. We do this to prevent pre-install scripts
# (which have lots of circular dependencies) from barfing.

View file

@ -196,7 +196,7 @@ let
in runCommand "test-writers" {
passthru = { inherit writeTest bin simple; };
meta.platforms = stdenv.lib.platforms.all;
meta.platforms = lib.platforms.all;
} ''
${lib.concatMapStringsSep "\n" (test: writeTest "success" "${test}/bin/test_writers") (lib.attrValues bin)}
${lib.concatMapStringsSep "\n" (test: writeTest "success" test) (lib.attrValues simple)}

View file

@ -1,4 +1,4 @@
{ stdenv, makeWrapper, coreutils, gnused, gnugrep, diffutils, nix, git, jq }:
{ lib, stdenv, makeWrapper, coreutils, gnused, gnugrep, diffutils, nix, git, jq }:
stdenv.mkDerivation {
name = "common-updater-scripts";
@ -12,7 +12,7 @@ stdenv.mkDerivation {
cp ${./scripts}/* $out/bin
for f in $out/bin/*; do
wrapProgram $f --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gnused gnugrep nix diffutils git jq ]}
wrapProgram $f --prefix PATH : ${lib.makeBinPath [ coreutils gnused gnugrep nix diffutils git jq ]}
done
'';
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchFromGitHub, gnome3, glib }:
stdenv.mkDerivation rec {
pname = "gnome-shell-extension-dynamic-panel-transparency";
version = "35";
src = fetchFromGitHub {
owner = "ewlsh";
repo = "dynamic-panel-transparency";
rev = "0800c0a921bb25f51f6a5ca2e6981b1669a69aec";
sha256 = "0200mx861mlsi9lf7h108yam02jfqqw55r521chkgmk4fy6z99pq";
};
uuid = "dynamic-panel-transparency@rockon999.github.io";
nativeBuildInputs = [ glib ];
buildPhase = ''
runHook preBuild
glib-compile-schemas --strict --targetdir=${uuid}/schemas/ ${uuid}/schemas
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/gnome-shell/extensions/${uuid}
cp -r ${uuid} $out/share/gnome-shell/extensions
runHook postInstall
'';
meta = with lib; {
description = "This extension fades your top panel to nothingness when there are no maximized windows present";
license = licenses.gpl3Only;
maintainers = with maintainers; [ rhoriguchi ];
homepage = "https://github.com/ewlsh/dynamic-panel-transparency";
broken = versionOlder gnome3.gnome-shell.version "3.36";
};
}

View file

@ -5,7 +5,7 @@ nixpkgs$ maintainers/scripts/update-luarocks-packages pkgs/development/lua-modul
These packages are manually refined in lua-overrides.nix
*/
{ self, lib, stdenv, fetchurl, fetchgit, pkgs, ... } @ args:
{ self, stdenv, lib, fetchurl, fetchgit, pkgs, ... } @ args:
self: super:
with self;
{

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchgit }:
let
lss = fetchgit {
url = "https://chromium.googlesource.com/linux-syscall-support";
rev = "d9ad2969b369a9f1c455fef92d04c7628f7f9eb8";
sha256 = "952dv+ZE1ge/WF5RyHmEqht+AofoRHKAeFmGasVF9BA=";
};
in stdenv.mkDerivation {
pname = "breakpad";
version = "unstable-3b3469e";
src = fetchgit {
url = "https://chromium.googlesource.com/breakpad/breakpad";
rev = "3b3469e9ed0de3d02e4450b9b95014a4266cf2ff";
sha256 = "bRGOBrGPK+Zxp+KK+E5MFkYlDUNVhVeInVSwq+eCAF0=";
};
postUnpack = ''
ln -s ${lss} $sourceRoot/src/third_party/lss
'';
meta = with lib; {
description = "An open-source multi-platform crash reporting system";
homepage = "https://chromium.googlesource.com/breakpad";
license = licenses.bsd3;
maintainers = with maintainers; [ berberman ];
platforms = platforms.all;
};
}

View file

@ -19,7 +19,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
sha256 = "sha256-CLK1gJj/YX0RVAVsefinC+7Rj3z6cQvKI6ByGWkQ1bQ=";
sha256 = "1d6m21lijwm04g50nwgsgj7x3vhblzw7jv05ah8psqgzk20bbch8";
};
nativeBuildInputs = [
@ -39,8 +39,14 @@ buildPythonPackage rec {
# No tests in archive
doCheck = false;
meta = {
description = "A simple, correct PEP517 package builder";
license = lib.licenses.mit;
meta = with lib; {
description = "Simple, correct PEP517 package builder";
longDescription = ''
build will invoke the PEP 517 hooks to build a distribution package. It
is a simple build tool and does not perform any dependency management.
'';
homepage = "https://github.com/pypa/build";
maintainers = with maintainers; [ fab ];
license = licenses.mit;
};
}

View file

@ -4,12 +4,12 @@
, git, glibcLocales }:
buildPythonPackage rec {
version = "0.20.14";
version = "0.20.15";
pname = "dulwich";
src = fetchPypi {
inherit pname version;
sha256 = "21d6ee82708f7c67ce3fdcaf1f1407e524f7f4f7411a410a972faa2176baec0d";
sha256 = "1248942fr12av2rkzpm2fq0qn6rajvv2lcgq65h8kby27qvp65zv";
};
LC_ALL = "en_US.UTF-8";
@ -23,8 +23,13 @@ buildPythonPackage rec {
meta = with lib; {
description = "Simple Python implementation of the Git file formats and protocols";
homepage = "https://samba.org/~jelmer/dulwich/";
license = licenses.gpl2Plus;
longDescription = ''
Dulwich is a Python implementation of the Git file formats and protocols, which
does not depend on Git itself. All functionality is available in pure Python.
'';
homepage = "https://www.dulwich.io/";
changelog = "https://github.com/dulwich/dulwich/blob/dulwich-${version}/NEWS";
license = with licenses; [ asl20 gpl2Plus];
maintainers = with maintainers; [ koral ];
};
}

View file

@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pyahocorasick";
version = "1.4.0";
src = fetchFromGitHub {
owner = "WojciechMula";
repo = pname;
rev = version;
sha256 = "0plm9x2gziayjsl7flsgn1z8qx88c9vqm4fs1wq7dv7fr188liik";
};
checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "unittests.py" ];
pythonImportsCheck = [ "ahocorasick" ];
meta = with lib; {
description = "Python module implementing Aho-Corasick algorithm";
longDescription = ''
This Python module is a fast and memory efficient library for exact or
approximate multi-pattern string search meaning that you can find multiple
key strings occurrences at once in some input text.
'';
homepage = "https://github.com/WojciechMula/pyahocorasick";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -1,29 +1,53 @@
{ lib, buildPythonApplication, fetchFromGitHub, isPy27, pyyaml, unidiff, configparser, enum34, future, functools32, mock, pytest }:
{ lib
, buildPythonApplication
, configparser
, enum34
, fetchFromGitHub
, functools32
, future
, isPy27
, mock
, pyahocorasick
, pytestCheckHook
, pyyaml
, requests
, responses
, unidiff
}:
buildPythonApplication rec {
pname = "detect-secrets";
version = "0.12.4";
version = "0.14.3";
disabled = isPy27;
# PyPI tarball doesn't ship tests
src = fetchFromGitHub {
owner = "Yelp";
repo = "detect-secrets";
repo = pname;
rev = "v${version}";
sha256 = "01y5xd0irxxib4wnf5834gwa7ibb81h5y4dl8b26gyzgvm5zfpk1";
sha256 = "0c4hxih9ljmv0d3izq5idyspk5zci26gdb6lv9klwcshwrfkvxj0";
};
propagatedBuildInputs = [ pyyaml ]
++ lib.optionals isPy27 [ configparser enum34 future functools32 ];
propagatedBuildInputs = [
pyyaml
requests
];
checkInputs = [ mock pytest unidiff ];
checkInputs = [
mock
pyahocorasick
pytestCheckHook
responses
unidiff
];
# deselect tests which require git setup
checkPhase = ''
PYTHONPATH=$PWD:$PYTHONPATH pytest \
--deselect tests/main_test.py::TestMain \
--deselect tests/pre_commit_hook_test.py::TestPreCommitHook \
--deselect tests/core/baseline_test.py::TestInitializeBaseline
'';
disabledTests = [
"TestMain"
"TestPreCommitHook"
"TestInitializeBaseline"
];
pythonImportsCheck = [ "detect_secrets" ];
meta = with lib; {
description = "An enterprise friendly way of detecting and preventing secrets in code";

View file

@ -11,6 +11,10 @@ buildGoModule rec {
sha256 = "0r0krbwvx5w1z0yv2qqi92irbsfhkvwvaigy350cvcz9gmcppj4h";
};
buildFlagsArray = [
"-ldflags=-s -w -X main.version=${version}"
];
vendorSha256 = "1macwm6hybjinwnx62v146yxydcn5k5r587nxwkf4ffy76s2m3jc";
doCheck = true;

View file

@ -1,14 +1,11 @@
{ luarocks, fetchFromGitHub }:
luarocks.overrideAttrs(old: {
pname = "luarocks-nix";
version = "2019-09-07";
version = "2021-01-22";
src = fetchFromGitHub {
owner = "nix-community";
repo = "luarocks-nix";
rev = "73b8772e56fd39dfffda9e3b13e9eb31e93d5cde";
sha256 = "00jgshygw439pbaxg7yph3ijia6nid9r1br416wdbyl5wqhlhm1y";
rev = "v3.5.0_nix";
sha256 = "sha256-Ea3PVkCaUPO/mvVZtHtD1G9T/Yom28M9oN6duY4ovHk=";
};
patches = [
./darwin-3.1.3.patch
];
})

View file

@ -0,0 +1,45 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, sfml
, glm
, python3
, glew
, pkg-config
, SDL2 }:
stdenv.mkDerivation rec {
pname = "SHADERed";
version = "1.4.1";
src = fetchFromGitHub {
owner = "dfranx";
repo = pname;
rev = "v${version}";
fetchSubmodules = true;
sha256 = "ivOd4NJgx5KWSDnXSBQLMrdvBuOm8NRzcb2S4lvOrms=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
SDL2
glew
glm
python3
sfml
];
NIX_CFLAGS_COMPILE = "-Wno-error=format-security";
meta = with lib; {
description = "Lightweight, cross-platform & full-featured shader IDE";
homepage = "https://github.com/dfranx/SHADERed";
license = with licenses; [ mit ];
maintainers = with maintainers; [ Scriptkiddi ];
};
}

View file

@ -1,16 +1,16 @@
{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake, jdk8, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase }:
{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake, jdk8, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, libGL }:
let
jdk = jdk8;
libpath = with xorg; lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio ];
libpath = with xorg; lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio libGL ];
in mkDerivation rec {
pname = "multimc";
version = "0.6.11";
version = "unstable-2021-01-17";
src = fetchFromGitHub {
owner = "MultiMC";
repo = "MultiMC5";
rev = version;
sha256 = "1jkbmb4sgfk8d93f5l1vd9pkpvhq9sxacc61w0rvf5xmz0wnszmz";
rev = "02887536f773643313f15442fc82cebf616da54a";
sha256 = "1aykvavcv415lq488hx4ig2a79g5a561jg92gw14fb964r43782i";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake file makeWrapper ];
@ -34,6 +34,6 @@ in mkDerivation rec {
'';
platforms = platforms.linux;
license = licenses.lgpl21Plus;
maintainers = [ maintainers.cleverca22 ];
maintainers = with maintainers; [ cleverca22 starcraft66 ];
};
}

View file

@ -35,7 +35,7 @@ let
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)
# https://github.com/gradle/gradle/issues/4426
${stdenv.lib.optionalString stdenv.isDarwin "export TERM=dumb"}
${lib.optionalString stdenv.isDarwin "export TERM=dumb"}
gradle --no-daemon desktop:release
'';
# perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar)
@ -57,7 +57,7 @@ in stdenv.mkDerivation rec {
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)
# https://github.com/gradle/gradle/issues/4426
${stdenv.lib.optionalString stdenv.isDarwin "export TERM=dumb"}
${lib.optionalString stdenv.isDarwin "export TERM=dumb"}
# point to offline repo
sed -ie "s#repositories {#repositories { maven { url '${deps}' };#g" build.gradle
gradle --offline --no-daemon desktop:release

View file

@ -698,7 +698,7 @@ self: super: {
ln -s ${fzy-lua-native}/static $target/${fzy-lua-native-path}/static
ln -s ${fzy-lua-native}/lua $target/${fzy-lua-native-path}/lua
'';
meta.platforms = stdenv.lib.platforms.all;
meta.platforms = lib.platforms.all;
});
} // (

View file

@ -1,10 +1,10 @@
{ stdenv, requireFile, lib }:
{ buildPlatform, requireFile, targetPlatform, lib }:
let requireXcode = version: sha256:
let
xip = "Xcode_" + version + ".xip";
# TODO(alexfmpe): Find out how to validate the .xip signature in Linux
unxip = if stdenv.isDarwin
unxip = if buildPlatform.isDarwin
then ''
open -W ${xip}
rm -rf ${xip}
@ -53,6 +53,19 @@ in lib.makeExtensible (self: {
xcode_10_2_1 = requireXcode "10.2.1" "11sdb54nr0x7kp987qq839x6k5gdx7vqdxjiy5xm5279n1n47bmg";
xcode_10_3 = requireXcode "10.3" "1i628vfn6zad81fsz3zpc6z15chhskvyp8qnajp2wnpzvrwl6ngb";
xcode_11 = requireXcode "11" "1r03j3kkp4blfp2kqpn538w3dx57ms930fj8apjkq6dk7fv3jcqh";
xcode_11_1 = requireXcode "11.1" "1c2gzc4jhhx5a7ncg19sh1r99izhipybaqxl1ll52x5y8689awc1";
xcode_11_2 = requireXcode "11.2" "1lm3q8zpvm184246h5j9mw4c1y9kk9sxnr3j98kfm0312n0l98gj";
xcode_11_3 = requireXcode "11.3" "04rv6xlywy8xqfx9ma8ygsdw4yhckk2mq0qnklxnfly899iw4wza";
xcode_11_3_1 = requireXcode "11.3.1" "1p6nicj91kr6ad3rmycahd1i7z4hj7ccjs93ixsiximjzaahx3q4";
xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if (stdenv.targetPlatform ? xcodeVer) then stdenv.targetPlatform.xcodeVer else "11.3.1")}";
xcode_11_4 = requireXcode "11.4" "065rpb3rdk19nv3rwyf9bk32ccbd0lld12gj12l89cyg65mhpyy7";
xcode_11_5 = requireXcode "11.5" "1dizazq9nz1vjkc5gy7dd4x760mkfjiifk1hf6d9mscchdq8rfkw";
xcode_11_6 = requireXcode "11.6" "1y4fhw1kiphzxdb4wpv697z5r0algvaldwq5iqv266797rnfql4x";
xcode_11_7 = requireXcode "11.7" "0422rdc4j5qwyk59anbybxyfv0p26x0xryszm0wd8i44g66smlmj";
xcode_12 = requireXcode "12" "1w3xm268pyn5m04wv22invd5kr2k4jqllgrzapv6n1sxxynxrh8z";
xcode_12_0_1 = requireXcode "12.0.1" "1p6vd5ai0hh3cq6aflh4h21ar0shxnz8wlkaxwq7liwsdmkwzbl0";
xcode_12_1 = requireXcode "12.1" "1widy74dk43wx8iqgd7arzf6q4kzdmaz8pfwymzs8chnq9dqr3wp";
xcode_12_2 = requireXcode "12.2" "17i0wf4pwrxwfgjw7rpw9mcd59nkmys1k5h2rqsw81snzyxy9j0v";
xcode_12_3 = requireXcode "12.3" "0kwf1y4llysf1p0nsbqyzccn7d77my0ldagr5fi3by4k0xy3d189";
xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if (targetPlatform ? xcodeVer) then targetPlatform.xcodeVer else "12.3")}";
})

View file

@ -1,4 +1,4 @@
{ multiStdenv, fetchurl }:
{ lib, multiStdenv, fetchurl }:
let version = "1.7.4"; in
multiStdenv.mkDerivation {
@ -16,7 +16,7 @@ multiStdenv.mkDerivation {
sed -e s@/bin/bash@"${multiStdenv.shell}"@g -i src/*.sh
'';
meta = with multiStdenv.lib; {
meta = with lib; {
description = "Tool for creating static Linux binaries";
platforms = platforms.linux;
license = licenses.gpl2;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "fiche";
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
doCheck = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "Command line pastebin for sharing terminal output";
longDescription = ''
Fiche is a command line pastebin server for sharing terminal output.

View file

@ -139,7 +139,7 @@ let
outputs = [ "out" "lib" "dev" "pythonsrc" ];
meta = with gcc6Stdenv.lib; {
meta = with lib; {
description = "Open source, distributed, transactional key-value store";
homepage = "https://www.foundationdb.org";
license = licenses.asl20;

View file

@ -1,4 +1,5 @@
{ buildBazelPackage
{ lib
, buildBazelPackage
, fetchFromGitHub
, stdenv
, cmake
@ -109,7 +110,7 @@ buildBazelPackage rec {
"--cxxopt=-Wno-uninitialized"
];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://envoyproxy.io";
description = "Cloud-native edge and service proxy";
license = licenses.asl20;

View file

@ -1,13 +1,13 @@
{ stdenv, glibc }:
with stdenv.lib;
{ lib, stdenv, glibc }:
let
# Sanitizers are not supported on Darwin.
# Sanitizer headers aren't available in older libc++ stdenvs due to a bug
sanitizersWorking = !stdenv.hostPlatform.isMusl && (
(stdenv.cc.isClang && versionAtLeast (getVersion stdenv.cc.name) "5.0.0")
(stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc.name) "5.0.0")
|| (stdenv.cc.isGNU && stdenv.isLinux)
);
staticLibc = optionalString (stdenv.hostPlatform.libc == "glibc") "-L ${glibc.static}/lib";
staticLibc = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "-L ${glibc.static}/lib";
in stdenv.mkDerivation {
name = "cc-wrapper-test";
@ -23,7 +23,7 @@ in stdenv.mkDerivation {
$CXX -o cxx-check ${./cxx-main.cc}
./cxx-check
${optionalString (stdenv.isDarwin && stdenv.cc.isClang) ''
${lib.optionalString (stdenv.isDarwin && stdenv.cc.isClang) ''
printf "checking whether compiler can build with CoreFoundation.framework... " >&2
mkdir -p foo/lib
$CC -framework CoreFoundation -o core-foundation-check ${./core-foundation-main.c}
@ -31,12 +31,12 @@ in stdenv.mkDerivation {
''}
${optionalString (!stdenv.isDarwin) ''
${lib.optionalString (!stdenv.isDarwin) ''
printf "checking whether compiler builds valid static C binaries... " >&2
$CC ${staticLibc} -static -o cc-static ${./cc-main.c}
./cc-static
# our glibc does not have pie enabled yet.
${optionalString (stdenv.hostPlatform.isMusl && stdenv.cc.isGNU) ''
${lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.cc.isGNU) ''
printf "checking whether compiler builds valid static pie C binaries... " >&2
$CC ${staticLibc} -static-pie -o cc-static-pie ${./cc-main.c}
./cc-static-pie
@ -52,7 +52,7 @@ in stdenv.mkDerivation {
printf "checking whether compiler uses NIX_LDFLAGS... " >&2
mkdir -p foo/lib
$CC -shared \
${optionalString stdenv.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \
${lib.optionalString stdenv.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \
-DVALUE=42 \
-o foo/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \
${./foo.c}
@ -68,7 +68,7 @@ in stdenv.mkDerivation {
$CXX -I std-include -nostdinc++ -o nostdinc-main++ ${./nostdinc-main.c}
./nostdinc-main++
${optionalString sanitizersWorking ''
${lib.optionalString sanitizersWorking ''
printf "checking whether sanitizers are fully functional... ">&2
$CC -o sanitizers -fsanitize=address,undefined ${./sanitizers.c}
./sanitizers
@ -77,5 +77,5 @@ in stdenv.mkDerivation {
touch $out
'';
meta.platforms = platforms.all;
meta.platforms = lib.platforms.all;
}

View file

@ -1,4 +1,4 @@
{ stdenv }:
{ lib, stdenv }:
stdenv.mkDerivation {
name = "cc-multilib-test";
@ -33,5 +33,5 @@ stdenv.mkDerivation {
touch $out
'';
meta.platforms = stdenv.lib.platforms.x86_64;
meta.platforms = lib.platforms.x86_64;
}

View file

@ -1,10 +1,10 @@
{ stdenv, runCommandLocal, recurseIntoAttrs, installShellFiles }:
{ lib, stdenv, runCommandLocal, recurseIntoAttrs, installShellFiles }:
let
runTest = name: env: buildCommand:
runCommandLocal "install-shell-files--${name}" ({
nativeBuildInputs = [ installShellFiles ];
meta.platforms = stdenv.lib.platforms.all;
meta.platforms = lib.platforms.all;
} // env) buildCommand;
in

View file

@ -1,4 +1,4 @@
{ stdenv }:
{ lib, stdenv }:
# This tests that libraries listed in LD_LIBRARY_PATH take precedence over those listed in RPATH.
@ -84,5 +84,5 @@ in stdenv.mkDerivation {
touch $out
'';
meta.platforms = stdenv.lib.platforms.linux;
meta.platforms = lib.platforms.linux;
}

View file

@ -1,4 +1,4 @@
{ stdenv, runCommand }:
{ lib, stdenv, runCommand }:
let
bad-shebang = stdenv.mkDerivation {
@ -13,7 +13,7 @@ let
};
in runCommand "patch-shebangs-test" {
passthru = { inherit bad-shebang; };
meta.platforms = stdenv.lib.platforms.all;
meta.platforms = lib.platforms.all;
} ''
printf "checking whether patchShebangs works properly... ">&2
if ! grep -q '^#!/bin/sh' ${bad-shebang}/bin/test; then

View file

@ -1,4 +1,4 @@
{ stdenv }:
{ lib, stdenv }:
let
foo = stdenv.mkDerivation {
@ -12,7 +12,7 @@ let
chmod +x $out/bin/foo
cp ${./foo.c} $out/include/foo.h
$CC -shared \
${stdenv.lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/libfoo.dylib"} \
${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/libfoo.dylib"} \
-o $out/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \
${./foo.c}
'';
@ -30,7 +30,7 @@ let
chmod +x $out/bin/bar
cp ${./bar.c} $dev/include/bar.h
$CC -shared \
${stdenv.lib.optionalString stdenv.isDarwin "-Wl,-install_name,$dev/lib/libbar.dylib"} \
${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$dev/lib/libbar.dylib"} \
-o $dev/lib/libbar${stdenv.hostPlatform.extensions.sharedLibrary} \
${./bar.c}
'';
@ -64,5 +64,5 @@ stdenv.mkDerivation {
touch $out
'';
meta.platforms = stdenv.lib.platforms.all;
meta.platforms = lib.platforms.all;
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, libpng, libjpeg, giflib, perl, pkg-config }:
{ lib, stdenv, fetchFromGitHub, libpng, libjpeg, giflib, perl, pkg-config }:
stdenv.mkDerivation rec {
pname = "metapixel";
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
cp metapixel-sizesort $out/bin/metapixel-sizesort
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/schani/metapixel";
description = "Tool for generating photomosaics";
license = licenses.gpl2Only;

View file

@ -0,0 +1,117 @@
{ lib, clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, fetchgit
, python3Packages, mesa, ninja, pkg-config, protobuf, zinnia, qt5, fcitx5
, jsoncpp, gtest, which, gtk2, unzip, abseil-cpp, breakpad }:
let
inherit (python3Packages) python gyp six;
japanese_usage_dictionary = fetchFromGitHub {
owner = "hiroyuki-komatsu";
repo = "japanese-usage-dictionary";
rev = "e5b3425575734c323e1d947009dd74709437b684";
sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm";
};
# abseil-cpp in nixpkgs is too old
abseil-cpp_2020923 = abseil-cpp.overrideAttrs (old: rec {
version = "20200923.2";
src = fetchFromGitHub {
owner = "abseil";
repo = "abseil-cpp";
rev = version;
sha256 = "G+wkaC4IPtyc/xCUyVFJOcHppPFU7KkhIHjv6uhVKGU=";
};
cmakeFlags = [ "-DCMAKE_CXX_STANDARD=17" "-DBUILD_SHARED_LIBS=ON" ];
});
zipcode_rel = "202011";
jigyosyo = fetchurl {
url = "https://osdn.net/projects/ponsfoot-aur/storage/mozc/jigyosyo-${zipcode_rel}.zip";
sha256 = "j7MkNtd4+QTi91EreVig4/OV0o5y1+KIjEJBEmLK/mY=";
};
x-ken-all = fetchurl {
url =
"https://osdn.net/projects/ponsfoot-aur/storage/mozc/x-ken-all-${zipcode_rel}.zip";
sha256 = "ExS0Cg3rs0I9IOVbZHLt8UEfk8/LmY9oAHPVVlYuTPw=";
};
in clangStdenv.mkDerivation rec {
pname = "fcitx5-mozc";
version = "2.26.4220.102";
src = fetchFromGitHub {
owner = "fcitx";
repo = "mozc";
rev = "1882e33b61673b66d63277f82b4c80ae4e506c10";
sha256 = "R+w0slVFpqtt7PIr1pyupJjRoQsABVZiMdZ9fKGKAqw=";
};
nativeBuildInputs = [ gyp ninja mesa python pkg-config qt5.wrapQtAppsHook six which unzip ];
buildInputs = [ protobuf zinnia qt5.qtbase fcitx5 abseil-cpp_2020923 jsoncpp gtest gtk2 ];
patches = [
# Support linking system abseil-cpp
(fetchpatch {
url = "https://salsa.debian.org/debian/mozc/-/raw/debian/sid/debian/patches/0007-Update-src-base-absl.gyp.patch";
sha256 = "UiS0UScDKyAusXOhc7Bg8dF8ARQQiVTylEhAOxqaZt8=";
})
];
postUnpack = ''
unzip ${x-ken-all} -d $sourceRoot/src/
unzip ${jigyosyo} -d $sourceRoot/src/
rmdir $sourceRoot/src/third_party/breakpad/
ln -s ${breakpad} $sourceRoot/src/third_party/breakpad
rmdir $sourceRoot/src/third_party/gtest/
ln -s ${gtest} $sourceRoot/src/third_party/gtest
rmdir $sourceRoot/src/third_party/gyp/
ln -s ${gyp} $sourceRoot/src/third_party/gyp
rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/
ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary
'';
# Copied from https://github.com/archlinux/svntogit-community/blob/packages/fcitx5-mozc/trunk/PKGBUILD
configurePhase = ''
cd src
export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 use_libabseil=1"
# disable fcitx4
rm unix/fcitx/fcitx.gyp
# gen zip code seed
PYTHONPATH="$PWD:$PYTHONPATH" python dictionary/gen_zip_code_seed.py --zip_code="x-ken-all.csv" --jigyosyo="JIGYOSYO.CSV" >> data/dictionary_oss/dictionary09.txt
# use libstdc++ instead of libc++
sed "/stdlib=libc++/d;/-lc++/d" -i gyp/common.gypi
# run gyp
python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc
'';
buildPhase = ''
python build_mozc.py build -c Release \
server/server.gyp:mozc_server \
gui/gui.gyp:mozc_tool \
unix/fcitx5/fcitx5.gyp:fcitx5-mozc
'';
installPhase = ''
export PREFIX=$out
export _bldtype=Release
../scripts/install_server
install -d $out/share/licenses/fcitx5-mozc
head -n 29 server/mozc_server.cc > $out/share/licenses/fcitx5-mozc/LICENSE
install -m644 data/installer/*.html $out/share/licenses/fcitx5-mozc/
install -d $out/share/fcitx5/addon
install -d $out/share/fcitx5/inputmethod
install -d $out/lib/fcitx5
../scripts/install_fcitx5
'';
meta = with lib; {
description = "Fcitx5 Module of A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)";
homepage = "https://github.com/fcitx/mozc";
license = licenses.bsd3;
maintainers = with maintainers; [ berberman ];
platforms = platforms.linux;
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub
{ lib, stdenv, fetchFromGitHub
, autoreconfHook, pkg-config
, liblxi, readline, lua
}:
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
buildInputs = [ liblxi readline lua ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Tool for communicating with LXI compatible instruments";
longDescription = ''
lxi-tools is a collection of open source software tools

View file

@ -45,7 +45,7 @@ common =
[ autoreconfHook
autoconf-archive
bison flex
lowdown mdbook
(lib.getBin lowdown) mdbook
jq
];
@ -55,7 +55,7 @@ common =
]
++ lib.optionals stdenv.isDarwin [ Security ]
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optionals is24 [ libarchive gmock ]
++ lib.optionals is24 [ libarchive gmock lowdown ]
++ lib.optional withLibseccomp libseccomp
++ lib.optional withAWS
((aws-sdk-cpp.override {

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation {
# source-highlight uses it's own binary to generate documentation.
# During cross-compilation, that binary was built for the target
# platform architecture, so it can't run on the build host.
patchPhase = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
patchPhase = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
substituteInPlace Makefile.in --replace "src doc tests" "src tests"
'';

View file

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
pname = "lowdown";
version = "0.7.9";
outputs = [ "out" "dev" ];
outputs = [ "out" "lib" "dev" "man" ];
src = fetchurl {
url = "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-${version}.tar.gz";
@ -16,9 +16,12 @@ stdenv.mkDerivation rec {
configurePhase = ''
./configure PREFIX=''${!outputDev} \
BINDIR=''${!outputBin}/bin \
MANDIR=''${!outputBin}/share/man
LIBDIR=''${!outputLib}/lib \
MANDIR=''${!outputMan}/share/man
'';
patches = lib.optional (!stdenv.hostPlatform.isStatic) ./shared.patch;
meta = with lib; {
homepage = "https://kristaps.bsd.lv/lowdown/";
description = "Simple markdown translator";

View file

@ -0,0 +1,41 @@
diff --git a/Makefile b/Makefile
index 955f737..2c9532c 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,7 @@ REGRESS_ARGS += "--parse-no-autolink"
REGRESS_ARGS += "--parse-no-cmark"
REGRESS_ARGS += "--parse-no-deflists"
-all: lowdown lowdown-diff lowdown.pc
+all: lowdown lowdown-diff liblowdown.so lowdown.pc
www: $(HTMLS) $(PDFS) $(THUMBS) lowdown.tar.gz lowdown.tar.gz.sha512
@@ -101,6 +101,9 @@ lowdown-diff: lowdown
liblowdown.a: $(OBJS) $(COMPAT_OBJS)
$(AR) rs $@ $(OBJS) $(COMPAT_OBJS)
+liblowdown.so: $(OBJS) $(COMPAT_OBJS)
+ $(CC) -shared -o $@ $(OBJS) $(COMPAT_OBJS) $(LDFLAGS)
+
install: all
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
@@ -111,7 +114,7 @@ install: all
$(INSTALL_DATA) lowdown.pc $(DESTDIR)$(LIBDIR)/pkgconfig
$(INSTALL_PROGRAM) lowdown $(DESTDIR)$(BINDIR)
$(INSTALL_PROGRAM) lowdown-diff $(DESTDIR)$(BINDIR)
- $(INSTALL_LIB) liblowdown.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL_LIB) liblowdown.so $(DESTDIR)$(LIBDIR)
$(INSTALL_DATA) lowdown.h $(DESTDIR)$(INCLUDEDIR)
for f in $(MANS) ; do \
name=`basename $$f .html` ; \
@@ -199,7 +202,7 @@ main.o: lowdown.h
clean:
rm -f $(OBJS) $(COMPAT_OBJS) main.o
- rm -f lowdown lowdown-diff liblowdown.a lowdown.pc
+ rm -f lowdown lowdown-diff liblowdown.so lowdown.pc
rm -f index.xml diff.xml diff.diff.xml README.xml lowdown.tar.gz.sha512 lowdown.tar.gz
rm -f $(PDFS) $(HTMLS) $(THUMBS)

View file

@ -156,6 +156,8 @@ in
bacnet-stack = callPackage ../tools/networking/bacnet-stack {};
breakpad = callPackage ../development/misc/breakpad { };
# Zip file format only allows times after year 1980, which makes e.g. Python wheel building fail with:
# ValueError: ZIP does not support timestamps before 1980
ensureNewerSourcesForZipFilesHook = ensureNewerSourcesHook { year = "1980"; };
@ -4016,6 +4018,8 @@ in
fcitx5-chinese-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { };
fcitx5-mozc = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-mozc.nix { };
fcitx5-configtool = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { };
fcitx5-lua = callPackage ../tools/inputmethods/fcitx5/fcitx5-lua.nix { };
@ -7682,6 +7686,8 @@ in
shadowsocks-libev = callPackage ../tools/networking/shadowsocks-libev { };
shadered = callPackage ../development/tools/shadered { };
go-shadowsocks2 = callPackage ../tools/networking/go-shadowsocks2 { };
shabnam-fonts = callPackage ../data/fonts/shabnam-fonts { };
@ -22487,6 +22493,8 @@ in
hdl-dump = callPackage ../tools/misc/hdl-dump { };
hpack = haskell.lib.justStaticExecutables haskellPackages.hpack;
hpcg = callPackage ../tools/misc/hpcg/default.nix { };
hpl = callPackage ../tools/misc/hpl { };
@ -27163,6 +27171,7 @@ in
dash-to-panel = callPackage ../desktops/gnome-3/extensions/dash-to-panel { };
draw-on-your-screen = callPackage ../desktops/gnome-3/extensions/draw-on-your-screen { };
drop-down-terminal = callPackage ../desktops/gnome-3/extensions/drop-down-terminal { };
dynamic-panel-transparency = callPackage ../desktops/gnome-3/extensions/dynamic-panel-transparency { };
easyScreenCast = callPackage ../desktops/gnome-3/extensions/EasyScreenCast { };
emoji-selector = callPackage ../desktops/gnome-3/extensions/emoji-selector { };
freon = callPackage ../desktops/gnome-3/extensions/freon { };

View file

@ -5124,6 +5124,8 @@ in {
pyaftership = callPackage ../development/python-modules/pyaftership { };
pyahocorasick = callPackage ../development/python-modules/pyahocorasick { };
pyairvisual = callPackage ../development/python-modules/pyairvisual { };
pyalgotrade = callPackage ../development/python-modules/pyalgotrade { };