nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

Merge staging-next into staging

authored by

github-actions[bot] and committed by
GitHub
3862bdd2 aa164b77

+215 -47
+46 -15
doc/languages-frameworks/dhall.section.md
··· 50 50 check, so the first step is to freeze the expression using `dhall freeze`, 51 51 like this: 52 52 53 - ```bash 53 + ```ShellSession 54 54 $ dhall freeze --inplace ./true.dhall 55 55 ``` 56 56 ··· 113 113 114 114 … which we can then build using this command: 115 115 116 - ```bash 116 + ```ShellSession 117 117 $ nix build --file ./example.nix dhallPackages.true 118 118 ``` 119 119 ··· 121 121 122 122 The above package produces the following directory tree: 123 123 124 - ```bash 124 + ```ShellSession 125 125 $ tree -a ./result 126 126 result 127 127 ├── .cache ··· 135 135 136 136 * `source.dhall` contains the result of interpreting our Dhall package: 137 137 138 - ```bash 138 + ```ShellSession 139 139 $ cat ./result/source.dhall 140 140 True 141 141 ``` ··· 143 143 * The `.cache` subdirectory contains one binary cache product encoding the 144 144 same result as `source.dhall`: 145 145 146 - ```bash 146 + ```ShellSession 147 147 $ dhall decode < ./result/.cache/dhall/122027abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70 148 148 True 149 149 ``` ··· 151 151 * `binary.dhall` contains a Dhall expression which handles fetching and decoding 152 152 the same cache product: 153 153 154 - ```bash 154 + ```ShellSession 155 155 $ cat ./result/binary.dhall 156 156 missing sha256:27abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70 157 157 $ cp -r ./result/.cache .cache ··· 168 168 example, if we build the Prelude package it will only contain the binary 169 169 encoding of the expression: 170 170 171 - ```bash 171 + ```ShellSession 172 172 $ nix build --file ./example.nix dhallPackages.Prelude 173 173 174 174 $ tree -a result ··· 199 199 … and now the Prelude will contain the fully decoded result of interpreting 200 200 the Prelude: 201 201 202 - ```bash 202 + ```ShellSession 203 203 $ nix build --file ./example.nix dhallPackages.Prelude 204 204 205 205 $ tree -a result ··· 302 302 You can use the `dhall-to-nixpkgs` command-line utility to automate 303 303 packaging Dhall code. For example: 304 304 305 - ```bash 305 + ```ShellSession 306 306 $ nix-env --install --attr haskellPackages.dhall-nixpkgs 307 307 308 308 $ nix-env --install --attr nix-prefetch-git # Used by dhall-to-nixpkgs ··· 329 329 them to package dependencies. You can also use the utility on local 330 330 Dhall directories, too: 331 331 332 - ```bash 332 + ```ShellSession 333 333 $ dhall-to-nixpkgs directory ~/proj/dhall-semver 334 334 { buildDhallDirectoryPackage, Prelude }: 335 335 buildDhallDirectoryPackage { 336 336 name = "proj"; 337 - src = /Users/gabriel/proj/dhall-semver; 337 + src = ~/proj/dhall-semver; 338 338 file = "package.dhall"; 339 339 source = false; 340 340 document = false; 341 341 dependencies = [ (Prelude.overridePackage { file = "package.dhall"; }) ]; 342 342 } 343 343 ``` 344 + 345 + ### Remote imports as fixed-output derivations {#ssec-dhall-remote-imports-as-fod} 346 + 347 + `dhall-to-nixpkgs` has the ability to fetch and build remote imports as 348 + fixed-output derivations by using their Dhall integrity check. This is 349 + sometimes easier than manually packaging all remote imports. 350 + 351 + This can be used like the following: 352 + 353 + ```ShellSession 354 + $ dhall-to-nixpkgs directory --fixed-output-derivations ~/proj/dhall-semver 355 + { buildDhallDirectoryPackage, buildDhallUrl }: 356 + buildDhallDirectoryPackage { 357 + name = "proj"; 358 + src = ~/proj/dhall-semver; 359 + file = "package.dhall"; 360 + source = false; 361 + document = false; 362 + dependencies = [ 363 + (buildDhallUrl { 364 + url = "https://prelude.dhall-lang.org/v17.0.0/package.dhall"; 365 + hash = "sha256-ENs8kZwl6QRoM9+Jeo/+JwHcOQ+giT2VjDQwUkvlpD4="; 366 + dhallHash = "sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e"; 367 + }) 368 + ]; 369 + } 370 + ``` 371 + 372 + Here, `dhall-semver`'s `Prelude` dependency is fetched and built with the 373 + `buildDhallUrl` helper function, instead of being passed in as a function 374 + argument. 344 375 345 376 ## Overriding dependency versions {#ssec-dhall-overriding-dependency-versions} 346 377 ··· 390 359 391 360 If we try to rebuild that expression the build will fail: 392 361 393 - ``` 362 + ```ShellSession 394 363 $ nix build --file ./example.nix dhallPackages.true 395 364 builder for '/nix/store/0f1hla7ff1wiaqyk1r2ky4wnhnw114fi-true.drv' failed with exit code 1; last 10 log lines: 396 365 ··· 416 385 However, we can override the default Prelude version by using `dhall-to-nixpkgs` 417 386 to create a Dhall package for our desired Prelude: 418 387 419 - ```bash 388 + ```ShellSession 420 389 $ dhall-to-nixpkgs github https://github.com/dhall-lang/dhall-lang.git \ 421 390 --name Prelude \ 422 391 --directory Prelude \ ··· 427 396 … and then referencing that package in our Dhall overlay, by either overriding 428 397 the Prelude globally for all packages, like this: 429 398 430 - ```bash 399 + ```nix 431 400 dhallOverrides = self: super: { 432 401 true = self.callPackage ./true.nix { }; 433 402 ··· 438 407 … or selectively overriding the Prelude dependency for just the `true` package, 439 408 like this: 440 409 441 - ```bash 410 + ```nix 442 411 dhallOverrides = self: super: { 443 412 true = self.callPackage ./true.nix { 444 413 Prelude = self.callPackage ./Prelude.nix { };
+2 -2
pkgs/applications/editors/kakoune/default.nix
··· 4 4 5 5 stdenv.mkDerivation rec { 6 6 pname = "kakoune-unwrapped"; 7 - version = "2021.10.28"; 7 + version = "2021.11.08"; 8 8 src = fetchFromGitHub { 9 9 repo = "kakoune"; 10 10 owner = "mawww"; 11 11 rev = "v${version}"; 12 - sha256 = "sha256-ph0063EHyFa7arXvCVD+tGhs8ShyCDYkFVd1w6MZ5Z8="; 12 + sha256 = "sha256-lMGMt0H1G8EN/7zSVSvU1yU4BYPnSF1vWmozLdrRTQk="; 13 13 }; 14 14 makeFlags = [ "debug=no" "PREFIX=${placeholder "out"}" ]; 15 15
+2 -2
pkgs/applications/misc/numberstation/default.nix
··· 15 15 16 16 python3.pkgs.buildPythonApplication rec { 17 17 pname = "numberstation"; 18 - version = "0.5.0"; 18 + version = "1.0.0"; 19 19 20 20 format = "other"; 21 21 ··· 23 23 owner = "~martijnbraam"; 24 24 repo = "numberstation"; 25 25 rev = version; 26 - sha256 = "1hh66i0rfm85a97iajxlh965wk68hn0kkfgi9cljjkqf98xiy0bb"; 26 + sha256 = "1mr0rmm7hcyn8qr485h1ihbb5f581sab4fgvs7lhwy9lxsqk0r0l"; 27 27 }; 28 28 29 29 postPatch = ''
+5 -4
pkgs/applications/networking/cluster/kubebuilder/default.nix
··· 4 4 , makeWrapper 5 5 , git 6 6 , go 7 + , gnumake 7 8 }: 8 9 9 10 buildGoModule rec { 10 11 pname = "kubebuilder"; 11 - version = "3.1.0"; 12 + version = "3.2.0"; 12 13 13 14 src = fetchFromGitHub { 14 15 owner = "kubernetes-sigs"; 15 16 repo = "kubebuilder"; 16 17 rev = "v${version}"; 17 - sha256 = "0bl5ff2cplal6hg75800crhyviamk1ws85sq60h4zg21hzf21y68"; 18 + sha256 = "sha256-V/g2RHnZPa/9hkVG5WVXmbx6hnJAwUEyyUX/Q3OR2DM="; 18 19 }; 19 - vendorSha256 = "0zxyd950ksjswja64rfri5v2yaalfg6qmq8215ildgrcavl9974n"; 20 + vendorSha256 = "sha256-bTCLuAo5xXNoafjGpjKLKlKVKB29PEFwdPu9+qjvufs="; 20 21 21 22 subPackages = ["cmd"]; 22 23 ··· 34 33 postInstall = '' 35 34 mv $out/bin/cmd $out/bin/kubebuilder 36 35 wrapProgram $out/bin/kubebuilder \ 37 - --prefix PATH : ${lib.makeBinPath [ go ]} 36 + --prefix PATH : ${lib.makeBinPath [ go gnumake ]} 38 37 ''; 39 38 40 39 allowGoReference = true;
+1
pkgs/applications/video/handbrake/default.nix
··· 228 228 license = licenses.gpl2Only; 229 229 maintainers = with maintainers; [ Anton-Latukha wmertens ]; 230 230 platforms = with platforms; unix; 231 + broken = stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13"; 231 232 }; 232 233 }
+2 -2
pkgs/data/icons/whitesur-icon-theme/default.nix
··· 2 2 3 3 stdenvNoCC.mkDerivation rec { 4 4 pname = "Whitesur-icon-theme"; 5 - version = "2021-10-13"; 5 + version = "2021-11-08"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = "vinceliuice"; 9 9 repo = pname; 10 10 rev = version; 11 - sha256 = "BP5hGi3G9zNUSfeCbwYUvd3jMcWhstXiDeZCJ6Hgey8="; 11 + sha256 = "LZ0GLJFUUvzsPhU2sBkfy5mPpQHuPzYhbumwFKnogoA="; 12 12 }; 13 13 14 14 nativeBuildInputs = [ gtk3 ];
+96
pkgs/development/interpreters/dhall/build-dhall-url.nix
··· 1 + { cacert, dhall, dhall-docs, haskell, lib, runCommand }: 2 + 3 + # `buildDhallUrl` is similar to `buildDhallDirectoryPackage` or 4 + # `buildDhallGitHubPackage`, but instead builds a Nixpkgs Dhall package 5 + # based on a hashed URL. This will generally be a URL that has an integrity 6 + # check in a Dhall file. 7 + # 8 + # Similar to `buildDhallDirectoryPackage` and `buildDhallGitHubPackage`, the output 9 + # of this function is a derivation that has a `binary.dhall` file, along with 10 + # a `.cache/` directory with the actual contents of the Dhall file from the 11 + # suppiled URL. 12 + # 13 + # This function is primarily used by `dhall-to-nixpkgs directory --fixed-output-derivations`. 14 + 15 + { # URL of the input Dhall file. 16 + # example: "https://raw.githubusercontent.com/cdepillabout/example-dhall-repo/c1b0d0327146648dcf8de997b2aa32758f2ed735/example1.dhall" 17 + url 18 + 19 + # Nix hash of the input Dhall file. 20 + # example: "sha256-ZTSiQUXpPbPfPvS8OeK6dDQE6j6NbP27ho1cg9YfENI=" 21 + , hash 22 + 23 + # Dhall hash of the input Dhall file. 24 + # example: "sha256:6534a24145e93db3df3ef4bc39e2ba743404ea3e8d6cfdbb868d5c83d61f10d2" 25 + , dhallHash 26 + 27 + # Name for this derivation. 28 + , name ? (baseNameOf url + "-cache") 29 + 30 + # `buildDhallUrl` can include both a "source distribution" in 31 + # `source.dhall` and a "binary distribution" in `binary.dhall`: 32 + # 33 + # * `source.dhall` is a dependency-free αβ-normalized Dhall expression 34 + # 35 + # * `binary.dhall` is an expression of the form: `missing sha256:${HASH}` 36 + # 37 + # This expression requires you to install the cache product located at 38 + # `.cache/dhall/1220${HASH}` to successfully resolve 39 + # 40 + # By default, `buildDhallUrl` only includes "binary.dhall" to conserve 41 + # space within the Nix store, but if you set the following `source` option to 42 + # `true` then the package will also include `source.dhall`. 43 + , source ? false 44 + }: 45 + 46 + let 47 + # HTTP support is disabled in order to force that HTTP dependencies are built 48 + # using Nix instead of using Dhall's support for HTTP imports. 49 + dhallNoHTTP = haskell.lib.appendConfigureFlag dhall "-f-with-http"; 50 + 51 + # This uses Dhall's remote importing capabilities for downloading a Dhall file. 52 + # The output Dhall file has all imports resolved, and then is 53 + # alpha-normalized and binary-encoded. 54 + downloadedEncodedFile = 55 + runCommand 56 + (baseNameOf url) 57 + { 58 + outputHashAlgo = null; 59 + outputHash = hash; 60 + name = baseNameOf url; 61 + nativeBuildInputs = [ cacert ]; 62 + } 63 + '' 64 + echo "${url} ${dhallHash}" > in-dhall-file 65 + ${dhall}/bin/dhall --alpha --plain --file in-dhall-file | ${dhallNoHTTP}/bin/dhall encode > $out 66 + ''; 67 + 68 + cache = ".cache"; 69 + 70 + data = ".local/share"; 71 + 72 + cacheDhall = "${cache}/dhall"; 73 + 74 + dataDhall = "${data}/dhall"; 75 + 76 + sourceFile = "source.dhall"; 77 + 78 + in 79 + runCommand name { } ('' 80 + set -eu 81 + 82 + mkdir -p ${cacheDhall} $out/${cacheDhall} 83 + 84 + export XDG_CACHE_HOME=$PWD/${cache} 85 + 86 + SHA_HASH="${dhallHash}" 87 + 88 + HASH_FILE="''${SHA_HASH/sha256:/1220}" 89 + 90 + cp ${downloadedEncodedFile} $out/${cacheDhall}/$HASH_FILE 91 + 92 + echo "missing $SHA_HASH" > $out/binary.dhall 93 + '' + 94 + lib.optionalString source '' 95 + ${dhallNoHTTP}/bin/dhall decode --file ${downloadedEncodedFile} > $out/${sourceFile} 96 + '')
+1 -1
pkgs/development/php-packages/phpmd/default.nix
··· 27 27 license = licenses.bsd3; 28 28 homepage = "https://phpmd.org/"; 29 29 maintainers = teams.php.members; 30 - broken = versionAtLeast php.version "7.4"; 30 + broken = versionOlder php.version "7.4"; 31 31 }; 32 32 }
+13 -1
pkgs/development/python-modules/slackclient/default.nix
··· 1 1 { lib 2 + , stdenv 2 3 , aiohttp 3 4 , buildPythonPackage 4 5 , codecov ··· 52 51 53 52 # Exclude tests that requires network features 54 53 pytestFlagsArray = [ "--ignore=integration_tests" ]; 55 - disabledTests = [ "test_start_raises_an_error_if_rtm_ws_url_is_not_returned" ]; 54 + 55 + disabledTests = [ 56 + "test_start_raises_an_error_if_rtm_ws_url_is_not_returned" 57 + ] ++ lib.optionals stdenv.isDarwin [ 58 + # these fail with `ConnectionResetError: [Errno 54] Connection reset by peer` 59 + "test_issue_690_oauth_access" 60 + "test_issue_690_oauth_v2_access" 61 + "test_send" 62 + "test_send_attachments" 63 + "test_send_blocks" 64 + "test_send_dict" 65 + ]; 56 66 57 67 pythonImportsCheck = [ "slack" ]; 58 68
+4
pkgs/os-specific/linux/nvidia-x11/default.nix
··· 45 45 url = "https://developer.nvidia.com/vulkan-beta-${lib.concatStrings (lib.splitString "." version)}-linux"; 46 46 }; 47 47 48 + # Update note: 49 + # If you add a legacy driver here, also update `top-level/linux-kernels.nix`, 50 + # adding to the `nvidia_x11_legacy*` entries. 51 + 48 52 # Last one supporting Kepler architecture 49 53 legacy_470 = generic { 50 54 version = "470.82.00";
+2
pkgs/test/default.nix
··· 58 58 }; 59 59 60 60 writers = callPackage ../build-support/writers/test.nix {}; 61 + 62 + dhall = callPackage ./dhall { }; 61 63 }
+14
pkgs/test/dhall/buildDhallUrl/default.nix
··· 1 + { dhallPackages, lib }: 2 + 3 + # This file tests that dhallPackages.buildDhallUrl is able to successfully 4 + # build a Nix Dhall package for a given remote Dhall import. 5 + # 6 + # TODO: It would be nice to extend this test to make sure that the resulting 7 + # Nix Dhall package is has the expected contents. 8 + 9 + dhallPackages.buildDhallUrl { 10 + url = "https://raw.githubusercontent.com/cdepillabout/example-dhall-nix/e6a675c72ecd4dd23d254a02aea8181fe875747f/mydhallfile.dhall"; 11 + hash = "sha256-434x+QjHRzuprBdw0h6wmwB1Zj6yZqQb533me8XdO4c="; 12 + dhallHash = "sha256:e37e31f908c7473ba9ac1770d21eb09b0075663eb266a41be77de67bc5dd3b87"; 13 + source = true; 14 + }
+5
pkgs/test/dhall/default.nix
··· 1 + { lib, callPackage }: 2 + 3 + lib.recurseIntoAttrs { 4 + buildDhallUrl = callPackage ./buildDhallUrl { }; 5 + }
+3 -3
pkgs/tools/backup/autorestic/default.nix
··· 2 2 3 3 buildGoModule rec { 4 4 pname = "autorestic"; 5 - version = "1.2.0"; 5 + version = "1.3.0"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = "cupcakearmy"; 9 9 repo = pname; 10 10 rev = "v${version}"; 11 - sha256 = "yQgSJ0SQNWPMyrYn8rep+1b549HP8sOERh+kOiAK3+c="; 11 + sha256 = "sha256-kd4nhfqKbJM7w1Prqiy+UBaa2SmZDgeSZzZTXTZ30yA="; 12 12 }; 13 13 14 - vendorSha256 = "7648gAguqeqLKFS9xRcx20wpSLb+ykZ7rOqR5PKe71o="; 14 + vendorSha256 = "sha256-eKsPdmPJXiCwvb2A28tNxF4xStry3iA6aLb+XYFJYSg="; 15 15 16 16 nativeBuildInputs = [ installShellFiles ]; 17 17
+3 -3
pkgs/tools/backup/kopia/default.nix
··· 2 2 3 3 buildGoModule rec { 4 4 pname = "kopia"; 5 - version = "0.9.4"; 5 + version = "0.9.5"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = pname; 9 9 repo = pname; 10 10 rev = "v${version}"; 11 - sha256 = "sha256-+zfkFusLoYITIStk3ZobeuN3MFeY5T6pbiUEc4IT1UA="; 11 + sha256 = "sha256-1HCpUfK8y4BaBluThpRVeXTPgMUym6R+WXCO+2pRNjc="; 12 12 }; 13 13 14 - vendorSha256 = "sha256-v81YkImg8GdI5locfsU4dg2JyO7XB24mfHRIZ+k8QBA="; 14 + vendorSha256 = "sha256-tYu1T4oHkvj4QOS/e/6N9IjMlxrGKosQ78DVgAyh6/Q="; 15 15 16 16 doCheck = false; 17 17
+10 -13
pkgs/tools/package-management/nix/default.nix
··· 77 77 78 78 propagatedBuildInputs = [ boehmgc ]; 79 79 80 - # Seems to be required when using std::atomic with 64-bit types 81 - NIX_LDFLAGS = 82 - # need to list libraries individually until 80 + NIX_LDFLAGS = lib.optionals (!is24) [ 83 81 # https://github.com/NixOS/nix/commit/3e85c57a6cbf46d5f0fe8a89b368a43abd26daba 84 - # is in a release 85 - lib.optionalString enableStatic "-lssl -lbrotlicommon -lssh2 -lz -lnghttp2 -lcrypto" 86 - 87 - # need to detect it here until 82 + (lib.optionalString enableStatic "-lssl -lbrotlicommon -lssh2 -lz -lnghttp2 -lcrypto") 88 83 # https://github.com/NixOS/nix/commits/74b4737d8f0e1922ef5314a158271acf81cd79f8 89 - # is in a release 90 - + lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic"; 84 + (lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic") 85 + ]; 91 86 92 87 preConfigure = 93 88 # Copy libboost_context so we don't get all of Boost in our closure. ··· 147 152 export TMPDIR=$NIX_BUILD_TOP 148 153 ''; 149 154 150 - separateDebugInfo = stdenv.isLinux; 155 + separateDebugInfo = stdenv.isLinux && (is24 -> !enableStatic); 151 156 152 157 enableParallelBuilding = true; 153 158 ··· 213 218 214 219 nix = nixStable; 215 220 216 - nixStable = callPackage common (rec { 221 + nixStable = nix_2_3; 222 + 223 + nix_2_3 = callPackage common (rec { 217 224 pname = "nix"; 218 225 version = "2.3.16"; 219 226 src = fetchurl { ··· 230 233 231 234 nix_2_4 = callPackage common (rec { 232 235 pname = "nix"; 233 - version = "2.4pre-rc1"; 236 + version = "2.4"; 234 237 235 238 src = fetchFromGitHub { 236 239 owner = "NixOS"; 237 240 repo = "nix"; 238 241 rev = version; 239 - sha256 = "sha256-KOb8etMm5LksvT2l+CkvqzMO1bgmo9tJmyaNh0LvaR8="; 242 + sha256 = "sha256-op48CCDgLHK0qV1Batz4Ln5FqBiRjlE6qHTiZgt3b6k="; 240 243 }; 241 244 242 245 boehmgc = boehmgc_nixUnstable;
+1 -1
pkgs/top-level/aliases.nix
··· 590 590 nginxUnstable = nginxMainline; # added 2018-04-25 591 591 nilfs_utils = nilfs-utils; # added 2018-04-25 592 592 nix-review = nixpkgs-review; # added 2019-12-22 593 - nixFlakes = nixUnstable; # added 2021-05-21 593 + nixFlakes = nix_2_4; # added 2021-05-21 594 594 nmap_graphical = nmap-graphical; # added 2017-01-19 595 595 nmap-unfree = nmap; # added 2021-04-06 596 596 nologin = shadow; # added 2018-04-25
+1
pkgs/top-level/all-packages.nix
··· 32252 32252 }) 32253 32253 nix 32254 32254 nixStable 32255 + nix_2_3 32255 32256 nix_2_4 32256 32257 nixUnstable; 32257 32258
+4
pkgs/top-level/dhall-packages.nix
··· 17 17 buildDhallDirectoryPackage = 18 18 callPackage ../development/interpreters/dhall/build-dhall-directory-package.nix { }; 19 19 20 + buildDhallUrl = 21 + callPackage ../development/interpreters/dhall/build-dhall-url.nix { }; 22 + 20 23 in 21 24 { inherit 22 25 callPackage 23 26 buildDhallPackage 24 27 buildDhallGitHubPackage 25 28 buildDhallDirectoryPackage 29 + buildDhallUrl 26 30 ; 27 31 28 32 lib = import ../development/dhall-modules/lib.nix { inherit lib; };