Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-05-12 18:01:18 +00:00 committed by GitHub
commit 206417b7a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
128 changed files with 2091 additions and 655 deletions

View File

@ -164,6 +164,26 @@ tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
};
```
## `runNixOSTest` {#tester-runNixOSTest}
A helper function that behaves exactly like the NixOS `runTest`, except it also assigns this Nixpkgs package set as the `pkgs` of the test and makes the `nixpkgs.*` options read-only.
If your test is part of the Nixpkgs repository, or if you need a more general entrypoint, see ["Calling a test" in the NixOS manual](https://nixos.org/manual/nixos/stable/index.html#sec-calling-nixos-tests).
Example:
```nix
pkgs.testers.runNixOSTest ({ lib, ... }: {
name = "hello";
nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.hello ];
};
testScript = ''
machine.succeed("hello")
'';
})
```
## `nixosTest` {#tester-nixosTest}
Run a NixOS VM network test using this evaluation of Nixpkgs.

View File

@ -535,7 +535,9 @@ directory of the `tokenizers` project's source archive, we use
```nix
{ fetchFromGitHub
, buildPythonPackage
, cargo
, rustPlatform
, rustc
, setuptools-rust
}:
@ -558,11 +560,12 @@ buildPythonPackage rec {
sourceRoot = "source/bindings/python";
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
nativeBuildInputs = [
cargo
rustPlatform.cargoSetupHook
rustc
setuptools-rust
];
# ...
}

View File

@ -12656,9 +12656,9 @@
githubId = 17690377;
};
ppom = {
name = "Paco Pompeani";
email = "paco@ecomail.io";
github = "aopom";
name = "ppom";
email = "ppom@ecomail.fr";
github = "ppom0";
githubId = 38916722;
};
pradeepchhetri = {

View File

@ -58,6 +58,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- [gemstash](https://github.com/rubygems/gemstash), a RubyGems.org cache and private gem server. Available as [services.gemstash](#opt-services.gemstash.enable).
- [gitea-actions-runner](https://gitea.com/gitea/act_runner), a CI runner for Gitea/Forgejo Actions. Available as [services.gitea-actions-runner](#opt-services.gitea-actions-runner.instances).
- [gmediarender](https://github.com/hzeller/gmrender-resurrect), a simple, headless UPnP/DLNA renderer. Available as [services.gmediarender](options.html#opt-services.gmediarender.enable).
- [harmonia](https://github.com/nix-community/harmonia/), Nix binary cache implemented in rust using libnix-store. Available as [services.harmonia](options.html#opt-services.harmonia.enable).

View File

@ -374,6 +374,7 @@
./services/continuous-integration/buildbot/master.nix
./services/continuous-integration/buildbot/worker.nix
./services/continuous-integration/buildkite-agents.nix
./services/continuous-integration/gitea-actions-runner.nix
./services/continuous-integration/github-runner.nix
./services/continuous-integration/github-runners.nix
./services/continuous-integration/gitlab-runner.nix

View File

@ -0,0 +1,237 @@
{ config
, lib
, pkgs
, utils
, ...
}:
let
inherit (lib)
any
attrValues
concatStringsSep
escapeShellArg
hasInfix
hasSuffix
optionalAttrs
optionals
literalExpression
mapAttrs'
mkEnableOption
mkOption
mkPackageOptionMD
mkIf
nameValuePair
types
;
inherit (utils)
escapeSystemdPath
;
cfg = config.services.gitea-actions-runner;
# Check whether any runner instance label requires a container runtime
# Empty label strings result in the upstream defined defaultLabels, which require docker
# https://gitea.com/gitea/act_runner/src/tag/v0.1.5/internal/app/cmd/register.go#L93-L98
hasDockerScheme = instance:
instance.labels == [] || any (label: hasInfix ":docker:" label) instance.labels;
wantsContainerRuntime = any hasDockerScheme (attrValues cfg.instances);
hasHostScheme = instance: any (label: hasSuffix ":host" label) instance.labels;
# provide shorthands for whether container runtimes are enabled
hasDocker = config.virtualisation.docker.enable;
hasPodman = config.virtualisation.podman.enable;
tokenXorTokenFile = instance:
(instance.token == null && instance.tokenFile != null) ||
(instance.token != null && instance.tokenFile == null);
in
{
meta.maintainers = with lib.maintainers; [
hexa
];
options.services.gitea-actions-runner = with types; {
package = mkPackageOptionMD pkgs "gitea-actions-runner" { };
instances = mkOption {
default = {};
description = lib.mdDoc ''
Gitea Actions Runner instances.
'';
type = attrsOf (submodule {
options = {
enable = mkEnableOption (lib.mdDoc "Gitea Actions Runner instance");
name = mkOption {
type = str;
example = literalExpression "config.networking.hostName";
description = lib.mdDoc ''
The name identifying the runner instance towards the Gitea/Forgejo instance.
'';
};
url = mkOption {
type = str;
example = "https://forge.example.com";
description = lib.mdDoc ''
Base URL of your Gitea/Forgejo instance.
'';
};
token = mkOption {
type = nullOr str;
default = null;
description = lib.mdDoc ''
Plain token to register at the configured Gitea/Forgejo instance.
'';
};
tokenFile = mkOption {
type = nullOr (either str path);
default = null;
description = lib.mdDoc ''
Path to an environment file, containing the `TOKEN` environment
variable, that holds a token to register at the configured
Gitea/Forgejo instance.
'';
};
labels = mkOption {
type = listOf str;
example = literalExpression ''
[
# provide a debian base with nodejs for actions
"debian-latest:docker://node:18-bullseye"
# fake the ubuntu name, because node provides no ubuntu builds
"ubuntu-latest:docker://node:18-bullseye"
# provide native execution on the host
#"native:host"
]
'';
description = lib.mdDoc ''
Labels used to map jobs to their runtime environment. Changing these
labels currently requires a new registration token.
Many common actions require bash, git and nodejs, as well as a filesystem
that follows the filesystem hierarchy standard.
'';
};
hostPackages = mkOption {
type = listOf package;
default = with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
];
defaultText = literalExpression ''
with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
]
'';
description = lib.mdDoc ''
List of packages, that are available to actions, when the runner is configured
with a host execution label.
'';
};
};
});
};
};
config = mkIf (cfg.instances != {}) {
assertions = [ {
assertion = any tokenXorTokenFile (attrValues cfg.instances);
message = "Instances of gitea-actions-runner can have `token` or `tokenFile`, not both.";
} {
assertion = wantsContainerRuntime -> hasDocker || hasPodman;
message = "Label configuration on gitea-actions-runner instance requires either docker or podman.";
} ];
systemd.services = let
mkRunnerService = name: instance: let
wantsContainerRuntime = hasDockerScheme instance;
wantsHost = hasHostScheme instance;
wantsDocker = wantsContainerRuntime && config.virtualisation.docker.enable;
wantsPodman = wantsContainerRuntime && config.virtualisation.podman.enable;
in
nameValuePair "gitea-runner-${escapeSystemdPath name}" {
inherit (instance) enable;
description = "Gitea Actions Runner";
after = [
"network-online.target"
] ++ optionals (wantsDocker) [
"docker.service"
] ++ optionals (wantsPodman) [
"podman.service"
];
wantedBy = [
"multi-user.target"
];
environment = optionalAttrs (instance.token != null) {
TOKEN = "${instance.token}";
} // optionalAttrs (wantsPodman) {
DOCKER_HOST = "unix:///run/podman/podman.sock";
};
path = with pkgs; [
coreutils
] ++ lib.optionals wantsHost instance.hostPackages;
serviceConfig = {
DynamicUser = true;
User = "gitea-runner";
StateDirectory = "gitea-runner";
WorkingDirectory = "-/var/lib/gitea-runner/${name}";
ExecStartPre = pkgs.writeShellScript "gitea-register-runner-${name}" ''
export INSTANCE_DIR="$STATE_DIRECTORY/${name}"
mkdir -vp "$INSTANCE_DIR"
cd "$INSTANCE_DIR"
# force reregistration on changed labels
export LABELS_FILE="$INSTANCE_DIR/.labels"
export LABELS_WANTED="$(echo ${escapeShellArg (concatStringsSep "\n" instance.labels)} | sort)"
export LABELS_CURRENT="$(cat $LABELS_FILE 2>/dev/null || echo 0)"
if [ ! -e "$INSTANCE_DIR/.runner" ] || [ "$LABELS_WANTED" != "$LABELS_CURRENT" ]; then
# remove existing registration file, so that changing the labels forces a re-registation
rm -v "$INSTANCE_DIR/.runner" || true
# perform the registration
${cfg.package}/bin/act_runner register --no-interactive \
--instance ${escapeShellArg instance.url} \
--token "$TOKEN" \
--name ${escapeShellArg instance.name} \
--labels ${escapeShellArg (concatStringsSep "," instance.labels)}
# and write back the configured labels
echo "$LABELS_WANTED" > "$LABELS_FILE"
fi
'';
ExecStart = "${cfg.package}/bin/act_runner daemon";
SupplementaryGroups = optionals (wantsDocker) [
"docker"
] ++ optionals (wantsPodman) [
"podman"
];
} // optionalAttrs (instance.tokenFile != null) {
EnvironmentFile = instance.tokenFile;
};
};
in mapAttrs' mkRunnerService cfg.instances;
};
}

View File

@ -8,7 +8,8 @@ let
cmdArgs =
[ "--port" cfg.port ]
++ optionals (cfg.salt != null) [ "--salt" cfg.salt ]
++ optionals (cfg.certDir != null) [ "--tls" cfg.certDir ];
++ optionals (cfg.certDir != null) [ "--tls" cfg.certDir ]
++ cfg.extraArgs;
in
{
@ -33,7 +34,22 @@ in
default = null;
description = lib.mdDoc ''
Salt to allow room operator passwords generated by this server
instance to still work when the server is restarted.
instance to still work when the server is restarted. The salt will be
readable in the nix store and the processlist. If this is not
intended use `saltFile` instead. Mutually exclusive with
<option>services.syncplay.saltFile</option>.
'';
};
saltFile = mkOption {
type = types.nullOr types.path;
default = null;
description = lib.mdDoc ''
Path to the file that contains the server salt. This allows room
operator passwords generated by this server instance to still work
when the server is restarted. `null`, the server doesn't load the
salt from a file. Mutually exclusive with
<option>services.syncplay.salt</option>.
'';
};
@ -46,6 +62,14 @@ in
'';
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [ ];
description = lib.mdDoc ''
Additional arguments to be passed to the service.
'';
};
user = mkOption {
type = types.str;
default = "nobody";
@ -74,21 +98,31 @@ in
};
config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.salt == null || cfg.saltFile == null;
message = "services.syncplay.salt and services.syncplay.saltFile are mutually exclusive.";
}
];
systemd.services.syncplay = {
description = "Syncplay Service";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
serviceConfig = {
User = cfg.user;
Group = cfg.group;
LoadCredential = lib.mkIf (cfg.passwordFile != null) "password:${cfg.passwordFile}";
LoadCredential = lib.optional (cfg.passwordFile != null) "password:${cfg.passwordFile}"
++ lib.optional (cfg.saltFile != null) "salt:${cfg.saltFile}";
};
script = ''
${lib.optionalString (cfg.passwordFile != null) ''
export SYNCPLAY_PASSWORD=$(cat "''${CREDENTIALS_DIRECTORY}/password")
''}
${lib.optionalString (cfg.saltFile != null) ''
export SYNCPLAY_SALT=$(cat "''${CREDENTIALS_DIRECTORY}/salt")
''}
exec ${pkgs.syncplay-nogui}/bin/syncplay-server ${escapeShellArgs cmdArgs}
'';
};

