Skip to content

Commit b39924f

Browse files
committed
Merge #179844: staging-next 2022-07-01
2 parents 0be91ce + add0201 commit b39924f

77 files changed

Lines changed: 926 additions & 540 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/languages-frameworks/perl.section.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Perl {#sec-language-perl}
22

3-
## Running perl programs on the shell {#ssec-perl-running}
3+
## Running Perl programs on the shell {#ssec-perl-running}
44

55
When executing a Perl script, it is possible you get an error such as `./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory`. This happens when the script expects Perl to be installed at `/usr/bin/perl`, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
66

@@ -35,15 +35,16 @@ Perl packages from CPAN are defined in [pkgs/top-level/perl-packages.nix](https:
3535

3636
```nix
3737
ClassC3 = buildPerlPackage rec {
38-
name = "Class-C3-0.21";
38+
pname = "Class-C3";
39+
version = "0.21";
3940
src = fetchurl {
40-
url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
41+
url = "mirror://cpan/authors/id/F/FL/FLORA/${pname}-${version}.tar.gz";
4142
sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
4243
};
4344
};
4445
```
4546

46-
Note the use of `mirror://cpan/`, and the `${name}` in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write
47+
Note the use of `mirror://cpan/`, and the `pname` and `version` in the URL definition to ensure that the `pname` attribute is consistent with the source that we’re actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write
4748

4849
```nix
4950
foo = import ../path/to/foo.nix {
@@ -72,10 +73,11 @@ So what does `buildPerlPackage` do? It does the following:
7273
{ buildPerlPackage, fetchurl, db }:
7374
7475
buildPerlPackage rec {
75-
name = "BerkeleyDB-0.36";
76+
pname = "BerkeleyDB";
77+
version = "0.36";
7678
7779
src = fetchurl {
78-
url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
80+
url = "mirror://cpan/authors/id/P/PM/PMQS/${pname}-${version}.tar.gz";
7981
sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
8082
};
8183
@@ -90,9 +92,10 @@ Dependencies on other Perl packages can be specified in the `buildInputs` and `p
9092

9193
```nix
9294
ClassC3Componentised = buildPerlPackage rec {
93-
name = "Class-C3-Componentised-1.0004";
95+
pname = "Class-C3-Componentised";
96+
version = "1.0004";
9497
src = fetchurl {
95-
url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
98+
url = "mirror://cpan/authors/id/A/AS/ASH/${pname}-${version}.tar.gz";
9699
sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
97100
};
98101
propagatedBuildInputs = [
@@ -111,7 +114,7 @@ ImageExifTool = buildPerlPackage {
111114
version = "11.50";
112115
113116
src = fetchurl {
114-
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
117+
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/${pname}-${version}.tar.gz";
115118
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
116119
};
117120
@@ -139,9 +142,10 @@ This program takes a Perl module name, looks it up on CPAN, fetches and unpacks
139142
```ShellSession
140143
$ nix-generate-from-cpan XML::Simple
141144
XMLSimple = buildPerlPackage rec {
142-
name = "XML-Simple-2.22";
145+
pname = "XML-Simple";
146+
version = "2.22";
143147
src = fetchurl {
144-
url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
148+
url = "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-2.22.tar.gz";
145149
sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
146150
};
147151
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];

pkgs/applications/networking/cluster/kompose/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kompose }:
1+
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kompose, git }:
22

