Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-10-22 00:02:31 +00:00 committed by GitHub
commit 1cf369a0dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
120 changed files with 2803 additions and 512 deletions

View file

@ -12,6 +12,8 @@ If you are packaging a Flutter desktop application, use [`buildFlutterApplicatio
If the upstream source is missing a `pubspec.lock` file, you'll have to vendor one and specify it using `pubspecLockFile`. If it is needed, one will be generated for you and printed when attempting to build the derivation.
The `depsListFile` must always be provided when packaging in Nixpkgs. It will be generated and printed if the derivation is attempted to be built without one. Alternatively, `autoDepsList` may be set to `true` only when outside of Nixpkgs, as it relies on import-from-derivation.
The `dart` commands run can be overridden through `pubGetScript` and `dartCompileCommand`, you can also add flags using `dartCompileFlags` or `dartJitFlags`.
Dart supports multiple [outputs types](https://dart.dev/tools/dart-compile#types-of-output), you can choose between them using `dartOutputType` (defaults to `exe`). If you want to override the binaries path or the source path they come from, you can use `dartEntryPoints`. Outputs that require a runtime will automatically be wrapped with the relevant runtime (`dartaotruntime` for `aot-snapshot`, `dart run` for `jit-snapshot` and `kernel`, `node` for `js`), this can be overridden through `dartRuntimeCommand`.
@ -31,6 +33,7 @@ buildDartApplication rec {
};
pubspecLockFile = ./pubspec.lock;
depsListFile = ./deps.json;
vendorHash = "sha256-Atm7zfnDambN/BmmUf4BG0yUz/y6xWzf0reDw3Ad41s=";
}
```
@ -39,9 +42,7 @@ buildDartApplication rec {
The function `buildFlutterApplication` builds Flutter applications.
The deps.json file must always be provided when packaging in Nixpkgs. It will be generated and printed if the derivation is attempted to be built without one. Alternatively, `autoDepsList` may be set to `true` when outside of Nixpkgs, as it relies on import-from-derivation.
A `pubspec.lock` file must be available. See the [Dart documentation](#ssec-dart-applications) for more details.
See the [Dart documentation](#ssec-dart-applications) for more details on required files and arguments.
```nix
{ flutter, fetchFromGitHub }:

View file

@ -6199,6 +6199,16 @@
githubId = 45048741;
name = "Alwanga Oyango";
};
galaxy = {
email = "galaxy@dmc.chat";
matrix = "@galaxy:mozilla.org";
name = "The Galaxy";
github = "ga1aksy";
githubId = 148551648;
keys = [{
fingerprint = "48CA 3873 9E9F CA8E 76A0 835A E3DE CF85 4212 E1EA";
}];
};
gal_bolle = {
email = "florent.becker@ens-lyon.org";
github = "FlorentBecker";
@ -13664,6 +13674,12 @@
githubId = 152312;
name = "Periklis Tsirakidis";
};
perstark = {
email = "perstark.se@gmail.com";
github = "perstarkse";
githubId = 63069986;
name = "Per Stark";
};
petercommand = {
email = "petercommand@gmail.com";
github = "petercommand";
@ -17883,6 +17899,10 @@
githubId = 13155277;
name = "Tom Houle";
};
tomkoid = {
email = "tomaszierl@outlook.com";
name = "Tomkoid";
};
tomodachi94 = {
email = "tomodachi94+nixpkgs@protonmail.com";
matrix = "@tomodachi94:matrix.org";

View file

@ -117,6 +117,8 @@
- [virt-manager](https://virt-manager.org/), an UI for managing virtual machines in libvirt, is now available as `programs.virt-manager`.
- [Soft Serve](https://github.com/charmbracelet/soft-serve), a tasty, self-hostable Git server for the command line. Available as [services.soft-serve](#opt-services.soft-serve.enable).
## Backward Incompatibilities {#sec-release-23.11-incompatibilities}
- `network-online.target` has been fixed to no longer time out for systems with `networking.useDHCP = true` and `networking.useNetworkd = true`.
@ -345,6 +347,8 @@
- `jq` was updated to 1.7, its [first release in 5 years](https://github.com/jqlang/jq/releases/tag/jq-1.7).
- `zfs` was updated from 2.1.x to 2.2.0, [enabling newer kernel support and adding new features](https://github.com/openzfs/zfs/releases/tag/zfs-2.2.0).
- A new option was added to the virtualisation module that enables specifying explicitly named network interfaces in QEMU VMs. The existing `virtualisation.vlans` is still supported for cases where the name of the network interface is irrelevant.
- DocBook option documentation is no longer supported, all module documentation now uses markdown.

View file

@ -0,0 +1,49 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.fanout;
mknodCmds = n: lib.lists.imap0 (i: s:
"mknod /dev/fanout${builtins.toString i} c $MAJOR ${builtins.toString i}"
) (lib.lists.replicate n "");
in
{
options.services.fanout = {
enable = lib.mkEnableOption (lib.mdDoc "fanout");
fanoutDevices = lib.mkOption {
type = lib.types.int;
default = 1;
description = "Number of /dev/fanout devices";
};
bufferSize = lib.mkOption {
type = lib.types.int;
default = 16384;
description = "Size of /dev/fanout buffer in bytes";
};
};
config = lib.mkIf cfg.enable {
boot.extraModulePackages = [ config.boot.kernelPackages.fanout.out ];
boot.kernelModules = [ "fanout" ];
boot.extraModprobeConfig = ''
options fanout buffersize=${builtins.toString cfg.bufferSize}
'';
systemd.services.fanout = {
description = "Bring up /dev/fanout devices";
script = ''
MAJOR=$(${pkgs.gnugrep}/bin/grep fanout /proc/devices | ${pkgs.gawk}/bin/awk '{print $1}')
${lib.strings.concatLines (mknodCmds cfg.fanoutDevices)}
'';
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
User = "root";
RemainAfterExit = "yes";
Restart = "no";
};
};
};
}

View file

@ -2,6 +2,7 @@
./config/appstream.nix
./config/console.nix
./config/debug-info.nix
./config/fanout.nix
./config/fonts/fontconfig.nix
./config/fonts/fontdir.nix
./config/fonts/ghostscript.nix
@ -730,6 +731,7 @@
./services/misc/signald.nix
./services/misc/siproxd.nix
./services/misc/snapper.nix
./services/misc/soft-serve.nix
./services/misc/sonarr.nix
./services/misc/sourcehut
./services/misc/spice-vdagentd.nix

View file

@ -224,11 +224,11 @@ in
extraPrefs = cfg.autoConfig;
extraNativeMessagingHosts =
old.extraNativeMessagingHosts or []
++ optional nmh.ff2mpv ff2mpv
++ optional nmh.euwebid web-eid-app
++ optional nmh.gsconnect gnomeExtensions.gsconnect
++ optional nmh.jabref jabref
++ optional nmh.passff passff-host;
++ optional nmh.ff2mpv pkgs.ff2mpv
++ optional nmh.euwebid pkgs.web-eid-app
++ optional nmh.gsconnect pkgs.gnomeExtensions.gsconnect
++ optional nmh.jabref pkgs.jabref
++ optional nmh.passff pkgs.passff-host;
cfg = let
# copy-pasted from the wrapper; TODO: figure out fix
applicationName = cfg.package.binaryName or (lib.getName cfg.package);

View file

@ -67,16 +67,16 @@ with lib;
mapredSiteDefault = mkOption {
default = {
"mapreduce.framework.name" = "yarn";
"yarn.app.mapreduce.am.env" = "HADOOP_MAPRED_HOME=${cfg.package}/lib/${cfg.package.untarDir}";
"mapreduce.map.env" = "HADOOP_MAPRED_HOME=${cfg.package}/lib/${cfg.package.untarDir}";
"mapreduce.reduce.env" = "HADOOP_MAPRED_HOME=${cfg.package}/lib/${cfg.package.untarDir}";
"yarn.app.mapreduce.am.env" = "HADOOP_MAPRED_HOME=${cfg.package}";
"mapreduce.map.env" = "HADOOP_MAPRED_HOME=${cfg.package}";
"mapreduce.reduce.env" = "HADOOP_MAPRED_HOME=${cfg.package}";
};
defaultText = literalExpression ''
{
"mapreduce.framework.name" = "yarn";
"yarn.app.mapreduce.am.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}/lib/''${config.${opt.package}.untarDir}";
"mapreduce.map.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}/lib/''${config.${opt.package}.untarDir}";
"mapreduce.reduce.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}/lib/''${config.${opt.package}.untarDir}";
"yarn.app.mapreduce.am.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}";
"mapreduce.map.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}";
"mapreduce.reduce.env" = "HADOOP_MAPRED_HOME=''${config.${opt.package}}";
}
'';
type = types.attrsOf types.anything;
@ -154,13 +154,13 @@ with lib;
};
log4jProperties = mkOption {
default = "${cfg.package}/lib/${cfg.package.untarDir}/etc/hadoop/log4j.properties";
default = "${cfg.package}/etc/hadoop/log4j.properties";
defaultText = literalExpression ''
"''${config.${opt.package}}/lib/''${config.${opt.package}.untarDir}/etc/hadoop/log4j.properties"
"''${config.${opt.package}}/etc/hadoop/log4j.properties"
'';
type = types.path;
example = literalExpression ''
"''${pkgs.hadoop}/lib/''${pkgs.hadoop.untarDir}/etc/hadoop/log4j.properties";
"''${pkgs.hadoop}/etc/hadoop/log4j.properties";
'';
description = lib.mdDoc "log4j.properties file added to HADOOP_CONF_DIR";
};

View file

@ -160,7 +160,7 @@ in
umount /run/wrappers/yarn-nodemanager/cgroup/cpu || true
rm -rf /run/wrappers/yarn-nodemanager/ || true
mkdir -p /run/wrappers/yarn-nodemanager/{bin,etc/hadoop,cgroup/cpu}
cp ${cfg.package}/lib/${cfg.package.untarDir}/bin/container-executor /run/wrappers/yarn-nodemanager/bin/
cp ${cfg.package}/bin/container-executor /run/wrappers/yarn-nodemanager/bin/
chgrp hadoop /run/wrappers/yarn-nodemanager/bin/container-executor
chmod 6050 /run/wrappers/yarn-nodemanager/bin/container-executor
cp ${hadoopConf}/container-executor.cfg /run/wrappers/yarn-nodemanager/etc/hadoop/

View file

@ -0,0 +1,99 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.soft-serve;
configFile = format.generate "config.yaml" cfg.settings;
format = pkgs.formats.yaml { };
docUrl = "https://charm.sh/blog/self-hosted-soft-serve/";
stateDir = "/var/lib/soft-serve";
in
{
options = {
services.soft-serve = {
enable = mkEnableOption "Enable soft-serve service";
package = mkPackageOption pkgs "soft-serve" { };
settings = mkOption {
type = format.type;
default = { };
description = mdDoc ''
The contents of the configuration file.
See <${docUrl}>.
'';
example = literalExpression ''
{
name = "dadada's repos";
log_format = "text";
ssh = {
listen_addr = ":23231";
public_url = "ssh://localhost:23231";
max_timeout = 30;
idle_timeout = 120;
};
stats.listen_addr = ":23233";
}
'';
};
};
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
# The config file has to be inside the state dir
"L+ ${stateDir}/config.yaml - - - - ${configFile}"
];
systemd.services.soft-serve = {
description = "Soft Serve git server";
documentation = [ docUrl ];
requires = [ "network-online.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
environment.SOFT_SERVE_DATA_PATH = stateDir;
serviceConfig = {
Type = "simple";
DynamicUser = true;
Restart = "always";
ExecStart = "${getExe cfg.package} serve";
StateDirectory = "soft-serve";
WorkingDirectory = stateDir;
RuntimeDirectory = "soft-serve";
RuntimeDirectoryMode = "0750";
ProcSubset = "pid";
ProtectProc = "invisible";
UMask = "0027";
CapabilityBoundingSet = "";
ProtectHome = true;
PrivateDevices = true;
PrivateUsers = true;
ProtectHostname = true;
ProtectClock = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectKernelLogs = true;
ProtectControlGroups = true;
RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
RestrictNamespaces = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
RestrictRealtime = true;
RemoveIPC = true;
PrivateMounts = true;
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"~@cpu-emulation @debug @keyring @module @mount @obsolete @privileged @raw-io @reboot @setuid @swap"
];
};
};
};
meta.maintainers = [ maintainers.dadada ];
}

View file

@ -267,6 +267,7 @@ let
};
storeImage = import ../../lib/make-disk-image.nix {
name = "nix-store-image";
inherit pkgs config lib;
additionalPaths = [ regInfo ];
format = "qcow2";

View file

@ -272,6 +272,7 @@ in {
fail2ban = handleTest ./fail2ban.nix { };
fakeroute = handleTest ./fakeroute.nix {};
fancontrol = handleTest ./fancontrol.nix {};
fanout = handleTest ./fanout.nix {};
fcitx5 = handleTest ./fcitx5 {};
fenics = handleTest ./fenics.nix {};
ferm = handleTest ./ferm.nix {};
@ -733,6 +734,7 @@ in {
snapper = handleTest ./snapper.nix {};
snipe-it = runTest ./web-apps/snipe-it.nix;
soapui = handleTest ./soapui.nix {};
soft-serve = handleTest ./soft-serve.nix {};
sogo = handleTest ./sogo.nix {};
solanum = handleTest ./solanum.nix {};
sonarr = handleTest ./sonarr.nix {};

30
nixos/tests/fanout.nix Normal file
View file

@ -0,0 +1,30 @@
{ system ? builtins.currentSystem
, config ? {}
, pkgs ? import ../.. { inherit system config; }
}:
import ./make-test-python.nix ({lib, pkgs, ...}: {
name = "fanout";
meta.maintainers = [ lib.maintainers.therishidesai ];
nodes = let
cfg = { ... }: {
services.fanout = {
enable = true;
fanoutDevices = 2;
bufferSize = 8192;
};
};
in {
machine = cfg;
};
testScript = ''
start_all()
# mDNS.
machine.wait_for_unit("multi-user.target")
machine.succeed("test -c /dev/fanout0")
machine.succeed("test -c /dev/fanout1")
'';
})

View file

@ -249,7 +249,7 @@ import ../make-test-python.nix ({ package, ... }: {
assert "standby" in client.succeed("sudo -u yarn yarn rmadmin -getAllServiceState")
client.succeed("sudo -u yarn yarn rmadmin -getAllServiceState | systemd-cat")
assert "Estimated value of Pi is" in client.succeed("HADOOP_USER_NAME=hdfs yarn jar $(readlink $(which yarn) | sed -r 's~bin/yarn~lib/hadoop-*/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar~g') pi 2 10")
assert "Estimated value of Pi is" in client.succeed("HADOOP_USER_NAME=hdfs yarn jar $(readlink $(which yarn) | sed -r 's~bin/yarn~share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar~g') pi 2 10")
assert "SUCCEEDED" in client.succeed("yarn application -list -appStates FINISHED")
'';
})

102
nixos/tests/soft-serve.nix Normal file
View file

@ -0,0 +1,102 @@
import ./make-test-python.nix ({ pkgs, lib, ... }:
let
inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey;
sshPort = 8231;
httpPort = 8232;
statsPort = 8233;
gitPort = 8418;
in
{
name = "soft-serve";
meta.maintainers = with lib.maintainers; [ dadada ];
nodes = {
client = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
curl
git
openssh
];
environment.etc.sshKey = {
source = snakeOilPrivateKey;
mode = "0600";
};
};
server =
{ config, ... }:
{
services.soft-serve = {
enable = true;
settings = {
name = "TestServer";
ssh.listen_addr = ":${toString sshPort}";
git.listen_addr = ":${toString gitPort}";
http.listen_addr = ":${toString httpPort}";
stats.listen_addr = ":${toString statsPort}";
initial_admin_keys = [ snakeOilPublicKey ];
};
};
networking.firewall.allowedTCPPorts = [ sshPort httpPort statsPort ];
};
};
testScript =
{ ... }:
''
SSH_PORT = ${toString sshPort}
HTTP_PORT = ${toString httpPort}
STATS_PORT = ${toString statsPort}
KEY = "${snakeOilPublicKey}"
SSH_KEY = "/etc/sshKey"
SSH_COMMAND = f"ssh -p {SSH_PORT} -i {SSH_KEY} -o StrictHostKeyChecking=no"
TEST_DIR = "/tmp/test"
GIT = f"git -C {TEST_DIR}"
for machine in client, server:
machine.wait_for_unit("network.target")
server.wait_for_unit("soft-serve.service")
server.wait_for_open_port(SSH_PORT)
with subtest("Get info"):
status, test = client.execute(f"{SSH_COMMAND} server info")
if status != 0:
raise Exception("Failed to get SSH info")
key = " ".join(KEY.split(" ")[0:2])
if not key in test:
raise Exception("Admin key must be configured correctly")
with subtest("Create user"):
client.succeed(f"{SSH_COMMAND} server user create beatrice")
client.succeed(f"{SSH_COMMAND} server user info beatrice")
with subtest("Create repo"):
client.succeed(f"git init {TEST_DIR}")
client.succeed(f"{GIT} config --global user.email you@example.com")
client.succeed(f"touch {TEST_DIR}/foo")
client.succeed(f"{GIT} add foo")
client.succeed(f"{GIT} commit --allow-empty -m test")
client.succeed(f"{GIT} remote add origin git@server:test")
client.succeed(f"GIT_SSH_COMMAND='{SSH_COMMAND}' {GIT} push -u origin master")
client.execute("rm -r /tmp/test")
server.wait_for_open_port(HTTP_PORT)
with subtest("Clone over HTTP"):
client.succeed(f"curl --connect-timeout 10 http://server:{HTTP_PORT}/")
client.succeed(f"git clone http://server:{HTTP_PORT}/test /tmp/test")
client.execute("rm -r /tmp/test")
with subtest("Clone over SSH"):
client.succeed(f"GIT_SSH_COMMAND='{SSH_COMMAND}' git clone git@server:test /tmp/test")
client.execute("rm -r /tmp/test")
with subtest("Get stats over HTTP"):
server.wait_for_open_port(STATS_PORT)
status, test = client.execute(f"curl --connect-timeout 10 http://server:{STATS_PORT}/metrics")
if status != 0:
raise Exception("Failed to get metrics from status port")
if not "go_gc_duration_seconds_count" in test:
raise Exception("Metrics did not contain key 'go_gc_duration_seconds_count'")
'';
})

View file

@ -113,8 +113,6 @@ let
};
testScript = ''
# TODO: Remove this when upgrading stable to zfs 2.2.0
unstable = ${if enableUnstable then "True" else "False"};
machine.wait_for_unit("multi-user.target")
machine.succeed(
"zpool status",
@ -136,8 +134,6 @@ let
machine.crash()
machine.wait_for_unit("multi-user.target")
machine.succeed("zfs set sharesmb=on rpool/shared_smb")
if not unstable:
machine.succeed("zfs share rpool/shared_smb")
machine.succeed(
"smbclient -gNL localhost | grep rpool_shared_smb",
"umount /tmp/mnt",

View file

@ -28,13 +28,13 @@
buildDotnetModule rec {
pname = "ryujinx";
version = "1.1.1044"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
version = "1.1.1053"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
src = fetchFromGitHub {
owner = "Ryujinx";
repo = "Ryujinx";
rev = "7afae8c69947f7a5fa9a55cee36381aef372dfba";
sha256 = "1kf95sbb4p50b6bah75sd95660kk2a7cbjwgvqv4c4cal6c126g7";
rev = "28dd7d80af56701887dbb538b56aa58edaf39d91";
sha256 = "09h4423z18q8r8fqcd5kv34iwmy9gkmpgw8an8myrhhvkmxi3zwg";
};
dotnet-sdk = dotnetCorePackages.sdk_7_0;

View file

@ -3,6 +3,7 @@
, lib
, makeWrapper
, installShellFiles
, stdenv
, Foundation
@ -30,18 +31,18 @@
rustPlatform.buildRustPackage rec {
pname = "yazi";
version = "0.1.4";
version = "0.1.5";
src = fetchFromGitHub {
owner = "sxyazi";
repo = pname;
rev = "v${version}";
hash = "sha256-ARpludMVQlZtCRAfW0cNYVmT3m9t9lunMIW24peYX6Y=";
hash = "sha256-FhKrq4N32uJRHGc0qRl+CIVNRW597jACcTFEgj8hiSE=";
};
cargoHash = "sha256-dhdk5aGKv6tY8x7MmA0hWcmJBiXOXC92DlQTd/1AKtQ=";
cargoHash = "sha256-YUymZhDp1Pjm+W6m8Vmh2AgMCdaNt6TQQpiJwSg/gPw=";
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ Foundation ];
postInstall = with lib;
@ -60,6 +61,10 @@ rustPlatform.buildRustPackage rec {
''
wrapProgram $out/bin/yazi \
--prefix PATH : "${makeBinPath runtimePaths}"
installShellCompletion --cmd yazi \
--bash ./config/completions/yazi.bash \
--fish ./config/completions/yazi.fish \
--zsh ./config/completions/_yazi
'';
passthru.updateScript = nix-update-script { };

View file

@ -67,16 +67,16 @@ let
]);
clangFormatPython3 = fetchurl {
url = "https://chromium.googlesource.com/chromium/tools/build/+/e77882e0dde52c2ccf33c5570929b75b4a2a2522/recipes/recipe_modules/chromium/resources/clang-format?format=TEXT";
sha256 = "0ic3hn65dimgfhakli1cyf9j3cxcqsf1qib706ihfhmlzxf7256l";
hash = "sha256-1BRxXP+0QgejAWdFHJzGrLMhk/MsRDoVdK/GVoyFg0U=";
};
# The additional attributes for creating derivations based on the chromium
# source tree.
extraAttrs = buildFun base;
githubPatch = { commit, sha256, revert ? false }: fetchpatch {
githubPatch = { commit, hash, revert ? false }: fetchpatch {
url = "https://github.com/chromium/chromium/commit/${commit}.patch";
inherit sha256 revert;
inherit hash revert;
};
mkGnFlags =
@ -118,7 +118,7 @@ let
libExecPath = "$out/libexec/${packageName}";
ungoogler = ungoogled-chromium {
inherit (upstream-info.deps.ungoogled-patches) rev sha256;
inherit (upstream-info.deps.ungoogled-patches) rev hash;
};
# There currently isn't a (much) more concise way to get a stdenv
@ -148,10 +148,10 @@ let
else throw "no chromium Rosetta Stone entry for os: ${platform.config}";
};
recompressTarball = { version, sha256 ? "" }: fetchzip {
recompressTarball = { version, hash ? "" }: fetchzip {
name = "chromium-${version}.tar.zstd";
url = "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${version}.tar.xz";
inherit sha256;
inherit hash;
nativeBuildInputs = [ zstd ];
@ -180,7 +180,7 @@ let
inherit (upstream-info) version;
inherit packageName buildType buildPath;
src = recompressTarball { inherit version; inherit (upstream-info) sha256; };
src = recompressTarball { inherit version; inherit (upstream-info) hash; };
nativeBuildInputs = [
ninja pkg-config
@ -250,7 +250,7 @@ let
(githubPatch {
# Reland [clang] Disable autoupgrading debug info in ThinLTO builds
commit = "54969766fd2029c506befc46e9ce14d67c7ed02a";
sha256 = "sha256-Vryjg8kyn3cxWg3PmSwYRG6zrHOqYWBMSdEMGiaPg6M=";
hash = "sha256-Vryjg8kyn3cxWg3PmSwYRG6zrHOqYWBMSdEMGiaPg6M=";
revert = true;
})
];

View file

@ -57,7 +57,7 @@ let
gnChromium = buildPackages.gn.overrideAttrs (oldAttrs: {
inherit (upstream-info.deps.gn) version;
src = fetchgit {
inherit (upstream-info.deps.gn) url rev sha256;
inherit (upstream-info.deps.gn) url rev hash;
};
});
});
@ -80,12 +80,12 @@ let
chromeSrc =
let
# Use the latest stable Chrome version if necessary:
version = if chromium.upstream-info.sha256bin64 != null
version = if chromium.upstream-info.hash_deb_amd64 != null
then chromium.upstream-info.version
else (import ./upstream-info.nix).stable.version;
sha256 = if chromium.upstream-info.sha256bin64 != null
then chromium.upstream-info.sha256bin64
else (import ./upstream-info.nix).stable.sha256bin64;
hash = if chromium.upstream-info.hash_deb_amd64 != null
then chromium.upstream-info.hash_deb_amd64
else (import ./upstream-info.nix).stable.hash_deb_amd64;
in fetchurl {
urls = map (repo: "${repo}/${pkgName}/${pkgName}_${version}-1_amd64.deb") [
"https://dl.google.com/linux/chrome/deb/pool/main/g"
@ -93,7 +93,7 @@ let
"http://mirror.pcbeta.com/google/chrome/deb/pool/main/g"
"http://repo.fdzh.org/chrome/deb/pool/main/g"
];
inherit sha256;
inherit hash;
};
mkrpath = p: "${lib.makeSearchPathOutput "lib" "lib64" p}:${lib.makeLibraryPath p}";

View file

@ -6,10 +6,10 @@
}:
{ rev
, sha256
, hash
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "ungoogled-chromium";
version = rev;
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "ungoogled-software";
repo = "ungoogled-chromium";
inherit rev sha256;
inherit rev hash;
};
dontBuild = true;

View file

@ -59,9 +59,9 @@ def prefetch_src_sri_hash(attr_path, version):
def nix_prefetch_url(url, algo='sha256'):
"""Prefetches the content of the given URL."""
print(f'nix-prefetch-url {url}')
out = subprocess.check_output(['nix-prefetch-url', '--type', algo, url])
return out.decode('utf-8').rstrip()
print(f'nix store prefetch-file {url}')
out = subprocess.check_output(['nix', 'store', 'prefetch-file', '--json', '--hash-type', algo, url])
return json.loads(out)['hash']
def nix_prefetch_git(url, rev):
@ -96,9 +96,9 @@ def get_chromedriver(channel):
return {
'version': channel['version'],
'sha256_linux': nix_prefetch_url(get_chromedriver_url('linux64')),
'sha256_darwin': nix_prefetch_url(get_chromedriver_url('mac-x64')),
'sha256_darwin_aarch64': nix_prefetch_url(get_chromedriver_url('mac-arm64'))
'hash_linux': nix_prefetch_url(get_chromedriver_url('linux64')),
'hash_darwin': nix_prefetch_url(get_chromedriver_url('mac-x64')),
'hash_darwin_aarch64': nix_prefetch_url(get_chromedriver_url('mac-arm64'))
}
@ -113,7 +113,7 @@ def get_channel_dependencies(version):
'version': datetime.fromisoformat(gn['date']).date().isoformat(),
'url': gn['url'],
'rev': gn['rev'],
'sha256': gn['sha256']
'hash': gn['hash']
}
}
@ -222,11 +222,11 @@ with urlopen(RELEASES_URL) as resp:
google_chrome_suffix = channel_name
try:
channel['sha256'] = prefetch_src_sri_hash(
channel['hash'] = prefetch_src_sri_hash(
channel_name_to_attr_name(channel_name),
release["version"]
)
channel['sha256bin64'] = nix_prefetch_url(
channel['hash_deb_amd64'] = nix_prefetch_url(
f'{DEB_URL}/google-chrome-{google_chrome_suffix}/' +
f'google-chrome-{google_chrome_suffix}_{release["version"]}-1_amd64.deb')
except subprocess.CalledProcessError:
@ -241,7 +241,7 @@ with urlopen(RELEASES_URL) as resp:
ungoogled_repo_url = 'https://github.com/ungoogled-software/ungoogled-chromium.git'
channel['deps']['ungoogled-patches'] = {
'rev': release['ungoogled_tag'],
'sha256': nix_prefetch_git(ungoogled_repo_url, release['ungoogled_tag'])['sha256']
'hash': nix_prefetch_git(ungoogled_repo_url, release['ungoogled_tag'])['hash']
}
with open(UNGOOGLED_FLAGS_PATH, 'w') as out:
out.write(get_ungoogled_chromium_gn_flags(release['ungoogled_tag']))

View file

@ -3,63 +3,63 @@
deps = {
gn = {
rev = "811d332bd90551342c5cbd39e133aa276022d7f8";
sha256 = "0jlg3d31p346na6a3yk0x29pm6b7q03ck423n5n6mi8nv4ybwajq";
hash = "sha256-WCq+PNkWxWpssUOQyQbAZ5l6k+hg+qGMsoaMG0Ybj0o=";
url = "https://gn.googlesource.com/gn";
version = "2023-08-01";
};
};
sha256 = "0c3adrrgpnhm8g1546ask9pf17qj1sjgb950mj0rv4snxvddi75j";
sha256bin64 = "11w1di146mjb9ql30df9yk9x4b9amc6514jzyfbf09mqsrw88dvr";
hash = "sha256-spzY2u5Wk52BrKCk9aQOEp/gbppaGVLCQxXa+3JuajA=";
hash_deb_amd64 = "sha256-eTeEeNa4JuCW81+SUAyrKi3S0/TJNTAoTktWQ0JsgYc=";
version = "117.0.5938.22";
};
dev = {
deps = {
gn = {
rev = "cc56a0f98bb34accd5323316e0292575ff17a5d4";
sha256 = "1ly7z48v147bfdb1kqkbc98myxpgqq3g6vgr8bjx1ikrk17l82ab";
hash = "sha256-SwlET5h5xtDlQvlt8wbG73ZfUWJr4hlWc+uQsBH5x9M=";
url = "https://gn.googlesource.com/gn";
version = "2023-08-10";
};
};
sha256 = "16dq27lsywrn2xlgr5g46gdv15p30sihfamli4vkv3zxzfxdjisv";
sha256bin64 = "11y09hsy7y1vg65xfilq44ffsmn15dqy80fa57psj1kin4a52v2x";
hash = "sha256-W0fZuvv9jz03ibQqB6MG45aw2zPklfxoFzZzr+kRuJk=";
hash_deb_amd64 = "sha256-XWxRFLFxBqnvKcoB5HErwVbtHCGYRteLeTv44zVMwIc=";
version = "118.0.5966.0";
};
stable = {
chromedriver = {
sha256_darwin = "0y973bs4dbdrl152bfiq5avsp6h27j3v1kwgcgxk1d0g293322xs";
sha256_darwin_aarch64 =
"04qrhr52qc9rhmslgsh2yymsix9cv32g39xbpf8576scihfdngv8";
sha256_linux = "1hy3s6j20h03ria033kfxd3rq259davvpjny4gpvznzklns71vi1";
hash_darwin = "sha256-ugsxRhIPtDD7Y4/PsIc8Apqrtyo4uiVKoLmtRvQaJ3k=";
hash_darwin_aarch64 =
"sha256-aD/bHIxMm1OQu6un8cTYLPWoq/cC6kd1hTkxLEqGGRM=";
hash_linux = "sha256-Ie5wtKXz27/vI97Ku7dqqQicR+tujgFUzANAIKTRw8M=";
version = "118.0.5993.70";
};
deps = {
gn = {
rev = "cc56a0f98bb34accd5323316e0292575ff17a5d4";
sha256 = "1ly7z48v147bfdb1kqkbc98myxpgqq3g6vgr8bjx1ikrk17l82ab";
hash = "sha256-SwlET5h5xtDlQvlt8wbG73ZfUWJr4hlWc+uQsBH5x9M=";
url = "https://gn.googlesource.com/gn";
version = "2023-08-10";
};
};
sha256 = "sha256-CTkw92TiRD2tkYu5a5dy8fjpR2MMOMCvcbxXhJ36Bp8=";
sha256bin64 = "06rbsjh4khhl408181ns5nsdwasklb277fdjfajdv5h1j9a190k3";
hash = "sha256-CTkw92TiRD2tkYu5a5dy8fjpR2MMOMCvcbxXhJ36Bp8=";
hash_deb_amd64 = "sha256-Y4IUVJIBlt2kcrK5c8SiUyvetC3aBhQQIBTCSaDUKxs=";
version = "118.0.5993.88";
};
ungoogled-chromium = {
deps = {
gn = {
rev = "cc56a0f98bb34accd5323316e0292575ff17a5d4";
sha256 = "1ly7z48v147bfdb1kqkbc98myxpgqq3g6vgr8bjx1ikrk17l82ab";
hash = "sha256-SwlET5h5xtDlQvlt8wbG73ZfUWJr4hlWc+uQsBH5x9M=";
url = "https://gn.googlesource.com/gn";
version = "2023-08-10";
};
ungoogled-patches = {
rev = "118.0.5993.88-1";
sha256 = "17j47d64l97ascp85h8cnfnr5wr4va3bdk95wmagqss7ym5c7zsf";
hash = "sha256-Tv/DSvVHa/xU5SXNtobaJPOSrbMMwYIu0+okSkw7RJ4=";
};
};
sha256 = "sha256-CTkw92TiRD2tkYu5a5dy8fjpR2MMOMCvcbxXhJ36Bp8=";
sha256bin64 = "06rbsjh4khhl408181ns5nsdwasklb277fdjfajdv5h1j9a190k3";
hash = "sha256-CTkw92TiRD2tkYu5a5dy8fjpR2MMOMCvcbxXhJ36Bp8=";
hash_deb_amd64 = "sha256-Y4IUVJIBlt2kcrK5c8SiUyvetC3aBhQQIBTCSaDUKxs=";
version = "118.0.5993.88";
};
}

View file

@ -2,15 +2,15 @@
buildGoModule rec {
pname = "cloudfoundry-cli";
version = "8.7.3";
version = "8.7.4";
src = fetchFromGitHub {
owner = "cloudfoundry";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-2ABsxoGRRUfa09tVPmn1IXDR2IXIewg/b/fmQnaKLoY=";
sha256 = "sha256-W4+2ugRSSP3HgmyQJKGCPMX7cmE7Fk3iovBOgBen+q8=";
};
vendorHash = "sha256-k2NI9zyeQM4PJo2wE3WkG5sntJGISwmz4xqQVChu8WQ=";
vendorHash = "sha256-klbKL/c7L7kHPadDa/FkpuAgHYQmuLQK6yFhph52KsU=";
subPackages = [ "." ];

View file

@ -0,0 +1,37 @@
{ version, stdenv, fetchurl, lib, cmake, openssl, platformAttrs, ... }:
stdenv.mkDerivation (finalAttrs: {
pname = "hadoop-yarn-containerexecutor";
inherit version;
src = fetchurl {
url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}-src.tar.gz";
hash = platformAttrs.${stdenv.system}.srcHash;
};
sourceRoot = "hadoop-${finalAttrs.version}-src/hadoop-yarn-project/hadoop-yarn/"
+"hadoop-yarn-server/hadoop-yarn-server-nodemanager/src";
nativeBuildInputs = [ cmake ];
buildInputs = [ openssl ];
cmakeFlags = [ "-DHADOOP_CONF_DIR=/run/wrappers/yarn-nodemanager/etc/hadoop" ];
installPhase = ''
mkdir $out
mv target/var/empty/local/bin $out/
'';
meta = with lib; {
homepage = "https://hadoop.apache.org/";
description = "Framework for distributed processing of large data sets across clusters of computers";
license = licenses.asl20;
longDescription = ''
The Hadoop YARN Container Executor is a native component responsible for managing the lifecycle of containers
on individual nodes in a Hadoop YARN cluster. It launches, monitors, and terminates containers, ensuring that
resources like CPU and memory are allocated according to the policies defined in the ResourceManager.
'';
maintainers = with maintainers; [ illustris ];
platforms = filter (strings.hasSuffix "linux") (attrNames platformAttrs);
};
})

View file

@ -19,6 +19,8 @@
, nixosTests
, sparkSupport ? true
, spark
, libtirpc
, callPackage
}:
with lib;
@ -26,40 +28,75 @@ with lib;
assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
let
common = { pname, platformAttrs, untarDir ? "${pname}-${version}", jdk, openssl ? null, nativeLibs ? [ ], libPatches ? "", tests }:
stdenv.mkDerivation rec {
inherit pname jdk libPatches untarDir openssl;
common = { pname, platformAttrs, jdk, tests }:
stdenv.mkDerivation (finalAttrs: {
inherit pname jdk;
version = platformAttrs.${stdenv.system}.version or (throw "Unsupported system: ${stdenv.system}");
src = fetchurl {
url = "mirror://apache/hadoop/common/hadoop-${version}/hadoop-${version}" + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz";
url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}"
+ optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz";
inherit (platformAttrs.${stdenv.system}) hash;
};
doCheck = true;
# Build the container executor binary from source
# InstallPhase is not lazily evaluating containerExecutor for some reason
containerExecutor = if stdenv.isLinux then (callPackage ./containerExecutor.nix {
inherit (finalAttrs) version;
inherit platformAttrs;
}) else "";
nativeBuildInputs = [ makeWrapper ]
++ optionals (stdenv.isLinux && (nativeLibs != [ ] || libPatches != "")) [ autoPatchelfHook ];
buildInputs = [ openssl ] ++ nativeLibs;
++ optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = optionals stdenv.isLinux [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ];
installPhase = ''
mkdir -p $out/{lib/${untarDir}/conf,bin,lib}
mv * $out/lib/${untarDir}
mkdir $out
mv * $out/
'' + optionalString stdenv.isLinux ''
# All versions need container-executor, but some versions can't use autoPatchelf because of broken SSL versions
patchelf --set-interpreter ${glibc.out}/lib64/ld-linux-x86-64.so.2 $out/lib/${untarDir}/bin/container-executor
'' + ''
for n in $(find $out/lib/${untarDir}/bin -type f ! -name "*.*"); do
makeWrapper "$n" "$out/bin/$(basename $n)"\
--set-default JAVA_HOME ${jdk.home}\
--set-default HADOOP_HOME $out/lib/${untarDir}\
--run "test -d /etc/hadoop-conf && export HADOOP_CONF_DIR=\''${HADOOP_CONF_DIR-'/etc/hadoop-conf/'}"\
--set-default HADOOP_CONF_DIR $out/lib/${untarDir}/etc/hadoop/\
--prefix PATH : "${makeBinPath [ bash coreutils which]}"\
--prefix JAVA_LIBRARY_PATH : "${makeLibraryPath buildInputs}"
for n in $(find ${finalAttrs.containerExecutor}/bin -type f); do
ln -sf "$n" $out/bin
done
'' + optionalString sparkSupport ''
# these libraries are loaded at runtime by the JVM
ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/native/libsasl2.so.2
ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/native/
ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/native/
ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/native/
ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/native/
ln -s ${getLib snappy}/lib/libsnappy.so.1 $out/lib/native/
# libjvm.so is in different paths for java 8 and 11
# libnativetask.so in hadooop 3 and libhdfs.so in hadoop 2 depend on it
find $out/lib/native/ -name 'libnativetask.so*' -o -name 'libhdfs.so*' | \
xargs -n1 patchelf --add-rpath $(dirname $(find ${finalAttrs.jdk.home} -name libjvm.so | head -n1))
# NixOS/nixpkgs#193370
# This workaround is needed to use protobuf 3.19
# hadoop 3.3+ depends on protobuf 3.18, 3.2 depends on 3.8
find $out/lib/native -name 'libhdfspp.so*' | \
xargs -r -n1 patchelf --replace-needed libprotobuf.so.${
if (versionAtLeast finalAttrs.version "3.3") then "18"
else "8"
} libprotobuf.so
patchelf --replace-needed libcrypto.so.1.1 libcrypto.so \
$out/lib/native/{libhdfs{pp,}.so*,examples/{pipes-sort,wordcount-nopipe,wordcount-part,wordcount-simple}}
'' + ''
for n in $(find $out/bin -type f ! -name "*.*"); do
wrapProgram "$n"\
--set-default JAVA_HOME ${finalAttrs.jdk.home}\
--set-default HADOOP_HOME $out/\
--run "test -d /etc/hadoop-conf && export HADOOP_CONF_DIR=\''${HADOOP_CONF_DIR-'/etc/hadoop-conf/'}"\
--set-default HADOOP_CONF_DIR $out/etc/hadoop/\
--prefix PATH : "${makeBinPath [ bash coreutils which]}"\
--prefix JAVA_LIBRARY_PATH : "${makeLibraryPath finalAttrs.buildInputs}"
done
'' + (optionalString sparkSupport ''
# Add the spark shuffle service jar to YARN
cp ${spark.src}/yarn/spark-${spark.version}-yarn-shuffle.jar $out/lib/${untarDir}/share/hadoop/yarn/
'' + libPatches;
cp ${spark.src}/yarn/spark-${spark.version}-yarn-shuffle.jar $out/share/hadoop/yarn/
'');
passthru = { inherit tests; };
@ -83,7 +120,7 @@ let
maintainers = with maintainers; [ illustris ];
platforms = attrNames platformAttrs;
} (attrByPath [ stdenv.system "meta" ] {} platformAttrs);
};
});
in
{
# Different version of hadoop support different java runtime versions
@ -91,48 +128,29 @@ in
hadoop_3_3 = common rec {
pname = "hadoop";
platformAttrs = rec {
x86_64-linux = {
version = "3.3.5";
hash = "sha256-RG4FypL6I6YGF6ixeUbe3kcoGvFQQEFhfLfV9i50JSo=";
};
x86_64-darwin = x86_64-linux;
aarch64-linux = {
version = "3.3.5";
hash = "sha256-qcKjbE881isauWBxIv+NY0UFbYit704/Re8Kdl6x1LA=";
};
aarch64-darwin = aarch64-linux;
x86_64-linux = {
version = "3.3.6";
hash = "sha256-9RlQWcDUECrap//xf3sqhd+Qa8tuGZSHFjGfmXhkGgQ=";
srcHash = "sha256-4OEsVhBNV9CJ+PN4FgCduUCVA9/el5yezSCZ6ko3+bU=";
};
x86_64-darwin = x86_64-linux;
aarch64-linux = x86_64-linux // {
hash = "sha256-5Lv2uA72BJEva5v2yncyPe5gKNCNOPNsoHffVt6KXQ0=";
};
aarch64-darwin = aarch64-linux;
};
untarDir = "${pname}-${platformAttrs.${stdenv.system}.version}";
jdk = jdk11_headless;
inherit openssl;
# TODO: Package and add Intel Storage Acceleration Library
nativeLibs = [ stdenv.cc.cc.lib protobuf zlib snappy ];
libPatches = ''
ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/${untarDir}/lib/native/libsasl2.so.2
ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/${untarDir}/lib/native/
ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/${untarDir}/lib/native/
ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/${untarDir}/lib/native/
ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/${untarDir}/lib/native/
'' + optionalString stdenv.isLinux ''
# libjvm.so for Java >=11
patchelf --add-rpath ${jdk.home}/lib/server $out/lib/${untarDir}/lib/native/libnativetask.so.1.0.0
# Java 8 has libjvm.so at a different path
patchelf --add-rpath ${jdk.home}/jre/lib/amd64/server $out/lib/${untarDir}/lib/native/libnativetask.so.1.0.0
# NixOS/nixpkgs#193370
# This workaround is needed to use protobuf 3.19
patchelf --replace-needed libprotobuf.so.18 libprotobuf.so $out/lib/${untarDir}/lib/native/libhdfspp.so
'';
tests = nixosTests.hadoop;
};
hadoop_3_2 = common rec {
hadoop_3_2 = common {
pname = "hadoop";
platformAttrs.x86_64-linux = {
version = "3.2.4";
hash = "sha256-qt2gpMr+NHuiVR+/zFRzRyRKG725/ZNBIM69z9J9wNw=";
srcHash = "sha256-F9nGD3mZZ1eJf3Ec3AJGE9YBcL/HiagskcdKQhCn/sw=";
};
jdk = jdk8_headless;
# not using native libs because of broken openssl_1_0_2 dependency
# can be manually overridden
tests = nixosTests.hadoop_3_2;
};
hadoop2 = common rec {
@ -140,6 +158,7 @@ in
platformAttrs.x86_64-linux = {
version = "2.10.2";
hash = "sha256-xhA4zxqIRGNhIeBnJO9dLKf/gx/Bq+uIyyZwsIafEyo=";
srcHash = "sha256-ucxCyXiJo8aL6aNMhZgKEbn8sGKOoMPVREbMGSfSdAI=";
};
jdk = jdk8_headless;
tests = nixosTests.hadoop2;

View file

@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
pname = "sacc";
version = "1.06";
version = "1.07";
src = fetchurl {
url = "ftp://bitreich.org/releases/sacc/sacc-${version}.tar.gz";
hash = "sha512-eoleQy4dKLfZsrsqUybKMjUIdqLIDTncbBnnU0fXKkhH8apP8R8H6Kmt6hTqcbhNcIkNzBcP9s4Ld54dZYa0+g==";
hash = "sha256-LdEeZH+JWb7iEEzikAXaxG0N5GMPxjgTId4THLgdU2w=";
};
inherit patches;

View file

@ -41,6 +41,10 @@ buildGoModule rec {
${rcloneBin}/bin/rclone genautocomplete $shell rclone.$shell
installShellCompletion rclone.$shell
done
# filesystem helpers
ln -s $out/bin/rclone $out/bin/rclonefs
ln -s $out/bin/rclone $out/bin/mount.rclone
'' + lib.optionalString (enableCmount && !stdenv.isDarwin)
# use --suffix here to ensure we don't shadow /run/wrappers/bin/fusermount,
# as the setuid wrapper is required as non-root on NixOS.

View file

@ -1,6 +1,7 @@
{ lib, stdenv, fetchDartDeps, runCommand, writeText, dartHooks, makeWrapper, dart, cacert, nodejs, darwin }:
{ lib, stdenv, callPackage, fetchDartDeps, runCommand, writeText, dartHooks, makeWrapper, dart, cacert, nodejs, darwin, jq }:
{ pubGetScript ? "dart pub get"
{ sdkSetupScript ? ""
, pubGetScript ? "dart pub get"
# Output type to produce. Can be any kind supported by dart
# https://dart.dev/tools/dart-compile#types-of-output
@ -18,12 +19,16 @@
, dartEntryPoints ? null
# Used when wrapping aot, jit, kernel, and js builds.
# Set to null to disable wrapping.
, dartRuntimeCommand ?
if dartOutputType == "aot-snapshot" then "${dart}/bin/dartaotruntime"
else if (dartOutputType == "jit-snapshot" || dartOutputType == "kernel") then "${dart}/bin/dart"
else if dartOutputType == "js" then "${nodejs}/bin/node"
else null
, dartRuntimeCommand ? if dartOutputType == "aot-snapshot" then "${dart}/bin/dartaotruntime"
else if (dartOutputType == "jit-snapshot" || dartOutputType == "kernel") then "${dart}/bin/dart"
else if dartOutputType == "js" then "${nodejs}/bin/node"
else null
, runtimeDependencies ? [ ]
, extraWrapProgramArgs ? ""
, customPackageOverrides ? { }
, autoDepsList ? false
, depsListFile ? null
, pubspecLockFile ? null
, vendorHash ? ""
, ...
@ -38,37 +43,81 @@ let
'';
}) {
buildDrvArgs = args;
inherit pubGetScript vendorHash pubspecLockFile;
inherit sdkSetupScript pubGetScript vendorHash pubspecLockFile;
};
inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook;
in
assert !(builtins.isString dartOutputType && dartOutputType != "") ->
throw "dartOutputType must be a non-empty string";
stdenv.mkDerivation (args // {
inherit pubGetScript dartCompileCommand dartOutputType dartRuntimeCommand
dartCompileFlags dartJitFlags;
inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook dartFixupHook;
baseDerivation = stdenv.mkDerivation (finalAttrs: args // {
inherit sdkSetupScript pubGetScript dartCompileCommand dartOutputType
dartRuntimeCommand dartCompileFlags dartJitFlags runtimeDependencies;
dartEntryPoints =
if (dartEntryPoints != null)
then writeText "entrypoints.json" (builtins.toJSON dartEntryPoints)
else null;
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [
dart
dartDeps
dartConfigHook
dartBuildHook
dartInstallHook
makeWrapper
] ++ lib.optionals stdenv.isDarwin [
darwin.sigtool
];
runtimeDependencyLibraryPath = lib.makeLibraryPath finalAttrs.runtimeDependencies;
# When stripping, it seems some ELF information is lost and the dart VM cli
# runs instead of the expected program. Don't strip if it's an exe output.
dontStrip = args.dontStrip or (dartOutputType == "exe");
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [
dart
dartDeps
dartConfigHook
dartBuildHook
dartInstallHook
dartFixupHook
makeWrapper
jq
] ++ lib.optionals stdenv.isDarwin [
darwin.sigtool
];
passthru = { inherit dartDeps; } // (args.passthru or { });
preUnpack = ''
${lib.optionalString (!autoDepsList) ''
if ! { [ '${lib.boolToString (depsListFile != null)}' = 'true' ] ${lib.optionalString (depsListFile != null) "&& cmp -s <(jq -Sc . '${depsListFile}') <(jq -Sc . '${finalAttrs.passthru.dartDeps.depsListFile}')"}; }; then
echo 1>&2 -e '\nThe dependency list file was either not given or differs from the expected result.' \
'\nPlease choose one of the following solutions:' \
'\n - Duplicate the following file and pass it to the depsListFile argument.' \
'\n ${finalAttrs.passthru.dartDeps.depsListFile}' \
'\n - Set autoDepsList to true (not supported by Hydra or permitted in Nixpkgs)'.
exit 1
fi
''}
${args.preUnpack or ""}
'';
meta = (args.meta or { }) // { platforms = args.meta.platforms or dart.meta.platforms; };
})
# When stripping, it seems some ELF information is lost and the dart VM cli
# runs instead of the expected program. Don't strip if it's an exe output.
dontStrip = args.dontStrip or (dartOutputType == "exe");
passthru = { inherit dartDeps; } // (args.passthru or { });
meta = (args.meta or { }) // { platforms = args.meta.platforms or dart.meta.platforms; };
});
packageOverrideRepository = (callPackage ../../../development/compilers/dart/package-overrides { }) // customPackageOverrides;
productPackages = builtins.filter (package: package.kind != "dev")
(if autoDepsList
then lib.importJSON dartDeps.depsListFile
else
if depsListFile == null
then [ ]
else lib.importJSON depsListFile);
in
assert !(builtins.isString dartOutputType && dartOutputType != "") ->
throw "dartOutputType must be a non-empty string";
builtins.foldl'
(prev: package:
if packageOverrideRepository ? ${package.name}
then
prev.overrideAttrs
(packageOverrideRepository.${package.name} {
inherit (package)
name
version
kind
source
dependencies;
})
else prev)
baseDerivation
productPackages

View file

@ -3,6 +3,9 @@
dartConfigHook() {
echo "Executing dartConfigHook"
echo "Setting up SDK"
eval "$sdkSetupScript"
echo "Installing dependencies"
eval doPubGet "$pubGetScript" --offline

View file

@ -0,0 +1,32 @@
# shellcheck shell=bash
dartFixupHook() {
echo "Executing dartFixupHook"
declare -a wrapProgramArgs
# Add runtime library dependencies to the LD_LIBRARY_PATH.
# For some reason, the RUNPATH of the executable is not used to load dynamic libraries in dart:ffi with DynamicLibrary.open().
#
# This could alternatively be fixed with patchelf --add-needed, but this would cause all the libraries to be opened immediately,
# which is not what application authors expect.
echo "$runtimeDependencyLibraryPath"
if [[ ! -z "$runtimeDependencyLibraryPath" ]]; then
wrapProgramArgs+=(--suffix LD_LIBRARY_PATH : \"$runtimeDependencyLibraryPath\")
fi
if [[ ! -z "$extraWrapProgramArgs" ]]; then
wrapProgramArgs+=("$extraWrapProgramArgs")
fi
if [ ${#wrapProgramArgs[@]} -ne 0 ]; then
for f in "$out"/bin/*; do
echo "Wrapping $f..."
eval "wrapProgram \"$f\" ${wrapProgramArgs[@]}"
done
fi
echo "Finished dartFixupHook"
}
postFixupHooks+=(dartFixupHook)

View file

@ -12,4 +12,7 @@
dartInstallHook = makeSetupHook {
name = "dart-install-hook";
} ./dart-install-hook.sh;
dartFixupHook = makeSetupHook {
name = "dart-fixup-hook";
} ./dart-fixup-hook.sh;
}

View file

@ -169,6 +169,8 @@ let
dart pub deps --json | jq .packages > $out
runHook postBuild
'';
dontInstall = true;
} // (removeAttrs buildDrvInheritArgs [ "name" "pname" ]));
# As of Dart 3.0.0, Pub checks the revision of cached Git-sourced packages.

View file

@ -1,34 +1,28 @@
{ lib
, callPackage
, stdenvNoCC
, runCommand
, makeWrapper
, wrapGAppsHook
, llvmPackages_13
, fetchDartDeps
, buildDartApplication
, cacert
, glib
, flutter
, jq
}:
# absolutely no mac support for now
{ pubGetScript ? "flutter pub get"
, flutterBuildFlags ? [ ]
, runtimeDependencies ? [ ]
, customPackageOverrides ? { }
, autoDepsList ? false
, depsListFile ? null
, vendorHash ? ""
, pubspecLockFile ? null
, nativeBuildInputs ? [ ]
, preUnpack ? ""
, postFixup ? ""
, extraWrapProgramArgs ? ""
, ...
}@args:
let
flutterSetupScript = ''
(buildDartApplication.override {
dart = flutter;
fetchDartDeps = fetchDartDeps.override { dart = flutter; };
}) (args // {
sdkSetupScript = ''
# Pub needs SSL certificates. Dart normally looks in a hardcoded path.
# https://github.com/dart-lang/sdk/blob/3.1.0/runtime/bin/security_context_linux.cc#L48
#
@ -54,136 +48,56 @@ let
flutter config --enable-linux-desktop >/dev/null
'';
deps = callPackage ../dart/fetch-dart-deps { dart = flutter; } {
sdkSetupScript = flutterSetupScript;
inherit pubGetScript vendorHash pubspecLockFile;
buildDrvArgs = args;
};
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ wrapGAppsHook ];
buildInputs = (args.buildInputs or [ ]) ++ [ glib ];
baseDerivation = llvmPackages_13.stdenv.mkDerivation (finalAttrs: args // {
inherit flutterBuildFlags runtimeDependencies;
dontDartBuild = true;
buildPhase = args.buildPhase or ''
runHook preBuild
outputs = [ "out" "debug" ];
mkdir -p build/flutter_assets/fonts
nativeBuildInputs = [
makeWrapper
deps
flutter
jq
glib
wrapGAppsHook
] ++ nativeBuildInputs;
doPubGet flutter pub get --offline -v
flutter build linux -v --release --split-debug-info="$debug" ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") flutterBuildFlags)}
dontWrapGApps = true;
runHook postBuild
'';
preUnpack = ''
${lib.optionalString (!autoDepsList) ''
if ! { [ '${lib.boolToString (depsListFile != null)}' = 'true' ] ${lib.optionalString (depsListFile != null) "&& cmp -s <(jq -Sc . '${depsListFile}') <(jq -Sc . '${finalAttrs.passthru.depsListFile}')"}; }; then
echo 1>&2 -e '\nThe dependency list file was either not given or differs from the expected result.' \
'\nPlease choose one of the following solutions:' \
'\n - Duplicate the following file and pass it to the depsListFile argument.' \
'\n ${finalAttrs.passthru.depsListFile}' \
'\n - Set autoDepsList to true (not supported by Hydra or permitted in Nixpkgs)'.
exit 1
fi
''}
dontDartInstall = true;
installPhase = args.installPhase or ''
runHook preInstall
${preUnpack}
'';
built=build/linux/*/release/bundle
configurePhase = ''
runHook preConfigure
mkdir -p $out/bin
mv $built $out/app
${flutterSetupScript}
for f in $(find $out/app -iname "*.desktop" -type f); do
install -D $f $out/share/applications/$(basename $f)
done
runHook postConfigure
'';
for f in $(find $out/app -maxdepth 1 -type f); do
ln -s $f $out/bin/$(basename $f)
done
buildPhase = ''
runHook preBuild
# make *.so executable
find $out/app -iname "*.so" -type f -exec chmod +x {} +
mkdir -p build/flutter_assets/fonts
# remove stuff like /build/source/packages/ubuntu_desktop_installer/linux/flutter/ephemeral
for f in $(find $out/app -executable -type f); do
if patchelf --print-rpath "$f" | grep /build; then # this ignores static libs (e,g. libapp.so) also
echo "strip RPath of $f"
newrp=$(patchelf --print-rpath $f | sed -r "s|/build.*ephemeral:||g" | sed -r "s|/build.*profile:||g")
patchelf --set-rpath "$newrp" "$f"
fi
done
doPubGet flutter pub get --offline -v
flutter build linux -v --release --split-debug-info="$debug" ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") finalAttrs.flutterBuildFlags)}
runHook postInstall
'';
runHook postBuild
'';
installPhase = ''
runHook preInstall
built=build/linux/*/release/bundle
mkdir -p $out/bin
mv $built $out/app
for f in $(find $out/app -iname "*.desktop" -type f); do
install -D $f $out/share/applications/$(basename $f)
done
for f in $(find $out/app -maxdepth 1 -type f); do
ln -s $f $out/bin/$(basename $f)
done
# make *.so executable
find $out/app -iname "*.so" -type f -exec chmod +x {} +
# remove stuff like /build/source/packages/ubuntu_desktop_installer/linux/flutter/ephemeral
for f in $(find $out/app -executable -type f); do
if patchelf --print-rpath "$f" | grep /build; then # this ignores static libs (e,g. libapp.so) also
echo "strip RPath of $f"
newrp=$(patchelf --print-rpath $f | sed -r "s|/build.*ephemeral:||g" | sed -r "s|/build.*profile:||g")
patchelf --set-rpath "$newrp" "$f"
fi
done
runHook postInstall
'';
postFixup = ''
# Add runtime library dependencies to the LD_LIBRARY_PATH.
# For some reason, the RUNPATH of the executable is not used to load dynamic libraries in dart:ffi with DynamicLibrary.open().
#
# This could alternatively be fixed with patchelf --add-needed, but this would cause all the libraries to be opened immediately,
# which is not what application authors expect.
for f in "$out"/bin/*; do
wrapProgram "$f" \
--suffix LD_LIBRARY_PATH : '${lib.makeLibraryPath finalAttrs.runtimeDependencies}' \
''${gappsWrapperArgs[@]} \
${extraWrapProgramArgs}
done
${postFixup}
'';
passthru = (args.passthru or {}) // {
inherit (deps) depsListFile;
};
});
packageOverrideRepository = (callPackage ../../development/compilers/flutter/package-overrides { }) // customPackageOverrides;
productPackages = builtins.filter (package: package.kind != "dev")
(if autoDepsList
then lib.importJSON deps.depsListFile
else
if depsListFile == null
then [ ]
else lib.importJSON depsListFile);
in
builtins.foldl'
(prev: package:
if packageOverrideRepository ? ${package.name}
then
prev.overrideAttrs
(packageOverrideRepository.${package.name} {
inherit (package)
name
version
kind
source
dependencies;
})
else prev)
baseDerivation
productPackages
dontWrapGApps = true;
extraWrapProgramArgs = ''
''${gappsWrapperArgs[@]} \
${extraWrapProgramArgs}
'';
})

View file

@ -0,0 +1,127 @@
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, gitUpdater
, testers
, boost
, cmake
, dbus
, doxygen
, graphviz
, gtest
, libxml2
, lomiri
, pkg-config
, process-cpp
, properties-cpp
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dbus-cpp";
version = "5.0.3";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lib-cpp/dbus-cpp";
rev = finalAttrs.version;
hash = "sha256-t8SzPRUuKeEchT8vAsITf8MwbgHA+mR5C9CnkdVyX7s=";
};
outputs = [
"out"
"dev"
"doc"
"examples"
];
patches = [
# Handle already-stolen dbus call better
# Remove when version > 5.0.3
(fetchpatch {
name = "0001-dbus-cpp-src-Dont-steal-a-pending-dbus-call-more-then-once.patch";
url = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/commit/9f3d1ff2b1c6c732285949c3dbb35e40cf55ea92.patch";
hash = "sha256-xzOCIJVsK2J+X9RsV930R9uw6h4UxqwSaNOgv8v4qQU=";
})
# Fix GCC13 compilation
# Remove when version > 5.0.3
(fetchpatch {
name = "0002-dbus-cpp-Add-missing-headers-for-GCC13.patch";
url = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/commit/c761b1eec084962dbe64d35d7f7b86dcbe57a3f7.patch";
hash = "sha256-/tKe3iHWxP9jWtpdgwwRynj8565u9LxCt4WXJDXzgX4=";
})
];
postPatch = ''
substituteInPlace doc/CMakeLists.txt \
--replace 'DESTINATION share/''${CMAKE_PROJECT_NAME}/doc' 'DESTINATION ''${CMAKE_INSTALL_DOCDIR}'
# Warning on aarch64-linux breaks build due to -Werror
substituteInPlace CMakeLists.txt \
--replace '-Werror' ""
# pkg-config output patching hook expects prefix variable here
substituteInPlace data/dbus-cpp.pc.in \
--replace 'includedir=''${exec_prefix}' 'includedir=''${prefix}'
'' + lib.optionalString (!finalAttrs.doCheck) ''
sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
'';
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
graphviz
pkg-config
];
buildInputs = [
boost
lomiri.cmake-extras
dbus
libxml2
process-cpp
properties-cpp
];
nativeCheckInputs = [
dbus
];
checkInputs = [
gtest
];
cmakeFlags = [
"-DDBUS_CPP_ENABLE_DOC_GENERATION=ON"
];
# Too flaky on ARM CI & for some amd64 users
doCheck = false;
# DBus, parallelism messes with communication
enableParallelChecking = false;
preFixup = ''
moveToOutput libexec/examples $examples
'';
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = with lib; {
description = "A dbus-binding leveraging C++-11";
homepage = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ OPNA2608 ];
mainProgram = "dbus-cppc";
platforms = platforms.linux;
pkgConfigModules = [
"dbus-cpp"
];
};
})

View file

@ -0,0 +1,52 @@
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, vala
, pkg-config
, wrapGAppsHook
, pantheon
, gtksourceview5
}:
stdenv.mkDerivation (finalAttrs: {
pname = "konbucase";
version = "4.1.1";
src = fetchFromGitHub {
owner = "ryonakano";
repo = "konbucase";
rev = finalAttrs.version;
hash = "sha256-g3EDa9EXymi6c8dRHFZYGEAT7k8M2TXUAzZVKTnLzyk=";
fetchSubmodules = true;
};
nativeBuildInputs = [
meson
ninja
vala
pkg-config
wrapGAppsHook
];
buildInputs = [
pantheon.granite7
gtksourceview5
];
postInstall = ''
mv $out/bin/com.github.ryonakano.konbucase $out/bin/konbucase
substituteInPlace $out/share/applications/com.github.ryonakano.konbucase.desktop \
--replace 'Exec=com.github.ryonakano.konbucase' 'Exec=${placeholder "out"}/bin/konbucase'
'';
meta = with lib; {
homepage = "https://github.com/ryonakano/konbucase";
description = "A case converting app suitable for coding or typing";
license = licenses.gpl3Only;
maintainers = with maintainers; [ galaxy ];
platforms = platforms.linux;
mainProgram = "konbucase";
};
})

View file

@ -0,0 +1,38 @@
{ stdenv
, lib
, fetchFromGitHub
, gitUpdater
, libX11
, libXrandr
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xsct";
version = "2.0";
src = fetchFromGitHub {
owner = "faf0";
repo = "sct";
rev = finalAttrs.version;
hash = "sha256-XhrkaK85I/U2ChO5mZYah/TaXz03yahfMEbfgzXqytU=";
};
buildInputs = [
libX11
libXrandr
];
makeFlags = [
"PREFIX=${placeholder "out"}"
];
passthru.updateScript = gitUpdater { };
meta = with lib; {
description = "Set color temperature of screen";
homepage = "https://github.com/faf0/sct";
license = licenses.unlicense;
maintainers = with maintainers; [ OPNA2608 ];
platforms = with platforms; linux ++ freebsd ++ openbsd;
};
})

View file

@ -38,6 +38,7 @@ rustPlatform.buildRustPackage rec {
description = "A tool for formatting Rust code according to style guidelines";
homepage = "https://github.com/rust-lang-nursery/rustfmt";
license = with licenses; [ mit asl20 ];
mainProgram = "rustfmt";
maintainers = with maintainers; [ globin basvandijk ];
};
}

View file

@ -13,11 +13,11 @@ let
in
stdenv.mkDerivation rec {
pname = "stm32cubemx";
version = "6.9.1";
version = "6.9.2";
src = fetchzip {
url = "https://sw-center.st.com/packs/resource/library/stm32cube_mx_v${builtins.replaceStrings ["."] [""] version}-lin.zip";
sha256 = "sha256-KTbIRj7DkWoC2h/TLKjVduvsKVSue28kGOL34JqBVx4=";
sha256 = "sha256-x3ZRMtTvFGz2/0gJMx4zOx9rSnrSkCEl3pj5raeyVHg=";
stripRoot = false;
};

View file

@ -0,0 +1,27 @@
From 2f53794374e0d32e1f322202c6668655792f745d Mon Sep 17 00:00:00 2001
From: Pol Dellaiera <pol.dellaiera@protonmail.com>
Date: Sat, 21 Oct 2023 16:46:59 +0200
Subject: [PATCH] composer.json
---
composer.json | 5 +-
1 file changed, 4 insertion(+), 1 deletion(-)
diff --git i/composer.json w/composer.json
index 6ac54420..69b75a51 100644
--- i/composer.json
+++ w/composer.json
@@ -96,7 +96,10 @@
"bin/grumphp"
],
"config": {
- "sort-packages": true
+ "sort-packages": true,
+ "platform": {
+ "php": "8.1"
+ }
},
"extra": {
"class": "GrumPHP\\Composer\\GrumPHPPlugin"
--
2.42.0

View file

@ -0,0 +1,24 @@
From 2f53794374e0d32e1f322202c6668655792f745d Mon Sep 17 00:00:00 2001
From: Pol Dellaiera <pol.dellaiera@protonmail.com>
Date: Sat, 21 Oct 2023 16:46:59 +0200
Subject: [PATCH] composer.lock
---
phar.composer.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phar.composer.lock b/phar.composer.lock
index 96b692c3..a8cb2a87 100644
--- a/phar.composer.lock
+++ b/phar.composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8a069c630e6ddbc4475db9a992430539",
+ "content-hash": "0474062650b24a22c63007631cf35f1e",
"packages": [
{
"name": "amphp/amp",
--
2.42.0

View file

@ -1,32 +1,48 @@
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
{ fetchFromGitHub, stdenvNoCC, lib, php }:
mkDerivation (finalAttrs: {
php.buildComposerProject (finalAttrs: {
pname = "grumphp";
version = "1.15.0";
version = "2.1.0";
src = fetchurl {
url = "https://github.com/phpro/grumphp/releases/download/v${finalAttrs.version}/grumphp.phar";
sha256 = "sha256-EqzJb7DYZb7PnebErLVI/EZLxj0m26cniZlsu1feif0=";
src = fetchFromGitHub {
owner = "phpro";
repo = "grumphp";
rev = "v${finalAttrs.version}";
hash = "sha256-RVgreCspdz+A6mdE2H4i8ajmdH8AZ9BOIw2OqLw7HfI=";
};
dontUnpack = true;
patches = [
./composer-json.patch
];
nativeBuildInputs = [ makeWrapper ];
composerLock = stdenvNoCC.mkDerivation (finalComposerLockAttrs: {
name = "grumphp-composer-lock";
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -D $src $out/libexec/grumphp/grumphp.phar
makeWrapper ${php}/bin/php $out/bin/grumphp \
--add-flags "$out/libexec/grumphp/grumphp.phar"
runHook postInstall
'';
src = fetchFromGitHub {
owner = "phpro";
repo = "grumphp-shim";
rev = "v${finalAttrs.version}";
hash = "sha256-JxgRd0p/o3ouZ4MPke8cHqvAPuepY8ax0wx4t8+2dME=";
};
meta = with lib; {
patches = [
./composer-lock.patch
];
installPhase = ''
runHook preInstall
cp phar.composer.lock $out
runHook postInstall
'';
});
vendorHash = "sha256-yefamPAzIabDCzZ9ghKq9iPH7AoCdgCCQ8PKrUN9ifQ=";
meta = {
changelog = "https://github.com/phpro/grumphp/releases/tag/v${finalAttrs.version}";
description = "A PHP code-quality tool";
homepage = "https://github.com/phpro/grumphp";
license = licenses.mit;
maintainers = teams.php.members;
license = lib.licenses.mit;
maintainers = lib.teams.php.members;
};
})

View file

@ -1,35 +1,27 @@
{ lib
, buildPythonPackage
, fetchPypi
, pyusb
}:
{ lib, buildPythonPackage, fetchFromGitHub, pyusb }:
buildPythonPackage rec {
pname = "blinkstick";
version = "1.2.0";
version = "unstable-2023-05-04";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "0rdk3i81s6byw23za0bxvkh7sj5l16qxxgc2c53qjg3klc24wcm9";
src = fetchFromGitHub {
owner = "arvydas";
repo = "blinkstick-python";
rev = "8140b9fa18a9ff4f0e9df8e70c073f41cb8f1d35";
hash = "sha256-9bc7TD/Ilc952ywLauFd0+3Lh64lQlYuDC1KG9eWDgs=";
};
# Upstream fix https://github.com/arvydas/blinkstick-python/pull/54
# https://github.com/arvydas/blinkstick-python/pull/54/commits/b9bee2cd72f799f1210e5d9e13207f93bbc2d244.patch
# has line ending issues after 1.2.0
postPatch = ''
substituteInPlace setup.py --replace "pyusb==1.0.0" "pyusb>=1.0.0"
'';
propagatedBuildInputs = [ pyusb ];
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "blinkstick" ];
meta = with lib; {
meta = {
description = "Python package to control BlinkStick USB devices";
homepage = "https://github.com/arvydas/blinkstick-python";
license = licenses.bsd3;
maintainers = with maintainers; [ np ];
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ np perstark ];
};
}

View file

@ -8,13 +8,13 @@
buildPythonPackage rec {
pname = "py-libzfs";
version = "22.02.4";
version = "22.12.4.2";
src = fetchFromGitHub {
owner = "truenas";
repo = pname;
rev = "TS-${version}";
hash = "sha256-BJG+cw07Qu4aL99pVKNd7JAgr+w/6Uv2eI46EB615/I=";
hash = "sha256-vBLbjP1gQEQNsTLc2W6uRzCFHQXZp+jGiwE0Pe8VTuw=";
};
nativeBuildInputs = [ cython ];

View file

@ -1,43 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "ratelimiter";
version = "1.2.0.post0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-XDldyr273i5ReO8/ibVoowZkVKbdwiO3ZHPawi+JtPc=";
};
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [
"ratelimiter"
];
preCheck = ''
# Uses out-dated options
rm tests/conftest.py
'';
disabledTests = [
# TypeError: object Lock can't be used in 'await' expression
"test_alock"
];
meta = with lib; {
description = "Simple python rate limiting object";
homepage = "https://github.com/RazerM/ratelimiter";
license = licenses.asl20;
maintainers = with maintainers; [ helkafen ];
};
}

View file

@ -95,8 +95,7 @@ let
paths = with rocmPackages; [
rocm-core clr rccl miopen miopengemm rocrand rocblas
rocsparse hipsparse rocthrust rocprim hipcub
roctracer # Unfree at the moment due to hsa-amd-aqlprofile hard dependency in rocprofiler
rocsparse hipsparse rocthrust rocprim hipcub roctracer
rocfft rocsolver hipfft hipsolver hipblas
rocminfo rocm-thunk rocm-comgr rocm-device-libs
rocm-runtime clr.icd hipify

View file

@ -9,7 +9,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "clang-ocl";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";

View file

@ -35,7 +35,7 @@ let
];
in stdenv.mkDerivation (finalAttrs: {
pname = "clr";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -46,7 +46,7 @@ in stdenv.mkDerivation (finalAttrs: {
owner = "ROCm-Developer-Tools";
repo = "clr";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-C+rFW/7kf35rz0sQTI2+iY5RhZZQY07fc5a+e6cB5OQ=";
hash = "sha256-1gZJhvBbUFdKH9p/7SRfzEV/fM+gIN2Qvlxf2VbmAIw=";
};
nativeBuildInputs = [
@ -144,6 +144,8 @@ in stdenv.mkDerivation (finalAttrs: {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
page = "tags?per_page=1";
filter = ".[0].name | split(\"-\") | .[1]";
};
impureTests = {

View file

@ -15,7 +15,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "composable_kernel";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -111,8 +111,7 @@ in rec {
# Needs GCC
roctracer = callPackage ./roctracer {
inherit rocmUpdateScript rocm-device-libs rocm-runtime rocprofiler clr;
inherit (llvm) clang;
inherit rocmUpdateScript rocm-device-libs rocm-runtime clr;
};
# Needs GCC

View file

@ -8,7 +8,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "half";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";

View file

@ -6,7 +6,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hip-common";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";

View file

@ -18,7 +18,7 @@
# Can also use cuBLAS
stdenv.mkDerivation (finalAttrs: {
pname = "hipblas";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -8,7 +8,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hipcc";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";

View file

@ -16,7 +16,7 @@
# CUB can also be used as a backend instead of rocPRIM.
stdenv.mkDerivation (finalAttrs: {
pname = "hipcub";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -21,7 +21,7 @@
# Can also use cuFFT
stdenv.mkDerivation (finalAttrs: {
pname = "hipfft";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -9,7 +9,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hipfort";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";

View file

@ -9,7 +9,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hipify";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";

View file

@ -18,7 +18,7 @@
# Can also use cuSOLVER
stdenv.mkDerivation (finalAttrs: {
pname = "hipsolver";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "hipSOLVER";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-I9Xjkilo+baeM1CRXjLAbj/vrg8r5/E2yEImhHGSyf8=";
hash = "sha256-5b6kPj9yvXvP7f7AyHDTYRoM/EhQZvwkVCfDflFJugc=";
};
nativeBuildInputs = [

View file

@ -18,7 +18,7 @@
# This can also use cuSPARSE as a backend instead of rocSPARSE
stdenv.mkDerivation (finalAttrs: {
pname = "hipsparse";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -53,7 +53,7 @@ let
llvmTargetsToBuild' = [ "AMDGPU" ] ++ builtins.map inferNativeTarget llvmTargetsToBuild;
in stdenv.mkDerivation (finalAttrs: {
pname = "rocm-llvm-${targetName}";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -70,7 +70,7 @@ in stdenv.mkDerivation (finalAttrs: {
owner = "RadeonOpenCompute";
repo = "llvm-project";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-oJIXALwxo130jl8b6yCFw+a2kMBlny5/0ubiqF6MOWY=";
hash = "sha256-0+lJnDiMntxCYbZBCSWvHOcKXexFfEzRfb49QbfOmK8=";
};
nativeBuildInputs = [

View file

@ -49,7 +49,7 @@ let
};
in stdenv.mkDerivation (finalAttrs: {
pname = "migraphx";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -63,7 +63,7 @@ in stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "AMDMIGraphX";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-7yL7Zn5I8GUPIAgB7tVLZI7OEHLv0E4FcLVx9xMfsNY=";
hash = "sha256-lg3pxHBpwqxBvdOQgE44YKLuumhkVF6b3Xx4+cw7jNQ=";
};
nativeBuildInputs = [

View file

@ -35,7 +35,7 @@
}:
let
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";

View file

@ -38,13 +38,13 @@ stdenv.mkDerivation (finalAttrs: {
else "cpu"
);
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "GPUOpen-ProfessionalCompute-Libraries";
repo = "MIVisionX";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-Z7UIqJWuSD+/FoZ1VIbITp4R/bwaqFCQqsL8CRW73Ek=";
hash = "sha256-jmOgwESNALQt7ctmUY9JHgKq47tCwsW1ybynkX9236U=";
};
nativeBuildInputs = [

View file

@ -16,7 +16,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rccl";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rccl";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-Abrwmsjnkx9JVTrARP/BM965g+R10lY+XPwthy/SG0k=";
hash = "sha256-nFkou/kjGBmImorlPOZNTlCrxbfAYpDhgRveyoAufu8=";
};
nativeBuildInputs = [

View file

@ -41,7 +41,7 @@ let
};
in stdenv.mkDerivation (finalAttrs: {
pname = "rdc";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -21,7 +21,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocalution";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -73,7 +73,7 @@ let
fallbacks = rocblas.overrideAttrs { pname = "rocblas-tensile-fallbacks"; };
in stdenv.mkDerivation (finalAttrs: {
pname = "rocblas";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -38,7 +38,7 @@ let
};
in stdenv.mkDerivation (finalAttrs: {
pname = "rocdbgapi";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -19,7 +19,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocfft";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";

View file

@ -15,7 +15,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocgdb";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";

View file

@ -7,7 +7,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-cmake";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
@ -22,8 +22,6 @@ stdenv.mkDerivation (finalAttrs: {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
page = "releases?per_page=2";
filter = ".[1].tag_name | split(\"-\") | .[1]";
};
meta = with lib; {

View file

@ -15,7 +15,7 @@ let
else throw "Unsupported ROCm LLVM platform";
in stdenv.mkDerivation (finalAttrs: {
pname = "rocm-comgr";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";

View file

@ -14,13 +14,13 @@ let
else throw "Unsupported ROCm LLVM platform";
in stdenv.mkDerivation (finalAttrs: {
pname = "rocm-device-libs";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCm-Device-Libs";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-f6/LAhJ2mBDO1/JloHvl7MJyDo3WutbXd4IDknA9nzM=";
hash = "sha256-ARxs/yqyVoIUWliJkINzitumF+64/5u3fbB0tHB5hPU=";
};
patches = [ ./cmake.patch ];

View file

@ -22,14 +22,14 @@
buildPythonPackage rec {
pname = "rocm-docs-core";
version = "0.25.0";
version = "0.26.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocm-docs-core";
rev = "v${version}";
hash = "sha256-kOsoIK0vaPT60hGr960s5vc0eloSr5CECtd8Dy24YuM=";
hash = "sha256-Mr6/Ne6P+TapoCqN7xkKMNse3fTaIAvvLmMl0kVg7Vs=";
};
buildInputs = [ setuptools ];

View file

@ -16,7 +16,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-runtime";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";

View file

@ -8,13 +8,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-smi";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocm_smi_lib";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-swCRO4PBMBJ6fO2bLq/xxFZIYw2IgiFB490wsU8Wm2o=";
hash = "sha256-NZR4jBgKVfpkRNQFPmav1yCZF872LkcrPBNNcBVTLDU=";
};
patches = [ ./cmake.patch ];

View file

@ -10,7 +10,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-thunk";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";

View file

@ -18,7 +18,7 @@
}:
stdenv.mkDerivation (finalAttrs: {
version = "5.7.0";
version = "5.7.1";
pname = "rocminfo";
src = fetchFromGitHub {

View file

@ -32,7 +32,7 @@ let
else throw "Unsupported ROCm LLVM platform";
in stdenv.mkDerivation (finalAttrs: {
pname = "rocmlir${suffix}";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -14,7 +14,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocprim";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -33,13 +33,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocprofiler";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";
repo = "rocprofiler";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-ue/2uiLbhOv/5XY4cIJuZ8DUMRhniYgxolq9xMwO1FY=";
hash = "sha256-1s/7C9y+73ADLF/17Vepw0pZNVtYnKoP24GdwKc9X2Y=";
};
nativeBuildInputs = [

View file

@ -11,7 +11,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocr-debug-agent";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";

View file

@ -14,7 +14,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocrand";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocRAND";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-cFH38fLD8tk6V9JERcqHokuwKemdDgHCZ75bZNEqmdY=";
hash = "sha256-VrpiHlZZQH+IOoaEDuDOfRgnMiqm1bpRIuNyrPz2SGY=";
fetchSubmodules = true; # For inline hipRAND
};

View file

@ -18,7 +18,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocsolver";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -19,7 +19,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocsparse";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"

View file

@ -14,7 +14,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocthrust";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocThrust";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-i0XCtJth8caVQT5oUgsxWXNzcePa02Gb7AQsthYTOv8=";
hash = "sha256-+bcHcA87IToTcII7N/hm81C/JiokJKj0M1yAph/x9Qc=";
};
nativeBuildInputs = [

View file

@ -3,14 +3,13 @@
, fetchFromGitHub
, rocmUpdateScript
, cmake
, clang
, clr
, rocm-device-libs
, rocprofiler
, libxml2
, doxygen
, graphviz
, gcc-unwrapped
, libbacktrace
, rocm-runtime
, python3Packages
, buildDocs ? false # Nothing seems to be generated, so not making the output
@ -19,7 +18,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "roctracer";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -38,7 +37,6 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
clang
clr
] ++ lib.optionals buildDocs [
doxygen
@ -46,8 +44,8 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
rocprofiler
libxml2
libbacktrace
python3Packages.python
python3Packages.cppheaderparser
];

View file

@ -18,7 +18,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocwmma";
version = "5.7.0";
version = "5.7.1";
outputs = [
"out"
@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocWMMA";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-/EuBBSjhlMwJfsqYvRb9oCNC0hNkEa1JH1KUDLMSs08=";
hash = "sha256-0otJxgVYLwvVYIWT/hjrrpuSj5jslP1dbJRt6GUOrDs=";
};
patches = lib.optionals (buildTests || buildBenchmarks) [

View file

@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: {
else "cpu"
);
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "GPUOpen-ProfessionalCompute-Libraries";

View file

@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "tensile";
version = "5.7.0";
version = "5.7.1";
format = "pyproject";
src = fetchFromGitHub {

View file

@ -5,8 +5,8 @@
{ name ? ""
, owner ? ""
, repo ? ""
, page ? "releases?per_page=1"
, filter ? ".[0].tag_name | split(\"-\") | .[1]"
, page ? "releases/latest"
, filter ? ".tag_name | split(\"-\") | .[1]"
}:
let

View file

@ -884,7 +884,7 @@
"version": "2023-09-12",
"url": "https://gn.googlesource.com/gn",
"rev": "991530ce394efb58fcd848195469022fa17ae126",
"sha256": "1zpbaspb2mncbsabps8n1iwzc67nhr79ndc9dnqxx1w1qfvaldg2"
"hash": "sha256-4jWqtsOBh96xbYk1m06G9hj2eQwW6buUXsxWsa5W6/4="
}
}
},
@ -1776,7 +1776,7 @@
"version": "2023-08-10",
"url": "https://gn.googlesource.com/gn",
"rev": "cc56a0f98bb34accd5323316e0292575ff17a5d4",
"sha256": "1ly7z48v147bfdb1kqkbc98myxpgqq3g6vgr8bjx1ikrk17l82ab"
"hash": "sha256-SwlET5h5xtDlQvlt8wbG73ZfUWJr4hlWc+uQsBH5x9M="
}
}
},
@ -2620,7 +2620,7 @@
"version": "2023-06-09",
"url": "https://gn.googlesource.com/gn",
"rev": "4bd1a77e67958fb7f6739bd4542641646f264e5d",
"sha256": "14h9jqspb86sl5lhh6q0kk2rwa9zcak63f8drp7kb3r4dx08vzsw"
"hash": "sha256-XP+NQG8kjzXPzQ25YaZiPymexZwAGwhpodqgdTWWCZI="
}
}
},
@ -3440,7 +3440,7 @@
"version": "2023-04-19",
"url": "https://gn.googlesource.com/gn",
"rev": "5a004f9427a050c6c393c07ddb85cba8ff3849fa",
"sha256": "01xrh9m9m6x8lz0vxwdw2mrhrvnw93zpg09hwdhqakj06agf4jjk"
"hash": "sha256-U0rinjJAToVh4zCBd/9I3O4McxW88b7Bp6ibmmqCuQc="
}
}
},

View file

@ -188,7 +188,7 @@ def get_gn_source(repo):
"version": datetime.fromisoformat(gn["date"]).date().isoformat(),
"url": gn["url"],
"rev": gn["rev"],
"sha256": gn["sha256"]
"hash": gn["hash"]
}
}

View file

@ -32,6 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
This package is only the Community Edition of the Flyway command-line tool.
'';
mainProgram = "flyway";
downloadPage = "https://github.com/flyway/flyway";
homepage = "https://flywaydb.org/";
changelog = "https://documentation.red-gate.com/fd/release-notes-for-flyway-engine-179732572.html";

View file

@ -29,6 +29,7 @@ buildDartApplication rec {
};
pubspecLockFile = ./pubspec.lock;
depsListFile = ./deps.json;
vendorHash = "sha256-PQvY+qFXovSXH5wuc60wCrt5RiooKcaGKYzbjKSvqso=";
nativeBuildInputs = [

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