Skip to content

Commit

Permalink
Merge master into haskell-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 4, 2022
2 parents 42c3938 + 8f0612b commit 3e2f6a2
Show file tree
Hide file tree
Showing 91 changed files with 2,499 additions and 599 deletions.
26 changes: 12 additions & 14 deletions lib/systems/examples.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,23 @@ rec {
config = "mipsel-unknown-linux-gnu";
} // platforms.fuloong2f_n32;

# MIPS ABI table transcribed from here: https://wiki.debian.org/Multiarch/Tuples

# can execute on 32bit chip
mips-linux-gnu = { config = "mips-linux-gnu"; } // platforms.gcc_mips32r2_o32;
mipsel-linux-gnu = { config = "mipsel-linux-gnu"; } // platforms.gcc_mips32r2_o32;
mipsisa32r6-linux-gnu = { config = "mipsisa32r6-linux-gnu"; } // platforms.gcc_mips32r6_o32;
mipsisa32r6el-linux-gnu = { config = "mipsisa32r6el-linux-gnu"; } // platforms.gcc_mips32r6_o32;
mips-linux-gnu = { config = "mips-unknown-linux-gnu"; } // platforms.gcc_mips32r2_o32;
mipsel-linux-gnu = { config = "mipsel-unknown-linux-gnu"; } // platforms.gcc_mips32r2_o32;
mipsisa32r6-linux-gnu = { config = "mipsisa32r6-unknown-linux-gnu"; } // platforms.gcc_mips32r6_o32;
mipsisa32r6el-linux-gnu = { config = "mipsisa32r6el-unknown-linux-gnu"; } // platforms.gcc_mips32r6_o32;

