Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into staging-next
Browse files Browse the repository at this point in the history
Conflicts:
- pkgs/development/python-modules/wxPython/4.0.nix
- pkgs/development/python-modules/wxPython/4.1.nix
  • Loading branch information
mweinelt committed Mar 20, 2023
2 parents c89234a + 8bc6945 commit 9959ec9
Show file tree
Hide file tree
Showing 34 changed files with 340 additions and 288 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-maintainers-sorted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@v19
- uses: cachix/install-nix-action@v20
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
Expand Down
2 changes: 1 addition & 1 deletion doc/languages-frameworks/dotnet.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ To package Dotnet applications, you can use `buildDotnetModule`. This has simila
* `runtimeDeps` is used to wrap libraries into `LD_LIBRARY_PATH`. This is how dotnet usually handles runtime dependencies.
* `buildType` is used to change the type of build. Possible values are `Release`, `Debug`, etc. By default, this is set to `Release`.
* `selfContainedBuild` allows to enable the [self-contained](https://docs.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained) build flag. By default, it is set to false and generated applications have a dependency on the selected dotnet runtime. If enabled, the dotnet runtime is bundled into the executable and the built app has no dependency on Dotnet.
* `dotnet-sdk` is useful in cases where you need to change what dotnet SDK is being used.
* `dotnet-sdk` is useful in cases where you need to change what dotnet SDK is being used. You can also set this to the result of `dotnetSdkPackages.combinePackages`, if the project uses multiple SDKs to build.
* `dotnet-runtime` is useful in cases where you need to change what dotnet runtime is being used. This can be either a regular dotnet runtime, or an aspnetcore.
* `dotnet-test-sdk` is useful in cases where unit tests expect a different dotnet SDK. By default, this is set to the `dotnet-sdk` attribute.
* `testProjectFile` is useful in cases where the regular project file does not contain the unit tests. It gets restored and build, but not installed. You may need to regenerate your nuget lockfile after setting this.
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2305.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ In addition to numerous new and upgraded packages, this release has the followin

- [woodpecker-server](https://woodpecker-ci.org/), a simple CI engine with great extensibility. Available as [services.woodpecker-server](#opt-services.woodpecker-server.enable).

- [ReGreet](https://github.com/rharish101/ReGreet), a clean and customizable greeter for greetd. Available as [programs.regreet](#opt-programs.regreet.enable).

## Backward Incompatibilities {#sec-release-23.05-incompatibilities}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
./programs/proxychains.nix
./programs/qdmr.nix
./programs/qt5ct.nix
./programs/regreet.nix
./programs/rog-control-center.nix
./programs/rust-motd.nix
./programs/screen.nix
Expand Down
75 changes: 75 additions & 0 deletions nixos/modules/programs/regreet.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.programs.regreet;
settingsFormat = pkgs.formats.toml { };
in
{
options.programs.regreet = {
enable = lib.mkEnableOption null // {
description = lib.mdDoc ''
Enable ReGreet, a clean and customizable greeter for greetd.
To use ReGreet, {option}`services.greetd` has to be enabled and
{option}`services.greetd.settings.default_session` should contain the
appropriate configuration to launch
{option}`config.programs.regreet.package`. For examples, see the
[ReGreet Readme](https://github.com/rharish101/ReGreet#set-as-default-session).
A minimal configuration that launches ReGreet in {command}`cage` is
enabled by this module by default.
'';
};

package = lib.mkPackageOptionMD pkgs [ "greetd" "regreet" ] { };

settings = lib.mkOption {
type = lib.types.either lib.types.path settingsFormat.type;
default = { };
description = lib.mdDoc ''
ReGreet configuration file. Refer
<https://github.com/rharish101/ReGreet/blob/main/regreet.sample.toml>
for options.
'';
};

extraCss = lib.mkOption {
type = lib.types.either lib.types.path lib.types.lines;
default = "";
description = lib.mdDoc ''
Extra CSS rules to apply on top of the GTK theme. Refer to
[GTK CSS Properties](https://docs.gtk.org/gtk4/css-properties.html) for
modifiable properties.
'';
};
};

config = lib.mkIf cfg.enable {
services.greetd = {
enable = lib.mkDefault true;
settings.default_session.command = lib.mkDefault "${lib.getExe pkgs.cage} -s -- ${lib.getExe cfg.package}";
};

environment.etc = {
"greetd/regreet.css" =
if lib.isPath cfg.extraCss
then {source = cfg.extraCss;}
else {text = cfg.extraCss;};

"greetd/regreet.toml".source =
if lib.isPath cfg.settings
then cfg.settings
else settingsFormat.generate "regreet.toml" cfg.settings;
};

systemd.tmpfiles.rules = let
user = config.services.greetd.settings.default_session.user;
in [
"d /var/log/regreet 0755 greeter ${user} - -"
"d /var/cache/regreet 0755 greeter ${user} - -"
];
};
}
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/portunus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ in
PORTUNUS_SERVER_BINARY = "${cfg.package}/bin/portunus-server";
PORTUNUS_SERVER_GROUP = cfg.group;
PORTUNUS_SERVER_USER = cfg.user;
PORTUNUS_SERVER_HTTP_LISTEN = "[::]:${toString cfg.port}";
PORTUNUS_SERVER_HTTP_LISTEN = "127.0.0.1:${toString cfg.port}";
PORTUNUS_SERVER_STATE_DIR = cfg.stateDir;
PORTUNUS_SLAPD_BINARY = "${cfg.ldap.package}/libexec/slapd";
PORTUNUS_SLAPD_GROUP = cfg.ldap.group;
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/display-managers/greetd/regreet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

rustPlatform.buildRustPackage {
pname = "regreet";
version = "unstable-2023-02-27";
version = "unstable-2023-03-19";

src = fetchFromGitHub {
owner = "rharish101";
repo = "ReGreet";
rev = "2bbabe90f112b4feeb0aea516c265daaec8ccf2a";
hash = "sha256-71ji4x/NUE4qmBuO5PkWTPE1a0uPXqJSwW1Ai1amPJE=";
rev = "fd496fa00abc078570ac85a47ea296bfc275222a";
hash = "sha256-pqCtDoycFKV+EFLEodoTCDSO5L+dOVtdjN6DVgJ/7to=";
};

cargoHash = "sha256-rz2eMMhoMtzBXCH6ZJOvGuYLeHSWga+Ebc4+ZO8Kk1g=";
cargoHash = "sha256-8FbA5FFJuRt5tvW1HGaaEZcr5g6OczcBeic1hCTQmUw=";

buildFeatures = [ "gtk4_8" ];

Expand Down
17 changes: 17 additions & 0 deletions pkgs/applications/editors/vscode/extensions/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,23 @@ let
};
};

genieai.chatgpt-vscode = buildVscodeMarketplaceExtension {
meta = {
changelog = "https://marketplace.visualstudio.com/items/genieai.chatgpt-vscode/changelog";
description = "A Visual Studio Code extension to support ChatGPT, GPT-3 and Codex conversations";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=genieai.chatgpt-vscode";
homepage = "https://github.com/ai-genie/chatgpt-vscode";
license = lib.licenses.isc;
maintainers = [ lib.maintainers.drupol ];
};
mktplcRef = {
name = "chatgpt-vscode";
publisher = "genieai";
version = "0.0.2";
sha256 = "sha256-mdBSZ8BAJ1dFy5MXBPMwXlSmNsY5vD/+gBAI+3+QT84=";
};
};

github = {
codespaces = buildVscodeMarketplaceExtension {
mktplcRef = {
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/graphics/hello-wayland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
}:

stdenv.mkDerivation {
pname = "hello-wayland-unstable";
version = "2020-07-27";
pname = "hello-wayland";
version = "unstable-2023-03-16";

src = fetchFromGitHub {
owner = "emersion";
repo = "hello-wayland";
rev = "501d0851cfa7f21c780c0eb52f0a6b23f02918c5";
sha256 = "0dz6przqp57kw8ycja3gw6jp9x12217nwbwdpgmvw7jf0lzhk4xr";
rev = "f6a8203309977af03cda94765dd61367c189bea6";
sha256 = "FNtc6OApW/epAFortvujNVWJJVI44IY+Pa0qU0QdecA=";
};

nativeBuildInputs = [ imagemagick pkg-config ];
Expand Down
18 changes: 9 additions & 9 deletions pkgs/applications/networking/cluster/kops/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ in
rec {
mkKops = generic;

kops_1_23 = mkKops rec {
version = "1.23.4";
sha256 = "sha256-hUj/kUyaqo8q3SJTkd5+9Ld8kfE8wCYNJ2qIATjXqhU=";
rev = "v${version}";
};

kops_1_24 = mkKops rec {
version = "1.24.3";
sha256 = "sha256-o84060P2aHTIm61lSkz2/GqzYd2NYk1zKgGdNaHlWfA=";
version = "1.24.5";
sha256 = "sha256-U5OSiU0t2gyvyNd07y68Fb+HaXp5wQN4t0CBPOOMd/M=";
rev = "v${version}";
};

kops_1_25 = mkKops rec {
version = "1.25.3";
version = "1.25.4";
sha256 = "sha256-Q40d62D+H7CpLmrjweCy75U3LgnHEV2pFZs2Ze+koqo=";
rev = "v${version}";
};

kops_1_26 = mkKops rec {
version = "1.26.2";
sha256 = "sha256-PY/dcKyciPg3OyUPeBwYed6ADprpI2/+8d8SuGTXWqc=";
rev = "v${version}";
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let
versions = if stdenv.isLinux then {
stable = "0.0.25";
ptb = "0.0.39";
canary = "0.0.149";
canary = "0.0.150";
} else {
stable = "0.0.264";
ptb = "0.0.59";
Expand All @@ -22,7 +22,7 @@ let
};
canary = fetchurl {
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
sha256 = "sha256-8DHr7adczIv9FXaxPxSfZPn+8ogWLWHRp9l0JpKhoiY=";
sha256 = "sha256-8huDp1u0t9/kZbeB7bPqQUw8+HQ6rIyzKYUVN02gQfo=";
};
};
x86_64-darwin = {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/science/biology/gatk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

stdenv.mkDerivation rec {
pname = "gatk";
version = "4.3.0.0";
version = "4.4.0.0";
src = fetchzip {
url = "https://github.com/broadinstitute/gatk/releases/download/${version}/gatk-${version}.zip";
sha256 = "sha256-AhXZyWbAXM5iwqxkYkMlqYUN838BjvIf5X95MVEfJ2I=";
sha256 = "sha256-svOtIS6gz9nwVgVmVQbk9z6Ufyobpn6bFbZY4zurvUI=";
};

nativeBuildInputs = [ makeWrapper ];
Expand Down
17 changes: 13 additions & 4 deletions pkgs/applications/version-management/got/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
{ lib, stdenv, fetchurl
, pkg-config, openssl, libbsd, libevent, libuuid, libossp_uuid, libmd, zlib, ncurses, bison
, autoPatchelfHook
}:

stdenv.mkDerivation rec {
pname = "got";
version = "0.83";
version = "0.86";

src = fetchurl {
url = "https://gameoftrees.org/releases/portable/got-portable-${version}.tar.gz";
sha256 = "sha256-kNhU6OR9IUNPL72D90nhq2X5vmVW7YUmpnq/EOUvG/8=";
hash = "sha256-FHjLEkxsvkYz4tK1k/pEUfDT9rfvN+K68gRc8fPVp7A=";
};

nativeBuildInputs = [ pkg-config bison ];
nativeBuildInputs = [ pkg-config bison ]
++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];

buildInputs = [ openssl libbsd libevent libuuid libmd zlib ncurses ]
++ lib.optionals stdenv.isDarwin [ libossp_uuid ];

preConfigure = lib.optionals stdenv.isDarwin ''
preConfigure = lib.optionalString stdenv.isDarwin ''
# The configure script assumes dependencies on Darwin are install via
# Homebrew or MacPorts and hardcodes assumptions about the paths of
# dependencies which fails the nixpkgs configurePhase.
substituteInPlace configure --replace 'xdarwin' 'xhomebrew'
'';

env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
# error: conflicting types for 'strmode'
"-DHAVE_STRMODE=1"
# Undefined symbols for architecture arm64: "_bsd_getopt"
"-include getopt.h"
]);

doInstallCheck = true;

installCheckPhase = ''
Expand Down
17 changes: 12 additions & 5 deletions pkgs/build-support/dotnet/build-dotnet-module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ let
# this contains all the nuget packages that are implicitly referenced by the dotnet
# build system. having them as separate deps allows us to avoid having to regenerate
# a packages dependencies when the dotnet-sdk version changes
sdkDeps = dotnet-sdk.packages;
sdkDeps = lib.lists.flatten [ dotnet-sdk.packages ];

sdkSource = mkNugetSource {
name = "dotnet-sdk-${dotnet-sdk.version}-source";
deps = [ sdkDeps ];
sdkSource = let
version = dotnet-sdk.version or (lib.concatStringsSep "-" dotnet-sdk.versions);
in mkNugetSource {
name = "dotnet-sdk-${version}-source";
deps = sdkDeps;
};

nuget-source = symlinkJoin {
Expand Down Expand Up @@ -271,7 +273,12 @@ stdenvNoCC.mkDerivation (args // {
echo "Writing lockfile..."
echo -e "# This file was automatically generated by passthru.fetch-deps.\n# Please dont edit it manually, your changes might get overwritten!\n" > "$depsFile"
nuget-to-nix "$tmp/nuget_pkgs" "${sdkDeps}" >> "$depsFile"
excluded_sources="${lib.concatStringsSep " " sdkDeps}"
for excluded_source in ''${excluded_sources[@]}; do
ls "$excluded_source" >> "$tmp/excluded_list"
done
nuget-to-nix "$tmp/nuget_pkgs" "$tmp/excluded_list" >> "$depsFile"
echo "Succesfully wrote lockfile to $depsFile"
'';
} // args.passthru or { };
Expand Down
7 changes: 4 additions & 3 deletions pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ export PATH="@binPath@"
export LC_ALL=C

if [ $# -eq 0 ]; then
>&2 echo "Usage: $0 <packages directory> [path to excluded package source] > deps.nix"
>&2 echo "Usage: $0 <packages directory> [path to a file with a list of excluded packages] > deps.nix"
exit 1
fi

pkgs=$1
tmp=$(realpath "$(mktemp -td nuget-to-nix.XXXXXX)")
trap 'rm -r "$tmp"' EXIT
excluded_source=$(realpath "${2:-$tmp/empty}")

excluded_list=$(realpath "${2:-/dev/null}")

export DOTNET_NOLOGO=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
Expand All @@ -37,7 +38,7 @@ for package in *; do
for version in *; do
id=$(xq -r .package.metadata.id "$version/$package".nuspec)

if [[ -e "$excluded_source/$id.$version".nupkg ]]; then
if grep -qxF "$id.$version.nupkg" "$excluded_list"; then
continue
fi

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/dotnet/build-dotnet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ let
sdk = ".NET SDK ${version}";
};

packageDeps = mkNugetDeps {
packageDeps = if type == "sdk" then mkNugetDeps {
name = "${pname}-${version}-deps";
nugetDeps = packages;
};
} else null;

in
stdenv.mkDerivation (finalAttrs: rec {
Expand Down
15 changes: 10 additions & 5 deletions pkgs/development/compilers/dotnet/combine-packages.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
packages:
dotnetPackages:
{ buildEnv, makeWrapper, lib }:
# TODO: Rethink how we determine and/or get the CLI.
# Possible options raised in #187118:
# 1. A separate argument for the CLI (as suggested by IvarWithoutBones
# 2. Use the highest version SDK for the CLI (as suggested by GGG)
# 3. Something else?
let cli = builtins.head packages;
let cli = builtins.head dotnetPackages;
in
assert lib.assertMsg ((builtins.length packages) > 0)
assert lib.assertMsg ((builtins.length dotnetPackages) > 0)
''You must include at least one package, e.g
`with dotnetCorePackages; combinePackages [
sdk_3_1 aspnetcore_5_0
];`'' ;
buildEnv {
name = "dotnet-core-combined";
paths = packages;
paths = dotnetPackages;
pathsToLink = [ "/host" "/packs" "/sdk" "/sdk-manifests" "/shared" "/templates" ];
ignoreCollisions = true;
nativeBuildInputs = [
Expand All @@ -29,6 +29,11 @@ assert lib.assertMsg ((builtins.length packages) > 0)
--prefix LD_LIBRARY_PATH : ${cli.icu}/lib
'';
passthru = {
inherit (cli) icu packages;
inherit (cli) icu;

versions = lib.catAttrs "version" dotnetPackages;
packages = lib.remove null (lib.catAttrs "packages" dotnetPackages);
};

inherit (cli) meta;
}
Loading

0 comments on commit 9959ec9

Please sign in to comment.