Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2021-08-19 00:02:01 +00:00 committed by GitHub
commit 599a736772
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 901 additions and 685 deletions

View file

@ -12316,4 +12316,10 @@
github = "zupo";
githubId = 311580;
};
rski = {
name = "rski";
email = "rom.skiad+nix@gmail.com";
github = "rski";
githubId = 2960312;
};
}

View file

@ -56,7 +56,7 @@ let
mysqlLocal = cfg.database.createLocally && cfg.database.type == "mysql";
pgsqlLocal = cfg.database.createLocally && cfg.database.type == "pgsql";
phpExt = pkgs.php.withExtensions
phpExt = pkgs.php74.withExtensions
({ enabled, all }: with all; [ iconv mbstring curl openssl tokenizer xmlrpc soap ctype zip gd simplexml dom intl json sqlite3 pgsql pdo_sqlite pdo_pgsql pdo_odbc pdo_mysql pdo mysqli session zlib xmlreader fileinfo filter ]);
in
{

View file

@ -1,12 +1,14 @@
{ lib, fetchurl, pythonPackages, mopidy }:
{ lib, fetchFromGitHub, pythonPackages, mopidy }:
pythonPackages.buildPythonApplication rec {
pname = "mopidy-spotify";
version = "4.1.1";
src = fetchurl {
url = "https://github.com/mopidy/mopidy-spotify/archive/v${version}.tar.gz";
sha256 = "0054gqvnx3brpfxr06dcby0z0dirwv9ydi6gj5iz0cxn0fbi6gv2";
src = fetchFromGitHub {
owner = "mopidy";
repo = "mopidy-spotify";
rev = "v${version}";
sha256 = "1qsac2yy26cdlsmxd523v8ayacs0s6jj9x79sngwap781i63zqrm";
};
propagatedBuildInputs = [ mopidy pythonPackages.pyspotify ];
@ -17,7 +19,7 @@ pythonPackages.buildPythonApplication rec {
homepage = "https://www.mopidy.com/";
description = "Mopidy extension for playing music from Spotify";
license = licenses.asl20;
maintainers = [];
hydraPlatforms = [];
maintainers = with maintainers; [ rski ];
hydraPlatforms = [ ];
};
}

View file

@ -9,13 +9,13 @@
mkDerivation rec {
pname = "spotify-qt";
version = "3.6";
version = "3.7";
src = fetchFromGitHub {
owner = "kraxarn";
repo = pname;
rev = "v${version}";
sha256 = "mKHyE6ZffMYYRLMpzMX53chyJyWxhTAaGvtBI3l6wkI=";
sha256 = "sha256-oRrgZtSDebbUVPc+hxE9GJ2n1AmGvZt/2aWrBMmRtNA=";
};
buildInputs = [ libxcb qtbase qtsvg ];

View file

@ -0,0 +1,40 @@
{ stdenv, lib, fetchFromGitHub
, pkg-config, cmake, libyaml
, jansson, libvorbis, taglib
, zlib
}:
stdenv.mkDerivation rec {
pname = "tagutil";
version = "3.1";
src = fetchFromGitHub {
owner = "kaworu";
repo = pname;
rev = "v${version}";
sha256 = "sha256-oY1aGl5CKVtpOfh8Wskio/huWYMiPuxWPqxlooTutcw=";
};
sourceRoot = "source/src";
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
libvorbis
libyaml
jansson
taglib
zlib
];
meta = with lib; {
description = "Scriptable music files tags tool and editor";
homepage = "https://github.com/kaworu/tagutil";
license = licenses.bsd2;
maintainers = with maintainers; [ dan4ik605743 ];
platforms = platforms.linux;
};
}

View file

@ -1,4 +1,4 @@
{ channel, pname, version, build ? null, sha256Hash }:
{ channel, pname, version, sha256Hash }:
{ alsa-lib
, bash
@ -55,7 +55,7 @@
let
drvName = "android-studio-${channel}-${version}";
filename = "android-studio-" + (if (build != null) then "ide-${build}" else version) + "-linux.tar.gz";
filename = "android-studio-${version}-linux.tar.gz";
androidStudio = stdenv.mkDerivation {
name = "${drvName}-unwrapped";

View file

@ -9,17 +9,16 @@ let
inherit buildFHSUserEnv;
};
stableVersion = {
version = "4.2.2.0"; # "Android Studio 4.2.2"
build = "202.7486908";
sha256Hash = "18zc9xr2xmphj6m6a1ilwripmvqzplp2583afq1pzzz3cv5h8fvk";
version = "2020.3.1.22"; # "Android Studio Arctic Fox (2020.3.1)"
sha256Hash = "0xkjnhq1vvrglcbab90mx5xw1q82lkkvyp6y2ap5jypdfsc7pnsa";
};
betaVersion = {
version = "2020.3.1.21"; # "Android Studio Arctic Fox (2020.3.1) RC 1"
sha256Hash = "04k7c328bl8ixi8bvp2mm33q2hmv40yc9p5dff5cghyycarwpd3f";
};
latestVersion = { # canary & dev
version = "2021.1.1.4"; # "Android Studio Bumblebee (2021.1.1) Canary 4"
sha256Hash = "0s2py7xikzryqrfd9v3in9ia9qv71dd9aad1nzbda6ff61inzizb";
version = "2021.1.1.5"; # "Android Studio Bumblebee (2021.1.1) Canary 5"
sha256Hash = "0fx6nnazg4548rhb11wzaccm5c2si57mj8qwyl5j17x4k5r3m7nh";
};
in {
# Attributes are named by their corresponding release channels

View file

@ -0,0 +1,38 @@
{ lib, fetchurl, appimageTools }:
let
pname = "anytype";
version = "0.18.59";
name = "Anytype-${version}";
nameExecutable = pname;
src = fetchurl {
url = "https://at9412003.fra1.digitaloceanspaces.com/Anytype-${version}.AppImage";
name = "Anytype-${version}.AppImage";
sha256 = "sha256-HDhDd23kXhIFXg+QKPNpR2R6QC4oJCnut+gD//qMK1Y=";
};
appimageContents = appimageTools.extractType2 { inherit name src; };
in
appimageTools.wrapType2 {
inherit name src;
extraPkgs = { pkgs, ... }@args: [
pkgs.gnome3.libsecret
] ++ appimageTools.defaultFhsEnvArgs.multiPkgs args;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/anytype2.desktop -t $out/share/applications
substituteInPlace $out/share/applications/anytype2.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/0x0/apps/anytype2.png \
$out/share/icons/hicolor/512x512/apps/anytype2.png
'';
meta = with lib; {
description = "P2P note-taking tool";
homepage = "https://anytype.io/";
license = licenses.unfree;
maintainers = with maintainers; [ bbigras ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -12,12 +12,12 @@
}:
stdenv.mkDerivation rec {
version = "0.3.6";
version = "0.3.7";
pname = "zathura-pdf-mupdf";
src = fetchurl {
url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz";
sha256 = "1r3v37k9fl2rxipvacgxr36llywvy7n20a25h3ajlyk70697sa66";
sha256 = "07d2ds9yqfrl20z3yfgc55vwg10mwmcg2yvpr4j66jjd5mlal01g";
};
nativeBuildInputs = [ meson ninja pkg-config ];

View file

@ -23,8 +23,7 @@ in
# Remove the symlinks created by symlinkJoin which we need to perform
# extra actions upon
postBuild = ''
rm $out/bin/helm
makeWrapper "${helm}/bin/helm" "$out/bin/helm" "--argv0" "$0" \
wrapProgram "$out/bin/helm" \
"--set" "HELM_PLUGINS" "${pluginsDir}" ${extraMakeWrapperArgs}
'';
paths = [ helm pluginsDir ];

View file

@ -195,9 +195,9 @@ rec {
};
terraform_1_0 = mkTerraform {
version = "1.0.4";
sha256 = "09g0ln247scv8mj40gxhkij0li62v0rjm2bsgmvl953aj7g3dlh1";
vendorSha256 = "07pzqvf9lwgc1fadmyam5hn7arlvzrjsplls445738jpn61854gg";
version = "1.0.5";
sha256 = "0nhxrlnwg76iiqs9hj6ls54176df78ys3356nxmd9ip8jx9ix47v";
vendorSha256 = "08fvp6w8xsv42jjgpr73kyah20g3979rf84ysrq5whvfmrbpzm2f";
patches = [ ./provider-path-0_15.patch ];
passthru = { inherit plugins; };
};

View file

@ -25,7 +25,7 @@ let
else "");
in stdenv.mkDerivation rec {
pname = "signal-desktop";
version = "5.13.1"; # Please backport all updates to the stable channel.
version = "5.14.0"; # Please backport all updates to the stable channel.
# All releases have a limited lifetime and "expire" 90 days after the release.
# When releases "expire" the application becomes unusable until an update is
# applied. The expiration date for the current release can be extracted with:
@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
sha256 = "0k3gbs6y19vri5n087wc6fdhydkis3h6rhxd3w1j9rhrb5fxjv3q";
sha256 = "0rb7ixha07v0l3bm9jbgnlf78l9hhjc9acyd1aji9l4fpq3azbq1";
};
nativeBuildInputs = [

View file

@ -2,13 +2,13 @@
stdenvNoCC.mkDerivation rec {
pname = "mpv-playlistmanager";
version = "unstable-2021-03-09";
version = "unstable-2021-08-17";
src = fetchFromGitHub {
owner = "jonniek";
repo = "mpv-playlistmanager";
rev = "c15a0334cf6d4581882fa31ddb1e6e7f2d937a3e";
sha256 = "uxcvgcSGS61UU8MmuD6qMRqpIa53iasH/vkg1xY7MVc=";
rev = "44d6911856a39e9a4057d19b70f21a9bc18bd6a9";
sha256 = "IwH6XngfrZlKGDab/ut43hzHeino8DmWzWRX8Av21Sk=";
};
postPatch = ''

View file

@ -15,6 +15,8 @@
# TODO(Profpatsch): automatically infer most of these
# : list string
, configureFlags
# : string
, postConfigure ? null
# mostly for moving and deleting files from the build directory
# : lines
, postInstall
@ -79,6 +81,8 @@ in stdenv.mkDerivation {
++ (lib.optional stdenv.isDarwin
"--build=${stdenv.hostPlatform.system}");
inherit postConfigure;
# TODO(Profpatsch): ensure that there is always a $doc output!
postInstall = ''
echo "Cleaning & moving common files"

View file

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, cmake
, coreutils
}:
stdenv.mkDerivation rec {
@ -22,6 +23,13 @@ stdenv.mkDerivation rec {
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests
];
# Prevent the execution of tests known to be flaky.
preCheck = ''
cat <<EOW >CTestCustom.cmake
SET(CTEST_CUSTOM_TESTS_IGNORE promise_test_multiple_waiters)
EOW
'';
doCheck = true;
meta = with lib; {

View file

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "itk";
version = "5.2.0";
version = "5.2.1";
src = fetchFromGitHub {
owner = "InsightSoftwareConsortium";
repo = "ITK";
rev = "v${version}";
sha256 = "19f65fc9spwvmywg43lkw9p2inrrzr1qrfzcbing3cjk0x2yrsnl";
sha256 = "sha256-KaVe9FMGm4ZVMpwAT12fA67T0qZS3ZueiI8z85+xSwE=";
};
postPatch = ''

View file

@ -7,14 +7,14 @@
buildPythonPackage rec {
pname = "ailment";
version = "9.0.9438";
version = "9.0.9506";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "angr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-V/0plNgApk8S/xdd0I8zeE7dqb0xBhqCVSDW7jGHpzo=";
sha256 = "sha256-ikIO6AhoBkmz4+8BLOC55Yh6HbzHJOjlktSDMiC0I38=";
};
propagatedBuildInputs = [ pyvex ];

View file

@ -43,14 +43,14 @@ in
buildPythonPackage rec {
pname = "angr";
version = "9.0.9438";
version = "9.0.9506";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-wbyuphcRw9FtVcwwQq8w0vaYZqWQ0nIyJPaZh+r8ROU=";
sha256 = "sha256-2bKsLmZeFs7N4YUYxIktDoOn/H8waaOaOJOzyVumuf8=";
};
propagatedBuildInputs = [

View file

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "angrop";
version = "9.0.9438";
version = "9.0.9506";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "angr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-+6fWdl5IcQTygFQbqPSfWvpqdooFN5yeBgPIblOyZEU=";
sha256 = "sha256-dTaTtiMzIm9PfVkjAED9x9zae+vdRcl1kDMtqUWvpkA=";
};
propagatedBuildInputs = [

View file

@ -7,13 +7,13 @@
buildPythonPackage rec {
pname = "archinfo";
version = "9.0.9438";
version = "9.0.9506";
src = fetchFromGitHub {
owner = "angr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-C3ZBqCNzXcpeLmAPpXci2AA4D5A3cQC6rHPuf/BmT38=";
sha256 = "sha256-jGXJpwiP2/O2aJhAP15VGqrekiiB0eiIFCjkzNMbqxw=";
};
checkInputs = [

View file

@ -9,7 +9,7 @@
buildPythonPackage rec {
pname = "bimmer-connected";
version = "0.7.18";
version = "0.7.19";
disabled = pythonOlder "3.5";
@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "bimmerconnected";
repo = "bimmer_connected";
rev = version;
sha256 = "sha256-90Rli0tiZIO2gtx3EfPXg8U6CSKEmHUiRePjITvov/E=";
sha256 = "sha256-r5x+9W1XadtXb1ClC/0HnjrR+UmrytzUTCpi9IyBbwU=";
};
nativeBuildInputs = [

View file

@ -13,14 +13,14 @@
buildPythonPackage rec {
pname = "claripy";
version = "9.0.9438";
version = "9.0.9506";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "angr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-QgBdR2Xs3OscJ1PQ3fSwe0vqsKVSl2E7xf7JZ6B2FYA=";
sha256 = "sha256-wczwKTtOJ4VC3UZvd1KT6GfGUk5AS90ggLi2lFjhD+Q=";
};
# Use upstream z3 implementation

View file

@ -15,7 +15,7 @@
let
# The binaries are following the argr projects release cycle
version = "9.0.9438";
version = "9.0.9506";
# Binary files from https://github.com/angr/binaries (only used for testing and only here)
binaries = fetchFromGitHub {
@ -35,7 +35,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-BDhrKVnT1+zeEsQBM3qMDwcPJcePMPlAj/iL7M4GWtM=";
sha256 = "sha256-jTVccnCRqsp3EBl/RSKWVekAOsGhRvdIJxRyYV2gI4Q=";
};
propagatedBuildInputs = [

View file

@ -17,14 +17,14 @@
buildPythonPackage rec {
pname = "gcsfs";
version = "2021.06.0";
version = "2021.07.0";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "dask";
repo = pname;
rev = version;
sha256 = "sha256-tJeCSGK24WC8E7NKupg6/Tv861idWg6WYir+ZXeU+e0=";
sha256 = "sha256-nC/uyhKKam3W+cOOTBULPeG6Hy2bExWYNOfDs1cPt1Y=";
};
propagatedBuildInputs = [

View file

@ -17,11 +17,11 @@
buildPythonPackage rec {
pname = "google-cloud-asset";
version = "3.3.0";
version = "3.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-/iTpO1Y+v//ZzaXUpOfBOXDRfftpmUV4hxsFmMj3tM0=";
sha256 = "bd1fe84efd2e45042d95c7e5713e0a0365ec8138df062c07fab761233202ab6f";
};
postPatch = ''

View file

@ -2,38 +2,25 @@
, buildPythonPackage
, fetchFromGitHub
, numpy
, requests
, pyglet
, scipy
, pillow
, cloudpickle
}:
buildPythonPackage rec {
pname = "gym";
version = "0.18.3";
version = "0.19.0";
src = fetchFromGitHub {
owner = "openai";
repo = pname;
rev = version;
sha256 = "sha256-10KHUG6WacYzqna97vEhSQWDmJDvDmD5QxLhPW5NQSs=";
sha256 = "sha256-0O/s9OVNGQmeX9j8B1x63RxdI6dhqfTEJcgDH2jtCv4=";
};
propagatedBuildInputs = [
cloudpickle
numpy
pillow
pyglet
requests
scipy
];
postPatch = ''
substituteInPlace setup.py \
--replace "Pillow<=8.2.0" "Pillow"
'';
# The test needs MuJoCo that is not free library.
doCheck = false;

View file

@ -2,13 +2,13 @@
buildPythonPackage rec {
pname = "itemadapter";
version = "0.2.0";
version = "0.3.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "cb7aaa577fefe2aa6f229ccf4d058e05f44e0178a98c8fb70ee4d95acfabb423";
sha256 = "ab2651ba20f5f6d0e15f041deba4c13ffc59270def2bd01518d13e94c4cd27d1";
};
doCheck = false; # infinite recursion with Scrapy
@ -18,6 +18,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Common interface for data container classes";
homepage = "https://github.com/scrapy/itemadapter";
changelog = "https://github.com/scrapy/itemadapter/raw/v${version}/Changelog.md";
license = licenses.bsd3;
maintainers = [ maintainers.marsam ];
};

View file

@ -8,13 +8,13 @@
buildPythonPackage rec {
pname = "jellyfish";
version = "0.8.2";
version = "0.8.8";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "02q3d9b933hf8lyvg7w7lgmhij8bjs748vjmsfxhabai04a796d4";
sha256 = "0506089cacf9b5897442134417b04b3c6610c19f280ae535eace390dc6325a5c";
};
checkInputs = [ pytest unicodecsv ];

View file

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "micawber";
version = "0.5.3";
version = "0.5.4";
src = fetchPypi {
inherit pname version;
sha256 = "05ef4c89e307e3031dd1d85a3a557cd7f9f900f7dbbbcb33dde454940ca38460";
sha256 = "003c5345aafe84f6b60fd289c003e8b1fef04c14e015c2d52d792a6b88135c89";
};
propagatedBuildInputs = [ beautifulsoup4 ];

View file

@ -1,6 +1,19 @@
{ blinker, buildPythonPackage, fetchFromGitHub, lib, isPy27, six, mock, pytest
, webtest, pytest-cov, pytest-django, pytest-pythonpath, flake8, sqlalchemy
, flask_sqlalchemy, peewee }:
{ lib
, blinker
, buildPythonPackage
, fetchFromGitHub
, flake8
, flask_sqlalchemy
, isPy27
, mock
, peewee
, pytest-django
, pytest-pythonpath
, pytestCheckHook
, six
, sqlalchemy
, webtest
}:
buildPythonPackage rec {
pname = "nplusone";
@ -14,6 +27,23 @@ buildPythonPackage rec {
sha256 = "0qdwpvvg7dzmksz3vqkvb27n52lq5sa8i06m7idnj5xk2dgjkdxg";
};
propagatedBuildInputs = [
blinker
six
];
checkInputs = [
flake8
flask_sqlalchemy
mock
peewee
pytest-django
pytest-pythonpath
pytestCheckHook
sqlalchemy
webtest
];
# The tests assume the source code is in an nplusone/ directory. When using
# the Nix sandbox, it will be in a source/ directory instead, making the
# tests fail.
@ -22,24 +52,29 @@ buildPythonPackage rec {
--replace nplusone/tests/conftest source/tests/conftest
'';
checkPhase = ''
pytest tests/
postPatch = ''
substituteInPlace pytest.ini \
--replace "--cov nplusone --cov-report term-missing" ""
'';
propagatedBuildInputs = [ six blinker ];
checkInputs = [
mock
pytest
webtest
pytest-cov
pytest-django
pytest-pythonpath
flake8
sqlalchemy
flask_sqlalchemy
peewee
disabledTests = [
# Tests are out-dated
"test_many_to_one"
"test_many_to_many"
"test_eager_join"
"test_eager_subquery"
"test_eager_subquery_unused"
"test_many_to_many_raise"
"test_many_to_many_whitelist_decoy"
"test_many_to_one_subquery"
"test_many_to_one_reverse_subquery"
"test_many_to_many_subquery"
"test_many_to_many_reverse_subquery"
"test_profile"
];
pythonImportsCheck = [ "nplusone" ];
meta = with lib; {
description = "Detecting the n+1 queries problem in Python";
homepage = "https://github.com/jmcarp/nplusone";

View file

@ -17,6 +17,7 @@
, django
, djangorestframework
, responses
, mock
}:
buildPythonPackage rec {
@ -54,6 +55,7 @@ buildPythonPackage rec {
django
djangorestframework
responses
mock
];
disabledTestPaths = [

View file

@ -2,7 +2,7 @@
buildPythonPackage rec {
pname = "pycm";
version = "3.1";
version = "3.2";
disabled = !isPy3k;
@ -10,7 +10,7 @@ buildPythonPackage rec {
owner = "sepandhaghighi";
repo = pname;
rev = "v${version}";
sha256 = "1aspd3vkjasb4wxs9czwjw42fmd4027wsmm4vlj09yp7sl57gary";
sha256 = "1p2scgb4aghjlxak4zvm3s9ydkpg42mdxy6vjxlnqw0wpnsskfni";
};
# remove a trivial dependency on the author's `art` Python ASCII art library

View file

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "pygit2";
version = "1.6.0";
version = "1.6.1";
src = fetchPypi {
inherit pname version;
sha256 = "7aacea4e57011777f4774421228e5d0ddb9a6ddb87ac4b542346d17ab12a4d62";
sha256 = "c3303776f774d3e0115c1c4f6e1fc35470d15f113a7ae9401a0b90acfa1661ac";
};
preConfigure = lib.optionalString stdenv.isDarwin ''

View file

@ -2,12 +2,12 @@
, graphviz, networkx, six, opt-einsum, tqdm, pyro-api }:
buildPythonPackage rec {
version = "1.6.0";
version = "1.7.0";
pname = "pyro-ppl";
src = fetchPypi {
inherit version pname;
sha256 = "ee181852713058f59d600dfa2e05bbc6f7f9b88fcdb4d2f1ccf61b0bf4794088";
sha256 = "a8ec6968fdfa34f140584b266099238f1ffeacbbaab3775de5c94c0e685d018a";
};
propagatedBuildInputs = [

View file

@ -11,11 +11,11 @@
buildPythonPackage rec {
pname = "pyscreenshot";
version = "2.3";
version = "3.0";
src = fetchPypi {
inherit pname version;
sha256 = "bfdc311bd6ec1ee9e3c25ece75b24a749673ad5d5f89ee02950080023054ffd5";
sha256 = "dd4fdfaeb617483913a6b16845b9f428de5db28758979f4b6cf8f236d292b908";
};
propagatedBuildInputs = [

View file

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "python-gammu";
version = "3.2.2";
version = "3.2.3";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "gammu";
repo = pname;
rev = version;
sha256 = "sha256-HFI4LBrVf+kBoZfdZrZL1ty9N5DxZ2SOvhiIAFVxqaI=";
sha256 = "sha256-MtFxKRE6CB/LZq9McMyYhjwfs/Rdke9gsNUqbOQdWYQ=";
};
nativeBuildInputs = [ pkg-config ];

View file

@ -11,11 +11,11 @@
buildPythonPackage rec {
pname = "pyvex";
version = "9.0.9438";
version = "9.0.9506";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-L7Y80qWecmAP9aBuUh1YMBNhvLGPJUfj80mdEbhzC9Y=";
sha256 = "sha256-DseMX41dXmmt44SPVHSIFRIJL1u9yZ3kq8pv8TzC/OQ=";
};
postPatch = lib.optionalString stdenv.isDarwin ''

View file

@ -10,14 +10,14 @@
buildPythonPackage rec {
pname = "pyvicare";
version = "2.7";
version = "2.7.1";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "somm15";
repo = "PyViCare";
rev = version;
sha256 = "0hsmn3irixrgmd04pm0f89gn44fdn2nkcp92x7gc2kncwkval6hc";
sha256 = "sha256-YczzB95RyOdRGEye1pUqCZxegtp6kjCtUUHYyHD0WP0=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View file

@ -20,14 +20,14 @@
buildPythonPackage rec {
pname = "slack-sdk";
version = "3.9.0";
version = "3.9.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "slackapi";
repo = "python-slack-sdk";
rev = "v${version}";
sha256 = "sha256-9iV/l2eX4WB8PkTz+bMJIshdD/Q3K0ig8hIK9R8S/oM=";
sha256 = "sha256-IskBFccMDG03BFkERRfL7TH1Ppq8Xr9qTxCEoUEqxtk=";
};
propagatedBuildInputs = [

View file

@ -1,43 +1,55 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, ptable
, click
, requests
, prompt-toolkit
, pygments
, urllib3
, pytest
, pytest-cov
, fetchFromGitHub
, mock
, prompt-toolkit
, ptable
, pygments
, pytestCheckHook
, pythonOlder
, requests
, sphinx
, testtools
, tkinter
, urllib3
}:
buildPythonPackage rec {
pname = "softlayer-python";
version = "5.8.4";
disabled = isPy27;
propagatedBuildInputs = [ ptable click requests prompt-toolkit pygments urllib3 ];
checkInputs = [ pytest pytest-cov mock sphinx testtools ];
checkPhase = ''
pytest
'';
pname = "softlayer";
version = "5.9.7";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "softlayer";
repo = pname;
owner = pname;
repo = "softlayer-python";
rev = "v${version}";
sha256 = "10kzi7kvvifr21a46q2xqsibs0bx5ys22nfym0bg605ka37vcz88";
sha256 = "0zwhykrpckx3ln4w6vlgp0nrkkr8343ni1w43hxznm55qmrllrpg";
};
propagatedBuildInputs = [
click
prompt-toolkit
ptable
pygments
requests
urllib3
];
checkInputs = [
mock
pytestCheckHook
sphinx
testtools
tkinter
];
pythonImportsCheck = [ "SoftLayer" ];
meta = with lib; {
description = "A set of Python libraries that assist in calling the SoftLayer API.";
description = "Python libraries that assist in calling the SoftLayer API";
homepage = "https://github.com/softlayer/softlayer-python";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

View file

@ -1,27 +1,36 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
, isPyPy
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "ujson";
version = "4.0.2";
disabled = isPyPy || (!isPy3k);
version = "4.1.0";
disabled = isPyPy || pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "c615a9e9e378a7383b756b7e7a73c38b22aeb8967a8bfbffd4741f7ffd043c4d";
sha256 = "sha256-IrY+xECfDS8sTJ1aozGZfgJHC3oVoyM/PMMvL5uS1Yw=";
};
nativeBuildInputs = [ setuptools-scm ];
nativeBuildInputs = [
setuptools-scm
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "ujson" ];
meta = with lib; {
homepage = "https://pypi.python.org/pypi/ujson";
description = "Ultra fast JSON encoder and decoder for Python";
homepage = "https://pypi.python.org/pypi/ujson";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}

View file

@ -1,25 +1,29 @@
{ lib, buildPythonPackage, fetchPypi, isPy27 }:
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
}:
buildPythonPackage rec {
pname = "versioneer";
version = "0.19";
disabled = isPy27;
version = "0.20";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "a4fed39bbebcbd2d07f8a86084773f303cb442709491955a0e6754858e47afae";
sha256 = "sha256-Ljk2AOwnF7efWcmE942TX3bkbEyu+HWoe4tO1gLy/2U=";
};
# Couldn't get tests to work because, for instance, they used virtualenv and
# pip.
doCheck = false;
pythonImportsCheck = [ "versioneer" ];
meta = with lib; {
description = "Version-string management for VCS-controlled trees";
homepage = "https://github.com/warner/python-versioneer";
license = licenses.publicDomain;
maintainers = with maintainers; [ jluttine ];
};
}

View file

@ -3,13 +3,13 @@
buildPythonPackage rec {
pname = "webdavclient3";
version = "3.14.5";
version = "3.14.6";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "0yw3n5m70ysjn1ch48znpn4zr4a1bd0lsm7q2grqz7q5hfjzjwk0";
sha256 = "bcd22586bb0d58abc26ca56054fd04228e704bd36073c3080f4597c1556c880d";
};
propagatedBuildInputs = [ python-dateutil lxml requests ];

View file

@ -14,31 +14,44 @@
}:
buildPythonPackage rec {
version = "2.0.32";
version = "2.0.35";
pname = "webtest";
disabled = isPy27; # paste.deploy is not longer a valid import
src = fetchPypi {
pname = "WebTest";
inherit version;
sha256 = "4221020d502ff414c5fba83c1213985b83219cb1cc611fe58aa4feaf96b5e062";
sha256 = "sha256-qsFotbK08gCvTjWGfPMWcSIQ49XbgcHL3/OHImR7sIc=";
};
preConfigure = ''
substituteInPlace setup.py --replace "nose<1.3.0" "nose"
'';
propagatedBuildInputs = [ webob six beautifulsoup4 waitress ];
propagatedBuildInputs = [
webob
six
beautifulsoup4
waitress
];
checkInputs = [ nose mock PasteDeploy wsgiproxy2 pyquery ];
checkInputs = [
nose
mock
PasteDeploy
wsgiproxy2
pyquery
];
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "webtest" ];
meta = with lib; {
description = "Helper to test WSGI applications";
homepage = "https://webtest.readthedocs.org/en/latest/";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

View file

@ -1,30 +1,33 @@
{ cmake, fetchFromGitHub, lib, stdenv }:
{ lib, stdenv, fetchFromGitHub, substituteAll, antlr4, libargs, catch2, cmake, libyamlcpp }:
stdenv.mkDerivation rec {
pname = "luaformatter";
version = "1.3.6";
src = fetchFromGitHub {
owner = "koihik";
repo = "luaformatter";
owner = "Koihik";
repo = "LuaFormatter";
rev = version;
sha256 = "0440kdab5i0vhlk71sbprdrhg362al8jqpy7w2vdhcz1fpi5cm0b";
fetchSubmodules = true;
sha256 = "14l1f9hrp6m7z3cm5yl0njba6gfixzdirxjl8nihp9val0685vm0";
};
patches = [
(substituteAll {
src = ./fix-lib-paths.patch;
antlr4RuntimeCpp = antlr4.runtime.cpp.dev;
inherit libargs catch2 libyamlcpp;
})
];
nativeBuildInputs = [ cmake ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp lua-format $out/bin
runHook postInstall
'';
buildInputs = [ antlr4.runtime.cpp libyamlcpp ];
meta = with lib; {
description = "Code formatter for lua";
homepage = "https://github.com/koihik/luaformatter";
description = "Code formatter for Lua";
homepage = "https://github.com/Koihik/LuaFormatter";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
maintainers = with maintainers; [ figsoda SuperSandro2000 ];
mainProgram = "lua-format";
};
}

View file

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "so";
version = "0.4.3";
version = "0.4.5";
src = fetchFromGitHub {
owner = "samtay";
repo = pname;
rev = "v${version}";
sha256 = "sha256-WAUPB4hhvroE1/8nQcgLVWgGyXcFh7qxdFg6UtQzM9A=";
sha256 = "sha256-KiIffq8olpNpynmV4lwdY0yu2ch4MAwp5VspfLZtkf4=";
};
cargoSha256 = "sha256-aaIzGvf+PvH8nz2BSJapi1P5gSVfXT92X62FqJ1Z2L0=";
cargoSha256 = "sha256-VBuWKit50cSHYg7WzUP5ein3MEoZN/KFfm+YEEu544Q=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [

View file

@ -21,5 +21,6 @@ rustPlatform.buildRustPackage rec {
homepage = "https://taplo.tamasfe.dev";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "taplo";
};
}

View file

@ -17,11 +17,11 @@
stdenv.mkDerivation rec {
pname = "cypress";
version = "8.2.0";
version = "8.3.0";
src = fetchzip {
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
sha256 = "0j5acj7ghqf2pywpf4vzzvmcn4ypc4gv0pjyjd8hgzrrl3kff4dm";
sha256 = "sha256-MmdAi/AZ4CI/dPWbJxAXYTg/h0Dr/eEVYcZLMHaDQQ0=";
};
# don't remove runtime deps

View file

@ -2,16 +2,16 @@
, atk, at-spi2-atk, at-spi2-core, alsa-lib, cairo, cups, dbus, expat, gdk-pixbuf, glib, gtk3
, freetype, fontconfig, nss, nspr, pango, udev, libuuid, libX11, libxcb, libXi
, libXcursor, libXdamage, libXrandr, libXcomposite, libXext, libXfixes
, libXrender, libXtst, libXScrnSaver, libdrm, mesa
, libXrender, libXtst, libXScrnSaver, libxkbcommon, libdrm, mesa
}:
stdenv.mkDerivation rec {
pname = "postman";
version = "8.4.0";
version = "8.10.0";
src = fetchurl {
url = "https://dl.pstmn.io/download/version/${version}/linux64";
sha256 = "040l0g6m8lmjrm0wvq8z13xyddasz7v95v54d658w14gv0n713vw";
sha256 = "05f3eaa229483a7e1f698e6e2ea2031d37687de540d4fad05ce677ac216db24d";
name = "${pname}.tar.gz";
};
@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
libXrender
libXtst
libXScrnSaver
libxkbcommon
];
nativeBuildInputs = [ wrapGAppsHook ];

View file

@ -1,7 +1,7 @@
{ lib, stdenv, buildLinux, fetchFromGitHub, ... } @ args:
let
version = "5.13.11";
version = "5.13.12";
release = "1";
suffix = "xanmod${release}-cacule";
in
@ -13,7 +13,7 @@ buildLinux (args // rec {
owner = "xanmod";
repo = "linux";
rev = modDirVersion;
sha256 = "sha256-55BRj0JNQKwmSvlquNHr6ZaI7x/sBYzfZPHIblxK4lY=";
sha256 = "sha256-cuZ8o0Ogi2dg4kVoFv4aqThRPDVI271i+DVw5Z4R7Kg=";
};
structuredExtraConfig = with lib.kernel; {

View file

@ -82,6 +82,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
dontDisableStatic = true;
dontAddStaticConfigureFlags = true;
separateDebugInfo = true;
NIX_DONT_SET_RPATH = true;

View file

@ -2,15 +2,15 @@
buildGoModule rec {
pname = "traefik";
version = "2.4.13";
version = "2.5.0";
src = fetchzip {
url = "https://github.com/traefik/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
sha256 = "sha256-kGCzw8B7fCh6oh0ziB1eBedWEeGOBJVBvUf++TK/Lo0=";
sha256 = "sha256-8UqnMORAPENkVcWVbNHRje+rjIAlE8CMwBTLYrihBDw=";
stripRoot = false;
};
vendorSha256 = "sha256-jn4Ud+MrX7no+s69LAAbDOoFg1yIQ2lmoy8r37JIVz8=";
vendorSha256 = "sha256-tBUW6iBZZYc2OgSzFcDZ1C8YnyrXnuy3SdQiy8FPksM=";
doCheck = false;

View file

@ -1,7 +1,7 @@
{ lib, stdenv, fetchurl, writeText, plugins ? [ ] }:
let
version = "3.11";
version = "3.11.2";
stableVersion = lib.concatStrings (lib.take 2 (lib.splitVersion version));
in stdenv.mkDerivation rec {
@ -11,7 +11,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url =
"https://download.moodle.org/stable${stableVersion}/${pname}-${version}.tgz";
sha256 = "sha256-rZKY26ZPvubSr6nZ+Kguj1uKoEJbF3pEIKjjh6weyYo";
sha256 = "sha256-owe/8CVz7+uBrHJQDN4csWVcdk49AvT1ip88lAe/tKg=";
};
phpConfig = writeText "config.php" ''

View file

@ -8,7 +8,7 @@ let archString = if stdenv.isAarch64 then "arm64"
else if stdenv.isLinux then "linux"
else throw "unsupported platform";
platformSha = if stdenv.isDarwin then "0w44ws8b6zfixf7xz93hmplqsx18279n9x8j77y4rbzs13fldvsn"
else if (stdenv.isLinux && stdenv.isx86_64) then "0xm7l49zhkz2fly3d751kjd5cy3ws9zji9i0061lkd06dvkch7jy"
else if (stdenv.isLinux && stdenv.isx86_64) then "sha256-SOZn7CGLu9x+xhQwjgm0SL7sKDODLwHRpzi7tMdRBAM="
else if (stdenv.isLinux && stdenv.isAarch64) then "1axbi4kmb1ydys7c45jhp729w1srid3c8jgivb4bdmdp56rf6h32"
else throw "unsupported platform";
platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH"
@ -19,7 +19,7 @@ let archString = if stdenv.isAarch64 then "arm64"
in
stdenv.mkDerivation rec {
pname = "powershell";
version = "7.1.3";
version = "7.1.4";
src = fetchzip {
url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${platformString}-${archString}.tar.gz";
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
rm -f $pslibs/libcrypto${ext}.1.0.0
rm -f $pslibs/libssl${ext}.1.0.0
# At least the 7.1.3-osx package does not have the executable bit set.
# At least the 7.1.4-osx package does not have the executable bit set.
chmod a+x $pslibs/pwsh
ls $pslibs

View file

@ -2,7 +2,31 @@
a new stdenv with different behaviour, e.g. using a different C
compiler. */
pkgs:
{ lib, pkgs, config }:
let
# N.B. Keep in sync with default arg for stdenv/generic.
defaultMkDerivationFromStdenv = import ./generic/make-derivation.nix { inherit lib config; };
# Low level function to help with overriding `mkDerivationFromStdenv`. One
# gives it the old stdenv arguments and a "continuation" function, and
# underneath the final stdenv argument it yields to the continuation to do
# whatever it wants with old `mkDerivation` (old `mkDerivationFromStdenv`
# applied to the *new, final* stdenv) provided for convenience.
withOldMkDerivation = stdenvSuperArgs: k: stdenvSelf: let
mkDerivationFromStdenv-super = stdenvSuperArgs.mkDerivationFromStdenv or defaultMkDerivationFromStdenv;
mkDerivationSuper = mkDerivationFromStdenv-super stdenvSelf;
in
k stdenvSelf mkDerivationSuper;
# Wrap the original `mkDerivation` providing extra args to it.
extendMkDerivationArgs = old: f: withOldMkDerivation old (_: mkDerivationSuper: args:
mkDerivationSuper (args // f args));
# Wrap the original `mkDerivation` transforming the result.
overrideMkDerivationResult = old: f: withOldMkDerivation old (_: mkDerivationSuper: args:
f (mkDerivationSuper args));
in
rec {
@ -31,33 +55,32 @@ rec {
# Return a modified stdenv that tries to build statically linked
# binaries.
makeStaticBinaries = stdenv:
let stdenv' = if stdenv.hostPlatform.libc != "glibc" then stdenv else
stdenv.override (prev: {
extraBuildInputs = (prev.extraBuildInputs or []) ++ [
stdenv.glibc.static
];
});
in stdenv' //
{ mkDerivation = args:
if stdenv'.hostPlatform.isDarwin
makeStaticBinaries = stdenv0:
stdenv0.override (old: {
mkDerivationFromStdenv = withOldMkDerivation old (stdenv: mkDerivationSuper: args:
if stdenv.hostPlatform.isDarwin
then throw "Cannot build fully static binaries on Darwin/macOS"
else stdenv'.mkDerivation (args // {
else mkDerivationSuper (args // {
NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "") + " -static";
} // pkgs.lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {
} // lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {
configureFlags = (args.configureFlags or []) ++ [
"--disable-shared" # brrr...
];
});
};
}));
} // lib.optionalAttrs (stdenv0.hostPlatform.libc == "libc") {
extraBuildInputs = (old.extraBuildInputs or []) ++ [
stdenv0.glibc.static
];
});
# Return a modified stdenv that builds static libraries instead of
# shared libraries.
makeStaticLibraries = stdenv: stdenv //
{ mkDerivation = args: stdenv.mkDerivation (args // {
makeStaticLibraries = stdenv:
stdenv.override (old: {
mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
dontDisableStatic = true;
} // pkgs.lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {
} // lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {
configureFlags = (args.configureFlags or []) ++ [
"--enable-static"
"--disable-shared"
@ -65,18 +88,19 @@ rec {
cmakeFlags = (args.cmakeFlags or []) ++ [ "-DBUILD_SHARED_LIBS:BOOL=OFF" ];
mesonFlags = (args.mesonFlags or []) ++ [ "-Ddefault_library=static" ];
});
};
});
/* Modify a stdenv so that all buildInputs are implicitly propagated to
consuming derivations
*/
propagateBuildInputs = stdenv: stdenv //
{ mkDerivation = args: stdenv.mkDerivation (args // {
propagateBuildInputs = stdenv:
stdenv.override (old: {
mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
propagatedBuildInputs = (args.propagatedBuildInputs or []) ++ (args.buildInputs or []);
buildInputs = [];
});
};
});
/* Modify a stdenv so that the specified attributes are added to
@ -88,8 +112,9 @@ rec {
{ NIX_CFLAGS_COMPILE = "-O0"; }
stdenv;
*/
addAttrsToDerivation = extraAttrs: stdenv: stdenv //
{ mkDerivation = args: stdenv.mkDerivation (args // extraAttrs); };
addAttrsToDerivation = extraAttrs: stdenv: stdenv.override (old: {
mkDerivationFromStdenv = extendMkDerivationArgs old (_: extraAttrs);
});
/* Return a modified stdenv that builds packages with GCC's coverage
@ -110,21 +135,20 @@ rec {
# remove all maintainers.
defaultStdenv = replaceMaintainersField allStdenvs.stdenv pkgs [];
*/
replaceMaintainersField = stdenv: pkgs: maintainers: stdenv //
{ mkDerivation = args:
pkgs.lib.recursiveUpdate
(stdenv.mkDerivation args)
{ meta.maintainers = maintainers; };
};
replaceMaintainersField = stdenv: pkgs: maintainers:
stdenv.override (old: {
mkDerivationFromStdenv = overrideMkDerivationResult (pkg:
lib.recursiveUpdate pkg { meta.maintainers = maintainers; });
});
/* Use the trace output to report all processed derivations with their
license name.
*/
traceDrvLicenses = stdenv: stdenv //
{ mkDerivation = args:
traceDrvLicenses = stdenv:
stdenv.override (old: {
mkDerivationFromStdenv = overrideMkDerivationResult (pkg:
let
pkg = stdenv.mkDerivation args;
printDrvPath = val: let
drvPath = builtins.unsafeDiscardStringContext pkg.drvPath;
license = pkg.meta.license or null;
@ -133,8 +157,8 @@ rec {
in pkg // {
outPath = printDrvPath pkg.outPath;
drvPath = printDrvPath pkg.drvPath;
};
};
});
});
/* Abort if the license predicate is not verified for a derivation
@ -152,10 +176,10 @@ rec {
use it by patching the all-packages.nix file or by using the override
feature of ~/.config/nixpkgs/config.nix .
*/
validateLicenses = licensePred: stdenv: stdenv //
{ mkDerivation = args:
validateLicenses = licensePred: stdenv:
stdenv.override (old: {
mkDerivationFromStdenv = overrideMkDerivationResult (pkg:
let
pkg = stdenv.mkDerivation args;
drv = builtins.unsafeDiscardStringContext pkg.drvPath;
license =
pkg.meta.license or
@ -175,40 +199,43 @@ rec {
in pkg // {
outPath = validate pkg.outPath;
drvPath = validate pkg.drvPath;
};
};
});
});
/* Modify a stdenv so that it produces debug builds; that is,
binaries have debug info, and compiler optimisations are
disabled. */
keepDebugInfo = stdenv: stdenv //
{ mkDerivation = args: stdenv.mkDerivation (args // {
keepDebugInfo = stdenv:
stdenv.override (old: {
mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
dontStrip = true;
NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -ggdb -Og";
});
};
});
/* Modify a stdenv so that it uses the Gold linker. */
useGoldLinker = stdenv: stdenv //
{ mkDerivation = args: stdenv.mkDerivation (args // {
useGoldLinker = stdenv:
stdenv.override (old: {
mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "") + " -fuse-ld=gold";
});
};
});
/* Modify a stdenv so that it builds binaries optimized specifically
for the machine they are built on.
WARNING: this breaks purity! */
impureUseNativeOptimizations = stdenv: stdenv //
{ mkDerivation = args: stdenv.mkDerivation (args // {
impureUseNativeOptimizations = stdenv:
stdenv.override (old: {
mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -march=native";
NIX_ENFORCE_NO_NATIVE = false;
preferLocalBuild = true;
allowSubstitutes = false;
});
};
});
}

View file

@ -48,6 +48,10 @@ let lib = import ../../../lib; in lib.makeOverridable (
, # The platform which build tools (especially compilers) build for in this stage,
targetPlatform
, # The implementation of `mkDerivation`, parameterized with the final stdenv so we can tie the knot.
# This is convient to have as a parameter so the stdenv "adapters" work better
mkDerivationFromStdenv ? import ./make-derivation.nix { inherit lib config; }
}:
let
@ -155,9 +159,7 @@ let
# to correct type of machine.
inherit (hostPlatform) system;
inherit (import ./make-derivation.nix {
inherit lib config stdenv;
}) mkDerivation;
mkDerivation = mkDerivationFromStdenv stdenv;
inherit fetchurlBoot;

View file

@ -1,4 +1,6 @@
{ lib, config, stdenv }:
{ lib, config }:
stdenv:
let
checkMeta = import ./check-meta.nix {
@ -7,405 +9,403 @@ let
# to build it. This is a bit confusing for cross compilation.
inherit (stdenv) hostPlatform;
};
in rec {
# `mkDerivation` wraps the builtin `derivation` function to
# produce derivations that use this stdenv and its shell.
in
# `mkDerivation` wraps the builtin `derivation` function to
# produce derivations that use this stdenv and its shell.
#
# See also:
#
# * https://nixos.org/nixpkgs/manual/#sec-using-stdenv
# Details on how to use this mkDerivation function
#
# * https://nixos.org/nix/manual/#ssec-derivation
# Explanation about derivations in general
{
# These types of dependencies are all exhaustively documented in
# the "Specifying Dependencies" section of the "Standard
# Environment" chapter of the Nixpkgs manual.
# TODO(@Ericson2314): Stop using legacy dep attribute names
# host offset -> target offset
depsBuildBuild ? [] # -1 -> -1
, depsBuildBuildPropagated ? [] # -1 -> -1
, nativeBuildInputs ? [] # -1 -> 0 N.B. Legacy name
, propagatedNativeBuildInputs ? [] # -1 -> 0 N.B. Legacy name
, depsBuildTarget ? [] # -1 -> 1
, depsBuildTargetPropagated ? [] # -1 -> 1
, depsHostHost ? [] # 0 -> 0
, depsHostHostPropagated ? [] # 0 -> 0
, buildInputs ? [] # 0 -> 1 N.B. Legacy name
, propagatedBuildInputs ? [] # 0 -> 1 N.B. Legacy name
, depsTargetTarget ? [] # 1 -> 1
, depsTargetTargetPropagated ? [] # 1 -> 1
, checkInputs ? []
, installCheckInputs ? []
# Configure Phase
, configureFlags ? []
, cmakeFlags ? []
, mesonFlags ? []
, # Target is not included by default because most programs don't care.
# Including it then would cause needless mass rebuilds.
#
# See also:
#
# * https://nixos.org/nixpkgs/manual/#sec-using-stdenv
# Details on how to use this mkDerivation function
#
# * https://nixos.org/nix/manual/#ssec-derivation
# Explanation about derivations in general
mkDerivation =
{
# TODO(@Ericson2314): Make [ "build" "host" ] always the default.
configurePlatforms ? lib.optionals
(stdenv.hostPlatform != stdenv.buildPlatform)
[ "build" "host" ]
# These types of dependencies are all exhaustively documented in
# the "Specifying Dependencies" section of the "Standard
# Environment" chapter of the Nixpkgs manual.
# TODO(@Ericson2314): Make unconditional / resolve #33599
# Check phase
, doCheck ? config.doCheckByDefault or false
# TODO(@Ericson2314): Stop using legacy dep attribute names
# TODO(@Ericson2314): Make unconditional / resolve #33599
# InstallCheck phase
, doInstallCheck ? config.doCheckByDefault or false
# host offset -> target offset
depsBuildBuild ? [] # -1 -> -1
, depsBuildBuildPropagated ? [] # -1 -> -1
, nativeBuildInputs ? [] # -1 -> 0 N.B. Legacy name
, propagatedNativeBuildInputs ? [] # -1 -> 0 N.B. Legacy name
, depsBuildTarget ? [] # -1 -> 1
, depsBuildTargetPropagated ? [] # -1 -> 1
, # TODO(@Ericson2314): Make always true and remove
strictDeps ? stdenv.hostPlatform != stdenv.buildPlatform
, meta ? {}
, passthru ? {}
, pos ? # position used in error messages and for meta.position
(if attrs.meta.description or null != null
then builtins.unsafeGetAttrPos "description" attrs.meta
else if attrs.version or null != null
then builtins.unsafeGetAttrPos "version" attrs
else builtins.unsafeGetAttrPos "name" attrs)
, separateDebugInfo ? false
, outputs ? [ "out" ]
, __darwinAllowLocalNetworking ? false
, __impureHostDeps ? []
, __propagatedImpureHostDeps ? []
, sandboxProfile ? ""
, propagatedSandboxProfile ? ""
, depsHostHost ? [] # 0 -> 0
, depsHostHostPropagated ? [] # 0 -> 0
, buildInputs ? [] # 0 -> 1 N.B. Legacy name
, propagatedBuildInputs ? [] # 0 -> 1 N.B. Legacy name
, hardeningEnable ? []
, hardeningDisable ? []
, depsTargetTarget ? [] # 1 -> 1
, depsTargetTargetPropagated ? [] # 1 -> 1
, patches ? []
, checkInputs ? []
, installCheckInputs ? []
, __contentAddressed ?
(! attrs ? outputHash) # Fixed-output drvs can't be content addressed too
&& (config.contentAddressedByDefault or false)
# Configure Phase
, configureFlags ? []
, cmakeFlags ? []
, mesonFlags ? []
, # Target is not included by default because most programs don't care.
# Including it then would cause needless mass rebuilds.
, ... } @ attrs:
let
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
# no package has `doCheck = true`.
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux && !(stdenv.hostPlatform.useLLVM or false);
outputs' = outputs ++ lib.optional separateDebugInfo' "debug";
noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
++ depsHostHost ++ depsHostHostPropagated
++ buildInputs ++ propagatedBuildInputs
++ depsTargetTarget ++ depsTargetTargetPropagated) == 0;
dontAddHostSuffix = attrs ? outputHash && !noNonNativeDeps || !stdenv.hasCC;
supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ];
# Musl-based platforms will keep "pie", other platforms will not.
# If you change this, make sure to update section `{#sec-hardening-in-nixpkgs}`
# in the nixpkgs manual to inform users about the defaults.
defaultHardeningFlags = if stdenv.hostPlatform.isMusl &&
# Except when:
# - static aarch64, where compilation works, but produces segfaulting dynamically linked binaries.
# - static armv7l, where compilation fails.
!((stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) && stdenv.hostPlatform.isStatic)
then supportedHardeningFlags
else lib.remove "pie" supportedHardeningFlags;
enabledHardeningOptions =
if builtins.elem "all" hardeningDisable
then []
else lib.subtractLists hardeningDisable (defaultHardeningFlags ++ hardeningEnable);
# hardeningDisable additionally supports "all".
erroneousHardeningFlags = lib.subtractLists supportedHardeningFlags (hardeningEnable ++ lib.remove "all" hardeningDisable);
in if builtins.length erroneousHardeningFlags != 0
then abort ("mkDerivation was called with unsupported hardening flags: " + lib.generators.toPretty {} {
inherit erroneousHardeningFlags hardeningDisable hardeningEnable supportedHardeningFlags;
})
else let
doCheck = doCheck';
doInstallCheck = doInstallCheck';
outputs = outputs';
references = nativeBuildInputs ++ buildInputs
++ propagatedNativeBuildInputs ++ propagatedBuildInputs;
dependencies = map (map lib.chooseDevOutputs) [
[
(map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild)
(map (drv: drv.nativeDrv or drv) nativeBuildInputs
++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh
++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh
++ lib.optionals doCheck checkInputs
++ lib.optionals doInstallCheck' installCheckInputs)
(map (drv: drv.__spliced.buildTarget or drv) depsBuildTarget)
]
[
(map (drv: drv.__spliced.hostHost or drv) depsHostHost)
(map (drv: drv.crossDrv or drv) buildInputs)
]
[
(map (drv: drv.__spliced.targetTarget or drv) depsTargetTarget)
]
];
propagatedDependencies = map (map lib.chooseDevOutputs) [
[
(map (drv: drv.__spliced.buildBuild or drv) depsBuildBuildPropagated)
(map (drv: drv.nativeDrv or drv) propagatedNativeBuildInputs)
(map (drv: drv.__spliced.buildTarget or drv) depsBuildTargetPropagated)
]
[
(map (drv: drv.__spliced.hostHost or drv) depsHostHostPropagated)
(map (drv: drv.crossDrv or drv) propagatedBuildInputs)
]
[
(map (drv: drv.__spliced.targetTarget or drv) depsTargetTargetPropagated)
]
];
computedSandboxProfile =
lib.concatMap (input: input.__propagatedSandboxProfile or [])
(stdenv.extraNativeBuildInputs
++ stdenv.extraBuildInputs
++ lib.concatLists dependencies);
computedPropagatedSandboxProfile =
lib.concatMap (input: input.__propagatedSandboxProfile or [])
(lib.concatLists propagatedDependencies);
computedImpureHostDeps =
lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or [])
(stdenv.extraNativeBuildInputs
++ stdenv.extraBuildInputs
++ lib.concatLists dependencies));
computedPropagatedImpureHostDeps =
lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or [])
(lib.concatLists propagatedDependencies));
derivationArg =
(removeAttrs attrs
["meta" "passthru" "pos"
"checkInputs" "installCheckInputs"
"__darwinAllowLocalNetworking"
"__impureHostDeps" "__propagatedImpureHostDeps"
"sandboxProfile" "propagatedSandboxProfile"])
// (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
name =
let
# Indicate the host platform of the derivation if cross compiling.
# Fixed-output derivations like source tarballs shouldn't get a host
# suffix. But we have some weird ones with run-time deps that are
# just used for their side-affects. Those might as well since the
# hash can't be the same. See #32986.
hostSuffix = lib.optionalString
(stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)
"-${stdenv.hostPlatform.config}";
# Disambiguate statically built packages. This was originally
# introduce as a means to prevent nix-env to get confused between
# nix and nixStatic. This should be also achieved by moving the
# hostSuffix before the version, so we could contemplate removing
# it again.
staticMarker = lib.optionalString stdenv.hostPlatform.isStatic "-static";
in
if attrs ? name
then attrs.name + hostSuffix
else "${attrs.pname}${staticMarker}${hostSuffix}-${attrs.version}";
}) // {
builder = attrs.realBuilder or stdenv.shell;
args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
inherit stdenv;
# The `system` attribute of a derivation has special meaning to Nix.
# Derivations set it to choose what sort of machine could be used to
# execute the build, The build platform entirely determines this,
# indeed more finely than Nix knows or cares about. The `system`
# attribute of `buildPlatfom` matches Nix's degree of specificity.
# exactly.
inherit (stdenv.buildPlatform) system;
userHook = config.stdenv.userHook or null;
__ignoreNulls = true;
inherit strictDeps;
depsBuildBuild = lib.elemAt (lib.elemAt dependencies 0) 0;
nativeBuildInputs = lib.elemAt (lib.elemAt dependencies 0) 1;
depsBuildTarget = lib.elemAt (lib.elemAt dependencies 0) 2;
depsHostHost = lib.elemAt (lib.elemAt dependencies 1) 0;
buildInputs = lib.elemAt (lib.elemAt dependencies 1) 1;
depsTargetTarget = lib.elemAt (lib.elemAt dependencies 2) 0;
depsBuildBuildPropagated = lib.elemAt (lib.elemAt propagatedDependencies 0) 0;
propagatedNativeBuildInputs = lib.elemAt (lib.elemAt propagatedDependencies 0) 1;
depsBuildTargetPropagated = lib.elemAt (lib.elemAt propagatedDependencies 0) 2;
depsHostHostPropagated = lib.elemAt (lib.elemAt propagatedDependencies 1) 0;
propagatedBuildInputs = lib.elemAt (lib.elemAt propagatedDependencies 1) 1;
depsTargetTargetPropagated = lib.elemAt (lib.elemAt propagatedDependencies 2) 0;
# This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
configureFlags = let inherit (lib) optional elem; in
(/**/ if lib.isString configureFlags then [configureFlags]
else if configureFlags == null then []
else configureFlags)
++ optional (elem "build" configurePlatforms) "--build=${stdenv.buildPlatform.config}"
++ optional (elem "host" configurePlatforms) "--host=${stdenv.hostPlatform.config}"
++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}";
inherit patches;
inherit doCheck doInstallCheck;
inherit outputs;
} // lib.optionalAttrs (__contentAddressed) {
inherit __contentAddressed;
# Provide default values for outputHashMode and outputHashAlgo because
# most people won't care about these anyways
outputHashAlgo = attrs.outputHashAlgo or "sha256";
outputHashMode = attrs.outputHashMode or "recursive";
} // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
cmakeFlags =
(/**/ if lib.isString cmakeFlags then [cmakeFlags]
else if cmakeFlags == null then []
else cmakeFlags)
++ [ "-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" (
lib.optional (!stdenv.hostPlatform.isRedox) stdenv.hostPlatform.uname.system)}"]
++ lib.optional (stdenv.hostPlatform.uname.processor != null) "-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}"
++ lib.optional (stdenv.hostPlatform.uname.release != null) "-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.release}"
++ lib.optional (stdenv.hostPlatform.isDarwin) "-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
++ lib.optional (stdenv.buildPlatform.uname.system != null) "-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}"
++ lib.optional (stdenv.buildPlatform.uname.processor != null) "-DCMAKE_HOST_SYSTEM_PROCESSOR=${stdenv.buildPlatform.uname.processor}"
++ lib.optional (stdenv.buildPlatform.uname.release != null) "-DCMAKE_HOST_SYSTEM_VERSION=${stdenv.buildPlatform.uname.release}";
mesonFlags = if mesonFlags == null then null else let
# See https://mesonbuild.com/Reference-tables.html#cpu-families
cpuFamily = platform: with platform;
/**/ if isAarch32 then "arm"
else if isAarch64 then "aarch64"
else if isx86_32 then "x86"
else if isx86_64 then "x86_64"
else platform.parsed.cpu.family + builtins.toString platform.parsed.cpu.bits;
crossFile = builtins.toFile "cross-file.conf" ''
[properties]
needs_exe_wrapper = true
[host_machine]
system = '${stdenv.targetPlatform.parsed.kernel.name}'
cpu_family = '${cpuFamily stdenv.targetPlatform}'
cpu = '${stdenv.targetPlatform.parsed.cpu.name}'
endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"}
'';
in [ "--cross-file=${crossFile}" ] ++ mesonFlags;
} // lib.optionalAttrs (attrs.enableParallelBuilding or false) {
enableParallelChecking = attrs.enableParallelChecking or true;
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) {
NIX_HARDENING_ENABLE = enabledHardeningOptions;
} // lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? gcc.arch) {
requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.gcc.arch}" ];
} // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {
inherit __darwinAllowLocalNetworking;
# TODO: remove lib.unique once nix has a list canonicalization primitive
__sandboxProfile =
let profiles = [ stdenv.extraSandboxProfile ] ++ computedSandboxProfile ++ computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile sandboxProfile ];
final = lib.concatStringsSep "\n" (lib.filter (x: x != "") (lib.unique profiles));
in final;
__propagatedSandboxProfile = lib.unique (computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile ]);
__impureHostDeps = computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ stdenv.__extraImpureHostDeps ++ [
"/dev/zero"
"/dev/random"
"/dev/urandom"
"/bin/sh"
];
__propagatedImpureHostDeps = computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps;
};
validity = checkMeta { inherit meta attrs; };
# The meta attribute is passed in the resulting attribute set,
# but it's not part of the actual derivation, i.e., it's not
# passed to the builder and is not a dependency. But since we
# include it in the result, it *is* available to nix-env for queries.
meta = {
# `name` above includes cross-compilation cruft (and is under assert),
# lets have a clean always accessible version here.
name = attrs.name or "${attrs.pname}-${attrs.version}";
# If the packager hasn't specified `outputsToInstall`, choose a default,
# which is the name of `p.bin or p.out or p` along with `p.man` when
# present.
#
# TODO(@Ericson2314): Make [ "build" "host" ] always the default.
configurePlatforms ? lib.optionals
(stdenv.hostPlatform != stdenv.buildPlatform)
[ "build" "host" ]
# If the packager has specified it, it will be overridden below in
# `// meta`.
#
# Note: This default probably shouldn't be globally configurable.
# Services and users should specify outputs explicitly,
# unless they are comfortable with this default.
outputsToInstall =
let
hasOutput = out: builtins.elem out outputs;
in [( lib.findFirst hasOutput null (["bin" "out"] ++ outputs) )]
++ lib.optional (hasOutput "man") "man";
}
// attrs.meta or {}
# Fill `meta.position` to identify the source location of the package.
// lib.optionalAttrs (pos != null) {
position = pos.file + ":" + toString pos.line;
} // {
# Expose the result of the checks for everyone to see.
inherit (validity) unfree broken unsupported insecure;
available = validity.valid
&& (if config.checkMetaRecursively or false
then lib.all (d: d.meta.available or true) references
else true);
};
# TODO(@Ericson2314): Make unconditional / resolve #33599
# Check phase
, doCheck ? config.doCheckByDefault or false
in
# TODO(@Ericson2314): Make unconditional / resolve #33599
# InstallCheck phase
, doInstallCheck ? config.doCheckByDefault or false
lib.extendDerivation
validity.handled
({
overrideAttrs = f: stdenv.mkDerivation (attrs // (f attrs));
, # TODO(@Ericson2314): Make always true and remove
strictDeps ? stdenv.hostPlatform != stdenv.buildPlatform
, meta ? {}
, passthru ? {}
, pos ? # position used in error messages and for meta.position
(if attrs.meta.description or null != null
then builtins.unsafeGetAttrPos "description" attrs.meta
else if attrs.version or null != null
then builtins.unsafeGetAttrPos "version" attrs
else builtins.unsafeGetAttrPos "name" attrs)
, separateDebugInfo ? false
, outputs ? [ "out" ]
, __darwinAllowLocalNetworking ? false
, __impureHostDeps ? []
, __propagatedImpureHostDeps ? []
, sandboxProfile ? ""
, propagatedSandboxProfile ? ""
# A derivation that always builds successfully and whose runtime
# dependencies are the original derivations build time dependencies
# This allows easy building and distributing of all derivations
# needed to enter a nix-shell with
# nix-build shell.nix -A inputDerivation
inputDerivation = derivation (derivationArg // {
# Add a name in case the original drv didn't have one
name = derivationArg.name or "inputDerivation";
# This always only has one output
outputs = [ "out" ];
, hardeningEnable ? []
, hardeningDisable ? []
# Propagate the original builder and arguments, since we override
# them and they might contain references to build inputs
_derivation_original_builder = derivationArg.builder;
_derivation_original_args = derivationArg.args;
, patches ? []
builder = stdenv.shell;
# The bash builtin `export` dumps all current environment variables,
# which is where all build input references end up (e.g. $PATH for
# binaries). By writing this to $out, Nix can find and register
# them as runtime dependencies (since Nix greps for store paths
# through $out to find them)
args = [ "-c" "export > $out" ];
});
, __contentAddressed ?
(! attrs ? outputHash) # Fixed-output drvs can't be content addressed too
&& (config.contentAddressedByDefault or false)
, ... } @ attrs:
let
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
# no package has `doCheck = true`.
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux && !(stdenv.hostPlatform.useLLVM or false);
outputs' = outputs ++ lib.optional separateDebugInfo' "debug";
noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
++ depsHostHost ++ depsHostHostPropagated
++ buildInputs ++ propagatedBuildInputs
++ depsTargetTarget ++ depsTargetTargetPropagated) == 0;
dontAddHostSuffix = attrs ? outputHash && !noNonNativeDeps || !stdenv.hasCC;
supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ];
# Musl-based platforms will keep "pie", other platforms will not.
# If you change this, make sure to update section `{#sec-hardening-in-nixpkgs}`
# in the nixpkgs manual to inform users about the defaults.
defaultHardeningFlags = if stdenv.hostPlatform.isMusl &&
# Except when:
# - static aarch64, where compilation works, but produces segfaulting dynamically linked binaries.
# - static armv7l, where compilation fails.
!((stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) && stdenv.hostPlatform.isStatic)
then supportedHardeningFlags
else lib.remove "pie" supportedHardeningFlags;
enabledHardeningOptions =
if builtins.elem "all" hardeningDisable
then []
else lib.subtractLists hardeningDisable (defaultHardeningFlags ++ hardeningEnable);
# hardeningDisable additionally supports "all".
erroneousHardeningFlags = lib.subtractLists supportedHardeningFlags (hardeningEnable ++ lib.remove "all" hardeningDisable);
in if builtins.length erroneousHardeningFlags != 0
then abort ("mkDerivation was called with unsupported hardening flags: " + lib.generators.toPretty {} {
inherit erroneousHardeningFlags hardeningDisable hardeningEnable supportedHardeningFlags;
})
else let
doCheck = doCheck';
doInstallCheck = doInstallCheck';
outputs = outputs';
references = nativeBuildInputs ++ buildInputs
++ propagatedNativeBuildInputs ++ propagatedBuildInputs;
dependencies = map (map lib.chooseDevOutputs) [
[
(map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild)
(map (drv: drv.nativeDrv or drv) nativeBuildInputs
++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh
++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh
++ lib.optionals doCheck checkInputs
++ lib.optionals doInstallCheck' installCheckInputs)
(map (drv: drv.__spliced.buildTarget or drv) depsBuildTarget)
]
[
(map (drv: drv.__spliced.hostHost or drv) depsHostHost)
(map (drv: drv.crossDrv or drv) buildInputs)
]
[
(map (drv: drv.__spliced.targetTarget or drv) depsTargetTarget)
]
];
propagatedDependencies = map (map lib.chooseDevOutputs) [
[
(map (drv: drv.__spliced.buildBuild or drv) depsBuildBuildPropagated)
(map (drv: drv.nativeDrv or drv) propagatedNativeBuildInputs)
(map (drv: drv.__spliced.buildTarget or drv) depsBuildTargetPropagated)
]
[
(map (drv: drv.__spliced.hostHost or drv) depsHostHostPropagated)
(map (drv: drv.crossDrv or drv) propagatedBuildInputs)
]
[
(map (drv: drv.__spliced.targetTarget or drv) depsTargetTargetPropagated)
]
];
computedSandboxProfile =
lib.concatMap (input: input.__propagatedSandboxProfile or [])
(stdenv.extraNativeBuildInputs
++ stdenv.extraBuildInputs
++ lib.concatLists dependencies);
computedPropagatedSandboxProfile =
lib.concatMap (input: input.__propagatedSandboxProfile or [])
(lib.concatLists propagatedDependencies);
computedImpureHostDeps =
lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or [])
(stdenv.extraNativeBuildInputs
++ stdenv.extraBuildInputs
++ lib.concatLists dependencies));
computedPropagatedImpureHostDeps =
lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or [])
(lib.concatLists propagatedDependencies));
derivationArg =
(removeAttrs attrs
["meta" "passthru" "pos"
"checkInputs" "installCheckInputs"
"__darwinAllowLocalNetworking"
"__impureHostDeps" "__propagatedImpureHostDeps"
"sandboxProfile" "propagatedSandboxProfile"])
// (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
name =
let
# Indicate the host platform of the derivation if cross compiling.
# Fixed-output derivations like source tarballs shouldn't get a host
# suffix. But we have some weird ones with run-time deps that are
# just used for their side-affects. Those might as well since the
# hash can't be the same. See #32986.
hostSuffix = lib.optionalString
(stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)
"-${stdenv.hostPlatform.config}";
# Disambiguate statically built packages. This was originally
# introduce as a means to prevent nix-env to get confused between
# nix and nixStatic. This should be also achieved by moving the
# hostSuffix before the version, so we could contemplate removing
# it again.
staticMarker = lib.optionalString stdenv.hostPlatform.isStatic "-static";
in
if attrs ? name
then attrs.name + hostSuffix
else "${attrs.pname}${staticMarker}${hostSuffix}-${attrs.version}";
}) // {
builder = attrs.realBuilder or stdenv.shell;
args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
inherit stdenv;
# The `system` attribute of a derivation has special meaning to Nix.
# Derivations set it to choose what sort of machine could be used to
# execute the build, The build platform entirely determines this,
# indeed more finely than Nix knows or cares about. The `system`
# attribute of `buildPlatfom` matches Nix's degree of specificity.
# exactly.
inherit (stdenv.buildPlatform) system;
userHook = config.stdenv.userHook or null;
__ignoreNulls = true;
inherit strictDeps;
depsBuildBuild = lib.elemAt (lib.elemAt dependencies 0) 0;
nativeBuildInputs = lib.elemAt (lib.elemAt dependencies 0) 1;
depsBuildTarget = lib.elemAt (lib.elemAt dependencies 0) 2;
depsHostHost = lib.elemAt (lib.elemAt dependencies 1) 0;
buildInputs = lib.elemAt (lib.elemAt dependencies 1) 1;
depsTargetTarget = lib.elemAt (lib.elemAt dependencies 2) 0;
depsBuildBuildPropagated = lib.elemAt (lib.elemAt propagatedDependencies 0) 0;
propagatedNativeBuildInputs = lib.elemAt (lib.elemAt propagatedDependencies 0) 1;
depsBuildTargetPropagated = lib.elemAt (lib.elemAt propagatedDependencies 0) 2;
depsHostHostPropagated = lib.elemAt (lib.elemAt propagatedDependencies 1) 0;
propagatedBuildInputs = lib.elemAt (lib.elemAt propagatedDependencies 1) 1;
depsTargetTargetPropagated = lib.elemAt (lib.elemAt propagatedDependencies 2) 0;
# This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
configureFlags = let inherit (lib) optional elem; in
(/**/ if lib.isString configureFlags then [configureFlags]
else if configureFlags == null then []
else configureFlags)
++ optional (elem "build" configurePlatforms) "--build=${stdenv.buildPlatform.config}"
++ optional (elem "host" configurePlatforms) "--host=${stdenv.hostPlatform.config}"
++ optional (elem "target" configurePlatforms) "--target=${stdenv.targetPlatform.config}";
inherit patches;
inherit doCheck doInstallCheck;
inherit outputs;
} // lib.optionalAttrs (__contentAddressed) {
inherit __contentAddressed;
# Provide default values for outputHashMode and outputHashAlgo because
# most people won't care about these anyways
outputHashAlgo = attrs.outputHashAlgo or "sha256";
outputHashMode = attrs.outputHashMode or "recursive";
} // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
cmakeFlags =
(/**/ if lib.isString cmakeFlags then [cmakeFlags]
else if cmakeFlags == null then []
else cmakeFlags)
++ [ "-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" (
lib.optional (!stdenv.hostPlatform.isRedox) stdenv.hostPlatform.uname.system)}"]
++ lib.optional (stdenv.hostPlatform.uname.processor != null) "-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}"
++ lib.optional (stdenv.hostPlatform.uname.release != null) "-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.release}"
++ lib.optional (stdenv.hostPlatform.isDarwin) "-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
++ lib.optional (stdenv.buildPlatform.uname.system != null) "-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}"
++ lib.optional (stdenv.buildPlatform.uname.processor != null) "-DCMAKE_HOST_SYSTEM_PROCESSOR=${stdenv.buildPlatform.uname.processor}"
++ lib.optional (stdenv.buildPlatform.uname.release != null) "-DCMAKE_HOST_SYSTEM_VERSION=${stdenv.buildPlatform.uname.release}";
mesonFlags = if mesonFlags == null then null else let
# See https://mesonbuild.com/Reference-tables.html#cpu-families
cpuFamily = platform: with platform;
/**/ if isAarch32 then "arm"
else if isAarch64 then "aarch64"
else if isx86_32 then "x86"
else if isx86_64 then "x86_64"
else platform.parsed.cpu.family + builtins.toString platform.parsed.cpu.bits;
crossFile = builtins.toFile "cross-file.conf" ''
[properties]
needs_exe_wrapper = true
[host_machine]
system = '${stdenv.targetPlatform.parsed.kernel.name}'
cpu_family = '${cpuFamily stdenv.targetPlatform}'
cpu = '${stdenv.targetPlatform.parsed.cpu.name}'
endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"}
'';
in [ "--cross-file=${crossFile}" ] ++ mesonFlags;
} // lib.optionalAttrs (attrs.enableParallelBuilding or false) {
enableParallelChecking = attrs.enableParallelChecking or true;
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) {
NIX_HARDENING_ENABLE = enabledHardeningOptions;
} // lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? gcc.arch) {
requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.gcc.arch}" ];
} // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {
inherit __darwinAllowLocalNetworking;
# TODO: remove lib.unique once nix has a list canonicalization primitive
__sandboxProfile =
let profiles = [ stdenv.extraSandboxProfile ] ++ computedSandboxProfile ++ computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile sandboxProfile ];
final = lib.concatStringsSep "\n" (lib.filter (x: x != "") (lib.unique profiles));
in final;
__propagatedSandboxProfile = lib.unique (computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile ]);
__impureHostDeps = computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ stdenv.__extraImpureHostDeps ++ [
"/dev/zero"
"/dev/random"
"/dev/urandom"
"/bin/sh"
];
__propagatedImpureHostDeps = computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps;
};
validity = checkMeta { inherit meta attrs; };
# The meta attribute is passed in the resulting attribute set,
# but it's not part of the actual derivation, i.e., it's not
# passed to the builder and is not a dependency. But since we
# include it in the result, it *is* available to nix-env for queries.
meta = {
# `name` above includes cross-compilation cruft (and is under assert),
# lets have a clean always accessible version here.
name = attrs.name or "${attrs.pname}-${attrs.version}";
# If the packager hasn't specified `outputsToInstall`, choose a default,
# which is the name of `p.bin or p.out or p` along with `p.man` when
# present.
#
# If the packager has specified it, it will be overridden below in
# `// meta`.
#
# Note: This default probably shouldn't be globally configurable.
# Services and users should specify outputs explicitly,
# unless they are comfortable with this default.
outputsToInstall =
let
hasOutput = out: builtins.elem out outputs;
in [( lib.findFirst hasOutput null (["bin" "out"] ++ outputs) )]
++ lib.optional (hasOutput "man") "man";
}
// attrs.meta or {}
# Fill `meta.position` to identify the source location of the package.
// lib.optionalAttrs (pos != null) {
position = pos.file + ":" + toString pos.line;
} // {
# Expose the result of the checks for everyone to see.
inherit (validity) unfree broken unsupported insecure;
available = validity.valid
&& (if config.checkMetaRecursively or false
then lib.all (d: d.meta.available or true) references
else true);
};
in
lib.extendDerivation
validity.handled
({
overrideAttrs = f: mkDerivation (attrs // (f attrs));
# A derivation that always builds successfully and whose runtime
# dependencies are the original derivations build time dependencies
# This allows easy building and distributing of all derivations
# needed to enter a nix-shell with
# nix-build shell.nix -A inputDerivation
inputDerivation = derivation (derivationArg // {
# Add a name in case the original drv didn't have one
name = derivationArg.name or "inputDerivation";
# This always only has one output
outputs = [ "out" ];
# Propagate the original builder and arguments, since we override
# them and they might contain references to build inputs
_derivation_original_builder = derivationArg.builder;
_derivation_original_args = derivationArg.args;
builder = stdenv.shell;
# The bash builtin `export` dumps all current environment variables,
# which is where all build input references end up (e.g. $PATH for
# binaries). By writing this to $out, Nix can find and register
# them as runtime dependencies (since Nix greps for store paths
# through $out to find them)
args = [ "-c" "export > $out" ];
});
inherit meta passthru;
} //
# Pass through extra attributes that are not inputs, but
# should be made available to Nix expressions using the
# derivation (e.g., in assertions).
passthru)
(derivation derivationArg);
}
inherit meta passthru;
} //
# Pass through extra attributes that are not inputs, but
# should be made available to Nix expressions using the
# derivation (e.g., in assertions).
passthru)
(derivation derivationArg)

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "sec";
version = "2.8.3";
version = "2.9.0";
src = fetchFromGitHub {
owner = "simple-evcorr";
repo = "sec";
rev = version;
sha256 = "0ryic5ilj1i5l41440i0ss6j3yv796fz3gr0qij5pqyd1z21md83";
sha256 = "sha256-WYSlIRhDBIDaza92VqCQcdMNicuRUX2IKY5CJyhswdI=";
};
buildInputs = [ perl ];