33
buildGoModule rec {
44
pname = "kompose";
@@ -13,7 +13,7 @@ buildGoModule rec {
1313

1414
vendorSha256 = "sha256-OR5U2PnebO0a+lwU09Dveh0Yxk91cmSRorTxQIO5lHc=";
1515

16-
nativeBuildInputs = [ installShellFiles ];
16+
nativeBuildInputs = [ installShellFiles git ];
1717

1818
ldflags = [ "-s" "-w" ];
1919

pkgs/applications/version-management/git-and-tools/gitbatch/default.nix

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, buildGoModule, fetchFromGitHub }:
1+
{ lib, buildGoModule, fetchFromGitHub, git }:
22

33
buildGoModule rec {
44
pname = "gitbatch";
@@ -15,7 +15,15 @@ buildGoModule rec {
1515

1616
ldflags = [ "-s" "-w" ];
1717

18-
checkFlags = [ "-short" ];
18+
nativeBuildInputs = [
19+
git # required by unit tests
20+
];
21+
22+
preCheck = ''
23+
HOME=$(mktemp -d)
24+
# Disable tests requiring network access to gitlab.com
25+
buildFlagsArray+=("-run" "[^(Test(Run|Start|(Fetch|Pull)With(Go|)Git))]")
26+
'';
1927

2028
meta = with lib; {
2129
description = "Running git UI commands";

pkgs/data/misc/cacert/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let
2020
blocklist = writeText "cacert-blocklist.txt" (lib.concatStringsSep "\n" blacklist);
2121
extraCertificatesBundle = writeText "cacert-extra-certificates-bundle.crt" (lib.concatStringsSep "\n\n" extraCertificateStrings);
2222

23-
srcVersion = "3.77";
23+
srcVersion = "3.80";
2424
version = if nssOverride != null then nssOverride.version else srcVersion;
2525
meta = with lib; {
2626
homepage = "https://curl.haxx.se/docs/caextract.html";
@@ -35,7 +35,7 @@ let
3535

3636
src = if nssOverride != null then nssOverride.src else fetchurl {
3737
url = "mirror://mozilla/security/nss/releases/NSS_${lib.replaceStrings ["."] ["_"] version}_RTM/src/nss-${version}.tar.gz";
38-
sha256 = "1pfy33b51914sivqyaxdwfd930hzb77gm07z4f57hnyk5xddypl2";
38+
sha256 = "sha256-wL8f0sfimmsCswliK6r8RD7skMiTS7FV2ku5iYh4S2o=";
3939
};
4040

4141
dontBuild = true;

pkgs/development/compilers/gcc/10/default.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ with lib;
5353
with builtins;
5454

5555
let majorVersion = "10";
56-
version = "${majorVersion}.3.0";
56+
version = "${majorVersion}.4.0";
5757

5858
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
5959

60-
patches = [ ./gcc10-asan-glibc-2.34.patch ]
60+
patches = [ ]
6161
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
6262
++ optional noSysDirs ../no-sys-dirs.patch
6363
++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv.patch
@@ -73,8 +73,6 @@ let majorVersion = "10";
7373
# Obtain latest patch with ../update-mcfgthread-patches.sh
7474
++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch
7575

76-
++ [ ../libsanitizer-no-cyclades.patch ]
77-
7876
++ optional (buildPlatform.system == "aarch64-darwin" && targetPlatform != buildPlatform) (fetchpatch {
7977
url = "https://raw.githubusercontent.com/richard-vd/musl-cross-make/5e9e87f06fc3220e102c29d3413fbbffa456fcd6/patches/gcc-${version}/0008-darwin-aarch64-self-host-driver.patch";
8078
sha256 = "sha256-XtykrPd5h/tsnjY1wGjzSOJ+AyyNLsfnjuOZ5Ryq9vA=";
@@ -95,7 +93,7 @@ stdenv.mkDerivation ({
9593

9694
src = fetchurl {
9795
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
98-
sha256 = "0i6378ig6h397zkhd7m4ccwjx5alvzrf2hm27p1pzwjhlv0h9x34";
96+
sha256 = "1wg4xdizkksmwi66mvv2v4pk3ja8x64m7v9gzhykzd3wrmdpsaf9";
9997
};
10098

10199
inherit patches;

pkgs/development/compilers/gcc/10/gcc10-asan-glibc-2.34.patch

Lines changed: 0 additions & 70 deletions
This file was deleted.

pkgs/development/compilers/ghc/8.6.5-binary.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ assert stdenv.targetPlatform == stdenv.hostPlatform;
1212
let
1313
useLLVM = !stdenv.targetPlatform.isx86;
1414

15-
useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux";
15+
useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux"
16+
|| (with stdenv.hostPlatform; isPower64 && isLittleEndian);
1617

1718
ourNcurses = if useNcurses6 then ncurses6 else ncurses5;
1819

@@ -73,6 +74,10 @@ stdenv.mkDerivation rec {
7374
url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
7475
sha256 = "0s9188vhhgf23q3rjarwhbr524z6h2qga5xaaa2pma03sfqvvhfz";
7576
};
77+
powerpc64le-linux = {
78+
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-powerpc64le-fedora29-linux.tar.xz";
79+
sha256 = "sha256-tWSsJdPVrCiqDyIKzpBt5DaXb3b6j951tCya584kWs4=";
80+
};
7681
}.${stdenv.hostPlatform.system}
7782
or (throw "cannot bootstrap GHC on this platform"));
7883

@@ -211,7 +216,7 @@ stdenv.mkDerivation rec {
211216

212217
meta = rec {
213218
license = lib.licenses.bsd3;
214-
platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
219+
platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin" "powerpc64le-linux" ];
215220
# build segfaults, use ghc8102Binary which has proper musl support instead
216221
broken = stdenv.hostPlatform.isMusl;
217222
maintainers = with lib.maintainers; [

pkgs/development/go-modules/generic/default.nix

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,22 @@ let
178178
exclude+='\)'
179179
180180
buildGoDir() {
181-
local d; local cmd;
182-
cmd="$1"
183-
d="$2"
181+
local cmd="$1" dir="$2"
182+
184183
. $TMPDIR/buildFlagsArray
184+
185+
declare -a flags
186+
flags+=($buildFlags "''${buildFlagsArray[@]}")
187+
flags+=(''${tags:+-tags=${lib.concatStringsSep "," tags}})
188+
flags+=(''${ldflags:+-ldflags="$ldflags"})
189+
flags+=("-v" "-p" "$NIX_BUILD_CORES")
190+
191+
if [ "$cmd" = "test" ]; then
192+
flags+=($checkFlags)
193+
fi
194+
185195
local OUT
186-
if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" ''${tags:+-tags=${lib.concatStringsSep "," tags}} ''${ldflags:+-ldflags="$ldflags"} -v -p $NIX_BUILD_CORES $d 2>&1)"; then
196+
if ! OUT="$(go $cmd "''${flags[@]}" $dir 2>&1)"; then
187197
if ! echo "$OUT" | grep -qE '(no( buildable| non-test)?|build constraints exclude all) Go (source )?files'; then
188198
echo "$OUT" >&2
189199
return 1
@@ -241,7 +251,7 @@ let
241251
runHook preCheck
242252
243253
for pkg in $(getGoDirs test); do
244-
buildGoDir test $checkFlags "$pkg"
254+
buildGoDir test "$pkg"
245255
done
246256
247257
runHook postCheck

pkgs/development/go-packages/generic/default.nix

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,22 @@ let
160160
exclude+='\)'
161161
162162
buildGoDir() {
163-
local d; local cmd;
164-
cmd="$1"
165-
d="$2"
163+
local cmd="$1" dir="$2"
164+
166165
. $TMPDIR/buildFlagsArray
166+
167+
declare -a flags
168+
flags+=($buildFlags "''${buildFlagsArray[@]}")
169+
flags+=(''${tags:+-tags=${lib.concatStringsSep "," tags}})
170+
flags+=(''${ldflags:+-ldflags="$ldflags"})
171+
flags+=("-v" "-p" "$NIX_BUILD_CORES")
172+
173+
if [ "$cmd" = "test" ]; then
174+
flags+=($checkFlags)
175+
fi
176+
167177
local OUT
168-
if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" ''${tags:+-tags=${lib.concatStringsSep "," tags}} ''${ldflags:+-ldflags="$ldflags"} -v -p $NIX_BUILD_CORES $d 2>&1)"; then
178+
if ! OUT="$(go $cmd "''${flags[@]}" $dir 2>&1)"; then
169179
if ! echo "$OUT" | grep -qE '(no( buildable| non-test)?|build constraints exclude all) Go (source )?files'; then
170180
echo "$OUT" >&2
171181
return 1
@@ -225,7 +235,7 @@ let
225235
runHook preCheck
226236
227237
for pkg in $(getGoDirs test); do
228-
buildGoDir test $checkFlags "$pkg"
238+
buildGoDir test "$pkg"
229239
done
230240
231241
runHook postCheck

pkgs/development/libraries/audio/libopenmpt/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
stdenv.mkDerivation rec {
1818
pname = "libopenmpt";
19-
version = "0.6.3";
19+
version = "0.6.4";
2020

2121
outputs = [ "out" "dev" "bin" ];
2222

2323
src = fetchurl {
2424
url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
25-
sha256 = "pBCv63zVlwsWuabOfazPSVsaXpEhqdZELeDAKP1Uols=";
25+
sha256 = "4J+4RcMpJwCnrBPDsx1mns072+vL/hMo66I3bOvkAWI=";
2626
};
2727

2828
enableParallelBuilding = true;

0 commit comments

Comments
 (0)