13
package-lock.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/package-lock.json b/package-lock.json
index 5a84fbe7..562051c7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12425,7 +12425,7 @@
"node_modules/pkg-up/node_modules/path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==",
"dev": true,
"engines": {
"node": ">=4"

View File

@ -2,6 +2,7 @@
, lib
, fetchFromGitLab
, cairo
, cargo
, desktop-file-utils
, gettext
, glib
@ -12,6 +13,7 @@
, pango
, pkg-config
, rustPlatform
, rustc
, wrapGAppsHook4
}:
@ -40,9 +42,9 @@ stdenv.mkDerivation rec {
meson
ninja
pkg-config
rustPlatform.rust.cargo
cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
rustc
wrapGAppsHook4
];

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitLab
, cargo
, meson
, ninja
, pkg-config
@ -14,6 +15,7 @@
, libxml2
, libxkbcommon
, rustPlatform
, rustc
, feedbackd
, wrapGAppsHook
, fetchpatch
@ -54,11 +56,10 @@ stdenv.mkDerivation rec {
glib
wayland
wrapGAppsHook
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
gtk3

View File

@ -2,12 +2,14 @@
, stdenv
, fetchFromGitLab
, rustPlatform
, cargo
, desktop-file-utils
, appstream-glib
, meson
, ninja
, pkg-config
, reuse
, rustc
, m4
, wrapGAppsHook4
, glib
@ -48,11 +50,10 @@ stdenv.mkDerivation rec {
reuse
m4
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
glib

View File

@ -3,11 +3,13 @@
, rustPlatform
, fetchFromGitLab
, fetchpatch
, cargo
, meson
, ninja
, gettext
, python3
, pkg-config
, rustc
, glib
, libhandy
, gtk3
@ -55,9 +57,9 @@ stdenv.mkDerivation rec {
pkg-config
gettext
python3
rustPlatform.rust.cargo
cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
rustc
wrapGAppsHook
glib
];

View File

@ -1,4 +1,5 @@
{ lib
, cargo
, clang
, desktop-file-utils
, fetchFromGitLab
@ -11,6 +12,7 @@
, pipewire
, pkg-config
, rustPlatform
, rustc
, stdenv
}:
@ -38,8 +40,8 @@ stdenv.mkDerivation rec {
ninja
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
rustPlatform.bindgenHook
];

View File

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, appstream-glib
, cargo
, dbus
, desktop-file-utils
, glib
@ -16,6 +17,7 @@
, ninja
, pkg-config
, rustPlatform
, rustc
, wrapGAppsHook4
}:
@ -43,11 +45,10 @@ stdenv.mkDerivation rec {
ninja
pkg-config
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
dbus

View File

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, rustPlatform
, cargo
, meson
, ninja
, pkg-config
@ -10,6 +11,7 @@
, appstream-glib
, desktop-file-utils
, libxml2
, rustc
, wrapGAppsHook4
, openssl
, dbus
@ -47,11 +49,10 @@ stdenv.mkDerivation rec {
desktop-file-utils # update-desktop-database
libxml2 # xmllint
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
openssl

View File

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "sfizz";
version = "1.2.0";
version = "1.2.1";
src = fetchFromGitHub {
owner = "sfztools";
repo = pname;
rev = version;
sha256 = "sha256-biHsB49Ym9NU4tMOVnUNuIxPtpcIi6oCAS7JBPhxwec=";
sha256 = "sha256-/G9tvJ4AcBSTmo44xDDKf6et1nSn/FV5m27ztDu10kI=";
fetchSubmodules = true;
};

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitLab
, cargo
, dbus
, desktop-file-utils
, gdk-pixbuf
@ -15,6 +16,7 @@
, openssl
, pkg-config
, rustPlatform
, rustc
, sqlite
, wrapGAppsHook4
, cmake
@ -47,9 +49,9 @@ stdenv.mkDerivation rec {
meson
ninja
pkg-config
rustPlatform.rust.cargo
cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
rustc
wrapGAppsHook4
cmake
];

View File

@ -7,7 +7,9 @@
, gettext
, python3
, desktop-file-utils
, cargo
, rustPlatform
, rustc
, pkg-config
, glib
, libadwaita
@ -45,9 +47,9 @@ stdenv.mkDerivation rec {
gtk4 # for gtk-update-icon-cache
glib # for glib-compile-schemas
desktop-file-utils
rustPlatform.rust.cargo
cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
rustc
wrapGAppsHook4
];

View File

@ -3,6 +3,7 @@
, fetchFromGitLab
, rustPlatform
, substituteAll
, cargo
, desktop-file-utils
, git
, itstool
@ -10,6 +11,7 @@
, ninja
, pkg-config
, python3
, rustc
, wrapGAppsHook4
, borgbackup
, gtk4
@ -55,11 +57,10 @@ stdenv.mkDerivation rec {
pkg-config
python3
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
gtk4

View File

@ -645,6 +645,22 @@ let
};
};
coder.coder-remote = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "coder-remote";
publisher = "coder";
version = "0.1.18";
sha256 = "soNGZuyvG5+haWRcwYmYB+0OcyDAm4UQ419UnEd8waA=";
};
meta = {
description = "An extension for Visual Studio Code to open any Coder workspace in VS Code with a single click.";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=coder.coder-remote";
homepage = "https://github.com/coder/vscode-coder";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.drupol ];
};
};
codezombiech.gitignore = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "gitignore";

View File

