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 start with the package name.
* Not have a period at the end. * Not have a period at the end.
* `meta.license` must be set and fit the upstream license. * `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. * `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). 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 = { iphone64 = {
config = "aarch64-apple-ios"; config = "aarch64-apple-ios";
# config = "aarch64-apple-darwin14"; # config = "aarch64-apple-darwin14";
sdkVer = "13.2"; sdkVer = "14.3";
xcodeVer = "11.3.1"; xcodeVer = "12.3";
xcodePlatform = "iPhoneOS"; xcodePlatform = "iPhoneOS";
useiOSPrebuilt = true; useiOSPrebuilt = true;
}; };
@ -188,8 +188,8 @@ rec {
iphone32 = { iphone32 = {
config = "armv7a-apple-ios"; config = "armv7a-apple-ios";
# config = "arm-apple-darwin10"; # config = "arm-apple-darwin10";
sdkVer = "13.2"; sdkVer = "14.3";
xcodeVer = "11.3.1"; xcodeVer = "12.3";
xcodePlatform = "iPhoneOS"; xcodePlatform = "iPhoneOS";
useiOSPrebuilt = true; useiOSPrebuilt = true;
}; };
@ -197,8 +197,8 @@ rec {
iphone64-simulator = { iphone64-simulator = {
config = "x86_64-apple-ios"; config = "x86_64-apple-ios";
# config = "x86_64-apple-darwin14"; # config = "x86_64-apple-darwin14";
sdkVer = "13.2"; sdkVer = "14.3";
xcodeVer = "11.3.1"; xcodeVer = "12.3";
xcodePlatform = "iPhoneSimulator"; xcodePlatform = "iPhoneSimulator";
useiOSPrebuilt = true; useiOSPrebuilt = true;
}; };
@ -206,8 +206,8 @@ rec {
iphone32-simulator = { iphone32-simulator = {
config = "i686-apple-ios"; config = "i686-apple-ios";
# config = "i386-apple-darwin11"; # config = "i386-apple-darwin11";
sdkVer = "13.2"; sdkVer = "14.3";
xcodeVer = "11.3.1"; xcodeVer = "12.3";
xcodePlatform = "iPhoneSimulator"; xcodePlatform = "iPhoneSimulator";
useiOSPrebuilt = true; useiOSPrebuilt = true;
}; };

View file

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

View file

@ -6,7 +6,7 @@ basexx,,,,,
binaryheap,,,,,vcunat binaryheap,,,,,vcunat
bit32,,,,lua5_1,lblasc bit32,,,,lua5_1,lblasc
busted,,,,, busted,,,,,
cassowary,,,,,marsam cassowary,,,,,marsam alerque
cjson,lua-cjson,,,, cjson,lua-cjson,,,,
compat53,,,,,vcunat compat53,,,,,vcunat
cosmo,,,,,marsam 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 These packages are manually refined in lua-overrides.nix
*/ */
{ self, stdenv, fetchurl, fetchgit, pkgs, ... } @ args: { self, stdenv, lib, fetchurl, fetchgit, pkgs, ... } @ args:
self: super: self: super:
with self; with self;
{ {

View file

@ -1,7 +1,7 @@
<chapter xmlns="http://docbook.org/ns/docbook" <chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-contributing"> xml:id="chap-contributing">
<title>Contributing to this documentation</title> <title>Contributing to this manual</title>
<para> <para>
The DocBook sources of NixOS' manual are in the <filename The DocBook sources of NixOS' manual are in the <filename
xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual"> 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 xlink:href="https://discourse.nixos.org">Discourse</literal> or
on the <link on the <link
xlink:href="irc://irc.freenode.net/#nixos"> 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 reported in
<link <link
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS

View file

@ -42,6 +42,7 @@ in
<itemizedlist> <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>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>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>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>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> <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, ... }: { import ./make-test-python.nix ({ pkgs, ... }: {
name = "usbguard"; name = "usbguard";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ tnias ]; maintainers = [ tnias ];
}; };

View file

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

View file

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

View file

@ -38,10 +38,10 @@ in mkDerivation rec {
passthru.updateScript = writeScript "${pname}-updater" '' passthru.updateScript = writeScript "${pname}-updater" ''
#!${stdenv.shell} #!${stdenv.shell}
set -eu -o pipefail 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')" 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 # 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 # We need to clear it before each run
update-source-version ${pname} 0 $(yes 0 | head -64 | tr -d "\n") --system=$platform 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 { stdenv.mkDerivation rec {
pname = "klog"; pname = "klog";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
qmakeFlags = [ "KLog.pro" ]; qmakeFlags = [ "KLog.pro" ];
meta = with stdenv.lib; { meta = with lib; {
description = "A multiplatform free hamradio logger"; description = "A multiplatform free hamradio logger";
longDescription = '' longDescription = ''
KLog provides QSO management, useful QSL management DX-Cluster client, DXCC management, 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 { gccStdenv.mkDerivation rec {
version = "3.7.2"; version = "3.7.2";
@ -14,7 +14,7 @@ gccStdenv.mkDerivation rec {
buildFlags = [ "thread" "mpis" ]; buildFlags = [ "thread" "mpis" ];
preInstall = "mkdir -p $out/man/man1"; 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"; description = "Estimates population size, migration, population splitting parameters using genetic/genomic data";
homepage = "https://peterbeerli.com/migrate-html5/index.html"; homepage = "https://peterbeerli.com/migrate-html5/index.html";
license = licenses.mit; license = licenses.mit;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -46,8 +46,8 @@ stdenv.mkDerivation {
) )
''; '';
meta = { meta = with lib; {
platforms = stdenv.lib.platforms.unix; platforms = platforms.unix;
description = "An LD_PRELOAD library to intercept and rewrite the paths in glibc calls"; description = "An LD_PRELOAD library to intercept and rewrite the paths in glibc calls";
longDescription = '' longDescription = ''
libredirect is an LD_PRELOAD library to intercept and rewrite the paths in 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 ? [], { name, version, buildInputs ? [],
createFindlibDestdir ? true, createFindlibDestdir ? true,
@ -14,7 +14,7 @@ let
}; };
in in
assert minimumSupportedOcamlVersion != null -> assert minimumSupportedOcamlVersion != null ->
stdenv.lib.versionOlder minimumSupportedOcamlVersion ocaml.version; lib.versionOlder minimumSupportedOcamlVersion ocaml.version;
stdenv.mkDerivation (args // { stdenv.mkDerivation (args // {
name = "ocaml-${name}-${version}"; 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: { pname, version, buildInputs ? [], enableParallelBuilding ? true, ... }@args:
let Dune = if args.useDune2 or false then dune_2 else dune; in let Dune = if args.useDune2 or false then dune_2 else dune; in
if args ? minimumOCamlVersion && 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}" then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
else 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 []; }, { pname, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
minimumOCamlVersion ? null, minimumOCamlVersion ? null,
@ -8,7 +8,7 @@
}@args: }@args:
if args ? minimumOCamlVersion && 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}" then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
else else

View file

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

View file

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

View file

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

View file

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

View file

@ -12,7 +12,7 @@
, doCoverityAnalysis ? false , doCoverityAnalysis ? false
, lcovFilter ? [] , lcovFilter ? []
, lcovExtraTraceFiles ? [] , lcovExtraTraceFiles ? []
, src, stdenv , src, lib, stdenv
, name ? if doCoverageAnalysis then "nix-coverage" else "nix-build" , name ? if doCoverageAnalysis then "nix-coverage" else "nix-build"
, failureHook ? null , failureHook ? null
, prePhases ? [] , prePhases ? []
@ -69,7 +69,7 @@ stdenv.mkDerivation (
fi fi
''; '';
failureHook = (stdenv.lib.optionalString (failureHook != null) failureHook) + failureHook = (lib.optionalString (failureHook != null) failureHook) +
'' ''
if test -n "$succeedOnFailure"; then if test -n "$succeedOnFailure"; then
if test -n "$keepBuildDirectory"; then if test -n "$keepBuildDirectory"; then
@ -136,10 +136,10 @@ stdenv.mkDerivation (
buildInputs = buildInputs =
buildInputs ++ buildInputs ++
(stdenv.lib.optional doCoverageAnalysis args.makeGCOVReport) ++ (lib.optional doCoverageAnalysis args.makeGCOVReport) ++
(stdenv.lib.optional doClangAnalysis args.clang-analyzer) ++ (lib.optional doClangAnalysis args.clang-analyzer) ++
(stdenv.lib.optional doCoverityAnalysis args.cov-build) ++ (lib.optional doCoverityAnalysis args.cov-build) ++
(stdenv.lib.optional doCoverityAnalysis args.xz); (lib.optional doCoverityAnalysis args.xz);
lcovFilter = ["/nix/store/*"] ++ lcovFilter; 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, openssl, sqlite, zlib, dbus, dbus-glib, gdk-pixbuf, cairo, python3,
libsodium, postgresql, gmp, foundationdb, capnproto, nettle, clang, libsodium, postgresql, gmp, foundationdb, capnproto, nettle, clang,
llvmPackages, ... }: llvmPackages, ... }:
@ -17,7 +17,7 @@ in
cargo = attrs: { cargo = attrs: {
buildInputs = [ openssl zlib curl ] buildInputs = [ openssl zlib curl ]
++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ]; ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ];
}; };
libz-sys = attrs: { libz-sys = attrs: {
@ -149,7 +149,7 @@ in
}; };
serde_derive = attrs: { serde_derive = attrs: {
buildInputs = stdenv.lib.optional stdenv.isDarwin Security; buildInputs = lib.optional stdenv.isDarwin Security;
}; };
thrussh-libsodium = attrs: { thrussh-libsodium = attrs: {

View file

@ -1,4 +1,5 @@
{ stdenv { stdenv
, lib
, buildPackages , buildPackages
, cacert , cacert
, cargo , cargo
@ -83,13 +84,13 @@ let
cargoDepsCopy="$sourceRoot/${cargoVendorDir}" cargoDepsCopy="$sourceRoot/${cargoVendorDir}"
''; '';
targetIsJSON = stdenv.lib.hasSuffix ".json" target; targetIsJSON = lib.hasSuffix ".json" target;
useSysroot = targetIsJSON && !__internal_dontAddSysroot; useSysroot = targetIsJSON && !__internal_dontAddSysroot;
# see https://github.com/rust-lang/cargo/blob/964a16a28e234a3d397b2a7031d4ab4a428b1391/src/cargo/core/compiler/compile_kind.rs#L151-L168 # 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 # the "${}" is needed to transform the path into a /nix/store path before baseNameOf
shortTarget = if targetIsJSON then shortTarget = if targetIsJSON then
(stdenv.lib.removeSuffix ".json" (builtins.baseNameOf "${target}")) (lib.removeSuffix ".json" (builtins.baseNameOf "${target}"))
else target; else target;
sysroot = (callPackage ./sysroot {}) { sysroot = (callPackage ./sysroot {}) {
@ -116,7 +117,7 @@ in
# See https://os.phil-opp.com/testing/ for more information. # See https://os.phil-opp.com/testing/ for more information.
assert useSysroot -> !(args.doCheck or true); 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 ""); RUSTFLAGS = "--sysroot ${sysroot} " + (args.RUSTFLAGS or "");
} // { } // {
inherit cargoDeps; inherit cargoDeps;
@ -124,7 +125,7 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
patchRegistryDeps = ./patch-registry-deps; patchRegistryDeps = ./patch-registry-deps;
nativeBuildInputs = nativeBuildInputs ++ [ cacert git cargo rustc ]; 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; patches = cargoPatches ++ patches;
@ -147,11 +148,11 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
cat >> .cargo/config <<'EOF' cat >> .cargo/config <<'EOF'
[target."${rust.toRustTarget stdenv.buildPlatform}"] [target."${rust.toRustTarget stdenv.buildPlatform}"]
"linker" = "${ccForBuild}" "linker" = "${ccForBuild}"
${stdenv.lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) '' ${lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
[target."${shortTarget}"] [target."${shortTarget}"]
"linker" = "${ccForHost}" "linker" = "${ccForHost}"
${# https://github.com/rust-lang/rust/issues/46651#issuecomment-433611633 ${# 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" ] "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 # After unpacking and applying patches, check that the Cargo.lock matches our
# src package. Note that we do this after the patchPhase, because the # src package. Note that we do this after the patchPhase, because the
# patchPhase may create the Cargo.lock if upstream has not shipped one. # 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 cargoDepsLockfile=$NIX_BUILD_TOP/$cargoDepsCopy/Cargo.lock
srcLockfile=$NIX_BUILD_TOP/$sourceRoot/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 '' buildPhase = with builtins; args.buildPhase or ''
${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"} ${lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}
runHook preBuild runHook preBuild
( (
@ -217,14 +218,14 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optional
"CC_${rust.toRustTarget stdenv.hostPlatform}"="${ccForHost}" \ "CC_${rust.toRustTarget stdenv.hostPlatform}"="${ccForHost}" \
"CXX_${rust.toRustTarget stdenv.hostPlatform}"="${cxxForHost}" \ "CXX_${rust.toRustTarget stdenv.hostPlatform}"="${cxxForHost}" \
cargo build -j $NIX_BUILD_CORES \ cargo build -j $NIX_BUILD_CORES \
${stdenv.lib.optionalString (buildType == "release") "--release"} \ ${lib.optionalString (buildType == "release") "--release"} \
--target ${target} \ --target ${target} \
--frozen ${concatStringsSep " " cargoBuildFlags} --frozen ${concatStringsSep " " cargoBuildFlags}
) )
runHook postBuild 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 # 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 # 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 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"; threads = if cargoParallelTestThreads then "$NIX_BUILD_CORES" else "1";
in '' in ''
${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"} ${lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}
runHook preCheck runHook preCheck
echo "Running cargo test ${argstr} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}" echo "Running cargo test ${argstr} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
cargo test -j $NIX_BUILD_CORES ${argstr} -- --test-threads=${threads} ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"} cargo test -j $NIX_BUILD_CORES ${argstr} -- --test-threads=${threads} ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"}
runHook postCheck runHook postCheck
${stdenv.lib.optionalString (buildAndTestSubdir != null) "popd"} ${lib.optionalString (buildAndTestSubdir != null) "popd"}
''); '');
doCheck = args.doCheck or true; 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 { let cargo-vendor-normalise = stdenv.mkDerivation {
name = "cargo-vendor-normalise"; name = "cargo-vendor-normalise";
src = ./cargo-vendor-normalise.py; src = ./cargo-vendor-normalise.py;
@ -80,7 +80,7 @@ in stdenv.mkDerivation ({
inherit (hash_) outputHashAlgo outputHash; inherit (hash_) outputHashAlgo outputHash;
impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars; impureEnvVars = lib.fetchers.proxyImpureEnvVars;
} // (builtins.removeAttrs args [ } // (builtins.removeAttrs args [
"name" "sha256" "cargoUpdateHook" "name" "sha256" "cargoUpdateHook"
])) ]))

View file

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

View file

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

View file

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

View file

@ -1,10 +1,10 @@
{ stdenv }: { lib, stdenv }:
args: args:
stdenv.mkDerivation ({ stdenv.mkDerivation ({
name = if args ? name then args.name else baseNameOf (toString args.src); 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 source $stdenv/setup
set -o pipefail set -o pipefail
@ -13,7 +13,7 @@ stdenv.mkDerivation ({
args= args=
pushd "$src" 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")" mkdir -p "$out/$(dirname "$line")"
substituteAll "$line" "$out/$line" substituteAll "$line" "$out/$line"
done done

View file

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

View file

@ -1,4 +1,5 @@
{ pkgs { lib
, pkgs
, kernel ? pkgs.linux , kernel ? pkgs.linux
, img ? pkgs.stdenv.hostPlatform.linux-kernel.target , img ? pkgs.stdenv.hostPlatform.linux-kernel.target
, storeDir ? builtins.storeDir , storeDir ? builtins.storeDir
@ -572,7 +573,7 @@ rec {
buildCommand = '' buildCommand = ''
${createRootFS} ${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 # Unpack the .debs. We do this to prevent pre-install scripts
# (which have lots of circular dependencies) from barfing. # (which have lots of circular dependencies) from barfing.

View file

@ -196,7 +196,7 @@ let
in runCommand "test-writers" { in runCommand "test-writers" {
passthru = { inherit writeTest bin simple; }; 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}/bin/test_writers") (lib.attrValues bin)}
${lib.concatMapStringsSep "\n" (test: writeTest "success" test) (lib.attrValues simple)} ${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 { stdenv.mkDerivation {
name = "common-updater-scripts"; name = "common-updater-scripts";
@ -12,7 +12,7 @@ stdenv.mkDerivation {
cp ${./scripts}/* $out/bin cp ${./scripts}/* $out/bin
for f in $out/bin/*; do 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 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 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: self: super:
with self; 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 { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-CLK1gJj/YX0RVAVsefinC+7Rj3z6cQvKI6ByGWkQ1bQ="; sha256 = "1d6m21lijwm04g50nwgsgj7x3vhblzw7jv05ah8psqgzk20bbch8";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -39,8 +39,14 @@ buildPythonPackage rec {
# No tests in archive # No tests in archive
doCheck = false; doCheck = false;
meta = { meta = with lib; {
description = "A simple, correct PEP517 package builder"; description = "Simple, correct PEP517 package builder";
license = lib.licenses.mit; 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 }: , git, glibcLocales }:
buildPythonPackage rec { buildPythonPackage rec {
version = "0.20.14"; version = "0.20.15";
pname = "dulwich"; pname = "dulwich";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "21d6ee82708f7c67ce3fdcaf1f1407e524f7f4f7411a410a972faa2176baec0d"; sha256 = "1248942fr12av2rkzpm2fq0qn6rajvv2lcgq65h8kby27qvp65zv";
}; };
LC_ALL = "en_US.UTF-8"; LC_ALL = "en_US.UTF-8";
@ -23,8 +23,13 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "Simple Python implementation of the Git file formats and protocols"; description = "Simple Python implementation of the Git file formats and protocols";
homepage = "https://samba.org/~jelmer/dulwich/"; longDescription = ''
license = licenses.gpl2Plus; 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 ]; 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 { buildPythonApplication rec {
pname = "detect-secrets"; pname = "detect-secrets";
version = "0.12.4"; version = "0.14.3";
disabled = isPy27;
# PyPI tarball doesn't ship tests # PyPI tarball doesn't ship tests
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Yelp"; owner = "Yelp";
repo = "detect-secrets"; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "01y5xd0irxxib4wnf5834gwa7ibb81h5y4dl8b26gyzgvm5zfpk1"; sha256 = "0c4hxih9ljmv0d3izq5idyspk5zci26gdb6lv9klwcshwrfkvxj0";
}; };
propagatedBuildInputs = [ pyyaml ] propagatedBuildInputs = [
++ lib.optionals isPy27 [ configparser enum34 future functools32 ]; pyyaml
requests
];
checkInputs = [ mock pytest unidiff ]; checkInputs = [
mock
pyahocorasick
pytestCheckHook
responses
unidiff
];
# deselect tests which require git setup disabledTests = [
checkPhase = '' "TestMain"
PYTHONPATH=$PWD:$PYTHONPATH pytest \ "TestPreCommitHook"
--deselect tests/main_test.py::TestMain \ "TestInitializeBaseline"
--deselect tests/pre_commit_hook_test.py::TestPreCommitHook \ ];
--deselect tests/core/baseline_test.py::TestInitializeBaseline
''; pythonImportsCheck = [ "detect_secrets" ];
meta = with lib; { meta = with lib; {
description = "An enterprise friendly way of detecting and preventing secrets in code"; description = "An enterprise friendly way of detecting and preventing secrets in code";

View file

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

View file

@ -1,14 +1,11 @@
{ luarocks, fetchFromGitHub }: { luarocks, fetchFromGitHub }:
luarocks.overrideAttrs(old: { luarocks.overrideAttrs(old: {
pname = "luarocks-nix"; pname = "luarocks-nix";
version = "2019-09-07"; version = "2021-01-22";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nix-community"; owner = "nix-community";
repo = "luarocks-nix"; repo = "luarocks-nix";
rev = "73b8772e56fd39dfffda9e3b13e9eb31e93d5cde"; rev = "v3.5.0_nix";
sha256 = "00jgshygw439pbaxg7yph3ijia6nid9r1br416wdbyl5wqhlhm1y"; 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 let
jdk = jdk8; 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 { in mkDerivation rec {
pname = "multimc"; pname = "multimc";
version = "0.6.11"; version = "unstable-2021-01-17";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "MultiMC"; owner = "MultiMC";
repo = "MultiMC5"; repo = "MultiMC5";
rev = version; rev = "02887536f773643313f15442fc82cebf616da54a";
sha256 = "1jkbmb4sgfk8d93f5l1vd9pkpvhq9sxacc61w0rvf5xmz0wnszmz"; sha256 = "1aykvavcv415lq488hx4ig2a79g5a561jg92gw14fb964r43782i";
fetchSubmodules = true; fetchSubmodules = true;
}; };
nativeBuildInputs = [ cmake file makeWrapper ]; nativeBuildInputs = [ cmake file makeWrapper ];
@ -34,6 +34,6 @@ in mkDerivation rec {
''; '';
platforms = platforms.linux; platforms = platforms.linux;
license = licenses.lgpl21Plus; license = licenses.lgpl21Plus;
maintainers = [ maintainers.cleverca22 ]; maintainers = with maintainers; [ cleverca22 starcraft66 ];
}; };
} }

View file

@ -35,7 +35,7 @@ let
buildPhase = '' buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d) export GRADLE_USER_HOME=$(mktemp -d)
# https://github.com/gradle/gradle/issues/4426 # 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 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) # 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 = '' buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d) export GRADLE_USER_HOME=$(mktemp -d)
# https://github.com/gradle/gradle/issues/4426 # 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 # point to offline repo
sed -ie "s#repositories {#repositories { maven { url '${deps}' };#g" build.gradle sed -ie "s#repositories {#repositories { maven { url '${deps}' };#g" build.gradle
gradle --offline --no-daemon desktop:release 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}/static $target/${fzy-lua-native-path}/static
ln -s ${fzy-lua-native}/lua $target/${fzy-lua-native-path}/lua 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 requireXcode = version: sha256:
let let
xip = "Xcode_" + version + ".xip"; xip = "Xcode_" + version + ".xip";
# TODO(alexfmpe): Find out how to validate the .xip signature in Linux # TODO(alexfmpe): Find out how to validate the .xip signature in Linux
unxip = if stdenv.isDarwin unxip = if buildPlatform.isDarwin
then '' then ''
open -W ${xip} open -W ${xip}
rm -rf ${xip} rm -rf ${xip}
@ -53,6 +53,19 @@ in lib.makeExtensible (self: {
xcode_10_2_1 = requireXcode "10.2.1" "11sdb54nr0x7kp987qq839x6k5gdx7vqdxjiy5xm5279n1n47bmg"; xcode_10_2_1 = requireXcode "10.2.1" "11sdb54nr0x7kp987qq839x6k5gdx7vqdxjiy5xm5279n1n47bmg";
xcode_10_3 = requireXcode "10.3" "1i628vfn6zad81fsz3zpc6z15chhskvyp8qnajp2wnpzvrwl6ngb"; xcode_10_3 = requireXcode "10.3" "1i628vfn6zad81fsz3zpc6z15chhskvyp8qnajp2wnpzvrwl6ngb";
xcode_11 = requireXcode "11" "1r03j3kkp4blfp2kqpn538w3dx57ms930fj8apjkq6dk7fv3jcqh"; 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_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 let version = "1.7.4"; in
multiStdenv.mkDerivation { multiStdenv.mkDerivation {
@ -16,7 +16,7 @@ multiStdenv.mkDerivation {
sed -e s@/bin/bash@"${multiStdenv.shell}"@g -i src/*.sh 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"; description = "Tool for creating static Linux binaries";
platforms = platforms.linux; platforms = platforms.linux;
license = licenses.gpl2; license = licenses.gpl2;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ stdenv }: { lib, stdenv }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "cc-multilib-test"; name = "cc-multilib-test";
@ -33,5 +33,5 @@ stdenv.mkDerivation {
touch $out 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 let
runTest = name: env: buildCommand: runTest = name: env: buildCommand:
runCommandLocal "install-shell-files--${name}" ({ runCommandLocal "install-shell-files--${name}" ({
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
meta.platforms = stdenv.lib.platforms.all; meta.platforms = lib.platforms.all;
} // env) buildCommand; } // env) buildCommand;
in 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. # 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 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 let
bad-shebang = stdenv.mkDerivation { bad-shebang = stdenv.mkDerivation {
@ -13,7 +13,7 @@ let
}; };
in runCommand "patch-shebangs-test" { in runCommand "patch-shebangs-test" {
passthru = { inherit bad-shebang; }; passthru = { inherit bad-shebang; };
meta.platforms = stdenv.lib.platforms.all; meta.platforms = lib.platforms.all;
} '' } ''
printf "checking whether patchShebangs works properly... ">&2 printf "checking whether patchShebangs works properly... ">&2
if ! grep -q '^#!/bin/sh' ${bad-shebang}/bin/test; then if ! grep -q '^#!/bin/sh' ${bad-shebang}/bin/test; then

View file

@ -1,4 +1,4 @@
{ stdenv }: { lib, stdenv }:
let let
foo = stdenv.mkDerivation { foo = stdenv.mkDerivation {
@ -12,7 +12,7 @@ let
chmod +x $out/bin/foo chmod +x $out/bin/foo
cp ${./foo.c} $out/include/foo.h cp ${./foo.c} $out/include/foo.h
$CC -shared \ $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} \ -o $out/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \
${./foo.c} ${./foo.c}
''; '';
@ -30,7 +30,7 @@ let
chmod +x $out/bin/bar chmod +x $out/bin/bar
cp ${./bar.c} $dev/include/bar.h cp ${./bar.c} $dev/include/bar.h
$CC -shared \ $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} \ -o $dev/lib/libbar${stdenv.hostPlatform.extensions.sharedLibrary} \
${./bar.c} ${./bar.c}
''; '';
@ -64,5 +64,5 @@ stdenv.mkDerivation {
touch $out 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 { stdenv.mkDerivation rec {
pname = "metapixel"; pname = "metapixel";
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
cp metapixel-sizesort $out/bin/metapixel-sizesort cp metapixel-sizesort $out/bin/metapixel-sizesort
''; '';
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://github.com/schani/metapixel"; homepage = "https://github.com/schani/metapixel";
description = "Tool for generating photomosaics"; description = "Tool for generating photomosaics";
license = licenses.gpl2Only; 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 , autoreconfHook, pkg-config
, liblxi, readline, lua , liblxi, readline, lua
}: }:
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
buildInputs = [ liblxi readline lua ]; buildInputs = [ liblxi readline lua ];
meta = with stdenv.lib; { meta = with lib; {
description = "Tool for communicating with LXI compatible instruments"; description = "Tool for communicating with LXI compatible instruments";
longDescription = '' longDescription = ''
lxi-tools is a collection of open source software tools lxi-tools is a collection of open source software tools

View file

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

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation {
# source-highlight uses it's own binary to generate documentation. # source-highlight uses it's own binary to generate documentation.
# During cross-compilation, that binary was built for the target # During cross-compilation, that binary was built for the target
# platform architecture, so it can't run on the build host. # 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" substituteInPlace Makefile.in --replace "src doc tests" "src tests"
''; '';

View file

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
pname = "lowdown"; pname = "lowdown";
version = "0.7.9"; version = "0.7.9";
outputs = [ "out" "dev" ]; outputs = [ "out" "lib" "dev" "man" ];
src = fetchurl { src = fetchurl {
url = "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-${version}.tar.gz"; url = "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-${version}.tar.gz";
@ -16,9 +16,12 @@ stdenv.mkDerivation rec {
configurePhase = '' configurePhase = ''
./configure PREFIX=''${!outputDev} \ ./configure PREFIX=''${!outputDev} \
BINDIR=''${!outputBin}/bin \ 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; { meta = with lib; {
homepage = "https://kristaps.bsd.lv/lowdown/"; homepage = "https://kristaps.bsd.lv/lowdown/";
description = "Simple markdown translator"; 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 {}; 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: # 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 # ValueError: ZIP does not support timestamps before 1980
ensureNewerSourcesForZipFilesHook = ensureNewerSourcesHook { year = "1980"; }; ensureNewerSourcesForZipFilesHook = ensureNewerSourcesHook { year = "1980"; };
@ -4016,6 +4018,8 @@ in
fcitx5-chinese-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; 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-configtool = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { };
fcitx5-lua = callPackage ../tools/inputmethods/fcitx5/fcitx5-lua.nix { }; fcitx5-lua = callPackage ../tools/inputmethods/fcitx5/fcitx5-lua.nix { };
@ -7682,6 +7686,8 @@ in
shadowsocks-libev = callPackage ../tools/networking/shadowsocks-libev { }; shadowsocks-libev = callPackage ../tools/networking/shadowsocks-libev { };
shadered = callPackage ../development/tools/shadered { };
go-shadowsocks2 = callPackage ../tools/networking/go-shadowsocks2 { }; go-shadowsocks2 = callPackage ../tools/networking/go-shadowsocks2 { };
shabnam-fonts = callPackage ../data/fonts/shabnam-fonts { }; shabnam-fonts = callPackage ../data/fonts/shabnam-fonts { };
@ -22487,6 +22493,8 @@ in
hdl-dump = callPackage ../tools/misc/hdl-dump { }; hdl-dump = callPackage ../tools/misc/hdl-dump { };
hpack = haskell.lib.justStaticExecutables haskellPackages.hpack;
hpcg = callPackage ../tools/misc/hpcg/default.nix { }; hpcg = callPackage ../tools/misc/hpcg/default.nix { };
hpl = callPackage ../tools/misc/hpl { }; hpl = callPackage ../tools/misc/hpl { };
@ -27163,6 +27171,7 @@ in
dash-to-panel = callPackage ../desktops/gnome-3/extensions/dash-to-panel { }; dash-to-panel = callPackage ../desktops/gnome-3/extensions/dash-to-panel { };
draw-on-your-screen = callPackage ../desktops/gnome-3/extensions/draw-on-your-screen { }; draw-on-your-screen = callPackage ../desktops/gnome-3/extensions/draw-on-your-screen { };
drop-down-terminal = callPackage ../desktops/gnome-3/extensions/drop-down-terminal { }; 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 { }; easyScreenCast = callPackage ../desktops/gnome-3/extensions/EasyScreenCast { };
emoji-selector = callPackage ../desktops/gnome-3/extensions/emoji-selector { }; emoji-selector = callPackage ../desktops/gnome-3/extensions/emoji-selector { };
freon = callPackage ../desktops/gnome-3/extensions/freon { }; freon = callPackage ../desktops/gnome-3/extensions/freon { };

View file

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