# require 64bit chip (for more registers, 64-bit floating point, 64-bit "long long") but use 32bit pointers
mips64-linux-gnuabin32 = { config = "mips64-linux-gnuabin32"; } // platforms.gcc_mips64r2_n32;
mips64el-linux-gnuabin32 = { config = "mips64el-linux-gnuabin32"; } // platforms.gcc_mips64r2_n32;
mipsisa64r6-linux-gnuabin32 = { config = "mipsisa64r6-linux-gnuabin32"; } // platforms.gcc_mips64r6_n32;
mipsisa64r6el-linux-gnuabin32 = { config = "mipsisa64r6el-linux-gnuabin32"; } // platforms.gcc_mips64r6_n32;
mips64-linux-gnuabin32 = { config = "mips64-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r2_n32;
mips64el-linux-gnuabin32 = { config = "mips64el-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r2_n32;
mipsisa64r6-linux-gnuabin32 = { config = "mipsisa64r6-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r6_n32;
mipsisa64r6el-linux-gnuabin32 = { config = "mipsisa64r6el-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r6_n32;

# 64bit pointers
mips64-linux-gnuabi64 = { config = "mips64-linux-gnuabi64"; } // platforms.gcc_mips64r2_64;
mips64el-linux-gnuabi64 = { config = "mips64el-linux-gnuabi64"; } // platforms.gcc_mips64r2_64;
mipsisa64r6-linux-gnuabi64 = { config = "mipsisa64r6-linux-gnuabi64"; } // platforms.gcc_mips64r6_64;
mipsisa64r6el-linux-gnuabi64 = { config = "mipsisa64r6el-linux-gnuabi64"; } // platforms.gcc_mips64r6_64;
mips64-linux-gnuabi64 = { config = "mips64-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r2_64;
mips64el-linux-gnuabi64 = { config = "mips64el-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r2_64;
mipsisa64r6-linux-gnuabi64 = { config = "mipsisa64r6-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r6_64;
mipsisa64r6el-linux-gnuabi64 = { config = "mipsisa64r6el-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r6_64;

muslpi = raspberryPi // {
config = "armv6l-unknown-linux-musleabihf";
Expand Down
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,12 @@
githubId = 13324165;
name = "Bill Ewanick";
};
billhuang = {
email = "[email protected]";
github = "BillHuang2001";
githubId = 11801831;
name = "Bill Huang";
};
binarin = {
email = "[email protected]";
github = "binarin";
Expand Down
35 changes: 30 additions & 5 deletions nixos/doc/manual/configuration/adding-custom-packages.section.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Adding Custom Packages {#sec-custom-packages}

It's possible that a package you need is not available in NixOS. In that
case, you can do two things. First, you can clone the Nixpkgs
repository, add the package to your clone, and (optionally) submit a
patch or pull request to have it accepted into the main Nixpkgs repository.
This is described in detail in the [Nixpkgs manual](https://nixos.org/nixpkgs/manual).
In short, you clone Nixpkgs:
case, you can do two things. Either you can package it with Nix, or you can try
to use prebuilt packages from upstream. Due to the peculiarities of NixOS, it
is important to note that building software from source is often easier than
using pre-built executables.

## Building with Nix {#sec-custom-packages-nix}

This can be done either in-tree or out-of-tree. For an in-tree build, you can
clone the Nixpkgs repository, add the package to your clone, and (optionally)
submit a patch or pull request to have it accepted into the main Nixpkgs
repository. This is described in detail in the [Nixpkgs
manual](https://nixos.org/nixpkgs/manual). In short, you clone Nixpkgs:

```ShellSession
$ git clone https://github.com/NixOS/nixpkgs
Expand Down Expand Up @@ -72,3 +79,21 @@ $ nix-build my-hello.nix
$ ./result/bin/hello
Hello, world!
```

## Using pre-built executables {#sec-custom-packages-prebuilt}

Most pre-built executables will not work on NixOS. There are two notable
exceptions: flatpaks and AppImages. For flatpaks see the [dedicated
section](#module-services-flatpak). AppImages will not run "as-is" on NixOS.
First you need to install `appimage-run`: add to `/etc/nixos/configuration.nix`

```nix
environment.systemPackages = [ pkgs.appimage-run ];
```

Then instead of running the AppImage "as-is", run `appimage-run foo.appimage`.

To make other pre-built executables work on NixOS, you need to package them
with Nix and special helpers like `autoPatchelfHook` or `buildFHSUserEnv`. See
the [Nixpkgs manual](https://nixos.org/nixpkgs/manual) for details. This
is complex and often doing a source build is easier.
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,50 @@
<title>Adding Custom Packages</title>
<para>
It’s possible that a package you need is not available in NixOS. In
that case, you can do two things. First, you can clone the Nixpkgs
repository, add the package to your clone, and (optionally) submit a
patch or pull request to have it accepted into the main Nixpkgs
repository. This is described in detail in the
<link xlink:href="https://nixos.org/nixpkgs/manual">Nixpkgs
manual</link>. In short, you clone Nixpkgs:
that case, you can do two things. Either you can package it with
Nix, or you can try to use prebuilt packages from upstream. Due to
the peculiarities of NixOS, it is important to note that building
software from source is often easier than using pre-built
executables.
</para>
<programlisting>
<section xml:id="sec-custom-packages-nix">
<title>Building with Nix</title>
<para>
This can be done either in-tree or out-of-tree. For an in-tree
build, you can clone the Nixpkgs repository, add the package to
your clone, and (optionally) submit a patch or pull request to
have it accepted into the main Nixpkgs repository. This is
described in detail in the
<link xlink:href="https://nixos.org/nixpkgs/manual">Nixpkgs
manual</link>. In short, you clone Nixpkgs:
</para>
<programlisting>
$ git clone https://github.com/NixOS/nixpkgs
$ cd nixpkgs
</programlisting>
<para>
Then you write and test the package as described in the Nixpkgs
manual. Finally, you add it to
<xref linkend="opt-environment.systemPackages" />, e.g.
</para>
<programlisting language="bash">
<para>
Then you write and test the package as described in the Nixpkgs
manual. Finally, you add it to
<xref linkend="opt-environment.systemPackages" />, e.g.
</para>
<programlisting language="bash">
environment.systemPackages = [ pkgs.my-package ];
</programlisting>
<para>
and you run <literal>nixos-rebuild</literal>, specifying your own
Nixpkgs tree:
</para>
<programlisting>
<para>
and you run <literal>nixos-rebuild</literal>, specifying your own
Nixpkgs tree:
</para>
<programlisting>
# nixos-rebuild switch -I nixpkgs=/path/to/my/nixpkgs
</programlisting>
<para>
The second possibility is to add the package outside of the Nixpkgs
tree. For instance, here is how you specify a build of the
<link xlink:href="https://www.gnu.org/software/hello/">GNU
Hello</link> package directly in
<literal>configuration.nix</literal>:
</para>
<programlisting language="bash">
<para>
The second possibility is to add the package outside of the
Nixpkgs tree. For instance, here is how you specify a build of the
<link xlink:href="https://www.gnu.org/software/hello/">GNU
Hello</link> package directly in
<literal>configuration.nix</literal>:
</para>
<programlisting language="bash">
environment.systemPackages =
let
my-hello = with pkgs; stdenv.mkDerivation rec {
Expand All @@ -48,17 +58,17 @@ environment.systemPackages =
in
[ my-hello ];
</programlisting>
<para>
Of course, you can also move the definition of
<literal>my-hello</literal> into a separate Nix expression, e.g.
</para>
<programlisting language="bash">
<para>
Of course, you can also move the definition of
<literal>my-hello</literal> into a separate Nix expression, e.g.
</para>
<programlisting language="bash">
environment.systemPackages = [ (import ./my-hello.nix) ];
</programlisting>
<para>
where <literal>my-hello.nix</literal> contains:
</para>
<programlisting language="bash">
<para>
where <literal>my-hello.nix</literal> contains:
</para>
<programlisting language="bash">
with import &lt;nixpkgs&gt; {}; # bring all of Nixpkgs into scope

stdenv.mkDerivation rec {
Expand All @@ -69,12 +79,40 @@ stdenv.mkDerivation rec {
};
}
</programlisting>
<para>
This allows testing the package easily:
</para>
<programlisting>
<para>
This allows testing the package easily:
</para>
<programlisting>
$ nix-build my-hello.nix
$ ./result/bin/hello
Hello, world!
</programlisting>
</section>
<section xml:id="sec-custom-packages-prebuilt">
<title>Using pre-built executables</title>
<para>
Most pre-built executables will not work on NixOS. There are two
notable exceptions: flatpaks and AppImages. For flatpaks see the
<link linkend="module-services-flatpak">dedicated section</link>.
AppImages will not run <quote>as-is</quote> on NixOS. First you
need to install <literal>appimage-run</literal>: add to
<literal>/etc/nixos/configuration.nix</literal>
</para>
<programlisting language="bash">
environment.systemPackages = [ pkgs.appimage-run ];
</programlisting>
<para>
Then instead of running the AppImage <quote>as-is</quote>, run
<literal>appimage-run foo.appimage</literal>.
</para>
<para>
To make other pre-built executables work on NixOS, you need to
package them with Nix and special helpers like
<literal>autoPatchelfHook</literal> or
<literal>buildFHSUserEnv</literal>. See the
<link xlink:href="https://nixos.org/nixpkgs/manual">Nixpkgs
manual</link> for details. This is complex and often doing a
source build is easier.
</para>
</section>
</section>
5 changes: 5 additions & 0 deletions nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@
as coreboot’s fork is no longer available.
</para>
</listitem>
<listitem>
<para>
Add udev rules for the Teensy family of microcontrollers.
</para>
</listitem>
<listitem>
<para>
There is a new module for the <literal>thunar</literal>
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2211.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Use `configure.packages` instead.

- memtest86+ was updated from 5.00-coreboot-002 to 6.00-beta2. It is now the upstream version from https://www.memtest.org/, as coreboot's fork is no longer available.

- Add udev rules for the Teensy family of microcontrollers.

- There is a new module for the `thunar` program (the Xfce file manager), which depends on the `xfconf` dbus service, and also has a dbus service and a systemd unit. The option `services.xserver.desktopManager.xfce.thunarPlugins` has been renamed to `programs.thunar.plugins`, and in a future release it may be removed.

- There is a new module for the `xfconf` program (the Xfce configuration storage system), which has a dbus service.
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/hardware/ckb-next.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ in
};

meta = {
maintainers = with lib.maintainers; [ kierdavis ];
maintainers = with lib.maintainers; [ superherointj ];
};
}
4 changes: 2 additions & 2 deletions nixos/modules/tasks/filesystems/zfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ in
zfs load-key -a
''
else concatMapStrings (fs: ''
zfs load-key ${fs}
zfs load-key -- ${escapeShellArg fs}
'') cfgZfs.requestEncryptionCredentials}
'') rootPools));

Expand Down Expand Up @@ -701,7 +701,7 @@ in
# expand every pool. Otherwise we want to enumerate
# just the specifically provided list of pools.
poolListProvider = if cfgExpandOnBoot == "all"
then "$(zpool list -H | awk '{print $1}')"
then "$(zpool list -H -o name)"
else lib.escapeShellArgs cfgExpandOnBoot;
in
{
Expand Down
3 changes: 3 additions & 0 deletions nixos/tests/nginx-http3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ in
testScript = ''
start_all()
server.wait_for_unit("nginx")
server.wait_for_open_port(443)
# Check http connections
client.succeed("curl --verbose --http3 https://acme.test | grep 'Hello World!'")
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/audio/amberol/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@

stdenv.mkDerivation rec {
pname = "amberol";
version = "0.8.0";
version = "0.8.1";

src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = pname;
rev = version;
hash = "sha256-spVZOFqnY4cNbIY1ED3Zki6yPMoFDNG5BtuD456hPs4=";
hash = "sha256-27jXpx79JNF5FjVKERNrQFS7VHZHWh57jjBWvX5IRio=";
};

cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-8PEAyQ8JW45d/Lut3hUSKCzV7JjFTpvKGra5dj3byo4=";
hash = "sha256-M5T+imP7up3RRiXOJRrqimcjs8r81V5jfQMjR02skko=";
};

postPatch = ''
Expand Down
7 changes: 4 additions & 3 deletions pkgs/applications/blockchains/erigon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

buildGoModule rec {
pname = "erigon";
version = "2022.02.04";
version = "2022.07.01";

src = fetchFromGitHub {
owner = "ledgerwatch";
repo = pname;
rev = "v${version}";
sha256 = "sha256-86a1VtVyTRKpY41fAHskUfPZpXUutpyvxlRLhkiHTZ0=";
sha256 = "sha256-UoK6pPGVeIrubM6vdZBQCE+lgcFthOxZXviyLD86wxg=";
fetchSubmodules = true;
};

vendorSha256 = "sha256-P3jdK+ubBHusTL4eWlA/TDJIrbuV17tL8Cv6c3ubjlc=";
vendorSha256 = "sha256-lIukjt/QtidijB1KmWQBlSFZqdh1PwhZNP2U73/beiU=";
proxyVendor = true;

# Build errors in mdbx when format hardening is enabled:
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vim/common.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }:
rec {
version = "8.2.4975";
version = "9.0.0001";

src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
sha256 = "sha256-KkaW1WSX5OB03Dx6xTdbLFMpM7phbXyMpiufYKzAx0k=";
sha256 = "sha256-WnMm3q5Stn3s33rxQt76goURSa1Rq+jMVWYiS+uJTX0=";
};

enableParallelBuilding = true;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/graphics/darktable/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
}:

stdenv.mkDerivation rec {
version = "3.8.1";
version = "4.0.0";
pname = "darktable";

src = fetchurl {
url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz";
sha256 = "1xmyn9haagizh8qqg91bm1lx3dq1v8failxj943mipnvaj80dvl1";
sha256 = "0bfcag6bj5vcmg4z4xjirs43iafcx89al6jl41i5mrhpjzszh5hl";
};

nativeBuildInputs = [ cmake ninja llvm_13 pkg-config intltool perl desktop-file-utils wrapGAppsHook ];
Expand Down
Loading

0 comments on commit 3e2f6a2

Please sign in to comment.