@ -3,11 +3,13 @@
, fetchFromGitLab
, rustPlatform
, appstream-glib
, cargo
, desktop-file-utils
, glib
, meson
, ninja
, pkg-config
, rustc
, wrapGAppsHook4
, gtk4
, libadwaita
@ -43,11 +45,10 @@ stdenv.mkDerivation rec {
ninja
pkg-config
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
gtk4

View File

@ -2,12 +2,14 @@
, stdenv
, fetchFromGitHub
, rustPlatform
, cargo
, pkg-config
, meson
, ninja
, glib
, gtk4
, libadwaita
, rustc
, wrapGAppsHook4
, appstream-glib
, desktop-file-utils
@ -37,11 +39,10 @@ stdenv.mkDerivation rec {
wrapGAppsHook4
appstream-glib
desktop-file-utils
] ++ (with rustPlatform; [
rust.cargo
rust.rustc
cargoSetupHook
]);
cargo
rustc
rustPlatform.cargoSetupHook
];
buildInputs = [
glib

View File

@ -3,9 +3,11 @@
, fetchFromGitLab
, libclang
, rustPlatform
, cargo
, meson
, ninja
, pkg-config
, rustc
, glib
, gtk4
, libadwaita
@ -46,11 +48,10 @@ clangStdenv.mkDerivation rec {
wrapGAppsHook4
appstream-glib
desktop-file-utils
] ++ (with rustPlatform; [
rust.cargo
rust.rustc
cargoSetupHook
]);
cargo
rustc
rustPlatform.cargoSetupHook
];
buildInputs = [
glib

View File

@ -1,11 +1,13 @@
{ stdenv
, lib
, fetchFromGitLab
, cargo
, gettext
, meson
, ninja
, pkg-config
, rustPlatform
, rustc
, wrapGAppsHook4
, appstream-glib
, desktop-file-utils
@ -40,8 +42,8 @@ stdenv.mkDerivation rec {
ninja
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
wrapGAppsHook4
appstream-glib
desktop-file-utils

View File

@ -6,11 +6,13 @@
, gtk4
, lib
, libadwaita
, cargo
, meson
, ninja
, nix-update-script
, pkg-config
, rustPlatform
, rustc
, stdenv
, wrapGAppsHook4
}:
@ -41,11 +43,10 @@ stdenv.mkDerivation rec {
ninja
pkg-config
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
gst_all_1.gst-libav

View File

@ -2,9 +2,11 @@
, stdenv
, rustPlatform
, fetchFromGitHub
, cargo
, meson
, ninja
, pkg-config
, rustc
, wrapGAppsHook4
, appstream-glib
, desktop-file-utils
@ -37,11 +39,10 @@ stdenv.mkDerivation rec {
wrapGAppsHook4
appstream-glib
desktop-file-utils
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
glib

View File

@ -3,6 +3,7 @@
, fetchFromGitHub
, alsa-lib
, appstream-glib
, cargo
, cmake
, desktop-file-utils
, glib
@ -16,6 +17,7 @@
, poppler
, python3
, rustPlatform
, rustc
, shared-mime-info
, wrapGAppsHook4
, AudioUnit
@ -51,8 +53,8 @@ stdenv.mkDerivation rec {
python3 # For the postinstall script
rustPlatform.bindgenHook
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
shared-mime-info # For update-mime-database
wrapGAppsHook4
];

View File

@ -1,5 +1,6 @@
{ lib
, mkDerivation
, cargo
, cmake
, corrosion
, extra-cmake-modules
@ -17,6 +18,7 @@
, qqc2-desktop-style
, qtwebengine
, rustPlatform
, rustc
, srcs
# These must be updated in tandem with package updates.
@ -46,11 +48,10 @@ mkDerivation rec {
cmake
corrosion
extra-cmake-modules
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
kconfig

View File

@ -2,11 +2,13 @@
, stdenv
, fetchFromGitLab
, appstream-glib
, cargo
, desktop-file-utils
, meson
, ninja
, pkg-config
, rustPlatform
, rustc
, wrapGAppsHook4
, gdk-pixbuf
, glib
@ -45,12 +47,11 @@ stdenv.mkDerivation rec {
ninja
pkg-config
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
bindgenHook
]);
rustPlatform.cargoSetupHook
cargo
rustc
rustPlatform.bindgenHook
];
buildInputs = [
gdk-pixbuf

View File

@ -1,4 +1,5 @@
{ darwin
{ cargo
, darwin
, desktop-file-utils
, fetchFromGitLab
, gettext
@ -12,6 +13,7 @@
, pkg-config
, poppler
, rustPlatform
, rustc
, stdenv
, testers
, wrapGAppsHook4
@ -43,8 +45,8 @@ stdenv.mkDerivation (finalAttrs: {
ninja
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
wrapGAppsHook4
];

View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'coltrane'

View File

@ -0,0 +1,45 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.4.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
cli-ui (1.5.1)
color (1.8)
coltrane (4.1.1)
activesupport (> 5.2)
color (~> 1.8)
dry-monads (~> 0.4)
gambiarra (~> 0)
paint (~> 2.0)
concurrent-ruby (1.2.2)
dry-core (0.9.1)
concurrent-ruby (~> 1.0)
zeitwerk (~> 2.6)
dry-equalizer (0.3.0)
dry-monads (0.4.0)
dry-core (~> 0.3, >= 0.3.3)
dry-equalizer
gambiarra (0.0.5)
activesupport (> 5.2)
cli-ui (~> 1.1)
thor (~> 1.1.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
minitest (5.18.0)
paint (2.3.0)
thor (1.1.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
zeitwerk (2.6.7)
PLATFORMS
x86_64-linux
DEPENDENCIES
coltrane
BUNDLED WITH
2.3.26

View File

@ -0,0 +1,23 @@
{ lib
, bundlerApp
, bundlerUpdateScript
}:
bundlerApp rec {
pname = "coltrane";
gemdir = ./.;
exes = [ "coltrane" ];
passthru.updateScript = bundlerUpdateScript pname;
meta = with lib; {
homepage = "https://github.com/pedrozath/coltrane";
description = "A music calculation library/CLI";
longDescription = ''
coltrane allows to search for Notes, Chords, Scales for
guitar, bass, piano and ukelele
'';
license = licenses.mit;
maintainers = [ maintainers.panaeon ];
};
}

View File

@ -0,0 +1,159 @@
{
activesupport = {
dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dmywys50074vj5rivpx188b00qimlc4jn84xzqlialrgp3ckq5f";
type = "gem";
};
version = "7.0.4.2";
};
cli-ui = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1aghiy4qrh6y6q421lcpal81c98zypj8jki4wymqnc8vjvqsyiv4";
type = "gem";
};
version = "1.5.1";
};
color = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "10kgsdy86p72q6cf2k92larmbjc0crvd5xq7hy919zm8yvn1518a";
type = "gem";
};
version = "1.8";
};
coltrane = {
dependencies = ["activesupport" "color" "dry-monads" "gambiarra" "paint"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0hchdllbbx2n2fl3ydidl17rsl18mb9953c8k1r6rw1ibzw8sm7f";
type = "gem";
};
version = "4.1.1";
};
concurrent-ruby = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0krcwb6mn0iklajwngwsg850nk8k9b35dhmc2qkbdqvmifdi2y9q";
type = "gem";
};
version = "1.2.2";
};
dry-core = {
dependencies = ["concurrent-ruby" "zeitwerk"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1dpm9dk11x2zcjsymkl5jcz5nxhffsg7qqy5p6h92cppzbwmm656";
type = "gem";
};
version = "0.9.1";
};
dry-equalizer = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0rsqpk0gjja6j6pjm0whx2px06cxr3h197vrwxp6k042p52r4v46";
type = "gem";
};
version = "0.3.0";
};
dry-monads = {
dependencies = ["dry-core" "dry-equalizer"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1fbji6crgqh88j0p4j1qlfpjnhyf8h1b991dh5wypib0xwzlc5an";
type = "gem";
};
version = "0.4.0";
};
gambiarra = {
dependencies = ["activesupport" "cli-ui" "thor"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "19kpbqp27fy6w990ciw3vx0z0bdmrcf14fr6dlfcn3r8xqpq56fr";
type = "gem";
};
version = "0.0.5";
};
i18n = {
dependencies = ["concurrent-ruby"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1vdcchz7jli1p0gnc669a7bj3q1fv09y9ppf0y3k0vb1jwdwrqwi";
type = "gem";
};
version = "1.12.0";
};
minitest = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0ic7i5z88zcaqnpzprf7saimq2f6sad57g5mkkqsrqrcd6h3mx06";
type = "gem";
};
version = "5.18.0";
};
paint = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1r9vx3wcx0x2xqlh6zqc81wcsn9qjw3xprcsv5drsq9q80z64z9j";
type = "gem";
};
version = "2.3.0";
};
thor = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "18yhlvmfya23cs3pvhr1qy38y41b6mhr5q9vwv5lrgk16wmf3jna";
type = "gem";
};
version = "1.1.0";
};
tzinfo = {
dependencies = ["concurrent-ruby"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "16w2g84dzaf3z13gxyzlzbf748kylk5bdgg3n1ipvkvvqy685bwd";
type = "gem";
};
version = "2.0.6";
};
zeitwerk = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "028ld9qmgdllxrl7d0qkl65s58wb1n3gv8yjs28g43a8b1hplxk1";
type = "gem";
};
version = "2.6.7";
};
}

View File