View file

@ -1,32 +0,0 @@
{ lib, stdenv, fetchFromGitHub, substituteAll, antlr4, libargs, catch2, cmake, libyamlcpp }:
stdenv.mkDerivation rec {
pname = "lua-format";
version = "1.3.6";
src = fetchFromGitHub {
owner = "Koihik";
repo = "LuaFormatter";
rev = version;
sha256 = "14l1f9hrp6m7z3cm5yl0njba6gfixzdirxjl8nihp9val0685vm0";
};
patches = [
(substituteAll {
src = ./fix-lib-paths.patch;
antlr4RuntimeCpp = antlr4.runtime.cpp.dev;
inherit libargs catch2 libyamlcpp;
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [ antlr4.runtime.cpp libyamlcpp ];
meta = with lib; {
description = "Code formatter for Lua";
homepage = "https://github.com/Koihik/LuaFormatter";
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -0,0 +1,27 @@
{ lib
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "otpauth";
version = "0.3.4";
src = fetchFromGitHub {
owner = "dim13";
repo = "otpauth";
rev = "v${version}";
sha256 = "199kh544kx4cbsczc9anmciczi738gdc5g518ybb05h49vlb51dp";
};
runVend = true;
vendorSha256 = "1762cchqydgsf94y05dwxcrajvjr64ayi5xk1svn1xissyc7vgpv";
doCheck = true;
meta = with lib; {
description = "Google Authenticator migration decoder";
homepage = "https://github.com/dim13/otpauth";
license = licenses.isc;
maintainers = with maintainers; [ ereslibre ];
};
}

View file

@ -1,7 +1,14 @@
{ lib, fetchFromGitHub, stdenv, autoreconfHook
, ncurses, IOKit
, ncurses
, IOKit
, sensorsSupport ? stdenv.isLinux, lm_sensors
, systemdSupport ? stdenv.isLinux, systemd
}:
with lib;
assert systemdSupport -> stdenv.isLinux;
stdenv.mkDerivation rec {
pname = "htop";
version = "3.0.5";
@ -15,10 +22,26 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ ncurses
] ++ lib.optionals stdenv.isDarwin [ IOKit ];
buildInputs = [ ncurses ]
++ optional stdenv.isDarwin IOKit
++ optional sensorsSupport lm_sensors
++ optional systemdSupport systemd
;
meta = with lib; {
configureFlags = [ "--enable-unicode" ]
++ optional sensorsSupport "--with-sensors"
;
postFixup =
let
optionalPatch = pred: so: optionalString pred "patchelf --add-needed ${so} $out/bin/htop";
in
''
${optionalPatch sensorsSupport "${lm_sensors}/lib/libsensors.so"}
${optionalPatch systemdSupport "${systemd}/lib/libsystemd.so"}
'';
meta = {
description = "An interactive process viewer for Linux";
homepage = "https://htop.dev";
license = licenses.gpl2Only;

View file

@ -1,4 +1,4 @@
{ lib, skawarePackages }:
{ lib, stdenv, skawarePackages, targetPackages }:
with skawarePackages;
@ -8,7 +8,7 @@ buildPackage {
sha256 = "12bzc483jpd16xmhfsfrib84daj1k3kwy5s5nc18ap60apa1r39a";
description = "A service manager for s6-based systems";
platforms = lib.platforms.linux;
platforms = lib.platforms.unix;
outputs = [ "bin" "lib" "dev" "doc" "out" ];
@ -30,6 +30,25 @@ buildPackage {
"--with-dynlib=${s6.out}/lib"
];
# s6-rc-compile generates built-in service definitions containing
# absolute paths to execline, s6, and s6-rc programs. If we're
# running s6-rc-compile as part of a Nix derivation, and we want to
# cross-compile that derivation, those paths will be wrong --
# they'll be for execline, s6, and s6-rc on the platform we're
# running s6-rc-compile on, not the platform we're targeting.
#
# We can detect this special case of s6-rc being used at build time
# in a derivation that's being cross-compiled, because that's the
# only time hostPlatform != targetPlatform. When that happens we
# modify s6-rc-compile to use the configuration headers for the
# system we're cross-compiling for.
postConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) ''
substituteInPlace src/s6-rc/s6-rc-compile.c \
--replace '<execline/config.h>' '"${targetPackages.execline.dev}/include/execline/config.h"' \
--replace '<s6/config.h>' '"${targetPackages.s6.dev}/include/s6/config.h"' \
--replace '<s6-rc/config.h>' '"${targetPackages.s6-rc.dev}/include/s6-rc/config.h"'
'';
postInstall = ''
# remove all s6 executables from build directory
rm $(find -name "s6-rc-*" -type f -mindepth 1 -maxdepth 1 -executable)

View file

@ -971,8 +971,6 @@ with pkgs;
logseq = callPackage ../applications/misc/logseq { };
lua-format = callPackage ../tools/misc/lua-format { };
lxterminal = callPackage ../applications/terminal-emulators/lxterminal { };
microcom = callPackage ../applications/terminal-emulators/microcom { };
@ -7974,6 +7972,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) IOKit;
};
otpauth = callPackage ../tools/security/otpauth { };
pcsclite = callPackage ../tools/security/pcsclite {
inherit (darwin.apple_sdk.frameworks) IOKit;
};
@ -9324,6 +9324,8 @@ with pkgs;
tboot = callPackage ../tools/security/tboot { };
tagutil = callPackage ../applications/audio/tagutil { };
tcpdump = callPackage ../tools/networking/tcpdump { };
tcpflow = callPackage ../tools/networking/tcpflow { };
@ -22854,6 +22856,8 @@ with pkgs;
anup = callPackage ../applications/misc/anup {};
anytype = callPackage ../applications/misc/anytype { };
ao = libfive;
apache-directory-studio = callPackage ../applications/networking/apache-directory-studio {};

View file

@ -65,7 +65,12 @@
let
stdenvAdapters = self: super:
let res = import ../stdenv/adapters.nix self; in res // {
let
res = import ../stdenv/adapters.nix {
inherit lib config;
pkgs = self;
};
in res // {
stdenvAdapters = res;
};

View file

@ -35,9 +35,6 @@ self: super: let
};
staticAdapters =
# makeStaticDarwin must go first so that the extraBuildInputs
# override does not recreate mkDerivation, removing subsequent
# adapters.
optional super.stdenv.hostPlatform.isDarwin makeStaticDarwin
++ [ makeStaticLibraries propagateBuildInputs ]
@ -80,30 +77,9 @@ self: super: let
});
};
llvmStaticAdapter = llvmPackages:
llvmPackages // {
stdenv = foldl (flip id) llvmPackages.stdenv staticAdapters;
libcxxStdenv = foldl (flip id) llvmPackages.libcxxStdenv staticAdapters;
};
in {
stdenv = foldl (flip id) super.stdenv staticAdapters;
gcc49Stdenv = foldl (flip id) super.gcc49Stdenv staticAdapters;
gcc6Stdenv = foldl (flip id) super.gcc6Stdenv staticAdapters;
gcc7Stdenv = foldl (flip id) super.gcc7Stdenv staticAdapters;
gcc8Stdenv = foldl (flip id) super.gcc8Stdenv staticAdapters;
gcc9Stdenv = foldl (flip id) super.gcc9Stdenv staticAdapters;
llvmPackages_5 = llvmStaticAdapter super.llvmPackages_5;
llvmPackages_6 = llvmStaticAdapter super.llvmPackages_6;
llvmPackages_7 = llvmStaticAdapter super.llvmPackages_7;
llvmPackages_8 = llvmStaticAdapter super.llvmPackages_8;
llvmPackages_9 = llvmStaticAdapter super.llvmPackages_9;
llvmPackages_10 = llvmStaticAdapter super.llvmPackages_10;
llvmPackages_11 = llvmStaticAdapter super.llvmPackages_11;
llvmPackages_12 = llvmStaticAdapter super.llvmPackages_12;
boost = super.boost.override {
# Dont use new stdenv for boost because it doesnt like the
# --disable-shared flag