@ -1,5 +1,8 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, appstream-glib, desktop-file-utils
, glib, libadwaita, meson, ninja, pkg-config, wrapGAppsHook4, dbus , gtk4, sqlite }:
{ lib, stdenv, fetchFromGitHub, rustPlatform
, appstream-glib, cargo, desktop-file-utils, glib, libadwaita, meson, ninja
, pkg-config, rustc, wrapGAppsHook4
, dbus, gtk4, sqlite
}:
stdenv.mkDerivation rec {
pname = "furtherance";
@ -25,8 +28,8 @@ stdenv.mkDerivation rec {
ninja
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
wrapGAppsHook4
];

View File

@ -3,10 +3,12 @@
, fetchFromGitLab
, fetchpatch
, rustPlatform
, cargo
, desktop-file-utils
, meson
, ninja
, pkg-config
, rustc
, wrapGAppsHook
, python3
, git
@ -55,11 +57,10 @@ stdenv.mkDerivation rec {
python3
git
desktop-file-utils
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
glib

View File

@ -1,9 +1,11 @@
{ lib
, stdenv
, fetchFromGitHub
, cargo
, cmake
, pkg-config
, rustPlatform
, rustc
, wrapQtAppsHook
, ibus
, qtbase
@ -25,8 +27,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
pkg-config
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
rustPlatform.cargoSetupHook
wrapQtAppsHook
];

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "dnscontrol";
version = "3.31.3";
version = "3.31.4";
src = fetchFromGitHub {
owner = "StackExchange";
repo = pname;
rev = "v${version}";
sha256 = "sha256-jGM/Of5/wSMs7cedbGmgJC05gxxHOCAjjEZ2Qmlxgew=";
sha256 = "sha256-BHsvw4X8HWxAACq+4/rR/XHjVVt0qmAxYETDyp1Z/cg=";
};
vendorHash = "sha256-N7KS48Kr9SipliZ9JhMo2u9pRoE8+pxhC8B/YcZlNyg=";

View File

@ -2,9 +2,11 @@
, stdenv
, rustPlatform
, fetchFromGitLab
, cargo
, meson
, ninja
, pkg-config
, rustc
, wrapGAppsHook4
, gdk-pixbuf
, glib
@ -65,11 +67,10 @@ stdenv.mkDerivation (finalAttrs: {
# Provides glib-compile-resources to compile gresources
glib
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
gtk4

View File

@ -7,11 +7,11 @@ let
python = python3.override {
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (old: rec {
version = "1.4.47";
version = "1.4.48";
src = self.fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-lfwC9/wfMZmqpHqKdXQ3E0z2GOnZlMhO/9U/Uww4WG8=";
hash = "sha256-tHvChwltmJoIOM6W99jpZpFKJNqHftQadTHUS1XNuN8=";
};
});
};
@ -19,7 +19,7 @@ let
in
python.pkgs.buildPythonApplication rec {
pname = "flexget";
version = "3.6.3";
version = "3.7.0";
format = "pyproject";
# Fetch from GitHub in order to use `requirements.in`
@ -27,7 +27,7 @@ python.pkgs.buildPythonApplication rec {
owner = "Flexget";
repo = "Flexget";
rev = "refs/tags/v${version}";
hash = "sha256-Z1tiIs4NHHsWa7agAl1dnwliQbgFEl/SPT6QLQkqTVA=";
hash = "sha256-H+R2NPHJbpQToKI1Op+DqPt82+w2xHxHC9NPpiF3aF0=";
};
postPatch = ''

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitLab
, cargo
, meson
, ninja
, pkg-config
@ -8,6 +9,7 @@
, libsecret
, libadwaita
, rustPlatform
, rustc
, desktop-file-utils
, wrapGAppsHook4
}:
@ -40,11 +42,10 @@ stdenv.mkDerivation rec {
ninja
pkg-config
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
libadwaita

View File

@ -1,9 +1,11 @@
{ stdenv
, lib
, fetchFromGitLab
, cargo
, meson
, ninja
, rustPlatform
, rustc
, pkg-config
, glib
, gtk4
@ -49,8 +51,8 @@ stdenv.mkDerivation rec {
pkg-config
rustPlatform.bindgenHook
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
desktop-file-utils
appstream-glib
wrapGAppsHook4

View File

@ -2,11 +2,13 @@
, lib
, fetchFromGitLab
, nix-update-script
, cargo
, meson
, ninja
, gettext
, python3
, rustPlatform
, rustc
, pkg-config
, gtksourceview4
, glib
@ -49,9 +51,9 @@ stdenv.mkDerivation rec {
ninja
pkg-config
python3
rustPlatform.rust.cargo
cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
rustc
wrapGAppsHook
glib
];

View File

@ -3,6 +3,7 @@
, fetchFromGitLab
, fetchpatch
, appstream-glib
, cargo
, dbus
, desktop-file-utils
, git
@ -14,6 +15,7 @@
, openssl
, pkg-config
, rustPlatform
, rustc
, sqlite
, transmission
, wrapGAppsHook4
@ -56,11 +58,10 @@ in stdenv.mkDerivation rec {
ninja
pkg-config
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
dbus

View File

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitLab
, appstream-glib
, cargo
, desktop-file-utils
, itstool
, meson
@ -9,6 +10,7 @@
, pkg-config
, python3
, rustPlatform
, rustc
, wrapGAppsHook4
, glib
, gtk4
@ -46,11 +48,10 @@ stdenv.mkDerivation rec {
pkg-config
python3
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
glib

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, pkg-config, rustPlatform
{ stdenv, lib, fetchFromGitHub, cargo, pkg-config, rustPlatform
, bzip2, curl, zlib, zstd, libiconv, CoreServices
}:
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [
pkg-config rustPlatform.cargoSetupHook rustPlatform.rust.cargo
pkg-config rustPlatform.cargoSetupHook cargo
];
buildInputs = [ bzip2 curl zlib zstd ]

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, fetchpatch, python3Packages, makeWrapper, gettext, installShellFiles
, re2Support ? true
, rustSupport ? stdenv.hostPlatform.isLinux, rustPlatform
, rustSupport ? stdenv.hostPlatform.isLinux, cargo, rustPlatform, rustc
, fullBuild ? false
, gitSupport ? fullBuild
, guiSupport ? fullBuild, tk
@ -44,11 +44,11 @@ let
++ lib.optional gitSupport pygit2
++ lib.optional highlightSupport pygments;
nativeBuildInputs = [ makeWrapper gettext installShellFiles ]
++ lib.optionals rustSupport (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
++ lib.optionals rustSupport [
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [ docutils ]
++ lib.optionals stdenv.isDarwin [ ApplicationServices ];

View File

@ -4,10 +4,12 @@
, fetchFromGitHub
, fetchurl
, sd
, cargo
, curl
, pkg-config
, openssl
, rustPlatform
, rustc
, fetchYarnDeps
, yarn
, nodejs
@ -147,11 +149,10 @@ python3Packages.buildPythonApplication {
nativeBuildInputs = [
curl
pkg-config
] ++ (with rustPlatform; [
myCargoSetupHook
rust.cargo
rust.rustc
]);
cargo
rustc
];
buildInputs = [
openssl

View File

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, appstream-glib
, cargo
, desktop-file-utils
, glib
, gst_all_1
@ -14,6 +15,7 @@
, ninja
, pkg-config
, rustPlatform
, rustc
, wayland
, wrapGAppsHook4
}:
@ -42,8 +44,8 @@ stdenv.mkDerivation rec {
ninja
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
wrapGAppsHook4
];

View File

@ -1,25 +1,77 @@
{ stdenv, lib, buildPythonApplication, fetchFromGitHub, pycurl, python-dateutil, configobj, sqlalchemy, sdnotify, flask }:
{ stdenv, lib, python3, fetchFromGitHub, buildNpmPackage, jq }:
buildPythonApplication rec {
let
python = python3.override {
packageOverrides = self: super: {
# pyCA is incompatible with SQLAlchemy 2.0
sqlalchemy = super.sqlalchemy.overridePythonAttrs (old: rec {
version = "1.4.46";
src = self.fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA=";
};
});
};
};
frontend = buildNpmPackage rec {
pname = "pyca";
version = "4.5";
src = fetchFromGitHub {
owner = "opencast";
repo = "pyCA";
rev = "v${version}";
sha256 = "sha256-cTkWkOmgxJZlddqaSYKva2wih4Mvsdrd7LD4NggxKQk=";
};
npmDepsHash = "sha256-0U+semrNWTkNu3uQQkiJKZT1hB0/IfkL84G7/oP8XYY=";
nativeBuildInputs = [ jq python ];
postPatch = ''
${jq}/bin/jq '. += {"version": "${version}"}' < package.json > package.json.tmp
mv package.json.tmp package.json
'';
installPhase = ''
mkdir -p $out/static
cp -R pyca/ui/static/* $out/static/
'';
};
in
python3.pkgs.buildPythonApplication rec {
pname = "pyca";
version = "2.1";
version = "4.5";
src = fetchFromGitHub {
owner = "opencast";
repo = "pyCA";
rev = "v${version}";
sha256 = "0cvkmdlcax9da9iw4ls73vw0pxvm8wvchab5gwdy9w9ibqdpcmwh";
sha256 = "sha256-cTkWkOmgxJZlddqaSYKva2wih4Mvsdrd7LD4NggxKQk=";
};
propagatedBuildInputs = [
propagatedBuildInputs = with python.pkgs; [
pycurl
python-dateutil
configobj
sqlalchemy
sdnotify
psutil
flask
prometheus-client
];
postPatch = ''
sed -i -e 's#static_folder=.*#static_folder="${frontend}/static")#' pyca/ui/__init__.py
'';
passthru = {
inherit frontend;
};
meta = with lib; {
broken = stdenv.isDarwin;
description = "A fully functional Opencast capture agent written in Python";

View File

@ -2,8 +2,10 @@
, lib
, fetchFromGitLab
, rustPlatform
, cargo
, pkg-config
, meson
, rustc
, wrapGAppsHook4
, desktop-file-utils
, blueprint-compiler
@ -43,11 +45,10 @@ stdenv.mkDerivation rec {
# `gtk4-update-icon-cache` during installPhase, thanks to:
# https://gitlab.gnome.org/YaLTeR/video-trimmer/-/merge_requests/12
gtk4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
gtk4

View File

@ -5,9 +5,11 @@
, asciidoctor
, buildah
, buildah-unwrapped
, cargo
, libiconv
, libkrun
, makeWrapper
, rustc
, sigtool
}:
@ -27,10 +29,10 @@ stdenv.mkDerivation rec {
hash = "sha256-Y0FNi/+HuN5SqexHTKjcW6lEaeis7xZDYc2/FOAANIA=";
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
nativeBuildInputs = [
rustPlatform.cargoSetupHook
cargo
rustc
asciidoctor
makeWrapper
] ++ lib.optionals stdenv.isDarwin [ sigtool ];

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, cargo
, desktop-file-utils
, glib
, gtk4
@ -8,6 +9,7 @@
, ninja
, pkg-config
, rustPlatform
, rustc
, wrapGAppsHook4
, gtksourceview5
, libadwaita
@ -38,8 +40,8 @@ stdenv.mkDerivation rec {
ninja
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
wrapGAppsHook4
];

View File

@ -1,4 +1,4 @@
{ dotnetPackages, lib, xml2, stdenvNoCC }:
{ lib, python3, stdenvNoCC }:
{ name
, description ? ""
@ -10,21 +10,21 @@ let
inherit name;
meta.description = description;
nativeBuildInputs = [ dotnetPackages.Nuget xml2 ];
nativeBuildInputs = [ python3 ];
buildCommand = ''
export HOME=$(mktemp -d)
mkdir -p $out/{lib,share}
${lib.concatMapStringsSep "\n" (dep: ''
nuget init "${dep}" "$out/lib"
'') deps}
(
shopt -s nullglob
for nupkg in ${lib.concatMapStringsSep " " (dep: "\"${dep}\"/*.nupkg") deps}; do
cp --no-clobber "$nupkg" $out/lib
done
)
# Generates a list of all licenses' spdx ids, if available.
# Note that this currently ignores any license provided in plain text (e.g. "LICENSE.txt")
find "$out/lib" -name "*.nuspec" -exec sh -c \
"NUSPEC=\$(xml2 < {}) && echo "\$NUSPEC" | grep license/@type=expression | tr -s \ '\n' | grep "license=" | cut -d'=' -f2" \
\; | sort -u > $out/share/licenses
python ${./extract-licenses-from-nupkgs.py} $out/lib > $out/share/licenses
'';
} // { # We need data from `$out` for `meta`, so we have to use overrides as to not hit infinite recursion.
meta.licence = let

View File

@ -0,0 +1,30 @@
#!/usr/bin/env python3
"""
Opens each .nupkg file in a directory, and extracts the SPDX license identifiers
from them if they exist. The SPDX license identifier is stored in the
'<license type="expression">...</license>' tag in the .nuspec file.
All found license identifiers will be printed to stdout.
"""
from glob import glob
from pathlib import Path
import sys
import xml.etree.ElementTree as ET
import zipfile
all_licenses = set()
if len(sys.argv) < 2:
print(f"Usage: {sys.argv[0]} DIRECTORY")
sys.exit(1)
nupkg_dir = Path(sys.argv[1])
for nupkg_name in glob("*.nupkg", root_dir=nupkg_dir):
with zipfile.ZipFile(nupkg_dir / nupkg_name) as nupkg:
for nuspec_name in [name for name in nupkg.namelist() if name.endswith(".nuspec")]:
with nupkg.open(nuspec_name) as nuspec_stream:
nuspec = ET.parse(nuspec_stream)
licenses = nuspec.findall(".//{*}license[@type='expression']")
all_licenses.update([license.text for license in licenses])
print("\n".join(sorted(all_licenses)))

View File

@ -94,6 +94,20 @@
else salted;
in checked;
# See doc/builders/testers.chapter.md or
# https://nixos.org/manual/nixpkgs/unstable/#tester-runNixOSTest
runNixOSTest =
let nixos = import ../../../nixos/lib {};
in testModule:
nixos.runTest {
_file = "pkgs.runNixOSTest implementation";
imports = [
(lib.setDefaultModuleLocation "the argument that was passed to pkgs.runNixOSTest" testModule)
];
hostPkgs = pkgs;
node.pkgs = pkgs;
};
# See doc/builders/testers.chapter.md or
# https://nixos.org/manual/nixpkgs/unstable/#tester-invalidateFetcherByDrvHash
nixosTest =

View File

@ -14,6 +14,17 @@ in
lib.recurseIntoAttrs {
hasPkgConfigModule = pkgs.callPackage ../hasPkgConfigModule/tests.nix { };
runNixOSTest-example = pkgs-with-overlay.testers.runNixOSTest ({ lib, ... }: {
name = "runNixOSTest-test";
nodes.machine = { pkgs, ... }: {
system.nixos = dummyVersioning;
environment.systemPackages = [ pkgs.proof-of-overlay-hello pkgs.figlet ];
};
testScript = ''
machine.succeed("hello | figlet >/dev/console")
'';
});
# Check that the wiring of nixosTest is correct.
# Correct operation of the NixOS test driver should be asserted elsewhere.
nixosTest-example = pkgs-with-overlay.testers.nixosTest ({ lib, pkgs, figlet, ... }: {

View File

@ -1,25 +1,27 @@
{ lib, fetchurl, stdenvNoCC }:
{ lib, fetchFromGitHub, stdenvNoCC }:
stdenvNoCC.mkDerivation rec {
pname = "carlito";
version = "20130920";
pname = "carlito-unstable";
version = "20230309";
src = fetchurl {
url = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/crosextrafonts-carlito-${version}.tar.gz";
sha256 = "sha256-S9ErbLwyHBzxbaduLFhcklzpVqCAZ65vbGTv9sz9r1o=";
src = fetchFromGitHub {
owner = "googlefonts";
repo = "carlito";
rev = "3a810cab78ebd6e2e4eed42af9e8453c4f9b850a";
hash = "sha256-U4TvZZ7n7dr1/14oZkF1Eo96ZcdWIDWron70um77w+E=";
};
installPhase = ''
mkdir -p $out/etc/fonts/conf.d
mkdir -p $out/share/fonts/truetype
cp -v *.ttf $out/share/fonts/truetype
cp -v fonts/ttf/*.ttf $out/share/fonts/truetype
cp -v ${./calibri-alias.conf} $out/etc/fonts/conf.d/30-calibri.conf
'';
meta = with lib; {
# This font doesn't appear to have any official web site but this
# one provides some good information and samples.
homepage = "http://openfontlibrary.org/en/font/carlito";
homepage = "https://github.com/googlefonts/carlito";
description = "A sans-serif font metric-compatible with Microsoft Calibri";
longDescription = ''
Carlito is a free font that is metric-compatible with the

View File

@ -2,11 +2,11 @@
stdenvNoCC.mkDerivation rec {
pname = "gentium";
version = "6.101";
version = "6.200";
src = fetchzip {
url = "http://software.sil.org/downloads/r/gentium/GentiumPlus-${version}.zip";
hash = "sha256-iKD1Q7/lsbZCuJQoJqySQHwplrHv8yzmph+QwKpYgMU=";
hash = "sha256-gpVOtmF4Kp3y1Rm00c4o3WQEskO7mY1Z5SVaYHI0hzg=";
};
installPhase = ''

View File

@ -0,0 +1,104 @@
{ autoPatchelfHook, fetchurl, lib, stdenv }:
let
skip_tests = [
# Test flaky on ofborg
"channels"
# Test flaky because of our RPATH patching
# https://github.com/NixOS/nixpkgs/pull/230965#issuecomment-1545336489
"compiler/codegen"
] ++ lib.optionals stdenv.isDarwin [
# Test flaky on ofborg
"FileWatching"
# Test requires pbcopy
"InteractiveUtils"
# Test requires network access
"Sockets"
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
# Test Failed at $out/share/julia/stdlib/v1.8/LinearAlgebra/test/blas.jl:702
"LinearAlgebra/blas"
# Test Failed at $out/share/julia/test/misc.jl:724
"misc"
];
in
stdenv.mkDerivation rec {
pname = "julia-bin";
version = "1.9.0";
src = {
x86_64-linux = fetchurl {
url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz";
hash = "sha256-AMYURm75gJwusjSA440ZaixXf/8nMMT4PRNbkT1HM1k=";
};
aarch64-linux = fetchurl {
url = "https://julialang-s3.julialang.org/bin/linux/aarch64/${lib.versions.majorMinor version}/julia-${version}-linux-aarch64.tar.gz";
hash = "sha256-ChQxW1Os2X8i0m1Kj9LCN+Uk6Vw77JjS14tU2Awrw2Q=";
};
x86_64-darwin = fetchurl {
url = "https://julialang-s3.julialang.org/bin/mac/x64/${lib.versions.majorMinor version}/julia-${version}-mac64.tar.gz";
hash = "sha256-ALxMJ+6xvr01BZcxL/CRkXYxX9MZnGPslj+0HjsEv68=";
};
aarch64-darwin = fetchurl {
url = "https://julialang-s3.julialang.org/bin/mac/aarch64/${lib.versions.majorMinor version}/julia-${version}-macaarch64.tar.gz";
hash = "sha256-U+YncKaZDVqJ56AB72iqJd4lEmo76DggDEyacF2uo3w=";
};
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
patches = [
# https://github.com/JuliaLang/julia/commit/f5eeba35d9bf20de251bb9160cc935c71e8b19ba
./patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch
];
postPatch = ''
# Julia fails to pick up our Certification Authority root certificates, but
# it provides its own so we can simply disable the test. Patching in the
# dynamic path to ours require us to rebuild the Julia system image.
substituteInPlace share/julia/stdlib/v${lib.versions.majorMinor version}/NetworkOptions/test/runtests.jl \
--replace '@test ca_roots_path() != bundled_ca_roots()' \
'@test_skip ca_roots_path() != bundled_ca_roots()'
'';
nativeBuildInputs = lib.optionals stdenv.isLinux [
autoPatchelfHook
# https://github.com/JuliaLang/julia/blob/v1.9.0/NEWS.md#external-dependencies
stdenv.cc.cc
];
installPhase = ''
runHook preInstall
cp -r . $out
runHook postInstall
'';
# Breaks backtraces, etc.
dontStrip = true;
doInstallCheck = true;
preInstallCheck = ''
export JULIA_TEST_USE_MULTIPLE_WORKERS=true
# Some tests require read/write access to $HOME.
export HOME="$TMPDIR"
'';
installCheckPhase = ''
runHook preInstallCheck
# Command lifted from `test/Makefile`.
$out/bin/julia \
--check-bounds=yes \
--startup-file=no \
--depwarn=error \
$out/share/julia/test/runtests.jl \
--skip internet_required ${toString skip_tests}
runHook postInstallCheck
'';
meta = {
description = "High-level, high-performance, dynamic language for technical computing";
homepage = "https://julialang.org";
# Bundled and linked with various GPL code, although Julia itself is MIT.
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ raskin nickcao wegank ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
mainProgram = "julia";
};
}

View File

@ -0,0 +1,50 @@
diff --git a/share/julia/test/choosetests.jl b/share/julia/test/choosetests.jl
index 334ef05..db5f795 100644
--- a/share/julia/test/choosetests.jl
+++ b/share/julia/test/choosetests.jl
@@ -31,6 +31,19 @@ const TESTNAMES = [
"smallarrayshrink", "opaque_closure", "filesystem", "download",
]
+const INTERNET_REQUIRED_LIST = [
+ "Artifacts",
+ "Downloads",
+ "LazyArtifacts",
+ "LibCURL",
+ "LibGit2",
+ "Pkg",
+ "download",
+ "TOML",
+]
+
+const NETWORK_REQUIRED_LIST = vcat(INTERNET_REQUIRED_LIST, ["Sockets"])
+
"""
`(; tests, net_on, exit_on_error, seed) = choosetests(choices)` selects a set of tests to be
run. `choices` should be a vector of test names; if empty or set to
@@ -149,6 +162,7 @@ function choosetests(choices = [])
filtertests!(tests, "compiler/EscapeAnalysis", [
"compiler/EscapeAnalysis/local", "compiler/EscapeAnalysis/interprocedural"])
filtertests!(tests, "stdlib", STDLIBS)
+ filtertests!(tests, "internet_required", INTERNET_REQUIRED_LIST)
# do ambiguous first to avoid failing if ambiguities are introduced by other tests
filtertests!(tests, "ambiguous")
@@ -164,16 +178,7 @@ function choosetests(choices = [])
filter!(x -> x != "rounding", tests)
end
- net_required_for = filter!(in(tests), [
- "Artifacts",
- "Downloads",
- "LazyArtifacts",
- "LibCURL",
- "LibGit2",
- "Sockets",
- "download",
- "TOML",
- ])
+ net_required_for = filter!(in(tests), NETWORK_REQUIRED_LIST)
net_on = true
JULIA_TEST_NETWORKING_AVAILABLE = get(ENV, "JULIA_TEST_NETWORKING_AVAILABLE", "") |>
strip |>

View File

@ -1,8 +1,8 @@
{ stdenv, lib, rustPlatform, Security, patchelf }:
{ stdenv, lib, rustPlatform, rustc, Security, patchelf }:
rustPlatform.buildRustPackage {
pname = "clippy";
inherit (rustPlatform.rust.rustc) version src;
inherit (rustc) version src;
separateDebugInfo = true;
@ -13,7 +13,7 @@ rustPlatform.buildRustPackage {
# changes hash of vendor directory otherwise
dontUpdateAutotoolsGnuConfigScripts = true;
buildInputs = [ rustPlatform.rust.rustc.llvm ]
buildInputs = [ rustc.llvm ]
++ lib.optionals stdenv.isDarwin [ Security ];
# fixes: error: the option `Z` is only accepted on the nightly compiler
@ -31,8 +31,8 @@ rustPlatform.buildRustPackage {
# [0]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/src/bootstrap/builder.rs#L1543
# [1]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/compiler/rustc_codegen_ssa/src/back/linker.rs#L323-L331
preFixup = lib.optionalString stdenv.isDarwin ''
install_name_tool -add_rpath "${rustPlatform.rust.rustc}/lib" "$out/bin/clippy-driver"
install_name_tool -add_rpath "${rustPlatform.rust.rustc}/lib" "$out/bin/cargo-clippy"
install_name_tool -add_rpath "${rustc}/lib" "$out/bin/clippy-driver"
install_name_tool -add_rpath "${rustc}/lib" "$out/bin/cargo-clippy"
'';
meta = with lib; {

View File

@ -68,6 +68,7 @@ in
patches = rustcPatches;
# Use boot package set to break cycle
inherit (bootstrapRustPackages) cargo rustc;
rustPlatform = bootRustPlatform;
} // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) {
stdenv = llvmBootstrapForDarwin.stdenv;
@ -75,7 +76,10 @@ in
pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmBootstrapForDarwin.stdenv; };
pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmBootstrapForDarwin.stdenv; };
});
rustfmt = self.callPackage ./rustfmt.nix { inherit Security; };
rustfmt = self.callPackage ./rustfmt.nix {
inherit Security;
inherit (self.buildRustPackages) rustc;
};
cargo = self.callPackage ./cargo.nix {
# Use boot package set to break cycle
rustPlatform = bootRustPlatform;
@ -83,7 +87,7 @@ in
};
cargo-auditable = self.callPackage ./cargo-auditable.nix { };
cargo-auditable-cargo-wrapper = self.callPackage ./cargo-auditable-cargo-wrapper.nix { };
clippy = callPackage ./clippy.nix {
clippy = self.callPackage ./clippy.nix {
# We want to use self, not buildRustPackages, so that
# buildPackages.clippy uses the cross compiler and supports
# linting for the target platform.

View File

@ -1,4 +1,4 @@
{ buildPackages, callPackage, cargo-auditable, stdenv, runCommand }@prev:
{ lib, buildPackages, callPackage, cargo-auditable, stdenv, runCommand }@prev:
{ rustc
, cargo
@ -9,7 +9,8 @@
rec {
rust = {
inherit rustc cargo;
rustc = lib.warn "rustPlatform.rust.rustc is deprecated. Use rustc instead." rustc;
cargo = lib.warn "rustPlatform.rust.cargo is deprecated. Use cargo instead." cargo;
};
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-tarball {

View File

@ -1,7 +1,7 @@
{ lib, stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget, targetPackages
, llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget, llvmPackages
, fetchurl, file, python3
, darwin, cmake, rust, rustPlatform
, darwin, cargo, cmake, rust, rustc, rustPlatform
, pkg-config, openssl, xz
, libiconv
, which, libffi
@ -73,8 +73,8 @@ in stdenv.mkDerivation rec {
cxxForTarget = "${pkgsBuildTarget.targetPackages.stdenv.cc}/bin/${pkgsBuildTarget.targetPackages.stdenv.cc.targetPrefix}c++";
in [
"--release-channel=stable"
"--set=build.rustc=${rustPlatform.rust.rustc}/bin/rustc"
"--set=build.cargo=${rustPlatform.rust.cargo}/bin/cargo"
"--set=build.rustc=${rustc}/bin/rustc"
"--set=build.cargo=${cargo}/bin/cargo"
"--enable-rpath"
"--enable-vendor"
"--build=${rust.toRustTargetSpec stdenv.buildPlatform}"
@ -180,7 +180,7 @@ in stdenv.mkDerivation rec {
depsBuildBuild = [ pkgsBuildHost.stdenv.cc pkg-config ];
nativeBuildInputs = [
file python3 rustPlatform.rust.rustc cmake
file python3 rustc cmake
which libffi removeReferencesTo pkg-config xz
];

View File

@ -1,8 +1,8 @@
{ lib, stdenv, rustPlatform, Security, asNightly ? false }:
{ lib, stdenv, rustPlatform, rustc, Security, asNightly ? false }:
rustPlatform.buildRustPackage rec {
pname = "rustfmt" + lib.optionalString asNightly "-nightly";
inherit (rustPlatform.rust.rustc) version src;
inherit (rustc) version src;
# the rust source tarball already has all the dependencies vendored, no need to fetch them again
cargoVendorDir = "vendor";
@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
dontUpdateAutotoolsGnuConfigScripts = true;
buildInputs = [
rustPlatform.rust.rustc.llvm
rustc.llvm
] ++ lib.optional stdenv.isDarwin Security;
# As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
# As of rustc 1.45.0, these env vars are required to build rustfmt (due to
# https://github.com/rust-lang/rust/pull/72001)
CFG_RELEASE = rustPlatform.rust.rustc.version;
CFG_RELEASE = rustc.version;
CFG_RELEASE_CHANNEL = if asNightly then "nightly" else "stable";
meta = with lib; {

View File

@ -2,7 +2,7 @@
, fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub
, zlib, gdbm, ncurses, readline, groff, libyaml, libffi, jemalloc, autoreconfHook, bison
, autoconf, libiconv, libobjc, libunwind, Foundation
, buildEnv, bundler, bundix, rustPlatform
, buildEnv, bundler, bundix, cargo, rustPlatform, rustc
, makeBinaryWrapper, buildRubyGem, defaultGemConfig, removeReferencesTo
, openssl, openssl_1_1
, linuxPackages, libsystemtap
@ -48,7 +48,7 @@ let
# $(nix-build -A ruby)/lib/ruby/2.6.0/x86_64-linux/rbconfig.rb
# - In $out/lib/libruby.so and/or $out/lib/libruby.dylib
, removeReferencesTo, jitSupport ? yjitSupport
, rustPlatform, yjitSupport ? yjitSupported
, cargo, rustPlatform, rustc, yjitSupport ? yjitSupported
, autoreconfHook, bison, autoconf
, buildEnv, bundler, bundix
, libiconv, libobjc, libunwind, Foundation
@ -78,7 +78,7 @@ let
nativeBuildInputs = [ autoreconfHook bison ]
++ (op docSupport groff)
++ (ops (dtraceSupport && stdenv.isLinux) [ systemtap libsystemtap ])
++ ops yjitSupport [ rustPlatform.cargoSetupHook rustPlatform.rust.cargo rustPlatform.rust.rustc ]
++ ops yjitSupport [ rustPlatform.cargoSetupHook cargo rustc ]
++ op useBaseRuby baseRuby;
buildInputs = [ autoconf ]
++ (op fiddleSupport libffi)

View File

@ -1,26 +1,34 @@
{ lib, stdenv, fetchurl, fetchpatch, cairo, cmake, opencv, pcre, pkg-config }:
{ lib
, config
, stdenv
, fetchurl
, cairo
, cmake
, opencv
, pcre
, pkg-config
, cudaSupport ? config.cudaSupport or false
, cudaPackages
}:
stdenv.mkDerivation rec {
pname = "frei0r-plugins";
version = "1.7.0";
version = "1.8.0";
src = fetchurl {
url = "https://files.dyne.org/frei0r/releases/${pname}-${version}.tar.gz";
hash = "sha256-Gx/48Pm8I+7XJOlOmnwdjwJEv+M0JLtP5o5kYMCIUjo=";
hash = "sha256-RaKGVcrwVyJ7RCuADKOJnpNJBRXIHiEtIZ/fSnYT9cQ=";
};
# A PR to add support for OpenCV 4 was merged in May 2020. This
# patch can be removed when a release beyond 1.7.0 is issued.
patches = [
(fetchpatch {
name = "opencv4-support.patch";
url = "https://github.com/dyne/frei0r/commit/c0c8eed79fc8abe6c9881a53d7391efb526a3064.patch";
sha256 = "sha256-qxUAui4EEBEj8M/SoyMUkj//KegMTTT6FTBDC/Chxz4=";
})
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ cairo opencv pcre ];
buildInputs = [
cairo
opencv
pcre
] ++ lib.optionals cudaSupport [
cudaPackages.cuda_cudart
cudaPackages.cuda_nvcc
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
for f in $out/lib/frei0r-1/*.so* ; do
@ -31,9 +39,8 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://frei0r.dyne.org";
description = "Minimalist, cross-platform, shared video plugins";
license = licenses.gpl2;
license = licenses.gpl2Plus;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, cargo
, cmake
, openssl
, perl
@ -45,10 +46,9 @@ stdenv.mkDerivation rec {
cmake
perl
pkg-config
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
]) ++ lib.optionals stdenv.isDarwin [
rustPlatform.cargoSetupHook
cargo
] ++ lib.optionals stdenv.isDarwin [
fixDarwinDylibNames
];

View File

@ -3,12 +3,14 @@
, fetchFromGitHub
, fetchurl
, rustPlatform
, cargo
, pkg-config
, dtc
, glibc
, openssl
, libiconv
, libkrunfw
, rustc
, Hypervisor
, sevVariant ? false
}:
@ -32,10 +34,10 @@ stdenv.mkDerivation rec {
hash = "sha256-nbtp7FP+ObVGfDOEzTt4Z7TZwcNlREczTKIAXGSflZU=";
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
nativeBuildInputs = [
rustPlatform.cargoSetupHook
cargo
rustc
] ++ lib.optional sevVariant pkg-config;
buildInputs = [

View File

@ -1,4 +1,6 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, napi-rs-cli, nodejs, libiconv }:
{ lib, stdenv, fetchFromGitHub
, cargo, rustPlatform, rustc, napi-rs-cli, nodejs, libiconv
}:
stdenv.mkDerivation rec {
pname = "matrix-sdk-crypto-nodejs";
@ -26,8 +28,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
napi-rs-cli
nodejs
];

View File

@ -116,6 +116,7 @@ rec {
deployAndroidPackages = callPackage ./deploy-androidpackages.nix {
inherit stdenv lib mkLicenses;
};
deployAndroidPackage = ({package, os ? null, buildInputs ? [], patchInstructions ? "", meta ? {}, ...}@args:
let
extraParams = removeAttrs args [ "package" "os" "buildInputs" "patchInstructions" ];
@ -127,15 +128,25 @@ rec {
} // extraParams
));
# put a much nicer error message that includes the available options.
check-version = packages: package: version:
if lib.hasAttrByPath [ package version ] packages then
packages.${package}.${version}
else
throw ''
The version ${version} is missing in package ${package}.
The only available versions are ${builtins.concatStringsSep ", " (builtins.attrNames packages.${package})}.
'';
platform-tools = callPackage ./platform-tools.nix {
inherit deployAndroidPackage;
os = if stdenv.system == "aarch64-darwin" then "macosx" else os; # "macosx" is a universal binary here
package = packages.platform-tools.${platformToolsVersion};
package = check-version packages "platform-tools" platformToolsVersion;
};
tools = callPackage ./tools.nix {
inherit deployAndroidPackage os;
package = packages.tools.${toolsVersion};
package = check-version packages "tools" toolsVersion;
postInstall = ''
${linkPlugin { name = "platform-tools"; plugin = platform-tools; }}
@ -152,7 +163,7 @@ rec {
build-tools = map (version:
callPackage ./build-tools.nix {
inherit deployAndroidPackage os;
package = packages.build-tools.${version};
package = check-version packages "build-tools" version;
postInstall = ''
${linkPlugin { name = "tools"; plugin = tools; check = toolsVersion != null; }}
@ -162,7 +173,7 @@ rec {
emulator = callPackage ./emulator.nix {
inherit deployAndroidPackage os;
package = packages.emulator.${emulatorVersion};
package = check-version packages "emulator" emulatorVersion;
postInstall = ''
${linkSystemImages { images = system-images; check = includeSystemImages; }}
@ -172,14 +183,14 @@ rec {
platforms = map (version:
deployAndroidPackage {
inherit os;
package = packages.platforms.${version};
package = check-version packages "platforms" version;
}
) platformVersions;
sources = map (version:
deployAndroidPackage {
inherit os;
package = packages.sources.${version};
package = check-version packages "sources" version;
}
) platformVersions;
@ -223,7 +234,7 @@ rec {
cmake = map (version:
callPackage ./cmake.nix {
inherit deployAndroidPackage os;
package = packages.cmake.${version};
package = check-version packages "cmake" version;
}
) cmakeVersions;
@ -243,14 +254,14 @@ rec {
google-apis = map (version:
deployAndroidPackage {
inherit os;
package = addons.addons.${version}.google_apis;
package = (check-version addons "addons" version).google_apis;
}
) (builtins.filter (platformVersion: platformVersion < "26") platformVersions); # API level 26 and higher include Google APIs by default
google-tv-addons = map (version:
deployAndroidPackage {
inherit os;
package = addons.addons.${version}.google_tv_addon;
package = (check-version addons "addons" version).google_tv_addon;
}
) platformVersions;
@ -320,7 +331,7 @@ rec {
'' else callPackage ./cmdline-tools.nix {
inherit deployAndroidPackage os cmdLineToolsVersion;
package = packages.cmdline-tools.${cmdLineToolsVersion};
package = check-version packages "cmdline-tools" cmdLineToolsVersion;
postInstall = ''
# Symlink all requested plugins

View File

@ -6,6 +6,7 @@
, asyauth
, asysocks
, buildPythonPackage
, cargo
, colorama
, fetchFromGitHub
, iconv
@ -14,6 +15,7 @@
, pyperclip
, pythonOlder
, rustPlatform
, rustc
, setuptools-rust
, tqdm
, unicrypto
@ -46,10 +48,9 @@ buildPythonPackage rec {
nativeBuildInputs = [
rustPlatform.cargoSetupHook
setuptools-rust
] ++ (with rustPlatform.rust; [
cargo
rustc
]);
];
propagatedBuildInputs = [
arc4

View File

@ -1,6 +1,8 @@
{ lib
, buildPythonPackage
, cargo
, rustPlatform
, rustc
, setuptools
, setuptools-rust
, isPyPy
@ -41,11 +43,10 @@ buildPythonPackage rec {
nativeBuildInputs = [
setuptools
setuptools-rust
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
# Remove when https://github.com/NixOS/nixpkgs/pull/190093 lands.
buildInputs = lib.optional stdenv.isDarwin libiconv;

View File

@ -2,6 +2,7 @@
, stdenv
, buildPythonPackage
, fetchPypi
, cargo
, configobj
, cython
, dulwich
@ -18,6 +19,7 @@
, pythonOlder
, installShellFiles
, rustPlatform
, rustc
, setuptools-gettext
, setuptools-rust
, testers
@ -49,8 +51,8 @@ buildPythonPackage rec {
cython
installShellFiles
rustPlatform.cargoSetupHook
rustPlatform.rust.cargo
rustPlatform.rust.rustc
cargo
rustc
setuptools-gettext
setuptools-rust
];

View File

@ -3,7 +3,9 @@
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, cargo
, rustPlatform
, rustc
, setuptools-rust
, libiconv
}:
@ -27,11 +29,11 @@ buildPythonPackage rec {
hash = "sha256-AqSVFOB9Lfvk9h3GtoYlEOXBEt7YZYLhCDNKM9upQ2U=";
};
nativeBuildInputs = with rustPlatform;[
nativeBuildInputs = [
setuptools-rust
cargoSetupHook
rust.rustc
rust.cargo
rustPlatform.cargoSetupHook
rustc
cargo
];
buildInputs = lib.optionals stdenv.isDarwin [

View File

@ -4,6 +4,8 @@
, buildPythonPackage
, fetchPypi
, rustPlatform
, cargo
, rustc
, setuptools-rust
, openssl
, Security
@ -58,7 +60,9 @@ buildPythonPackage rec {
] ++ [
rustPlatform.cargoSetupHook
setuptools-rust
] ++ (with rustPlatform; [ rust.cargo rust.rustc ]);
cargo
rustc
];
buildInputs = [ openssl ]
++ lib.optionals stdenv.isDarwin [ Security libiconv ]

View File

@ -3,7 +3,9 @@
, fetchFromGitHub
, buildPythonPackage
, rustPlatform
, cargo
, pkg-config
, rustc
, rustfmt
, setuptools-rust
, openssl
@ -34,11 +36,10 @@ buildPythonPackage rec {
pkg-config
rustfmt
setuptools-rust
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];

View File

@ -3,6 +3,8 @@
, fetchFromGitHub
, buildPythonPackage
, rustPlatform
, cargo
, rustc
, setuptools-rust
, unittestCheckHook
}:
@ -26,11 +28,12 @@ buildPythonPackage rec {
sourceRoot = "source";
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
nativeBuildInputs = [
setuptools-rust
rustPlatform.cargoSetupHook
cargo
rustc
];
nativeCheckInputs = [ unittestCheckHook ];

View File

@ -2,6 +2,8 @@
, buildPythonPackage
, fetchFromGitHub
, rustPlatform
, cargo
, rustc
, setuptools-rust
, json-stream-rs-tokenizer
, json-stream
@ -31,12 +33,10 @@ buildPythonPackage rec {
nativeBuildInputs = [
setuptools-rust
]
++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
# Tests depend on json-stream, which depends on this package.
# To avoid infinite recursion, we only enable tests when building passthru.tests.

View File

@ -2,6 +2,7 @@
, stdenv
, buildPythonPackage
, fetchFromGitHub
, cargo
, hypothesis
, libiconv
, pytestCheckHook
@ -9,6 +10,7 @@
, pythonOlder
, pyyaml
, rustPlatform
, rustc
, setuptools-rust
, setuptools-scm
, typing-extensions
@ -50,7 +52,9 @@ buildPythonPackage rec {
setuptools-rust
setuptools-scm
rustPlatform.cargoSetupHook
] ++ (with rustPlatform; [ rust.cargo rust.rustc ]);
cargo
rustc
];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];

View File

@ -3,7 +3,9 @@
, pythonOlder
, buildPythonPackage
, fetchFromGitHub
, cargo
, rustPlatform
, rustc
# Python requirements
, dill
, numpy
@ -67,7 +69,7 @@ buildPythonPackage rec {
hash = "sha256-imktzBpgP+lq6FsVWIUK82+t76gKTgt53kPfKOnsseQ=";
};
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ rust.rustc rust.cargo cargoSetupHook ]);
nativeBuildInputs = [ setuptools-rust rustc cargo rustPlatform.cargoSetupHook ];
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;

View File

@ -1,10 +1,12 @@
{ lib
, buildPythonPackage
, cargo
, fetchFromGitHub
, libiconv
, pytestCheckHook
, pythonOlder
, rustPlatform
, rustc
, setuptools-rust
}:
@ -29,9 +31,9 @@ buildPythonPackage rec {
nativeBuildInputs = with rustPlatform; [
setuptools-rust
rust.rustc
rust.cargo
cargoSetupHook
rustc
cargo
rustPlatform.cargoSetupHook
];
buildInputs = [

View File

@ -1,6 +1,8 @@
{ fetchFromGitHub
, buildPythonPackage
, cargo
, rustPlatform
, rustc
, setuptools-rust
, numpy
, fixtures
@ -26,11 +28,12 @@ buildPythonPackage rec {
hash = "sha256-imhiPj763iumRQb+oeBOpICD1nCvzZx+3yQWu1QRRQQ=";
};
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
nativeBuildInputs = [
setuptools-rust
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [ numpy ] ++ lib.optionals stdenv.isDarwin [ libiconv ];

View File

@ -1,12 +1,14 @@
{ stdenv
, lib
, buildPythonPackage
, cargo
, fetchFromGitHub
, fetchpatch
, h5py
, numpy
, pythonOlder
, pytestCheckHook
, rustc
, rustPlatform
, setuptools-rust
, torch
@ -45,11 +47,11 @@ buildPythonPackage rec {
sourceRoot = "source/bindings/python";
nativeBuildInputs = with rustPlatform; [
nativeBuildInputs = [
setuptools-rust
rust.cargo
rust.rustc
cargoSetupHook
cargo
rustc
rustPlatform.cargoSetupHook
];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];

View File

@ -1,5 +1,7 @@
{ callPackage
, cargo
, rustPlatform
, rustc
, setuptools-rust
}:
@ -11,11 +13,11 @@ callPackage ../../../tools/rust/maturin/pyo3-test/generic.nix {
#
format = "setuptools";
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
nativeBuildInputs = [ setuptools-rust ] ++ [
rustPlatform.cargoSetupHook
cargo
rustc
];
preConfigure = ''
# sourceRoot puts Cargo.lock in the wrong place due to the

View File

@ -1,10 +1,12 @@
{ lib
, stdenv
, buildPythonPackage
, cargo
, fetchFromGitHub
, libiconv
, Foundation
, rustPlatform
, rustc
, setuptools-rust
, range-typed-integers
}:
@ -27,7 +29,7 @@ buildPythonPackage rec {
};
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Foundation ];
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]);
nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo rustc ];
propagatedBuildInputs = [ range-typed-integers ];
GETTEXT_SYSTEM = true;

View File

@ -1,10 +1,12 @@
{ lib
, stdenv
, cargo
, fetchPypi
, fetchpatch
, buildPythonPackage
, isPy3k
, rustPlatform
, rustc
, setuptools-rust
, libiconv
}:
@ -28,11 +30,10 @@ buildPythonPackage rec {
nativeBuildInputs = [
setuptools-rust
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];

View File

@ -4,6 +4,8 @@
, fetchPypi
, pythonOlder
, rustPlatform
, cargo
, rustc
, setuptools-rust
, libiconv
, requests
@ -40,7 +42,9 @@ buildPythonPackage {
nativeBuildInputs = [
rustPlatform.cargoSetupHook
setuptools-rust
] ++ (with rustPlatform; [ rust.cargo rust.rustc ]);
cargo
rustc
];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, buildPythonPackage
, cargo
, datasets
, fetchFromGitHub
, fetchurl
@ -12,6 +13,7 @@
, pythonOlder
, requests
, rustPlatform
, rustc
, Security
, setuptools-rust
}:
@ -82,11 +84,10 @@ buildPythonPackage rec {
nativeBuildInputs = [
pkg-config
setuptools-rust
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
openssl

View File

@ -8,12 +8,12 @@
buildPythonPackage rec {
pname = "trimesh";
version = "3.21.2";
version = "3.21.6";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-VRPE+1QLKGy5W99ia5BuPNtmH/eoXulApS8n8SdQSaQ=";
hash = "sha256-+gFqZAbGLoNDdOmbxElKwb0QY7BJfOUZVD7888T6eU8=";
};
nativeBuildInputs = [ setuptools ];

View File

@ -13,7 +13,7 @@
buildPythonPackage rec {
pname = "vehicle";
version = "1.0.0";
version = "1.0.1";
format = "pyproject";
disabled = pythonOlder "3.10";
@ -22,7 +22,7 @@ buildPythonPackage rec {
owner = "frenck";
repo = "python-vehicle";
rev = "refs/tags/v${version}";
hash = "sha256-7WW/gEtS4KLcAujQ+pypDpk9VaacMWj/RP7OpLxUrDs=";
hash = "sha256-nN7efkN59FCCjCk3svYCTGGdvr2RSM5VektuUkHy3Vo=";
};
nativeBuildInputs = [

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, rustPlatform
, rustc
, callPackage
, fetchFromGitHub
, buildPythonPackage
@ -93,7 +94,7 @@ rec {
pname = "wasmer-compiler-llvm";
buildAndTestSubdir = "packages/compiler-llvm";
cargoHash = "sha256-xawbf5gXXV+7I2F2fDSaMvjtFvGDBtqX7wL3c28TSbA=";
extraNativeBuildInputs = [ rustPlatform.rust.rustc.llvm ];
extraNativeBuildInputs = [ rustc.llvm ];
extraBuildInputs = [ libffi libxml2.out ncurses zlib ];
};

View File

@ -2,8 +2,10 @@
, stdenv
, anyio
, buildPythonPackage
, cargo
, fetchFromGitHub
, rustPlatform
, rustc
, setuptools-rust
, pythonOlder
, dirty-equals
@ -41,12 +43,11 @@ buildPythonPackage rec {
];
nativeBuildInputs = [
] ++ (with rustPlatform; [
cargoSetupHook
maturinBuildHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
cargo
rustc
];
propagatedBuildInputs = [
anyio

View File

@ -3,6 +3,8 @@
, buildPythonPackage
, fetchPypi
, rustPlatform
, cargo
, rustc
, libiconv
, pytestCheckHook
}:
@ -24,11 +26,11 @@ buildPythonPackage rec {
hash = "sha256-tpUDGBIHqXsKPsK+1h2sNuiV2I0pGVBokKh+hdFazRQ=";
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
rust.cargo
rust.rustc
nativeBuildInputs = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
cargo
rustc
];
buildInputs = lib.optional stdenv.isDarwin libiconv;

View File

@ -2,9 +2,11 @@
, lib
, fetchFromGitHub
, nix-update-script
, cargo
, meson
, ninja
, rustPlatform
, rustc
, pkg-config
, glib
, libshumate
@ -44,9 +46,9 @@ stdenv.mkDerivation rec {
meson
ninja
pkg-config
rustPlatform.rust.cargo
cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
rustc
wrapGAppsHook4
rustPlatform.bindgenHook
desktop-file-utils

View File

@ -1,8 +1,10 @@
{ lib
, stdenv
, fetchFromGitHub
, cargo
, cmake
, rustPlatform
, rustc
, libiconv
}:
@ -30,11 +32,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
rustPlatform.cargoSetupHook
cargo
rustc
];
meta = with lib; {
description = "Tool for integrating Rust into an existing CMake project";

View File

@ -1,20 +1,25 @@
{ lib
, buildGoModule
, fetchFromGitHub
, makeBinaryWrapper
}:
buildGoModule rec {
pname = "cloud-nuke";
version = "0.30.0";
version = "0.31.1";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-H6W30OrkeMJGEIcNLAcdxWOz4bUXlklMCAgW4WkOAZ8=";
hash = "sha256-TTGC2lvqG+RYsruNzo7GApT5HMJyG4aoT12Rju9hTmY=";
};
vendorHash = "sha256-4RVblG4Y+KLRYJ7iPbrcbwKQ3tz2WSZQyUrqCLeamgo=";
vendorHash = "sha256-DPJ6+akisNtMsbDdHWEWavZ2GJfeWjFIV6K+bV91FEY=";
nativeBuildInputs = [
makeBinaryWrapper
];
ldflags = [
"-s"
@ -24,6 +29,10 @@ buildGoModule rec {
doCheck = false;
postInstall = ''
wrapProgram $out/bin/cloud-nuke --set-default DISABLE_TELEMETRY true
'';
meta = with lib; {
homepage = "https://github.com/gruntwork-io/cloud-nuke";
description = "A tool for cleaning up your cloud accounts by nuking (deleting) all resources within it";

View File

@ -0,0 +1,62 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, git
, python3
, makeWrapper
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "pylyzer";
version = "0.0.26";
src = fetchFromGitHub {
owner = "mtshiba";
repo = "pylyzer";
rev = "v${version}";
hash = "sha256-ZEmTSSYHQWk0IVJXlrtGb+j2hbb9ZtDLCtajOR7BMoU=";
};
cargoHash = "sha256-/QMzPvLcAjpai2YX58+YM/+KhYZRuK59hPYAEHeTTa4=";
nativeBuildInputs = [
git
python3
makeWrapper
];
buildInputs = [
python3
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
preBuild = ''
export HOME=$TMPDIR
'';
postInstall = ''
mkdir -p $out/lib
cp -r $HOME/.erg/ $out/lib/erg
'';
checkFlags = [
# this test causes stack overflow
# > thread 'exec_import' has overflowed its stack
"--skip=exec_import"
];
postFixup = ''
wrapProgram $out/bin/pylyzer --set ERG_PATH $out/lib/erg
'';
meta = with lib; {
description = "A fast static code analyzer & language server for Python";
homepage = "https://github.com/mtshiba/pylyzer";
changelog = "https://github.com/mtshiba/pylyzer/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
}

View File

@ -212,7 +212,7 @@ lib.composeManyExtensions [
nativeBuildInputs = with pkgs;
(old.nativeBuildInputs or [ ])
++ lib.optionals (lib.versionAtLeast old.version "4")
(with pkgs.rustPlatform; [ rust.rustc rust.cargo cargoSetupHook self.setuptools-rust ]);
[ rustc cargo rustPlatform.cargoSetupHook self.setuptools-rust ];
} // lib.optionalAttrs (lib.versionAtLeast old.version "4") {
cargoDeps =
pkgs.rustPlatform.fetchCargoTarball
@ -402,7 +402,7 @@ lib.composeManyExtensions [
++ lib.optionals (lib.versionAtLeast old.version "3.4") [ self.setuptools-rust ]
++ lib.optional (!self.isPyPy) pyBuildPackages.cffi
++ lib.optional (lib.versionAtLeast old.version "3.5" && !isWheel)
(with pkgs.rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ])
(with pkgs; [ rustPlatform.cargoSetupHook cargo rustc ])
++ [ pkg-config ]
;
buildInputs = (old.buildInputs or [ ])

Some files were not shown because too many files have changed in this diff Show More