Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2024-04-13 00:11:26 +00:00 committed by GitHub
commit 07e27017e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
355 changed files with 7386 additions and 7133 deletions

View File

@ -2621,6 +2621,12 @@
githubId = 30630233;
name = "Timo Triebensky";
};
birkb = {
email = "birk@batchworks.de";
github = "birkb";
githubId = 10164833;
name = "Birk Bohne";
};
bjornfor = {
email = "bjorn.forsman@gmail.com";
github = "bjornfor";
@ -11778,12 +11784,6 @@
githubId = 5767106;
name = "Lukas Schmidt";
};
luis = {
email = "luis.nixos@gmail.com";
github = "Luis-Hebendanz";
githubId = 22085373;
name = "Luis Hebendanz";
};
luisdaranda = {
email = "luisdomingoaranda@gmail.com";
github = "propet";
@ -16341,6 +16341,12 @@
matrix = "@quantenzitrone:matrix.org";
name = "quantenzitrone";
};
qubasa = {
email = "consulting@qube.email";
github = "Qubasa";
githubId = 22085373;
name = "Luis Hebendanz";
};
queezle = {
email = "git@queezle.net";
github = "queezle42";
@ -19608,6 +19614,12 @@
githubId = 2389333;
name = "Andy Tockman";
};
tcmal = {
email = "me@aria.rip";
github = "tcmal";
githubId = 4183876;
name = "Aria Shrimpton";
};
teatwig = {
email = "nix@teatwig.net";
name = "tea";
@ -20619,6 +20631,12 @@
githubId = 20206121;
name = "umlx5h";
};
uncenter = {
name = "uncenter";
email = "uncenter@uncenter.dev";
github = "uncenter";
githubId = 47499684;
};
unclamped = {
name = "Maru";
email = "clear6860@tutanota.com";

View File

@ -122,10 +122,7 @@ class KDERepoMetadata:
dep_graph={},
)
dep_specs = [
"dependency-data-common",
"dependency-data-kf6-qt6"
]
dep_specs = ["dependency-data-stable-kf6-qt6"]
dep_graph = collections.defaultdict(set)
for spec in dep_specs:

View File

@ -451,6 +451,7 @@ with lib.maintainers; {
# Verify additions to this team with at least one already existing member of the team.
members = [
das_j
conni2461
];
scope = "Group registration for packages maintained by Helsinki Systems";
shortName = "Helsinki Systems employees";

View File

@ -217,6 +217,10 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `services.neo4j.allowUpgrade` was removed and no longer has any effect. Neo4j 5 supports automatic rolling upgrades.
- `unifiLTS`, `unifi5` and `unifi6` have been removed, as they require MongoDB versions which are end-of-life. All these versions can be upgraded to `unifi7` directly.
- `mongodb-4_4` has been removed as it has reached end of life. Consequently, `unifi7` and `unifi8` now use MongoDB 5.0 by default.
- `nitter` requires a `guest_accounts.jsonl` to be provided as a path or loaded into the default location at `/var/lib/nitter/guest_accounts.jsonl`. See [Guest Account Branch Deployment](https://github.com/zedeus/nitter/wiki/Guest-Account-Branch-Deployment) for details.
- `boot.supportedFilesystems` and `boot.initrd.supportedFilesystems` are now attribute sets instead of lists. Assignment from lists as done previously is still supported, but checking whether a filesystem is enabled must now by done using `supportedFilesystems.fs or false` instead of using `lib.elem "fs" supportedFilesystems` as was done previously.
@ -410,6 +414,10 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The `erlang_node_short_name`, `erlang_node_name`, `port` and `options` configuration parameters are gone, and have been replaced with an `environment` parameter.
Use the appropriate [environment variables](https://hexdocs.pm/livebook/readme.html#environment-variables) inside `environment` to configure the service instead.
- `akkoma` now requires explicitly setting the base URL for uploaded media (`settings."Pleroma.Upload".base_url`), as well as for the media proxy if enabled (`settings."Media"`).
This is recommended to be a separate (sub)domain to the one Akkoma is hosted at.
See [here](https://meta.akkoma.dev/t/akkoma-stable-2024-03-securer-i-barely-know-her/681#explicit-upload-and-media-proxy-domains-5) for more details.
- The `crystal` package has been updated to 1.11.x, which has some breaking changes.
Refer to crystal's changelog for more information. ([v1.10](https://github.com/crystal-lang/crystal/blob/master/CHANGELOG.md#1100-2023-10-09), [v1.11](https://github.com/crystal-lang/crystal/blob/master/CHANGELOG.md#1110-2024-01-08))
@ -460,6 +468,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- [Lilypond](https://lilypond.org/index.html) and [Denemo](https://www.denemo.org) are now compiled with Guile 3.0.
- Garage has been updated to v1.x.x. Users should read the [upstream release notes](https://git.deuxfleurs.fr/Deuxfleurs/garage/releases/tag/v1.0.0) and follow the documentation when changing over their `services.garage.package` and performing this manual upgrade.
- The EC2 image module now enables the [Amazon SSM Agent](https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html) by default.
- The following options of the Nextcloud module were moved into [`services.nextcloud.settings`](#opt-services.nextcloud.settings) and renamed to match the name from Nextcloud's `config.php`:
@ -572,6 +582,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- QtMultimedia has changed its default backend to `QT_MEDIA_BACKEND=ffmpeg` (previously `gstreamer` on Linux or `darwin` on MacOS).
The previous native backends remain available but are now minimally maintained. Refer to [upstream documentation](https://doc.qt.io/qt-6/qtmultimedia-index.html#ffmpeg-as-the-default-backend) for further details about each platform.
- The `drbd` out-of-tree Linux kernel driver has been added in version `9.2.7`. With it the DRBD 9.x features can be used instead of the 8.x features provided by the `8.4.11` in-tree driver.
- The oil shell's c++ version is now available as `oils-for-unix`. The python version is still available as `oil`
- `documentation.man.mandoc` now by default uses `MANPATH` to set the directories where mandoc will search for manual pages.

View File

@ -36,7 +36,7 @@ in
};
platforms = lib.mkOption {
type = types.listOf types.raw;
default = lib.platforms.linux;
default = lib.platforms.linux ++ lib.platforms.darwin;
description = ''
Sets the [`meta.platforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-platforms) attribute on the [{option}`test`](#test-opt-test) derivation.
'';

View File

@ -10,7 +10,8 @@ let
resolvconfOptions = cfg.extraOptions
++ optional cfg.dnsSingleRequest "single-request"
++ optional cfg.dnsExtensionMechanism "edns0";
++ optional cfg.dnsExtensionMechanism "edns0"
++ optional cfg.useLocalResolver "trust-ad";
configText =
''
@ -27,9 +28,7 @@ let
resolv_conf_options='${concatStringsSep " " resolvconfOptions}'
'' + optionalString cfg.useLocalResolver ''
# This hosts runs a full-blown DNS resolver.
name_servers='127.0.0.1'
'' + optionalString (cfg.useLocalResolver && config.networking.enableIPv6) ''
name_servers='::1'
name_servers='127.0.0.1${optionalString config.networking.enableIPv6 " ::1"}'
'' + cfg.extraConfig;
in

View File

@ -338,7 +338,7 @@ in {
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/redis-server /var/lib/${redisName name}/redis.conf ${escapeShellArgs conf.extraParams}";
ExecStart = "${cfg.package}/bin/${cfg.package.serverBin or "redis-server"} /var/lib/${redisName name}/redis.conf ${escapeShellArgs conf.extraParams}";
ExecStartPre = "+"+pkgs.writeShellScript "${redisName name}-prep-conf" (let
redisConfVar = "/var/lib/${redisName name}/redis.conf";
redisConfRun = "/run/${redisName name}/nixos.conf";
@ -391,7 +391,8 @@ in {
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" ];
RestrictNamespaces = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
# we need to disable MemoryDenyWriteExecute for keydb
MemoryDenyWriteExecute = cfg.package.pname != "keydb";
RestrictRealtime = true;
RestrictSUIDSGID = true;
PrivateMounts = true;

View File

@ -173,11 +173,14 @@ in
imports = [
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "autoLogin" ] [ "services" "displayManager" "autoLogin" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "defaultSession" ] [ "services" "displayManager" "defaultSession" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "hiddenUsers" ] [ "services" "displayManager" "hiddenUsers" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "environment" ] [ "services" "displayManager" "environment" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "execCmd" ] [ "services" "displayManager" "execCmd" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logToFile" ] [ "services" "displayManager" "logToFile" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logToJournal" ] [ "services" "displayManager" "logToJournal" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "preStart" ] [ "services" "displayManager" "preStart" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "sessionData" ] [ "services" "displayManager" "sessionData" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "sessionPackages" ] [ "services" "displayManager" "sessionPackages" ])
];
config = lib.mkIf cfg.enable {

View File

@ -60,6 +60,9 @@ in
# This prevents nixos-rebuild from killing greetd by activating getty again
systemd.services."autovt@${tty}".enable = false;
# Enable desktop session data
services.displayManager.enable = lib.mkDefault true;
systemd.services.greetd = {
aliases = [ "display-manager.service" ];

View File

@ -1,46 +1,52 @@
{ config, lib, pkgs, ... }:
with lib;
let
toStr = value:
if true == value then "yes"
else if false == value then "no"
else toString value;
inherit (lib.attrsets) optionalAttrs;
inherit (lib.generators) toINIWithGlobalSection;
inherit (lib.lists) optional;
inherit (lib.modules) mkIf;
inherit (lib.options) literalExpression mkEnableOption mkOption;
inherit (lib.strings) escape;
inherit (lib.types) attrsOf bool int lines oneOf str submodule;
cfg = config.services.davfs2;
format = pkgs.formats.toml { };
configFile = let
settings = mapAttrsToList (n: v: "${n} = ${toStr v}") cfg.settings;
in pkgs.writeText "davfs2.conf" ''
${concatStringsSep "\n" settings}
${cfg.extraConfig}
'';
escapeString = escape ["\"" "\\"];
formatValue = value:
if true == value then "1"
else if false == value then "0"
else if builtins.isString value then "\"${escapeString value}\""
else toString value;
configFile = pkgs.writeText "davfs2.conf" (
if (cfg.settings != { }) then
(toINIWithGlobalSection {
mkSectionName = escapeString;
mkKeyValue = k: v: "${k} ${formatValue v}";
} cfg.settings)
else
cfg.extraConfig
);
in
{
options.services.davfs2 = {
enable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to enable davfs2.
'';
};
enable = mkEnableOption "davfs2";
davUser = mkOption {
type = types.str;
type = str;
default = "davfs2";
description = lib.mdDoc ''
description = ''
When invoked by root the mount.davfs daemon will run as this user.
Value must be given as name, not as numerical id.
'';
};
davGroup = mkOption {
type = types.str;
type = str;
default = "davfs2";
description = lib.mdDoc ''
description = ''
The group of the running mount.davfs daemon. Ordinary users must be
member of this group in order to mount a davfs2 file system. Value must
be given as name, not as numerical id.
@ -48,14 +54,19 @@ in
};
extraConfig = mkOption {
type = types.lines;
type = lines;
default = "";
example = ''
kernel_fs coda
proxy foo.bar:8080
use_locks 0
[/media/dav]
use_locks 1
[/home/otto/mywebspace]
gui_optimize 1
'';
description = lib.mdDoc ''
description = ''
Extra lines appended to the configuration of davfs2.
See {manpage}`davfs2.conf(5)` for available settings.
@ -66,18 +77,30 @@ in
};
settings = mkOption {
type = types.submodule {
freeformType = format.type;
type = submodule {
freeformType = let
valueTypes = [ bool int str ];
in
attrsOf (attrsOf (oneOf (valueTypes ++ [ (attrsOf (oneOf valueTypes)) ] )));
};
default = {};
default = { };
example = literalExpression ''
{
kernel_fs = "coda";
proxy = "foo.bar:8080";
use_locks = 0;
globalSection = {
proxy = "foo.bar:8080";
use_locks = false;
};
sections = {
"/media/dav" = {
use_locks = true;
};
"/home/otto/mywebspace" = {
gui_optimize = true;
};
};
}
'';
description = lib.mdDoc ''
description = ''
Extra settings appended to the configuration of davfs2.
See {manpage}`davfs2.conf(5)` for available settings.
'' ;
@ -86,16 +109,29 @@ in
config = mkIf cfg.enable {
warnings = lib.optional (cfg.extraConfig != null) ''
services.davfs2.extraConfig will be deprecated in future releases, please use the settings option now.
assertions = [
{
assertion = cfg.extraConfig != "" -> cfg.settings == { };
message = ''
services.davfs2.extraConfig and services.davfs2.settings cannot be used together.
Please prefer using services.davfs2.settings.
'';
}
];
warnings = optional (cfg.extraConfig != "") ''
services.davfs2.extraConfig will be deprecated in future releases;
please use services.davfs2.settings instead.
'';
environment.systemPackages = [ pkgs.davfs2 ];
environment.etc."davfs2/davfs2.conf".source = configFile;
services.davfs2.settings = {
dav_user = cfg.davUser;
dav_group = cfg.davGroup;
globalSection = {
dav_user = cfg.davUser;
dav_group = cfg.davGroup;
};
};
users.groups = optionalAttrs (cfg.davGroup == "davfs2") {

View File

@ -39,10 +39,10 @@ in
services.unifi.unifiPackage = lib.mkPackageOption pkgs "unifi5" { };
services.unifi.mongodbPackage = lib.mkPackageOption pkgs "mongodb" {
default = "mongodb-4_4";
default = "mongodb-5_0";
extraDescription = ''
::: {.note}
unifi7 officially only supports mongodb up until 3.6 but works with 4.4.
unifi7 officially only supports mongodb up until 4.4 but works with 5.0.
:::
'';
};

View File

@ -108,7 +108,7 @@ in
unifiVideoPackage = mkPackageOption pkgs "unifi-video" { };
mongodbPackage = mkPackageOption pkgs "mongodb" {
default = "mongodb-4_4";
default = "mongodb-5_0";
};
logDir = mkOption {

View File

@ -764,6 +764,21 @@ in {
};
};
"Pleroma.Upload" = let
httpConf = cfg.config.":pleroma"."Pleroma.Web.Endpoint".url;
in {
base_url = mkOption {
type = types.nonEmptyStr;
default = if lib.versionOlder config.system.stateVersion "24.05"
then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}/media/"
else null;
description = mdDoc ''
Base path which uploads will be stored at.
Whilst this can just be set to a subdirectory of the main domain, it is now recommended to use a different subdomain.
'';
};
};
":frontends" = mkOption {
type = elixirValue;
default = mapAttrs
@ -781,6 +796,30 @@ in {
[{option}`config.services.akkoma.frontends`](#opt-services.akkoma.frontends).
'';
};
":media_proxy" = let
httpConf = cfg.config.":pleroma"."Pleroma.Web.Endpoint".url;
in {
enabled = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
Whether to enable proxying of remote media through the instance's proxy.
'';
};
base_url = mkOption {
type = types.nullOr types.nonEmptyStr;
default = if lib.versionOlder config.system.stateVersion "24.05"
then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}/media/"
else null;
description = mdDoc ''
Base path for the media proxy.
Whilst this can just be set to a subdirectory of the main domain, it is now recommended to use a different subdomain.
'';
};
};
};
":web_push_encryption" = mkOption {
@ -904,6 +943,9 @@ in {
};
config = mkIf cfg.enable {
assertions = optionals (cfg.config.":pleroma".":media_proxy".enabled && cfg.config.":pleroma".":media_proxy".base_url == null) [''
`services.akkoma.config.":pleroma".":media_proxy".base_url` must be set when the media proxy is enabled.
''];
warnings = optionals (with config.security; (!sudo.enable) && (!sudo-rs.enable)) [''
The pleroma_ctl wrapper enabled by the installWrapper option relies on
sudo, which appears to have been disabled through security.sudo.enable.
@ -1083,6 +1125,6 @@ in {
};
};
meta.maintainers = with maintainers; [ mvs ];
meta.maintainers = with maintainers; [ mvs tcmal ];
meta.doc = ./akkoma.md;
}

View File

@ -36,7 +36,8 @@ let
${pkgs.toot}/bin/toot timeline -1 | grep -F -q "hello world Jamy here"
# Test file upload
${pkgs.toot}/bin/toot upload <(dd if=/dev/zero bs=1024 count=1024 status=none)
echo "y" | ${pkgs.toot}/bin/toot upload <(dd if=/dev/zero bs=1024 count=1024 status=none) \
| grep -F -q "https://akkoma.nixos.test:443/media"
'';
checkFe = pkgs.writers.writeBashBin "checkFe" ''
@ -90,6 +91,9 @@ in
"Pleroma.Web.Endpoint" = {
url.host = "akkoma.nixos.test";
};
"Pleroma.Upload" = {
base_url = "https://akkoma.nixos.test:443/media/";
};
};
};

View File

@ -593,8 +593,8 @@ in {
nimdow = handleTest ./nimdow.nix {};
neo4j = handleTest ./neo4j.nix {};
netdata = handleTest ./netdata.nix {};
networking.networkd = handleTest ./networking.nix { networkd = true; };
networking.scripted = handleTest ./networking.nix { networkd = false; };
networking.scripted = handleTest ./networking/networkd-and-scripted.nix { networkd = false; };
networking.networkd = handleTest ./networking/networkd-and-scripted.nix { networkd = true; };
netbox_3_6 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_6; };
netbox_3_7 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_7; };
netbox-upgrade = handleTest ./web-apps/netbox-upgrade.nix {};

View File

@ -31,11 +31,11 @@ import ./make-test-python.nix (
}
on drbd1 {
address ${nodes.drbd1.config.networking.primaryIPAddress}:${toString drbdPort};
address ${nodes.drbd1.networking.primaryIPAddress}:${toString drbdPort};
}
on drbd2 {
address ${nodes.drbd2.config.networking.primaryIPAddress}:${toString drbdPort};
address ${nodes.drbd2.networking.primaryIPAddress}:${toString drbdPort};
}
}
'';
@ -45,7 +45,7 @@ import ./make-test-python.nix (
{
name = "drbd";
meta = with pkgs.lib.maintainers; {
maintainers = [ ryantm astro ];
maintainers = [ ryantm astro birkb ];
};
nodes.drbd1 = drbdConfig;

View File

@ -33,7 +33,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
nodes = {
node = {...}: {
environment.systemPackages = with pkgs; [
mongodb-4_4
mongodb-5_0
];
};
@ -42,7 +41,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
testScript = ''
node.start()
''
+ runMongoDBTest pkgs.mongodb-4_4
+ runMongoDBTest pkgs.mongodb-5_0
+ ''
node.shutdown()

View File

@ -4,98 +4,19 @@
# bool: whether to use networkd in the tests
, networkd }:
with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;
with import ../../lib/testing-python.nix { inherit system pkgs; };
let
qemu-common = import ../lib/qemu-common.nix { inherit (pkgs) lib pkgs; };
router = { config, pkgs, lib, ... }:
with pkgs.lib;
let
vlanIfs = range 1 (length config.virtualisation.vlans);
in {
environment.systemPackages = [ pkgs.iptables ]; # to debug firewall rules
virtualisation.vlans = [ 1 2 3 ];
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = true;
networking = {
useDHCP = false;
useNetworkd = networkd;
firewall.checkReversePath = true;
firewall.allowedUDPPorts = [ 547 ];
interfaces = mkOverride 0 (listToAttrs (forEach vlanIfs (n:
nameValuePair "eth${toString n}" {
ipv4.addresses = [ { address = "192.168.${toString n}.1"; prefixLength = 24; } ];
ipv6.addresses = [ { address = "fd00:1234:5678:${toString n}::1"; prefixLength = 64; } ];
})));
};
services.kea = {
dhcp4 = {
enable = true;
settings = {
interfaces-config = {
interfaces = map (n: "eth${toString n}") vlanIfs;
dhcp-socket-type = "raw";
service-sockets-require-all = true;
service-sockets-max-retries = 5;
service-sockets-retry-wait-time = 2500;
};
subnet4 = map (n: {
id = n;
subnet = "192.168.${toString n}.0/24";
pools = [{ pool = "192.168.${toString n}.3 - 192.168.${toString n}.254"; }];
option-data = [{ name = "routers"; data = "192.168.${toString n}.1"; }];
reservations = [{
hw-address = qemu-common.qemuNicMac n 1;
hostname = "client${toString n}";
ip-address = "192.168.${toString n}.2";
}];
}) vlanIfs;
};
};
dhcp6 = {
enable = true;
settings = {
interfaces-config = {
interfaces = map (n: "eth${toString n}") vlanIfs;
service-sockets-require-all = true;
service-sockets-max-retries = 5;
service-sockets-retry-wait-time = 2500;
};
subnet6 = map (n: {
id = n;
subnet = "fd00:1234:5678:${toString n}::/64";
interface = "eth${toString n}";
pools = [{ pool = "fd00:1234:5678:${toString n}::2-fd00:1234:5678:${toString n}::2"; }];
}) vlanIfs;
};
};
};
services.radvd = {
enable = true;
config = flip concatMapStrings vlanIfs (n: ''
interface eth${toString n} {
AdvSendAdvert on;
AdvManagedFlag on;
AdvOtherConfigFlag on;
prefix fd00:1234:5678:${toString n}::/64 {
AdvAutonomous off;
};
};
'');
};
};
lib = pkgs.lib;
router = import ./router.nix { inherit networkd; };
clientConfig = extraConfig: lib.recursiveUpdate {
networking.useDHCP = false;
networking.useNetworkd = networkd;
} extraConfig;
testCases = {
loopback = {
name = "Loopback";
nodes.client = { pkgs, ... }: with pkgs.lib; {
networking.useDHCP = false;
networking.useNetworkd = networkd;
};
nodes.client = clientConfig {};
testScript = ''
start_all()
client.wait_for_unit("network.target")
@ -107,12 +28,10 @@ let
static = {
name = "Static";
nodes.router = router;
nodes.client = { pkgs, ... }: with pkgs.lib; {
nodes.client = clientConfig {
virtualisation.interfaces.enp1s0.vlan = 1;
virtualisation.interfaces.enp2s0.vlan = 2;
networking = {
useNetworkd = networkd;
useDHCP = false;
defaultGateway = { address = "192.168.1.1"; interface = "enp1s0"; };
defaultGateway6 = { address = "fd00:1234:5678:1::1"; interface = "enp1s0"; };
interfaces.enp1s0.ipv4.addresses = [
@ -125,8 +44,7 @@ let
];
};
};
testScript = { ... }:
''
testScript = ''
start_all()
client.wait_for_unit("network.target")
@ -139,35 +57,23 @@ let
with subtest("Test vlan 1"):
client.wait_until_succeeds("ping -c 1 192.168.1.1")
client.wait_until_succeeds("ping -c 1 192.168.1.2")
client.wait_until_succeeds("ping -c 1 192.168.1.3")
client.wait_until_succeeds("ping -c 1 192.168.1.10")
router.wait_until_succeeds("ping -c 1 192.168.1.1")
router.wait_until_succeeds("ping -c 1 192.168.1.2")
router.wait_until_succeeds("ping -c 1 192.168.1.3")
router.wait_until_succeeds("ping -c 1 192.168.1.10")
with subtest("Test vlan 2"):
client.wait_until_succeeds("ping -c 1 192.168.2.1")
client.wait_until_succeeds("ping -c 1 192.168.2.2")
router.wait_until_succeeds("ping -c 1 192.168.2.1")
router.wait_until_succeeds("ping -c 1 192.168.2.2")
with subtest("Test default gateway"):
router.wait_until_succeeds("ping -c 1 192.168.3.1")
client.wait_until_succeeds("ping -c 1 192.168.3.1")
router.wait_until_succeeds("ping -c 1 fd00:1234:5678:3::1")
client.wait_until_succeeds("ping -c 1 fd00:1234:5678:3::1")
'';
};
routeType = {
name = "RouteType";
nodes.client = { pkgs, ... }: with pkgs.lib; {
nodes.client = clientConfig {
networking = {
useDHCP = false;
useNetworkd = networkd;
interfaces.eth1.ipv4.routes = [{
address = "192.168.1.127";
prefixLength = 32;
@ -184,7 +90,7 @@ let
dhcpDefault = {
name = "useDHCP-by-default";
nodes.router = router;
nodes.client = { lib, ... }: {
nodes.client = {
# Disable test driver default config
networking.interfaces = lib.mkForce {
# Make sure DHCP defaults correctly even when some unrelated config
@ -198,28 +104,22 @@ let
start_all()
client.wait_for_unit("multi-user.target")
client.wait_until_succeeds("ip addr show dev enp1s0 | grep '192.168.1'")
client.shell_interact()
client.succeed("ping -c 1 192.168.1.1")
router.succeed("ping -c 1 192.168.1.1")
router.succeed("ping -c 1 192.168.1.2")
client.succeed("ping -c 1 192.168.1.2")
'';
};
dhcpSimple = {
name = "SimpleDHCP";
nodes.router = router;
nodes.client = { pkgs, ... }: with pkgs.lib; {
nodes.client = clientConfig {
virtualisation.interfaces.enp1s0.vlan = 1;
virtualisation.interfaces.enp2s0.vlan = 2;
networking = {
useNetworkd = networkd;
useDHCP = false;
interfaces.enp1s0.useDHCP = true;
interfaces.enp2s0.useDHCP = true;
};
};
testScript = { ... }:
''
testScript = ''
start_all()
client.wait_for_unit("network.target")
@ -234,44 +134,31 @@ let
with subtest("Test vlan 1"):
client.wait_until_succeeds("ping -c 1 192.168.1.1")
client.wait_until_succeeds("ping -c 1 192.168.1.2")
client.wait_until_succeeds("ping -c 1 fd00:1234:5678:1::1")
client.wait_until_succeeds("ping -c 1 fd00:1234:5678:1::2")
router.wait_until_succeeds("ping -c 1 192.168.1.1")
router.wait_until_succeeds("ping -c 1 192.168.1.2")
router.wait_until_succeeds("ping -c 1 fd00:1234:5678:1::1")
router.wait_until_succeeds("ping -c 1 fd00:1234:5678:1::2")
with subtest("Test vlan 2"):
client.wait_until_succeeds("ping -c 1 192.168.2.1")
client.wait_until_succeeds("ping -c 1 192.168.2.2")
client.wait_until_succeeds("ping -c 1 fd00:1234:5678:2::1")
client.wait_until_succeeds("ping -c 1 fd00:1234:5678:2::2")
router.wait_until_succeeds("ping -c 1 192.168.2.1")
router.wait_until_succeeds("ping -c 1 192.168.2.2")
router.wait_until_succeeds("ping -c 1 fd00:1234:5678:2::1")
router.wait_until_succeeds("ping -c 1 fd00:1234:5678:2::2")
'';
};
dhcpOneIf = {
name = "OneInterfaceDHCP";
nodes.router = router;
nodes.client = { pkgs, ... }: with pkgs.lib; {
nodes.client = clientConfig {
virtualisation.interfaces.enp1s0.vlan = 1;
virtualisation.interfaces.enp2s0.vlan = 2;
networking = {
useNetworkd = networkd;
useDHCP = false;
interfaces.enp1s0 = {
mtu = 1343;
useDHCP = true;
};
};
};
testScript = { ... }:
''
testScript = ''
start_all()
with subtest("Wait for networking to come up"):
@ -286,9 +173,6 @@ let
with subtest("Test vlan 1"):
client.wait_until_succeeds("ping -c 1 192.168.1.1")
client.wait_until_succeeds("ping -c 1 192.168.1.2")
router.wait_until_succeeds("ping -c 1 192.168.1.1")
router.wait_until_succeeds("ping -c 1 192.168.1.2")
with subtest("Test vlan 2"):
@ -300,17 +184,15 @@ let
'';
};
bond = let
node = address: { pkgs, ... }: with pkgs.lib; {
node = address: clientConfig {
virtualisation.interfaces.enp1s0.vlan = 1;
virtualisation.interfaces.enp2s0.vlan = 2;
networking = {
useNetworkd = networkd;
useDHCP = false;
bonds.bond0 = {
interfaces = [ "enp1s0" "enp2s0" ];
driverOptions.mode = "802.3ad";
};
interfaces.bond0.ipv4.addresses = mkOverride 0
interfaces.bond0.ipv4.addresses = lib.mkOverride 0
[ { inherit address; prefixLength = 30; } ];
};
};
@ -318,8 +200,7 @@ let
name = "Bond";
nodes.client1 = node "192.168.1.1";
nodes.client2 = node "192.168.1.2";
testScript = { ... }:
''
testScript = ''
start_all()
with subtest("Wait for networking to come up"):
@ -339,7 +220,7 @@ let
'';
};
bridge = let
node = { address, vlan }: { pkgs, ... }: with pkgs.lib; {
node = { address, vlan }: { pkgs, ... }: {
virtualisation.interfaces.enp1s0.vlan = vlan;
networking = {
useNetworkd = networkd;
@ -351,21 +232,20 @@ let
name = "Bridge";
nodes.client1 = node { address = "192.168.1.2"; vlan = 1; };
nodes.client2 = node { address = "192.168.1.3"; vlan = 2; };
nodes.router = { pkgs, ... }: with pkgs.lib; {
nodes.router = {
virtualisation.interfaces.enp1s0.vlan = 1;
virtualisation.interfaces.enp2s0.vlan = 2;
networking = {
useNetworkd = networkd;
useDHCP = false;
bridges.bridge.interfaces = [ "enp1s0" "enp2s0" ];
interfaces.eth1.ipv4.addresses = mkOverride 0 [ ];
interfaces.eth2.ipv4.addresses = mkOverride 0 [ ];
interfaces.bridge.ipv4.addresses = mkOverride 0
interfaces.eth1.ipv4.addresses = lib.mkOverride 0 [ ];
interfaces.eth2.ipv4.addresses = lib.mkOverride 0 [ ];
interfaces.bridge.ipv4.addresses = lib.mkOverride 0
[ { address = "192.168.1.1"; prefixLength = 24; } ];
};
};
testScript = { ... }:
''
testScript = ''
start_all()
with subtest("Wait for networking to come up"):
@ -389,7 +269,7 @@ let
macvlan = {
name = "MACVLAN";
nodes.router = router;
nodes.client = { pkgs, ... }: with pkgs.lib; {
nodes.client = { pkgs, ... }: {
environment.systemPackages = [ pkgs.iptables ]; # to debug firewall rules
virtualisation.interfaces.enp1s0.vlan = 1;
networking = {
@ -404,8 +284,7 @@ let
interfaces.macvlan.useDHCP = true;
};
};
testScript = { ... }:
''
testScript = ''
start_all()
with subtest("Wait for networking to come up"):
@ -439,34 +318,31 @@ let
};
fou = {
name = "foo-over-udp";
nodes.machine = { ... }: {
nodes.machine = clientConfig {
virtualisation.interfaces.enp1s0.vlan = 1;
networking = {
useNetworkd = networkd;
useDHCP = false;
interfaces.enp1s0.ipv4.addresses = [ { address = "192.168.1.1"; prefixLength = 24; } ];
fooOverUDP = {
fou1 = { port = 9001; };
fou2 = { port = 9002; protocol = 41; };
fou3 = mkIf (!networkd)
fou3 = lib.mkIf (!networkd)
{ port = 9003; local.address = "192.168.1.1"; };
fou4 = mkIf (!networkd)
fou4 = lib.mkIf (!networkd)
{ port = 9004; local = { address = "192.168.1.1"; dev = "enp1s0"; }; };
};
};
systemd.services = {
fou3-fou-encap.after = optional (!networkd) "network-addresses-enp1s0.service";
fou3-fou-encap.after = lib.optional (!networkd) "network-addresses-enp1s0.service";
};
};
testScript = { ... }:
''
testScript = ''
import json
machine.wait_for_unit("network.target")
fous = json.loads(machine.succeed("ip -json fou show"))
assert {"port": 9001, "gue": None, "family": "inet"} in fous, "fou1 exists"
assert {"port": 9002, "ipproto": 41, "family": "inet"} in fous, "fou2 exists"
'' + optionalString (!networkd) ''
'' + lib.optionalString (!networkd) ''
assert {
"port": 9003,
"gue": None,
@ -483,7 +359,7 @@ let
'';
};
sit = let
node = { address4, remote, address6 }: { pkgs, ... }: with pkgs.lib; {
node = { address4, remote, address6 }: { pkgs, ... }: {
virtualisation.interfaces.enp1s0.vlan = 1;
networking = {
useNetworkd = networkd;
@ -493,9 +369,9 @@ let
local = address4;
dev = "enp1s0";
};
interfaces.enp1s0.ipv4.addresses = mkOverride 0
interfaces.enp1s0.ipv4.addresses = lib.mkOverride 0
[ { address = address4; prefixLength = 24; } ];
interfaces.sit.ipv6.addresses = mkOverride 0
interfaces.sit.ipv6.addresses = lib.mkOverride 0
[ { address = address6; prefixLength = 64; } ];
};
};
@ -506,7 +382,7 @@ let
# client2 does the reverse, sending in proto-41 and accepting only UDP incoming.
# that way we'll notice when either SIT itself or FOU breaks.
nodes.client1 = args@{ pkgs, ... }:
mkMerge [
lib.mkMerge [
(node { address4 = "192.168.1.1"; remote = "192.168.1.2"; address6 = "fc00::1"; } args)
{
networking = {
@ -516,7 +392,7 @@ let
}
];
nodes.client2 = args@{ pkgs, ... }:
mkMerge [
lib.mkMerge [
(node { address4 = "192.168.1.2"; remote = "192.168.1.1"; address6 = "fc00::2"; } args)
{
networking = {
@ -525,8 +401,7 @@ let
};
}
];
testScript = { ... }:
''
testScript = ''
start_all()
with subtest("Wait for networking to be configured"):
@ -546,7 +421,7 @@ let
'';
};
gre = let
node = { pkgs, ... }: with pkgs.lib; {
node = { ... }: {
networking = {
useNetworkd = networkd;
useDHCP = false;
@ -556,7 +431,7 @@ let
in {
name = "GRE";
nodes.client1 = args@{ pkgs, ... }:
mkMerge [
lib.mkMerge [
(node args)
{
virtualisation.vlans = [ 1 2 4 ];
@ -578,21 +453,21 @@ let
};
};
bridges.bridge.interfaces = [ "greTunnel" "eth1" ];
interfaces.eth1.ipv4.addresses = mkOverride 0 [];
interfaces.bridge.ipv4.addresses = mkOverride 0 [
interfaces.eth1.ipv4.addresses = lib.mkOverride 0 [];
interfaces.bridge.ipv4.addresses = lib.mkOverride 0 [
{ address = "192.168.1.1"; prefixLength = 24; }
];
interfaces.eth3.ipv6.addresses = [
{ address = "fd00:1234:5678:4::1"; prefixLength = 64; }
];
interfaces.gre6Tunnel.ipv6.addresses = mkOverride 0 [
interfaces.gre6Tunnel.ipv6.addresses = lib.mkOverride 0 [
{ address = "fc00::1"; prefixLength = 64; }
];
};
}
];
nodes.client2 = args@{ pkgs, ... }:
mkMerge [
lib.mkMerge [
(node args)
{
virtualisation.vlans = [ 2 3 4 ];
@ -614,21 +489,20 @@ let
};
};
bridges.bridge.interfaces = [ "greTunnel" "eth2" ];
interfaces.eth2.ipv4.addresses = mkOverride 0 [];
interfaces.bridge.ipv4.addresses = mkOverride 0 [
interfaces.eth2.ipv4.addresses = lib.mkOverride 0 [];
interfaces.bridge.ipv4.addresses = lib.mkOverride 0 [
{ address = "192.168.1.2"; prefixLength = 24; }
];
interfaces.eth3.ipv6.addresses = [
{ address = "fd00:1234:5678:4::2"; prefixLength = 64; }
];
interfaces.gre6Tunnel.ipv6.addresses = mkOverride 0 [
interfaces.gre6Tunnel.ipv6.addresses = lib.mkOverride 0 [
{ address = "fc00::2"; prefixLength = 64; }
];
};
}
];
testScript = { ... }:
''
testScript = ''
import json
start_all()
@ -658,8 +532,7 @@ let
'';
};
vlan = let
node = address: { pkgs, ... }: with pkgs.lib; {
#virtualisation.vlans = [ 1 ];
node = address: {
networking = {
useNetworkd = networkd;
useDHCP = false;
@ -667,9 +540,9 @@ let
id = 1;
interface = "eth0";
};
interfaces.eth0.ipv4.addresses = mkOverride 0 [ ];
interfaces.eth1.ipv4.addresses = mkOverride 0 [ ];
interfaces.vlan.ipv4.addresses = mkOverride 0
interfaces.eth0.ipv4.addresses = lib.mkOverride 0 [ ];
interfaces.eth1.ipv4.addresses = lib.mkOverride 0 [ ];
interfaces.vlan.ipv4.addresses = lib.mkOverride 0
[ { inherit address; prefixLength = 24; } ];
};
};
@ -677,8 +550,7 @@ let
name = "vlan";
nodes.client1 = node "192.168.1.1";
nodes.client2 = node "192.168.1.2";
testScript = { ... }:
''
testScript = ''
start_all()
with subtest("Wait for networking to be configured"):
@ -695,14 +567,14 @@ let
vlanIP = number: "10.1.1.${number}";
baseInterface = "enp1s0";
vlanInterface = "vlan42";
node = number: {pkgs, ... }: with pkgs.lib; {
node = number: {
virtualisation.interfaces.enp1s0.vlan = 1;
networking = {
#useNetworkd = networkd;
useDHCP = false;
vlans.${vlanInterface} = { id = 42; interface = baseInterface; };
interfaces.${baseInterface}.ipv4.addresses = mkOverride 0 [{ address = baseIP number; prefixLength = 24; }];
interfaces.${vlanInterface}.ipv4.addresses = mkOverride 0 [{ address = vlanIP number; prefixLength = 24; }];
interfaces.${baseInterface}.ipv4.addresses = lib.mkOverride 0 [{ address = baseIP number; prefixLength = 24; }];
interfaces.${vlanInterface}.ipv4.addresses = lib.mkOverride 0 [{ address = vlanIP number; prefixLength = 24; }];
};
};
@ -713,8 +585,7 @@ let
name = "vlan-ping";
nodes.server = node serverNodeNum;
nodes.client = node clientNodeNum;
testScript = { ... }:
''
testScript = ''
start_all()
with subtest("Wait for networking to be configured"):
@ -778,7 +649,7 @@ let
machine.wait_until_succeeds("ip link show dev tun0 | grep 'mtu 1343'")
assert "02:de:ad:be:ef:01" in machine.succeed("ip link show dev tap0")
'' # network-addresses-* only exist in scripted networking
+ optionalString (!networkd) ''
+ lib.optionalString (!networkd) ''
with subtest("Test interfaces clean up"):
machine.succeed("systemctl stop network-addresses-tap0")
machine.sleep(10)
@ -792,13 +663,13 @@ let
};
privacy = {
name = "Privacy";
nodes.router = { ... }: {
nodes.router = {
virtualisation.interfaces.enp1s0.vlan = 1;
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = true;
networking = {
useNetworkd = networkd;
useDHCP = false;
interfaces.enp1s0.ipv6.addresses = singleton {
interfaces.enp1s0.ipv6.addresses = lib.singleton {
address = "fd00:1234:5678:1::1";
prefixLength = 64;
};
@ -819,34 +690,33 @@ let
'';
};
};
nodes.client_with_privacy = { pkgs, ... }: with pkgs.lib; {
nodes.client_with_privacy = {
virtualisation.interfaces.enp1s0.vlan = 1;
networking = {
useNetworkd = networkd;
useDHCP = false;
interfaces.enp1s0 = {
tempAddress = "default";
ipv4.addresses = mkOverride 0 [ ];
ipv6.addresses = mkOverride 0 [ ];
ipv4.addresses = lib.mkOverride 0 [ ];
ipv6.addresses = lib.mkOverride 0 [ ];
useDHCP = true;
};
};
};
nodes.client = { pkgs, ... }: with pkgs.lib; {
nodes.client = {
virtualisation.interfaces.enp1s0.vlan = 1;
networking = {
useNetworkd = networkd;
useDHCP = false;
interfaces.enp1s0 = {
tempAddress = "enabled";
ipv4.addresses = mkOverride 0 [ ];
ipv6.addresses = mkOverride 0 [ ];
ipv4.addresses = lib.mkOverride 0 [ ];
ipv6.addresses = lib.mkOverride 0 [ ];
useDHCP = true;
};
};
};
testScript = { ... }:
''
testScript = ''
start_all()
client.wait_for_unit("network.target")
@ -943,7 +813,7 @@ let
ipv6Table, targetIPv6Table
)
'' + optionalString (!networkd) ''
'' + lib.optionalString (!networkd) ''
with subtest("test clean-up of the tables"):
machine.succeed("systemctl stop network-addresses-eth0")
ipv4Residue = machine.succeed("ip -4 route list dev eth0 | head -n-3").strip()
@ -958,7 +828,7 @@ let
};
rename = if networkd then {
name = "RenameInterface";
nodes.machine = { pkgs, ... }: {
nodes.machine = {
virtualisation.vlans = [ 1 ];
networking = {
useNetworkd = networkd;
@ -982,7 +852,7 @@ let
# (as it's handled by udev, not networkd)
link = {
name = "Link";
nodes.client = { pkgs, ... }: {
nodes.client = {
virtualisation.vlans = [ 1 ];
networking = {
useNetworkd = networkd;
@ -1007,7 +877,7 @@ let
testMac = "06:00:00:00:02:00";
in {
name = "WlanInterface";
nodes.machine = { pkgs, ... }: {
nodes.machine = {
boot.kernelModules = [ "mac80211_hwsim" ];
networking.wlanInterfaces = {
wlan0 = { device = "wlan0"; };
@ -1033,10 +903,10 @@ let
];
in {
name = "naughtyInterfaceNames";
nodes.machine = { pkgs, ... }: {
nodes.machine = {
networking.useNetworkd = networkd;
networking.bridges = listToAttrs
(flip map ifnames
networking.bridges = lib.listToAttrs
(lib.flip builtins.map ifnames
(name: { inherit name; value.interfaces = []; }));
};
testScript = ''
@ -1048,7 +918,7 @@ let
};
caseSensitiveRenaming = {
name = "CaseSensitiveRenaming";
nodes.machine = { pkgs, ... }: {
nodes.machine = {
virtualisation.interfaces.enCustom.vlan = 11;
networking = {
useNetworkd = networkd;
@ -1063,6 +933,6 @@ let
};
};
in mapAttrs (const (attrs: makeTest (attrs // {
in lib.mapAttrs (lib.const (attrs: makeTest (attrs // {
name = "${attrs.name}-Networking-${if networkd then "Networkd" else "Scripted"}";
}))) testCases

View File

@ -0,0 +1,82 @@
{ networkd }: { config, pkgs, ... }:
let
inherit (pkgs) lib;
qemu-common = import ../../lib/qemu-common.nix { inherit lib pkgs; };
vlanIfs = lib.range 1 (lib.length config.virtualisation.vlans);
in {
environment.systemPackages = [ pkgs.iptables ]; # to debug firewall rules
virtualisation.vlans = [ 1 2 3 ];
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = true;
networking = {
useDHCP = false;
useNetworkd = networkd;
firewall.checkReversePath = true;
firewall.allowedUDPPorts = [ 547 ];
interfaces = lib.mkOverride 0 (lib.listToAttrs (lib.forEach vlanIfs (n:
lib.nameValuePair "eth${toString n}" {
ipv4.addresses = [ { address = "192.168.${toString n}.1"; prefixLength = 24; } ];
ipv6.addresses = [ { address = "fd00:1234:5678:${toString n}::1"; prefixLength = 64; } ];
})));
};
services.kea = {
dhcp4 = {
enable = true;
settings = {
interfaces-config = {
interfaces = map (n: "eth${toString n}") vlanIfs;
dhcp-socket-type = "raw";
service-sockets-require-all = true;
service-sockets-max-retries = 5;
service-sockets-retry-wait-time = 2500;
};
subnet4 = map (n: {
id = n;
subnet = "192.168.${toString n}.0/24";
pools = [{ pool = "192.168.${toString n}.3 - 192.168.${toString n}.254"; }];
option-data = [
{ data = "192.168.${toString n}.1"; name = "routers"; }
{ data = "192.168.${toString n}.1"; name = "domain-name-servers"; }
];
reservations = [{
hw-address = qemu-common.qemuNicMac n 1;
hostname = "client${toString n}";
ip-address = "192.168.${toString n}.2";
}];
}) vlanIfs;
};
};
dhcp6 = {
enable = true;
settings = {
interfaces-config = {
interfaces = map (n: "eth${toString n}") vlanIfs;
service-sockets-require-all = true;
service-sockets-max-retries = 5;
service-sockets-retry-wait-time = 2500;
};
subnet6 = map (n: {
id = n;
subnet = "fd00:1234:5678:${toString n}::/64";
interface = "eth${toString n}";
pools = [{ pool = "fd00:1234:5678:${toString n}::2-fd00:1234:5678:${toString n}::2"; }];
}) vlanIfs;
};
};
};
services.radvd = {
enable = true;
config = lib.flip lib.concatMapStrings vlanIfs (n: ''
interface eth${toString n} {
AdvSendAdvert on;
AdvManagedFlag on;
AdvOtherConfigFlag on;
prefix fd00:1234:5678:${toString n}::/64 {
AdvAutonomous off;
};
};
'');
};
}

View File

@ -1,44 +1,87 @@
import ./make-test-python.nix ({ pkgs, lib, ... }:
{
name = "redis";
meta.maintainers = with lib.maintainers; [ flokli ];
system ? builtins.currentSystem,
config ? { },
pkgs ? import ../../.. { inherit system config; },
nodes = {
machine =
{ pkgs, lib, ... }:
{
services.redis.servers."".enable = true;
services.redis.servers."test".enable = true;
users.users = lib.listToAttrs (map (suffix: lib.nameValuePair "member${suffix}" {
createHome = false;
description = "A member of the redis${suffix} group";
isNormalUser = true;
extraGroups = [ "redis${suffix}" ];
}) ["" "-test"]);
};
lib ? pkgs.lib,
}:
let
makeTest = import ./make-test-python.nix;
mkTestName =
pkg: "${pkg.pname}_${builtins.replaceStrings [ "." ] [ "" ] (lib.versions.majorMinor pkg.version)}";
redisPackages = {
inherit (pkgs) redis keydb;
};
makeRedisTest =
{
package,
name ? mkTestName package,
}:
makeTest {
inherit name;
meta.maintainers = [
lib.maintainers.flokli
lib.teams.helsinki-systems.members
];
testScript = { nodes, ... }: let
inherit (nodes.machine.config.services) redis;
in ''
start_all()
machine.wait_for_unit("redis")
machine.wait_for_unit("redis-test")
nodes = {
machine =
{ lib, ... }:
# The unnamed Redis server still opens a port for backward-compatibility
machine.wait_for_open_port(6379)
{
services = {
redis = {
inherit package;
servers."".enable = true;
servers."test".enable = true;
};
};
machine.wait_for_file("${redis.servers."".unixSocket}")
machine.wait_for_file("${redis.servers."test".unixSocket}")
users.users = lib.listToAttrs (
map
(
suffix:
lib.nameValuePair "member${suffix}" {
createHome = false;
description = "A member of the redis${suffix} group";
isNormalUser = true;
extraGroups = [ "redis${suffix}" ];
}
)
[
""
"-test"
]
);
};
};
# The unix socket is accessible to the redis group
machine.succeed('su member -c "redis-cli ping | grep PONG"')
machine.succeed('su member-test -c "redis-cli ping | grep PONG"')
testScript =
{ nodes, ... }:
let
inherit (nodes.machine.services) redis;
in
''
start_all()
machine.wait_for_unit("redis")
machine.wait_for_unit("redis-test")
machine.succeed("redis-cli ping | grep PONG")
machine.succeed("redis-cli -s ${redis.servers."".unixSocket} ping | grep PONG")
machine.succeed("redis-cli -s ${redis.servers."test".unixSocket} ping | grep PONG")
'';
})
# The unnamed Redis server still opens a port for backward-compatibility
machine.wait_for_open_port(6379)
machine.wait_for_file("${redis.servers."".unixSocket}")
machine.wait_for_file("${redis.servers."test".unixSocket}")
# The unix socket is accessible to the redis group
machine.succeed('su member -c "${pkgs.redis}/bin/redis-cli ping | grep PONG"')
machine.succeed('su member-test -c "${pkgs.redis}/bin/redis-cli ping | grep PONG"')
machine.succeed("${pkgs.redis}/bin/redis-cli ping | grep PONG")
machine.succeed("${pkgs.redis}/bin/redis-cli -s ${redis.servers."".unixSocket} ping | grep PONG")
machine.succeed("${pkgs.redis}/bin/redis-cli -s ${
redis.servers."test".unixSocket
} ping | grep PONG")
'';
};
in
lib.mapAttrs (_: package: makeRedisTest { inherit package; }) redisPackages

View File

@ -31,8 +31,6 @@ let
'';
};
in with pkgs; {
unifiLTS = makeAppTest unifiLTS;
unifi5 = makeAppTest unifi5;
unifi6 = makeAppTest unifi6;
unifi7 = makeAppTest unifi7;
unifi8 = makeAppTest unifi8;
}

View File

@ -27,11 +27,11 @@
stdenv.mkDerivation rec {
pname = "cardinal";
version = "23.10";
version = "24.04";
src = fetchurl {
url = "https://github.com/DISTRHO/Cardinal/releases/download/${version}/cardinal+deps-${version}.tar.xz";
hash = "sha256-6Wt2sC7vdrz2Fkl08bNLfnGu+pAV7b5lZUmsx1wtJRE=";
hash = "sha256-vowDdHAXVZ+HSMoQsvJdzghsJzH+OrSpx6MxPRAgtJA=";
};
prePatch = ''

View File

@ -1,41 +0,0 @@
{ stdenv
, lib
, meta
, fetchurl
, unzip
, mpv
, electron_24
, makeDesktopItem
, makeWrapper
, pname
, appname
, version
}:
stdenv.mkDerivation {
inherit pname version meta;
src = fetchurl {
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/${appname}-${version}-mac-x64.zip";
hash = "sha256-sJg3hYOiELm+edw2JTFt6cPFdbDj6mLcLngeqEPaPgs=";
};
nativeBuildInputs = [ makeWrapper unzip ];
# Installs mpv as a requirement
propagatedBuildInputs = [ mpv ];
installPhase = ''
runHook preInstall
mkdir -p $out/{Applications/${appname}.app,bin}
cp -R . $out/Applications/${appname}.app
makeWrapper $out/Applications/${appname}.app/Contents/MacOS/${appname} $out/bin/${pname}
runHook postInstall
'';
shellHook = ''
set -x
export LD_LIBRARY_PATH=${mpv}/lib
set +x
'';
}

View File

@ -1,27 +1,130 @@
{ lib
, stdenv
, callPackage
, ...
}@args:
{
lib,
buildNpmPackage,
fetchFromGitHub,
electron_27,
copyDesktopItems,
makeDesktopItem,
...
}:
let
extraArgs = removeAttrs args [ "callPackage" ];
pname = "feishin";
version = "0.5.1";
appname = "Feishin";
version = "0.6.1";
src = fetchFromGitHub {
owner = "jeffvli";
repo = pname;
rev = "v${version}";
hash = "sha256-Nj8GwrH49ph14xvJldj5GQR4mlt9unCPEcgLrsH/sx8=";
};
electron = electron_27;
in
buildNpmPackage {
pname = "feishin";
inherit version;
inherit src;
npmDepsHash = "sha256-+pr9fWg/9kxkYMmthtqhjgF6MOomSQxVCO5V8tHHRdE=";
npmFlags = [ "--legacy-peer-deps" ];
makeCacheWritable = true;
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
nativeBuildInputs = [ copyDesktopItems ];
postPatch = ''
# release/app dependencies are installed on preConfigure
substituteInPlace package.json \
--replace-fail "electron-builder install-app-deps &&" ""
# https://github.com/electron/electron/issues/31121
substituteInPlace src/main/main.ts \
--replace-fail "process.resourcesPath" "'$out/share/feishin/resources'"
'';
preConfigure =
let
releaseAppDeps = buildNpmPackage {
pname = "${pname}-release-app";
inherit version;
src = "${src}/release/app";
npmDepsHash = "sha256-MRwKxe1hoFs5bPXT6K/UspSDs9XBdcRJGvxGlTKExp4=";
npmFlags = [ "--ignore-scripts" ];
dontNpmBuild = true;
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
};
releaseNodeModules = "${releaseAppDeps}/lib/node_modules/feishin/node_modules";
in
''
for release_module_path in "${releaseNodeModules}"/*; do
rm -rf node_modules/"$(basename "$release_module_path")"
ln -s "$release_module_path" node_modules/
done
'';
postBuild = ''
npm exec electron-builder -- \
--dir \
-c.electronDist=${electron}/libexec/electron \
-c.electronVersion=${electron.version} \
-c.npmRebuild=false
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/feishin
pushd release/build/*/
cp -r locales resources{,.pak} $out/share/feishin
popd
# Code relies on checking app.isPackaged, which returns false if the executable is electron.
# Set ELECTRON_FORCE_IS_PACKAGED=1.
# https://github.com/electron/electron/issues/35153#issuecomment-1202718531
makeWrapper ${lib.getExe electron} $out/bin/feishin \
--add-flags $out/share/feishin/resources/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--set ELECTRON_FORCE_IS_PACKAGED=1 \
--inherit-argv0
for size in 32 64 128 256 512 1024; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
ln -s \
$out/share/feishin/resources/assets/icons/"$size"x"$size".png \
$out/share/icons/hicolor/"$size"x"$size"/apps/${pname}.png
done
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "feishin";
desktopName = "Feishin";
comment = "Full-featured Subsonic/Jellyfin compatible desktop music player";
icon = pname;
exec = "feishin %u";
categories = [
"Audio"
"AudioVideo"
];
mimeTypes = [ "x-scheme-handler/feishin" ];
})
];
meta = with lib; {
description = "Full-featured Subsonic/Jellyfin compatible desktop music player";
homepage = "https://github.com/jeffvli/feishin";
changelog = "https://github.com/jeffvli/feishin/releases/tag/v${version}";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.mit;
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
sourceProvenance = with sourceTypes; [ fromSource ];
license = licenses.gpl3Plus;
platforms = platforms.unix;
mainProgram = "feishin";
maintainers = with maintainers; [ onny ];
};
in
if stdenv.isDarwin
then callPackage ./darwin.nix (extraArgs // { inherit pname appname version meta; })
else callPackage ./linux.nix (extraArgs // { inherit pname appname version meta; })
}

View File

@ -1,71 +0,0 @@
{ stdenv
, meta
, lib
, fetchurl
, mpv
, graphicsmagick
, electron_24
, makeDesktopItem
, makeWrapper
, pname
, appname
, version
}:
let
icon = fetchurl {
url =
"https://github.com/jeffvli/feishin/raw/development/assets/icons/1024x1024.png";
sha256 = "sha256-8Qigt1CNMa3SDVK2cdqWJuMSl19yfy6nPQfME4qA48I=";
};
desktopItem = makeDesktopItem {
name = "feishin";
desktopName = "Feishin";
comment = "Full-featured Subsonic/Jellyfin compatible desktop music player";
icon = "feishin";
exec = "feishin %u";
categories = [ "Audio" "AudioVideo" ];
mimeTypes = [ "x-scheme-handler/feishin" ];
};
in
stdenv.mkDerivation {
inherit pname version meta;
src = fetchurl {
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/${appname}-${version}-linux-x64.tar.xz";
hash = "sha256-uYswGxSXz2YddoFs5F7f+ywqAr7qXqp6WryQ7ENSawQ=";
};
nativeBuildInputs = [ makeWrapper graphicsmagick ];
# Installs mpv as a requirement
propagatedBuildInputs = [ mpv ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/share
cp -r resources $out/share/${pname}/
cp -r locales $out/share/${pname}/
makeWrapper ${electron_24}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/app.asar
install -m 444 -D "${desktopItem}/share/applications/"* \
-t $out/share/applications/
for size in 16 24 32 48 64 128 256 512; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
gm convert -resize "$size"x"$size" ${icon} $out/share/icons/hicolor/"$size"x"$size"/apps/${appname}.png
done
runHook postInstall
'';
shellHook = ''
set -x
export LD_LIBRARY_PATH=${mpv}/lib
set +x
'';
}

View File

@ -2,12 +2,12 @@
python3Packages.buildPythonApplication rec {
pname = "mopidy-jellyfin";
version = "1.0.4";
version = "1.0.5";
src = fetchPypi {
inherit version;
pname = "Mopidy-Jellyfin";
sha256 = "ny0u6HdOlZCsmIzZuQ1rql+bvHU3xkh8IdwhJVHNH9c=";
sha256 = "sha256-cZliraTxTAJ2dXaxttWI3x4wCkmEhEo33GTNtAYwgTc=";
};
propagatedBuildInputs = [ mopidy python3Packages.unidecode python3Packages.websocket-client ];

View File

@ -6,13 +6,13 @@
python3Packages.buildPythonApplication rec {
pname = "pyradio";
version = "0.9.3.1";
version = "0.9.3.2";
src = fetchFromGitHub {
owner = "coderholic";
repo = "pyradio";
rev = "refs/tags/${version}";
hash = "sha256-p3F4uN+hkxGp+216abUkFNM5uF/0e0sQHKk5WIpULso=";
hash = "sha256-aIWU68bdPUsIh8QRNnF0NcK7FemmYyUHbJg9KcUALBk=";
};
nativeBuildInputs = [

View File

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "vgmstream";
version = "1896";
version = "1917";
src = fetchFromGitHub {
owner = "vgmstream";
repo = "vgmstream";
rev = "refs/tags/r${version}";
sha256 = "sha256-1BWJgV631MxxzdUtK8f+XRb9cqfhjlwN2LgWI0VmIHE=";
sha256 = "sha256-9HIa5/whdLouUWNFml7tPfXStIkO76dxUl5S4yiat64=";
};
passthru.updateScript = nix-update-script {

View File

@ -38,11 +38,11 @@ let
in
stdenv.mkDerivation rec {
pname = "bisq-desktop";
version = "1.9.14";
version = "1.9.15";
src = fetchurl {
url = "https://github.com/bisq-network/bisq/releases/download/v${version}/Bisq-64bit-${version}.deb";
sha256 = "0xbq94qbp59523xjp80bly38aisfwkfi0y9hmyhf8xlw084b82kz";
sha256 = "0bz4yzfrzn9rwsmwwnsqdgxsqd42dyiz3vxi53qxj36h49nh8lzg";
};
nativeBuildInputs = [

View File

@ -20,13 +20,13 @@
stdenv.mkDerivation rec {
pname = "gridcoin-research";
version = "5.4.7.0";
version = "5.4.8.0";
src = fetchFromGitHub {
owner = "gridcoin-community";
repo = "Gridcoin-Research";
rev = "${version}";
sha256 = "sha256-wdXah7QnWohGAtC98exPSkhg5F3BaBOiFs6bklFxD7E=";
sha256 = "sha256-HZirzXkqM2aep+wq8k2UCFWHPtN0sBZXjamgt7RYPBo=";
};
nativeBuildInputs = [

View File

@ -6,19 +6,19 @@
buildGoModule rec {
pname = "optimism";
version = "1.7.2";
version = "1.7.3";
src = fetchFromGitHub {
owner = "ethereum-optimism";
repo = "optimism";
rev = "op-node/v${version}";
hash = "sha256-p3dbyszUeknAXrI1WqN9WS6AkEYQdVfMP90Kk/L41vM=";
hash = "sha256-KKCVjGBQeO5K6wq3GV3f7qaGY1uXNPI27w4DEC31pzU=";
fetchSubmodules = true;
};
subPackages = [ "op-node/cmd" "op-proposer/cmd" "op-batcher/cmd" ];
vendorHash = "sha256-24zj480UU9SYqr2mV6rCJ46gwLgzilLuhqrkNKHVR28=";
vendorHash = "sha256-pQhNXOYohBoV5QsBnNpNjFg+Vvk5jK1zvSKkolp4yiQ=";
buildInputs = [
libpcap

View File

@ -1,5 +1,7 @@
{ lib, stdenv, fetchurl, fetchpatch, zlib, ncurses }:
{ lib, gccStdenv, fetchurl, fetchpatch, zlib, ncurses }:
let stdenv = gccStdenv;
in
stdenv.mkDerivation rec {
pname = "aewan";
version = "1.0.01";

View File

@ -21,11 +21,21 @@
, gzip
, fontconfig
, freetype
, libbsd
, libpulseaudio
, libGL
, libdrm
, libpng
, libuuid
, libX11
, libxcb
, libxkbcommon
, xcbutilwm
, xcbutilrenderutil
, xcbutilkeysyms
, xcbutilimage
, xcbutilcursor
, libxkbfile
, libXcomposite
, libXcursor
, libXdamage
@ -51,6 +61,7 @@
, which
, runCommand
, xkeyboard_config
, xorg
, zlib
, makeDesktopItem
, tiling_wm # if we are using a tiling wm, need to set _JAVA_AWT_WM_NONREPARENTING in wrapper
@ -136,15 +147,27 @@ let
alsa-lib
dbus
expat
libbsd
libpulseaudio
libuuid
libX11
libxcb
libxkbcommon
xcbutilwm
xcbutilrenderutil
xcbutilkeysyms
xcbutilimage
xcbutilcursor
xorg.libICE
xorg.libSM
libxkbfile
libXcomposite
libXcursor
libXdamage
libXfixes
libGL
libdrm
libpng
nspr
nss_latest
systemd

View File

@ -4099,6 +4099,27 @@ let
sumneko.lua = callPackage ./sumneko.lua { };
supermaven.supermaven = buildVscodeMarketplaceExtension {
mktplcRef = {
hash = "sha256-O3AN8fy28ZSun+k6MJnJdFcmwDDE21ib+I9HtDE0JwU=";
name = "supermaven";
publisher = "supermaven";
version = "0.1.42";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/supermaven.supermaven/changelog";
description = "A Visual Studio Code extension for code completion suggestions";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=supermaven.supermaven";
homepage = "https://supermaven.com/";
license = lib.licenses.unfree;
longDescription = ''
Supermaven uses a 300,000 token context window to provide you the best code completion suggestions and the lowest latency.
With our extension you will get the fastest and best completions of any tool on the market.
'';
maintainers = [ lib.maintainers.msanft ];
};
};
svelte.svelte-vscode = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "svelte-vscode";

View File

@ -10,6 +10,7 @@
, fluidsynth
, freetype
, glib
, libicns
, libpcap
, libpng
, libslirp
@ -18,6 +19,7 @@
, makeWrapper
, ncurses
, pkg-config
, python3
, SDL2
, SDL2_net
, testers
@ -36,12 +38,29 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-EcAp7KyqXdBACEbPgkM1INoKeGVo7hMDUx97y2RcX+k=";
};
# sips is unavailable in sandbox, replacing with imagemagick breaks build due to wrong Foundation propagation(?) so don't generate resolution variants
# iconutil is unavailable, replace with png2icns from libicns
# Patch bad hardcoded compiler
# Don't mess with codesign, doesn't seem to work?
postPatch = ''
substituteInPlace Makefile.am \
--replace-fail 'sips' '## sips' \
--replace-fail 'iconutil -c icns -o contrib/macos/dosbox.icns src/dosbox.iconset' 'png2icns contrib/macos/dosbox.icns contrib/macos/dosbox-x.png' \
--replace-fail 'g++' "$CXX" \
--replace-fail 'codesign' '## codesign'
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
patchShebangs appbundledeps.py
'';
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
makeWrapper
pkg-config
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
libicns
python3
];
buildInputs = [
@ -75,9 +94,22 @@ stdenv.mkDerivation (finalAttrs: {
hardeningDisable = [ "format" ]; # https://github.com/joncampbell123/dosbox-x/issues/4436
# Build optional App Bundle target, which needs at least one arch-suffixed binary
postBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
cp src/dosbox-x src/dosbox-x-$(uname -m)
make dosbox-x.app
'';
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/dosbox-x \
--prefix PATH : ${lib.makeBinPath [ yad ]}
''
# Install App Bundle, wrap regular binary into bundle's binary to get the icon working
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
mv dosbox-x.app $out/Applications/
mv $out/bin/dosbox-x $out/Applications/dosbox-x.app/Contents/MacOS/dosbox-x
makeWrapper $out/Applications/dosbox-x.app/Contents/MacOS/dosbox-x $out/bin/dosbox-x
'';
passthru.tests.version = testers.testVersion {

View File

@ -11,13 +11,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "pineapple-pictures";
version = "0.7.3";
version = "0.7.4";
src = fetchFromGitHub {
owner = "BLumia";
repo = "pineapple-pictures";
rev = finalAttrs.version;
hash = "sha256-UZVpyrUFf/uJNs2GHLYXpb81e7yzC8EFuoD+0Bzj6xQ=";
hash = "sha256-aiQlcTID8mfrT4MEx4s5K+QmMHBlHOu2HfsValiH5qU=";
};
nativeBuildInputs = [

View File

@ -8,13 +8,13 @@
mkDerivation rec {
pname = "heimer";
version = "4.3.0";
version = "4.4.0";
src = fetchFromGitHub {
owner = "juzzlin";
repo = pname;
rev = version;
hash = "sha256-VIlNahpSRQNpfOKXnI/GQANuhZ+vnoXsudwHmRbHIjs=";
hash = "sha256-47bQmT2bHcbWpeosuF/vpSJcws4SqTmalY/XFEf7cxQ=";
};
nativeBuildInputs = [

View File

@ -3,20 +3,20 @@
}:
let
pname = "josm";
version = "19017";
version = "19039";
srcs = {
jar = fetchurl {
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
hash = "sha256-+PSsvauVe+e+qB7sz9AFmC/dZhWHFHe0zWYPEhgvRIQ=";
hash = "sha256-iH6g18lJrvfAvtkAaVPSK7vhgdU6oI7X10GkFcwpsBs=";
};
macosx = fetchurl {
url = "https://josm.openstreetmap.de/download/macosx/josm-macos-${version}-java17.zip";
hash = "sha256-QYvAC+W7gHC5unwfcbQ0sz5U1VkMwIIUkDWQK9vDe2A=";
url = "https://josm.openstreetmap.de/download/macosx/josm-macos-${version}-java21.zip";
hash = "sha256-yA+Qf76MbouiLdH9o1Ri8ptbG70YZoI13pBA9Ki61/0=";
};
pkg = fetchsvn {
url = "https://josm.openstreetmap.de/svn/trunk/native/linux/tested";
rev = version;
sha256 = "sha256-Pb4EAyvERz6kP3EmkgmUy/58KQHhBJmZJvpAj72GCIk=";
sha256 = "sha256-L7P6FtqKLB4e+ezPzXePM33qj5esNoRlTFXi0/GhdsA=";
};
};

View File

@ -108,13 +108,13 @@ in {
application = mkSweetHome3D rec {
pname = lib.toLower module + "-application";
version = "7.2";
version = "7.3";
module = "SweetHome3D";
description = "Design and visualize your future home";
license = lib.licenses.gpl2Plus;
src = fetchzip {
url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
hash = "sha256-RVuwxL/YATqHoQuc25ZaYgZ+o2rMOqnzU8/LLxb5Ra4=";
hash = "sha256-adMQzQE+xAZpMJyQFm01A+AfvcB5YHsJvk+533BUf1Q=";
};
desktopName = "Sweet Home 3D";
icons = {

View File

@ -1,21 +1,24 @@
# Expression generated by update.sh; do not edit it by hand!
{ stdenv, callPackage }:
{ stdenv, callPackage, ... }@args:
if stdenv.isAarch64 then
callPackage ./make-brave.nix { } {
pname = "brave";
version = "1.64.116";
url = "https://github.com/brave/brave-browser/releases/download/v1.64.116/brave-browser_1.64.116_arm64.deb";
hash = "sha256-XC3GnutiTYdCOJPegj8MRYC5dRrBoKBg4k50ZFrlj4E=";
platform = "aarch64-linux";
}
else if stdenv.isx86_64 then
callPackage ./make-brave.nix { } {
pname = "brave";
version = "1.64.116";
url = "https://github.com/brave/brave-browser/releases/download/v1.64.116/brave-browser_1.64.116_amd64.deb";
hash = "sha256-mnvFPfZu44TZGdUb+AxaJbecQrXkIzJkYvB4GO55uv0=";
platform = "x86_64-linux";
}
else
throw "Unsupported platform."
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ])
(
if stdenv.isAarch64 then
{
pname = "brave";
version = "1.64.122";
url = "https://github.com/brave/brave-browser/releases/download/v1.64.122/brave-browser_1.64.122_arm64.deb";
hash = "sha256-PBYiCTy/QaPfxvWAzUnXLEzBELISNSKX0kG/mYTDDEA=";
platform = "aarch64-linux";
}
else if stdenv.isx86_64 then
{
pname = "brave";
version = "1.64.122";
url = "https://github.com/brave/brave-browser/releases/download/v1.64.122/brave-browser_1.64.122_amd64.deb";
hash = "sha256-9tSoOn9XGbX/b8n9vD9Hmpi26jzmUVJomoCFdSJoaoU=";
platform = "x86_64-linux";
}
else
throw "Unsupported platform."
)

View File

@ -19,24 +19,27 @@ hashAmd64="$(nix hash to-sri --type sha256 \
cat > $SCRIPT_DIR/default.nix << EOF
# Expression generated by update.sh; do not edit it by hand!
{ stdenv, callPackage }:
{ stdenv, callPackage, ... }@args:
if stdenv.isAarch64 then
callPackage ./make-brave.nix { } {
pname = "brave";
version = "${latestVersionAarch64}";
url = "https://github.com/brave/brave-browser/releases/download/v${latestVersionAarch64}/brave-browser_${latestVersionAarch64}_arm64.deb";
hash = "${hashAarch64}";
platform = "aarch64-linux";
}
else if stdenv.isx86_64 then
callPackage ./make-brave.nix { } {
pname = "brave";
version = "${latestVersionAmd64}";
url = "https://github.com/brave/brave-browser/releases/download/v${latestVersionAmd64}/brave-browser_${latestVersionAmd64}_amd64.deb";
hash = "${hashAmd64}";
platform = "x86_64-linux";
}
else
throw "Unsupported platform."
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ])
(
if stdenv.isAarch64 then
{
pname = "brave";
version = "${latestVersionAarch64}";
url = "https://github.com/brave/brave-browser/releases/download/v${latestVersionAarch64}/brave-browser_${latestVersionAmd64}_arm64.deb";
hash = "${hashAarch64}";
platform = "aarch64-linux";
}
else if stdenv.isx86_64 then
{
pname = "brave";
version = "${latestVersionAmd64}";
url = "https://github.com/brave/brave-browser/releases/download/v${latestVersionAmd64}/brave-browser_${latestVersionAmd64}_amd64.deb";
hash = "${hashAmd64}";
platform = "x86_64-linux";
}
else
throw "Unsupported platform."
)
EOF

View File

@ -24,7 +24,7 @@ let
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
in stdenv.mkDerivation rec {
pname = "vivaldi";
version = "6.6.3271.55";
version = "6.6.3271.57";
suffix = {
aarch64-linux = "arm64";
@ -34,8 +34,8 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}-1_${suffix}.deb";
hash = {
aarch64-linux = "sha256-IqCmDqcZDLT1abx67gAsGHR8DVVIAGZ/sifZi8bxUNc=";
x86_64-linux = "sha256-n0CHm1Dtd2QhGNhI/9WzQ6CeCyMAHkBpOMC2w3ylk2g=";
aarch64-linux = "sha256-v/UG4eL/66i/0sSqN8JmJJIEjHzJjTTDZLRzLMJpJMA=";
x86_64-linux = "sha256-uVrEVf9mePqalU2OJRMj0Zy9d7jDXwsdMwEQhn9uUh8=";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "kubeseal";
version = "0.26.0";
version = "0.26.2";
src = fetchFromGitHub {
owner = "bitnami-labs";
repo = "sealed-secrets";
rev = "v${version}";
sha256 = "sha256-rOaczDGjocGpYEPJpMiveWE7sHU9L0Csx2nX0Z3IrBs=";
sha256 = "sha256-96yaWHRfEHjXYZ9Hsh9bXk5O5viSOYhmwJ18JCbtv2U=";
};
vendorHash = "sha256-UicMiSSSQzquNAHFpnWKbybimz3jjbBgWykhyRSU7ZI=";
vendorHash = "sha256-91GKy7tNKSOiJmpArgp56RXegYP7sdGpaRAxS9xwTXA=";
subPackages = [ "cmd/kubeseal" ];

View File

@ -167,9 +167,9 @@ rec {
mkTerraform = attrs: pluggable (generic attrs);
terraform_1 = mkTerraform {
version = "1.7.5";
hash = "sha256-k/ugXlHK7lEKfOpSBXQNUdcq26rVVdjo53U+7ChJLIc=";
vendorHash = "sha256-5sCf65gFpI3y+qwDYvD08OZHNsDMg2IuDL65NMsLQ4Y=";
version = "1.8.0";
hash = "sha256-An/ElR1tXQSb9x26R5o9gcb4XKTeVxlv+72Whcrdeoc=";
vendorHash = "sha256-xpgGceAA+kvwUp4T0m9rnbPoZ3uJHU2KIRsrcGr8dRo=";
patches = [ ./provider-path-0_15.patch ];
passthru = {
inherit plugins;

View File

@ -10,16 +10,16 @@
buildGoModule rec {
pname = "werf";
version = "1.2.305";
version = "1.2.307";
src = fetchFromGitHub {
owner = "werf";
repo = "werf";
rev = "v${version}";
hash = "sha256-WbSGbwm3/GXRZBvnleJYXxXBhIj+NwKAMLBZdUkf4PE=";
hash = "sha256-jT0QZIMHFhhMIhBj2kliRP0/B8BLYGZdojZ7THXnUmg=";
};
vendorHash = "sha256-BN2baLI91tJyGFEuuS9lAzKsKwPPpKm0eUK7Hxwbvkk=";
vendorHash = "sha256-2ZRyRgW42W/z6G5DfSMqbdXnW5TNcMdz385Dt7PWj6k=";
proxyVendor = true;

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "signalbackup-tools";
version = "20240406";
version = "20240412-2";
src = fetchFromGitHub {
owner = "bepaald";
repo = pname;
rev = version;
hash = "sha256-Yc6QlEtN73zy3onckxC80QOmSrW5MPn4+rnWE7WEPug=";
hash = "sha256-e+QA8pqMz/XH+JpKErGYWKwsxHoFPTsFrSremfOaVbg=";
};
postPatch = ''

View File

@ -20,18 +20,18 @@
stdenv.mkDerivation (finalAttrs: {
pname = "teams-for-linux";
version = "1.4.17";
version = "1.4.22";
src = fetchFromGitHub {
owner = "IsmaelMartinez";
repo = "teams-for-linux";
rev = "v${finalAttrs.version}";
hash = "sha256-fpz3JzJ6RaSajCwc44Uavln572mT5ixLnIK8FFoKWMg=";
hash = "sha256-eNd12p9QvuYpiy9FaGaMSfQ3qVYzmYyO2/v/rdV3nN8=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-/8Jxly02EZxp5JZ3mVlv01aWX53V9eSy0pvVMfpb9I0=";
hash = "sha256-jBwyIyiWeqNmOnxmVOr7c4oMWwHElEjM25sShhTMi78=";
};
nativeBuildInputs = [ yarn prefetch-yarn-deps nodejs copyDesktopItems makeWrapper ];

View File

@ -11,7 +11,7 @@
, configText ? ""
}:
let
version = "2312";
version = "2312.1";
sysArch =
if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
@ -36,8 +36,8 @@ let
pname = "vmware-horizon-files";
inherit version;
src = fetchurl {
url = "https://download3.vmware.com/software/CART24FQ4_LIN_2312_TARBALL/VMware-Horizon-Client-Linux-2312-8.12.0-23149323.tar.gz";
sha256 = "15ca1d6028b9ca88e23fa363a2942fd76456c19e95ced4734595c3dc44db38d8";
url = "https://download3.vmware.com/software/CART25FQ1_LIN_2312.1_TARBALL/VMware-Horizon-Client-Linux-2312.1-8.12.1-23543969.tar.gz";
sha256 = "23d18be2955ba60ab3cca941a529fa3b804af97ebf1602d246ca6147cced8135";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''

View File

@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
--replace '/opt/Morgen' $out/bin
makeWrapper ${electron}/bin/electron $out/bin/morgen \
--add-flags $out/opt/Morgen/resources/app.asar
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer}} $out/opt/Morgen/resources/app.asar"
runHook postInstall
'';

View File

@ -14,19 +14,21 @@
, botan2
, pkg-config
, nixosTests
, installShellFiles
, xvfb-run
}:
let
pname = "qownnotes";
appname = "QOwnNotes";
version = "24.4.0";
version = "24.4.1";
in
stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/pbek/QOwnNotes/releases/download/v${version}/qownnotes-${version}.tar.xz";
hash = "sha256-SxoZD5DYuPAJZwBiw38jZYI+e9FExj+TiUlczvbXkWA=";
hash = "sha256-E4tLlzjIOElsZr2jcbsnge5jJqKQ0kWf86tFonZ1+Zs=";
};
nativeBuildInputs = [
@ -34,6 +36,8 @@ stdenv.mkDerivation {
qttools
wrapQtAppsHook
pkg-config
installShellFiles
xvfb-run
] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
buildInputs = [
@ -49,9 +53,16 @@ stdenv.mkDerivation {
"USE_SYSTEM_BOTAN=1"
];
postInstall =
postInstall = ''
installShellCompletion --cmd ${appname} \
--bash <(xvfb-run $out/bin/${appname} --completion bash --allow-multiple-instances) \
--fish <(xvfb-run $out/bin/${appname} --completion fish --allow-multiple-instances)
installShellCompletion --cmd ${pname} \
--bash <(xvfb-run $out/bin/${appname} --completion bash --allow-multiple-instances) \
--fish <(xvfb-run $out/bin/${appname} --completion fish --allow-multiple-instances)
''
# Create a lowercase symlink for Linux
lib.optionalString stdenv.isLinux ''
+ lib.optionalString stdenv.isLinux ''
ln -s $out/bin/${appname} $out/bin/${pname}
''
# Wrap application for macOS as lowercase binary

View File

@ -12,13 +12,13 @@
stdenv.mkDerivation rec {
pname = "treesheets";
version = "unstable-2024-03-30";
version = "unstable-2024-04-11";
src = fetchFromGitHub {
owner = "aardappel";
repo = "treesheets";
rev = "f5b13ed93eacdd62851081d0730ec5f8b306c1e6";
sha256 = "CoIvJzfVmblMPH0J45ykpRF7CDLj/Dx+8MpkjiQkMkM=";
rev = "5e9e95a34221d4bda584d2130586177e29ee8fe7";
sha256 = "X0aB0rJZd9G8S+QWviSAdB/YQMT4lVV3yiELzZs+P3g=";
};
nativeBuildInputs = [

View File

@ -8,13 +8,13 @@
stdenvNoCC.mkDerivation rec {
pname = "cloudlog";
version = "2.6.7";
version = "2.6.8";
src = fetchFromGitHub {
owner = "magicbug";
repo = "Cloudlog";
rev = version;
hash = "sha256-blWMfe/eqeccGE5dWVJWV7L1akWnhO3t5n8HbjlJIcA=";
hash = "sha256-8D8owjONUMpRpFqKvmxKERCprvHQ1DCavNfqW9VTKAE=";
};
postPatch = ''

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "minimap2";
version = "2.27";
version = "2.28";
src = fetchFromGitHub {
repo = pname;
owner = "lh3";
rev = "v${version}";
sha256 = "sha256-F6IJrYD2dk+5bKKVIahLiNnD/Hd/CjNQQd9zz0Gkans=";
sha256 = "sha256-cBl2BKgPCP/xHZW6fTH51cY9/lV/1HVLsN7a1R1Blv4=";
};
buildInputs = [ zlib ];

View File

@ -129,7 +129,7 @@ let
in stdenv.mkDerivation rec {
pname = "mujoco";
version = "3.1.3";
version = "3.1.4";
# Bumping version? Make sure to look though the MuJoCo's commit
# history for bumped dependency pins!
@ -137,7 +137,7 @@ in stdenv.mkDerivation rec {
owner = "google-deepmind";
repo = "mujoco";
rev = "refs/tags/${version}";
hash = "sha256-22yH3zAD479TRNS3XSqy6PuuLqyWmjvwScUTVfKumzY=";
hash = "sha256-VgD6ditMDpHki7l23Gjip2roA8Oi4MGpxl+4gSLTEFs=";
};
patches = [ ./mujoco-system-deps-dont-fetch.patch ];

View File

@ -27,7 +27,7 @@
}:
let
version = "1.17.0";
version = "1.17.1";
# build stimuli file for PGO build and the script to generate it
# independently of the foot's build, so we can cache the result
@ -99,7 +99,7 @@ stdenv.mkDerivation {
owner = "dnkl";
repo = "foot";
rev = version;
hash = "sha256-H4a9WQox7vD5HsY9PP0nrNDZtyaRFpsphsv8/qstNH8=";
hash = "sha256-B6RhzsOPwczPLJRx3gBFZZvklwx9IwqplRG2vsAPIlg=";
};
separateDebugInfo = true;

View File

@ -11,7 +11,7 @@
python3.pkgs.buildPythonApplication rec {
pname = "commitizen";
version = "3.21.3";
version = "3.22.0";
format = "pyproject";
disabled = python3.pythonOlder "3.8";
@ -20,7 +20,7 @@ python3.pkgs.buildPythonApplication rec {
owner = "commitizen-tools";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-4Wz7PRAdsBZ0nX0hxu1XB5Uc13oP1wl86j5V0iHPBoA=";
hash = "sha256-wDxhhPYElNPimVa+wX6AnTZrZOhWjuMzNJ6urn0wruk=";
};
pythonRelaxDeps = [

View File

@ -5,18 +5,18 @@
stdenv.mkDerivation rec {
pname = "flowblade";
version = "2.12.0.2";
version = "2.14.0.1";
src = fetchFromGitHub {
owner = "jliljebl";
repo = pname;
rev = "v${version}";
sha256 = "sha256-SZ/J03PYeAbqQlNQXdqLSduo/5VjQ7VH4eErJqO3Ua0=";
sha256 = "sha256-kyW/vYKGy/tgHmev8LgJbGugfKkzKFwLZStQQfWYPuQ=";
};
buildInputs = [
ffmpeg frei0r sox gtk3 ladspaPlugins
(python3.withPackages (ps: with ps; [ mlt pygobject3 dbus-python numpy pillow ]))
(python3.withPackages (ps: with ps; [ mlt pygobject3 dbus-python numpy pillow libusb1 ]))
];
nativeBuildInputs = [ gobject-introspection makeWrapper wrapGAppsHook ];

View File

@ -67,6 +67,7 @@ let
chapterskip = callPackage ./chapterskip.nix { };
convert = callPackage ./convert.nix { };
cutter = callPackage ./cutter.nix { };
dynamic-crop = callPackage ./dynamic-crop.nix { };
inhibit-gnome = callPackage ./inhibit-gnome.nix { };
modernx = callPackage ./modernx.nix { };
modernx-zydezu = callPackage ./modernx-zydezu.nix { };

View File

@ -0,0 +1,26 @@
{ lib
, fetchFromGitHub
, unstableGitUpdater
, buildLua
}:
buildLua {
pname = "dynamic-crop";
version = "0-unstable-2023-12-22";
src = fetchFromGitHub {
owner = "Ashyni";
repo = "mpv-scripts";
rev = "c79a46ba03631eb2a9b4f598aab0b723f03fc531";
hash = "sha256-W4Dj2tyJHeHLqAndrzllKs4iwMe3Tu8rfzEGBHuke6s=";
};
passthru.scriptName = "dynamic-crop.lua";
passthru.updateScript = unstableGitUpdater { };
meta = {
description = ''Script to "cropping" dynamically, hard-coded black bars detected with lavfi-cropdetect filter for Ultra Wide Screen or any screen (Smartphone/Tablet).'';
homepage = "https://github.com/Ashyni/mpv-scripts";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.iynaix ];
};
}

View File

@ -294,9 +294,23 @@ rec {
};
docker_25 = callPackage dockerGen rec {
version = "25.0.3";
version = "25.0.5";
cliRev = "v${version}";
cliHash = "sha256-Jvb0plV1O/UzrcpzN4zH5OulmTVF+p9UQQQ9xqkiObQ=";
cliHash = "sha256-CACMi3bXUN6oGc2f/Z+lNQqMgQ4llRWPRKgijdpiPGg=";
mobyRev = "v${version}";
mobyHash = "sha256-4QGz22fXxyAD77pyUWb2lF3VKqxmPIrGqcJGoyrEHew=";
runcRev = "v1.1.12";
runcHash = "sha256-N77CU5XiGYIdwQNPFyluXjseTeaYuNJ//OsEUS0g/v0=";
containerdRev = "v1.7.13";
containerdHash = "sha256-y3CYDZbA2QjIn1vyq/p1F1pAVxQHi/0a6hGWZCRWzyk=";
tiniRev = "v0.19.0";
tiniHash = "sha256-ZDKu/8yE5G0RYFJdhgmCdN3obJNyRWv6K/Gd17zc1sI=";
};
docker_26 = callPackage dockerGen rec {
version = "26.0.0";
cliRev = "v${version}";
cliHash = "sha256-jGg/AVnIzI8e+DdF0uKlSZApRxcwuOjCQpfnBaCY4fI=";
mobyRev = "v${version}";
mobyHash = "sha256-cDlRVdQNzH/X2SJUYHK1QLUHlKQtSyRYCVbz3wPx1ZM=";
runcRev = "v1.1.12";
@ -306,4 +320,5 @@ rec {
tiniRev = "v0.19.0";
tiniHash = "sha256-ZDKu/8yE5G0RYFJdhgmCdN3obJNyRWv6K/Gd17zc1sI=";
};
}

View File

@ -0,0 +1,57 @@
From: Geoffrey McRae <geoff@hostfission.com>
Date: Wed, 13 Mar 2024 11:17:25 +1100
Subject: [PATCH] [client] cmake: move X11 config directives to
`displayservers`
---
client/CMakeLists.txt | 7 -------
client/displayservers/CMakeLists.txt | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git client/CMakeLists.txt client/CMakeLists.txt
index 3755adcf..eeeb3eb0 100644
--- client/CMakeLists.txt
+++ client/CMakeLists.txt
@@ -42,19 +42,12 @@ add_feature_info(ENABLE_ASAN ENABLE_ASAN "AddressSanitizer support.")
option(ENABLE_UBSAN "Build with UndefinedBehaviorSanitizer" OFF)
add_feature_info(ENABLE_UBSAN ENABLE_UBSAN "UndefinedBehaviorSanitizer support.")
-option(ENABLE_X11 "Build with X11 support" ON)
-add_feature_info(ENABLE_X11 ENABLE_X11 "X11 support.")
-
option(ENABLE_PIPEWIRE "Build with PipeWire audio output support" ON)
add_feature_info(ENABLE_PIPEWIRE ENABLE_PIPEWIRE "PipeWire audio support.")
option(ENABLE_PULSEAUDIO "Build with PulseAudio audio output support" ON)
add_feature_info(ENABLE_PULSEAUDIO ENABLE_PULSEAUDIO "PulseAudio audio support.")
-if (NOT ENABLE_X11 AND NOT ENABLE_WAYLAND)
- message(FATAL_ERROR "Either ENABLE_X11 or ENABLE_WAYLAND must be on")
-endif()
-
add_compile_options(
"-Wall"
"-Wextra"
diff --git client/displayservers/CMakeLists.txt client/displayservers/CMakeLists.txt
index 5b5f827a..e7c4b25a 100644
--- client/displayservers/CMakeLists.txt
+++ client/displayservers/CMakeLists.txt
@@ -18,9 +18,16 @@ function(add_displayserver name)
add_subdirectory(${name})
endfunction()
+option(ENABLE_X11 "Build with X11 support" ON)
+add_feature_info(ENABLE_X11 ENABLE_X11 "X11 support.")
+
option(ENABLE_WAYLAND "Build with Wayland support" ON)
add_feature_info(ENABLE_WAYLAND ENABLE_WAYLAND "Wayland support.")
+if (NOT ENABLE_X11 AND NOT ENABLE_WAYLAND)
+ message(FATAL_ERROR "Either ENABLE_X11 or ENABLE_WAYLAND must be on")
+endif()
+
# Add/remove displayservers here!
if (ENABLE_WAYLAND)
add_displayserver(Wayland)
--
2.43.1

View File

@ -22,6 +22,7 @@
, libXinerama
, libXcursor
, libXpresent
, libXdmcp
, wayland
, wayland-protocols
@ -30,6 +31,7 @@
, pulseaudio
, libsamplerate
, openGLSupport ? true
, xorgSupport ? true
, waylandSupport ? true
, pipewireSupport ? true
@ -43,35 +45,39 @@ let
type = "Application";
exec = "looking-glass-client";
icon = "lg-logo";
terminal = true;
};
in
stdenv.mkDerivation rec {
pname = "looking-glass-client";
version = "B6";
version = "B7-rc1";
src = fetchFromGitHub {
owner = "gnif";
repo = "LookingGlass";
rev = version;
sha256 = "sha256-6vYbNmNJBCoU23nVculac24tHqH7F4AZVftIjL93WJU=";
sha256 = "sha256-ne1Q+67+P8RHcTsqdiSSwkFf0g3pSNT91WN/lsSzssU=";
fetchSubmodules = true;
};
patches = [
# Fix failing cmake assertion when disabling X11 whithout explicitly enabling Wayland.
./0001-client-cmake-move-X11-config-directives-to-displayse.patch
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libGL libX11 freefont_ttf spice-protocol expat libbfd nettle fontconfig libffi ]
++ lib.optionals xorgSupport [ libxkbcommon libXi libXScrnSaver libXinerama libXcursor libXpresent libXext libXrandr ]
buildInputs = [ libX11 libGL freefont_ttf spice-protocol expat libbfd nettle fontconfig libffi ]
++ lib.optionals xorgSupport [ libxkbcommon libXi libXScrnSaver libXinerama libXcursor libXpresent libXext libXrandr libXdmcp ]
++ lib.optionals waylandSupport [ libxkbcommon wayland wayland-protocols ]
++ lib.optionals pipewireSupport [ pipewire libsamplerate ]
++ lib.optionals pulseSupport [ pulseaudio libsamplerate ];
cmakeFlags = [ "-DOPTIMIZE_FOR_NATIVE=OFF" ]
++ lib.optional (!xorgSupport) "-DENABLE_X11=no"
++ lib.optional (!waylandSupport) "-DENABLE_WAYLAND=no"
++ lib.optional (!pulseSupport) "-DENABLE_PULSEAUDIO=no"
++ lib.optional (!pipewireSupport) "-DENABLE_PIPEWIRE=no";
++ lib.optionals (!openGLSupport) [ "-DENABLE_OPENGL=no" ]
++ lib.optionals (!xorgSupport) [ "-DENABLE_X11=no" ]
++ lib.optionals (!waylandSupport) [ "-DENABLE_WAYLAND=no" ]
++ lib.optionals (!pulseSupport) [ "-DENABLE_PULSEAUDIO=no" ]
++ lib.optionals (!pipewireSupport) [ "-DENABLE_PIPEWIRE=no" ];
postUnpack = ''
echo ${src.rev} > source/VERSION

View File

@ -49,13 +49,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "hyprland" + lib.optionalString debug "-debug";
version = "0.37.1";
version = "0.38.1";
src = fetchFromGitHub {
owner = "hyprwm";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
hash = "sha256-W+34KhCnqscRXN/IkvuJMiVx0Fa64RcYn8H4sZjzceI=";
hash = "sha256-6y422rx8ScSkjR1dNYGYUxBmFewRYlCz9XZZ+XrVZng=";
};
patches = [
@ -73,7 +73,7 @@ stdenv.mkDerivation (finalAttrs: {
--replace "@HASH@" '${finalAttrs.src.rev}' \
--replace "@BRANCH@" "" \
--replace "@MESSAGE@" "" \
--replace "@DATE@" "2024-03-16" \
--replace "@DATE@" "2024-04-06" \
--replace "@TAG@" "" \
--replace "@DIRTY@" ""
'';

View File

@ -24,13 +24,13 @@ let
hy3 = { fetchFromGitHub, cmake, hyprland }:
mkHyprlandPlugin hyprland {
pluginName = "hy3";
version = "0.36.0-unstable-2024-03-06";
version = "0.38.0";
src = fetchFromGitHub {
owner = "outfoxxed";
repo = "hy3";
rev = "a392bfd13caf865ccf6b9df6917b67cc3a054b82";
hash = "sha256-QuapQR9DJI9+vt7xqULYIXx2QCCX1I/YB50c+7ReexU=";
rev = "hl0.38.0";
hash = "sha256-ZVwX5yM97R6MLk64dQG5KqYOR4L4HxEEV+xzQi+NGrk=";
};
nativeBuildInputs = [ cmake ];

View File

@ -20,12 +20,12 @@
stdenv.mkDerivation rec {
pname = "phosh-mobile-settings";
version = "0.37.0";
version = "0.38.0";
src = fetchurl {
# This tarball includes the meson wrapped subproject 'gmobile'.
url = "https://sources.phosh.mobi/releases/${pname}/${pname}-${version}.tar.xz";
hash = "sha256-HW3wM/lb8pvr+eDoeqa0iHXiKhBQ8ybBIy0wwHPsrOg=";
hash = "sha256-WDqgVsJx5y6IlWII9fRBsAeWn/tB8BaXRtlPvA0wmMk=";
};
nativeBuildInputs = [

View File

@ -20,11 +20,7 @@ recurseIntoAttrs {
concat = callPackage ./concat-test.nix {};
linkFarm = callPackage ./link-farm.nix {};
overriding = callPackage ../test-overriding.nix {};
# VM test not supported beyond linux yet
references =
if stdenv.hostPlatform.isLinux
then references
else {};
inherit references;
writeCBin = callPackage ./writeCBin.nix {};
writeClosure-union = callPackage ./writeClosure-union.nix {
inherit (references) samples;

View File

@ -1,33 +1,37 @@
{ lib
, fetchFromGitHub
, python3
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "audiness";
version = "0.3.1";
version = "0.3.2";
pyproject = true;
src = fetchFromGitHub {
owner = "audiusGmbH";
repo = "audiness";
rev = "refs/tags/${version}";
hash = "sha256-r+xWwXRKuTp5ifUUlF1K6BIVWh67hNLMBKBB7wnLLAM=";
hash = "sha256-vc2k3oEMTgzm/C6z6BieRrT3cSP0IkY+D3RXkNGaZTE=";
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
pythonRelaxDeps = [ "validators" ];
propagatedBuildInputs = with python3.pkgs; [
pytenable
typer
validators
] ++ typer.optional-dependencies.all;
build-system = with python3.pkgs; [ poetry-core ];
pythonImportsCheck = [
"audiness"
];
nativeBuildInputs = with python3.pkgs; [ pythonRelaxDepsHook ];
dependencies =
with python3.pkgs;
[
pytenable
typer
validators
]
++ typer.optional-dependencies.all;
pythonImportsCheck = [ "audiness" ];
meta = with lib; {
description = "CLI tool to interact with Nessus";

View File

@ -2,13 +2,13 @@
buildDotnetModule rec {
pname = "Boogie";
version = "3.1.3";
version = "3.1.4";
src = fetchFromGitHub {
owner = "boogie-org";
repo = "boogie";
rev = "v${version}";
sha256 = "sha256-vGlRexnYdL14iMOJvGcavI/ZQjAlGu08VeeE2SXujOw=";
sha256 = "sha256-XKggNmyhY3ZwbmMvi78MPz36iulW1QPJRENW/LGgdts=";
};
projectFile = [ "Source/Boogie.sln" ];

View File

@ -16,7 +16,6 @@
, npm-lockfile-fix
, overrideSDK
, darwin
, fetchpatch
}:
let
@ -25,26 +24,18 @@ let
buildNpmPackage.override {
stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
};
# update package-lock to fix build errors. this will be resolved in the
# next patch version of Bruno at which point the patch can be removed entirely.
# upstream PR: https://github.com/usebruno/bruno/pull/1894
brunoLockfilePatch_1_12_2 = fetchpatch {
url = "https://github.com/usebruno/bruno/pull/1894/commits/e3bab23446623315ee674283285a86e210778fe7.patch";
hash = "sha256-8rYBvgu9ZLXjb9AFyk4yMBVjcyFPmlNi66YEaQGQaKw=";
};
in
buildNpmPackage' rec {
pname = "bruno";
version = "1.12.2";
version = "1.12.3";
src = fetchFromGitHub {
owner = "usebruno";
repo = "bruno";
rev = "v${version}";
hash = "sha256-C/WeEloUGF0PEfeanm6lHe/MgpcF+g/ZY2tnqXFl9LA=";
hash = "sha256-ubvsTJ/MSEguVeJg91LvgARWte+p5MHdqhXIVqbyPhQ=";
postFetch = ''
patch -d $out <${brunoLockfilePatch_1_12_2}
${lib.getExe npm-lockfile-fix} $out/package-lock.json
'';
};

View File

@ -0,0 +1,24 @@
{ fetchFromGitHub, lib, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "cargo-shear";
version = "0.0.24";
src = fetchFromGitHub {
owner = "Boshen";
repo = "cargo-shear";
rev = "v${version}";
sha256 = "sha256-7eBFDmeFOXqZhNE4RDlIq991xEoCGL6XLMmUQuLJvrE=";
};
cargoSha256 = "sha256-DQjLW6NtUPERT82zIlrGRk3FffU/EfLBMgAeFfFdDxE=";
meta = with lib; {
description = "Detect and remove unused dependencies from Cargo.toml";
mainProgram = "cargo-shear";
homepage = "https://github.com/Boshen/cargo-shear";
changelog = "https://github.com/Boshen/cargo-shear/blob/${src.rev}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ uncenter ];
};
}

View File

@ -5,16 +5,16 @@
buildGoModule rec {
pname = "cert-viewer";
version = "0.9.0";
version = "0.9.1";
src = fetchFromGitHub {
owner = "mgit-at";
repo = "cert-viewer";
rev = "refs/tags/v${version}";
hash = "sha256-q4FLKH0ZA/79zLo7dt+CSOjfKyygTiQKSuungQTtue0=";
hash = "sha256-6IPr2BG3y/7cmc2WkeeFDpQ59GNU1eOhhm49HE2w0cA=";
};
vendorHash = "sha256-55zDUAe5s+03/OnDcK1DqmMUpFO2sBaVjEk6vbrHgzY=";
vendorHash = "sha256-jNT04bYH5L/Zcfvel673zr2UJLayCO443tvBGZjrBZk=";
meta = {
description = "Admin tool to view and inspect multiple x509 Certificates";

View File

@ -44,13 +44,13 @@ in
stdenv.mkDerivation rec {
pname = "cockpit";
version = "314";
version = "315";
src = fetchFromGitHub {
owner = "cockpit-project";
repo = "cockpit";
rev = "refs/tags/${version}";
hash = "sha256-6iLfUqzBG/pvGNnzMJzMQqnNjPvKJtTHHCSBWtSwwFM=";
hash = "sha256-N6MDqhYQky80r9wSiDIPusg6iOpDh4S52pf337nojyY=";
fetchSubmodules = true;
};

View File

@ -1,49 +1,41 @@
{ lib
, mkDerivationWith
{ stdenv
, lib
, python3Packages
, fetchFromGitHub
, fetchpatch
, wrapQtAppsHook
, ffmpeg
, qtbase
, libsForQt5
, testers
, corrscope
}:
mkDerivationWith python3Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = "corrscope";
version = "0.8.1";
format = "pyproject";
version = "0.9.0";
pyproject = true;
src = fetchFromGitHub {
owner = "corrscope";
repo = "corrscope";
rev = version;
hash = "sha256-pS7upOYZAjgR3lWxny8TNZEj3Rrbg+L90ANZWFO9UPQ=";
hash = "sha256-kOPhVm4epIhBSsgQVKNCoQ7DZcMG/b3sapxwwKo/V+U=";
};
patches = [
# https://github.com/corrscope/corrscope/pull/446
(fetchpatch {
name = "remove-setuptools-dependency.patch";
url = "https://github.com/corrscope/corrscope/commit/70b123173a7a012d9f29d6d3a8960b85caf6cc79.patch";
hash = "sha256-YCtb7v8cGP0pdceAKeoempnRzw+LRKQqDb3AfN0z/9s=";
})
];
pythonRelaxDeps = [ "attrs" "ruamel.yaml" ];
nativeBuildInputs = [
nativeBuildInputs = (with libsForQt5; [
wrapQtAppsHook
] ++ (with python3Packages; [
]) ++ (with python3Packages; [
poetry-core
pythonRelaxDepsHook
]);
buildInputs = [
ffmpeg
] ++ (with libsForQt5; [
qtbase
];
] ++ lib.optionals stdenv.hostPlatform.isLinux [
qtwayland
]);
propagatedBuildInputs = with python3Packages; [
appdirs

View File

@ -7,16 +7,16 @@
}:
let
openShiftVersion = "4.14.12";
okdVersion = "4.14.0-0.okd-scos-2024-01-10-151818";
microshiftVersion = "4.14.12";
openShiftVersion = "4.15.3";
okdVersion = "4.15.0-0.okd-2024-02-23-163410";
microshiftVersion = "4.15.3";
podmanVersion = "4.4.4";
writeKey = "$(MODULEPATH)/pkg/crc/segment.WriteKey=cvpHsNcmGCJqVzf6YxrSnVlwFSAZaYtp";
gitCommit = "c43b172866bc039a2a23d6c88aeb398635dc16ef";
gitHash = "sha256-DVsXxgywPrrdxfmXh3JR8YpFkv1/Y2LvDZ9/2nVbclc=";
gitCommit = "b470b5f68269c93abee8d7139cbd3e3fe3419f93";
gitHash = "sha256-80B6eGPnAAeUdKzk9/8VDHjv9tUh85rZSki9PSzqVvg=";
in
buildGoModule rec {
version = "2.33.0";
version = "2.34.1";
pname = "crc";
src = fetchFromGitHub {

View File

@ -8,16 +8,16 @@
buildGoModule rec {
pname = "crossplane-cli";
version = "1.15.1";
version = "1.15.2";
src = fetchFromGitHub {
owner = "crossplane";
repo = "crossplane";
rev = "v${version}";
hash = "sha256-MuPJjVM8Nxm9PLTE3+7KGwmvXJTLfNj5RCh+/kHR0GM=";
hash = "sha256-jNaWedK9h4pP+0u1UDHoZ/7l6kVXA2g9Vs0036itk9Q=";
};
vendorHash = "sha256-+e3NuSCvUgZANDB9LsvlQn3h9+L1NeQeURKDZd21reo=";
vendorHash = "sha256-vYbTkdX3L/AZN9vWUw8NzkPk16BwUzP8zJb22fnsoRo=";
ldflags = [
"-s"

View File

@ -0,0 +1,70 @@
{ lib
, stdenv
, fetchYarnDeps
, fetchFromGitHub
, prefetch-yarn-deps
, nodejs
, python3
, makeWrapper
, git
, docker
, yarn
, docker-compose
}:
stdenv.mkDerivation (finalAttrs: {
pname = "devcontainer";
version = "0.58.0";
src = fetchFromGitHub {
owner = "devcontainers";
repo = "cli";
rev = "v${finalAttrs.version}";
hash = "sha256-pnhyyTJMSlTdMsSFzbmZ6SkGdbfr9qCIkrBxxSM42UE=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-Wy0UP8QaQzZ1par7W5UhnRLc5DF2PAif0JIZJtRokBk=";
};
nativeBuildInputs = [ yarn prefetch-yarn-deps python3 makeWrapper ];
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
yarn config --offline set yarn-offline-mirror ${finalAttrs.yarnOfflineCache}
# Without this, yarn will try to download the dependencies
fixup-yarn-lock yarn.lock
# set nodedir to prevent node-gyp from downloading headers
export npm_config_nodedir=${nodejs}
yarn --offline --frozen-lockfile
yarn --offline --frozen-lockfile compile-prod
mkdir -p $out/bin
mkdir -p $out/libexec
cp -r dist $out/libexec
cp devcontainer.js $out/libexec/devcontainer.js
cp -r node_modules $out/libexec/node_modules
cp -r $src/scripts $out/libexec/scripts
runHook postBuild
'';
postInstall = ''
makeWrapper "${nodejs}/bin/node" "$out/bin/devcontainer" \
--add-flags "$out/libexec/devcontainer.js" \
--prefix PATH : ${lib.makeBinPath [ git docker docker-compose ]}
'';
meta = with lib; {
description = "Dev container CLI, run and manage your dev environments via a devcontainer.json";
homepage = "https://containers.dev/";
license = licenses.mit;
maintainers = with maintainers; [ rucadi ];
platforms = platforms.unix;
mainProgram = "devcontainer";
};
})

View File

@ -1,6 +1,6 @@
{ version
, dmdSha256
, phobosSha256
, dmdHash
, phobosHash
}:
{ stdenv
@ -22,7 +22,7 @@
, git
, unzip
, dmdBootstrap ? callPackage ./bootstrap.nix { }
, dmd_bin ? "${dmdBootstrap}/bin"
, dmdBin ? "${dmdBootstrap}/bin"
}:
let
@ -45,7 +45,7 @@ let
pathToDmd = "\${NIX_BUILD_TOP}/dmd/generated/${osname}/release/${bits}/dmd";
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "dmd";
inherit version;
@ -55,15 +55,15 @@ stdenv.mkDerivation rec {
(fetchFromGitHub {
owner = "dlang";
repo = "dmd";
rev = "v${version}";
sha256 = dmdSha256;
rev = "v${finalAttrs.version}";
hash = dmdHash;
name = "dmd";
})
(fetchFromGitHub {
owner = "dlang";
repo = "phobos";
rev = "v${version}";
sha256 = phobosSha256;
rev = "v${finalAttrs.version}";
hash = phobosHash;
name = "phobos";
})
];
@ -80,7 +80,7 @@ stdenv.mkDerivation rec {
url = "https://github.com/dlang/dmd/commit/c4d33e5eb46c123761ac501e8c52f33850483a8a.patch";
stripLen = 1;
extraPrefix = "dmd/";
sha256 = "sha256-N21mAPfaTo+zGCip4njejasraV5IsWVqlGR5eOdFZZE=";
hash = "sha256-N21mAPfaTo+zGCip4njejasraV5IsWVqlGR5eOdFZZE=";
})
];
@ -102,18 +102,14 @@ stdenv.mkDerivation rec {
# https://issues.dlang.org/show_bug.cgi?id=23317
rm dmd/compiler/test/runnable/cdvecfill.sh
rm dmd/compiler/test/compilable/cdcmp.d
''
+ lib.optionalString (lib.versionAtLeast version "2.089.0" && lib.versionOlder version "2.092.2") ''
'' + lib.optionalString (lib.versionAtLeast version "2.089.0" && lib.versionOlder version "2.092.2") ''
rm dmd/compiler/test/dshell/test6952.d
'' + lib.optionalString (lib.versionAtLeast version "2.092.2") ''
substituteInPlace dmd/compiler/test/dshell/test6952.d --replace "/usr/bin/env bash" "${bash}/bin/bash"
''
+ lib.optionalString stdenv.isLinux ''
substituteInPlace phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
substituteInPlace dmd/compiler/test/dshell/test6952.d --replace-fail "/usr/bin/env bash" "${bash}/bin/bash"
'' + lib.optionalString stdenv.isLinux ''
substituteInPlace phobos/std/socket.d --replace-fail "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
substituteInPlace phobos/std/socket.d --replace-fail "foreach (name; names)" "names = []; foreach (name; names)"
'';
nativeBuildInputs = [
@ -148,24 +144,23 @@ stdenv.mkDerivation rec {
runHook preBuild
export buildJobs=$NIX_BUILD_CORES
if [ -z $enableParallelBuilding ]; then
buildJobs=1
fi
[ -z "$enableParallelBuilding" ] && buildJobs=1
${dmd_bin}/rdmd dmd/compiler/src/build.d -j$buildJobs HOST_DMD=${dmd_bin}/dmd $buildFlags
make -C dmd/druntime -f posix.mak DMD=${pathToDmd} $buildFlags -j$buildJobs
${dmdBin}/rdmd dmd/compiler/src/build.d -j$buildJobs $buildFlags \
HOST_DMD=${dmdBin}/dmd
make -C dmd/druntime -j$buildJobs DMD=${pathToDmd} $buildFlags
echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
echo ${lib.getLib curl}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > LibcurlPathFile
make -C phobos -f posix.mak $buildFlags -j$buildJobs DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD"
echo ${lib.getLib curl}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} \
> LibcurlPathFile
make -C phobos -j$buildJobs $buildFlags \
DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD"
runHook postBuild
'';
doCheck = true;
checkFlags = buildFlags;
# many tests are disbled because they are failing
# many tests are disabled because they are failing
# NOTE: Purity check is disabled for checkPhase because it doesn't fare well
# with the DMD linker. See https://github.com/NixOS/nixpkgs/issues/97420
@ -173,15 +168,14 @@ stdenv.mkDerivation rec {
runHook preCheck
export checkJobs=$NIX_BUILD_CORES
if [ -z $enableParallelChecking ]; then
checkJobs=1
fi
[ -z "$enableParallelChecking" ] && checkJobs=1
CC=$CXX HOST_DMD=${pathToDmd} NIX_ENFORCE_PURITY= \
${dmdBin}/rdmd dmd/compiler/test/run.d -j$checkJobs
NIX_ENFORCE_PURITY= \
make -C dmd/compiler/test $checkFlags CC=$CXX SHELL=$SHELL -j$checkJobs N=$checkJobs
NIX_ENFORCE_PURITY= \
make -C phobos -f posix.mak unittest $checkFlags -j$checkJobs DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD"
make -C phobos unittest -j$checkJobs $checkFlags \
DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$PWD"
runHook postCheck
'';
@ -200,7 +194,7 @@ stdenv.mkDerivation rec {
cp phobos/generated/${osname}/release/${bits}/libphobos2.* $out/lib/
wrapProgram $out/bin/dmd \
--prefix PATH ":" "${targetPackages.stdenv.cc}/bin" \
--prefix PATH : "${targetPackages.stdenv.cc}/bin" \
--set-default CC "${targetPackages.stdenv.cc}/bin/cc"
substitute ${dmdConfFile} "$out/bin/dmd.conf" --subst-var out
@ -209,19 +203,19 @@ stdenv.mkDerivation rec {
'';
preFixup = ''
find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${dmd_bin}/dmd '{}' +
find $out/bin -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${dmdBin}/dmd '{}' +
'';
disallowedReferences = [ dmdBootstrap ];
meta = with lib; {
description = "Official reference compiler for the D language";
mainProgram = "dmd";
homepage = "https://dlang.org/";
# Everything is now Boost licensed, even the backend.
# https://github.com/dlang/dmd/pull/6680
license = licenses.boost;
mainProgram = "dmd";
maintainers = with maintainers; [ lionello dukc jtbx ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
};
}
})

View File

@ -0,0 +1,5 @@
import ./generic.nix {
version = "2.108.0";
dmdHash = "sha256-tlWcFgKtXzfqMMkOq4ezhZHdYCXFckjN5+m6jO4VH0U=";
phobosHash = "sha256-uU8S4rABOfhpKh+MvSbclkbdf0hrsuKF8SIpWMnPpfU=";
}

View File

@ -8,13 +8,13 @@ let
in buildDotnetModule rec {
pname = "dotnet-outdated";
version = "4.6.0";
version = "4.6.1";
src = fetchFromGitHub {
owner = "dotnet-outdated";
repo = pname;
rev = "v${version}";
hash = "sha256-U5qCM+Um8bRafrDpbI5TnSN1nQ8mQpZ5W8Jao2hdAPw=";
hash = "sha256-cYEW++XKCBhB4fyGj4bDKOBuQ1CJwm9CfZfiZUiy7Sw=";
};
inherit dotnet-sdk;

View File

@ -13,13 +13,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "doublecmd";
version = "1.1.11";
version = "1.1.12";
src = fetchFromGitHub {
owner = "doublecmd";
repo = "doublecmd";
rev = "v${finalAttrs.version}";
hash = "sha256-8kxaJp9mSJ6fHOgVD5iFjecUU0Kt10KCAVSYMQt+bSw=";
hash = "sha256-8wwYyZ9Uq65jEmgA1yO001YSZuDLnXLrFjK6WIsppwU=";
};
nativeBuildInputs = [

View File

@ -0,0 +1,11 @@
--- a/rdmd_test.d
+++ b/rdmd_test.d
@@ -616,7 +616,7 @@ void runTests(string rdmdApp, string compiler, string model)
enforce(res.status == 1, res.output);
}
- version (Posix)
+ version (none)
{
import std.conv : to;
auto makeVersion = execute(["make", "--version"]).output.splitLines()[0];

View File

@ -0,0 +1,102 @@
Adapted from https://github.com/dlang/tools/commit/6c6a042d1b08e3ec1790bd07a7f69424625ee866.patch
--- /dev/null
+++ b/osmodel.mak
@@ -0,0 +1,75 @@
+# osmodel.mak
+#
+# Detects and sets the macros:
+#
+# OS = one of {osx,linux,freebsd,openbsd,netbsd,dragonflybsd,solaris}
+# MODEL = one of { 32, 64 }
+# MODEL_FLAG = one of { -m32, -m64 }
+# ARCH = one of { x86, x86_64, aarch64 }
+#
+# Note:
+# Keep this file in sync between druntime, phobos, and dmd repositories!
+# Source: https://github.com/dlang/dmd/blob/master/src/osmodel.mak
+
+
+ifeq (,$(OS))
+ uname_S:=$(shell uname -s)
+ ifeq (Darwin,$(uname_S))
+ OS:=osx
+ endif
+ ifeq (Linux,$(uname_S))
+ OS:=linux
+ endif
+ ifeq (FreeBSD,$(uname_S))
+ OS:=freebsd
+ endif
+ ifeq (OpenBSD,$(uname_S))
+ OS:=openbsd
+ endif
+ ifeq (NetBSD,$(uname_S))
+ OS:=netbsd
+ endif
+ ifeq (DragonFly,$(uname_S))
+ OS:=dragonflybsd
+ endif
+ ifeq (Solaris,$(uname_S))
+ OS:=solaris
+ endif
+ ifeq (SunOS,$(uname_S))
+ OS:=solaris
+ endif
+ ifeq (,$(OS))
+ $(error Unrecognized or unsupported OS for uname: $(uname_S))
+ endif
+endif
+
+# When running make from XCode it may set environment var OS=MACOS.
+# Adjust it here:
+ifeq (MACOS,$(OS))
+ OS:=osx
+endif
+
+ifeq (,$(MODEL))
+ ifeq ($(OS), solaris)
+ uname_M:=$(shell isainfo -n)
+ else
+ uname_M:=$(shell uname -m)
+ endif
+ ifneq (,$(findstring $(uname_M),x86_64 amd64))
+ MODEL:=64
+ ARCH:=x86_64
+ endif
+ ifneq (,$(findstring $(uname_M),aarch64 arm64))
+ MODEL:=64
+ ARCH:=aarch64
+ endif
+ ifneq (,$(findstring $(uname_M),i386 i586 i686))
+ MODEL:=32
+ ARCH:=x86
+ endif
+ ifeq (,$(MODEL))
+ $(error Cannot figure 32/64 model and arch from uname -m: $(uname_M))
+ endif
+endif
+
+MODEL_FLAG:=-m$(MODEL)
--- a/Makefile
+++ b/Makefile
@@ -9,9 +9,8 @@ DUB=dub
WITH_DOC = no
DOC = ../dlang.org
-# Load operating system $(OS) (e.g. linux, osx, ...) and $(MODEL) (e.g. 32, 64) detection Makefile from dmd
-$(shell [ ! -d $(DMD_DIR) ] && git clone --depth=1 https://github.com/dlang/dmd $(DMD_DIR))
-include $(DMD_DIR)/compiler/src/osmodel.mak
+# Load operating system $(OS) (e.g. linux, osx, ...) and $(MODEL) (e.g. 32, 64) detection Makefile
+include osmodel.mak
ifeq (windows,$(OS))
DOTEXE:=.exe
@@ -30,7 +29,7 @@ DFLAGS = $(MODEL_FLAG) $(if $(findstring windows,$(OS)),,-fPIC) -preview=dip1000
DFLAGS += $(WARNINGS)
# Default DUB flags (DUB uses a different architecture format)
-DUBFLAGS = --arch=$(subst 32,x86,$(subst 64,x86_64,$(MODEL)))
+DUBFLAGS = --arch=$(ARCH)
TOOLS = \
$(ROOT)/catdoc$(DOTEXE) \

View File

@ -0,0 +1,49 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, ldc
, curl
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dtools";
version = "2.108.0";
src = fetchFromGitHub {
owner = "dlang";
repo = "tools";
rev = "v${finalAttrs.version}";
hash = "sha256-YEBUgJPG/+WN4MnQUNAVftZM0ULxZZzpHoOozXua46U=";
name = "dtools";
};
patches = [
# Disable failing tests
./disabled-tests.diff
# Fix LDC arm64 build
./fix-ldc-arm64.diff
];
nativeBuildInputs = [ ldc ];
buildInputs = [ curl ];
makeFlags = [
"CC=${stdenv.cc}/bin/cc"
"DMD=${ldc.out}/bin/ldmd2"
"INSTALL_DIR=$(out)"
];
enableParallelBuilding = true;
doCheck = true;
checkTarget = "test_rdmd";
meta = with lib; {
description = "Ancillary tools for the D programming language";
homepage = "https://github.com/dlang/tools";
license = licenses.boost;
maintainers = with maintainers; [ jtbx ];
platforms = platforms.unix;
};
})

View File

@ -1,8 +1,22 @@
diff --git a/scriptbin/dyalogscript b/scriptbin/dyalogscript
index c99912738ec2..adeda1fe964e 100755
--- a/scriptbin/dyalogscript
+++ b/scriptbin/dyalogscript
@@ -5,1 +5,1 @@
-INSTALLDIR="/opt/mdyalog/18.2/64/unicode"
@@ -2,7 +2,7 @@
#set -x
## DO NOT CHANGE THIS FILE
-INSTALLDIR="/opt/mdyalog/19.0/64/unicode"
+INSTALLDIR="@installdir@"
@@ -40,1 +40,1 @@
EXE="dyalog"
ARGS=""
@@ -46,7 +46,7 @@ fi
# OPTS="$OPTS RIDE_INIT=$RIDE_INIT"
#fi
-: ${SCRIPTDIR:=$INSTALLDIR}
+SCRIPTDIR="@scriptdir@"
export LD_LIBRARY_PATH=${SCRIPTDIR}:${LD_LIBRARY_PATH}
eval "${SCRIPTDIR}/${EXE}" APLKEYS=\"$INSTALLDIR/aplkeys\" APLTRANS=\"$INSTALLDIR/apltrans\" ${APLT} ${APLK} $OPTS -script \"$SCRIPT\" "$ARGS"

View File

@ -1,31 +0,0 @@
diff --git a/mapl b/mapl
index c9d3727..de24c77 100755
--- a/mapl
+++ b/mapl
@@ -20,26 +20,8 @@ SHORTVERSION=182U64
LONGVERSION="18.2 64-bit Unicode"
REL="`echo "${LONGVERSION}" | sed 's/ .*$//'`"
-# Find the Dyalog installation directory
-if [ "$(uname)" = Linux ]; then
- # this script location, canonical.
- THIS="$(readlink -f $0)"
-else
- # this script location.
- THIS="$0"
-fi
-export DYALOG=$(cd $(dirname $THIS) && pwd)
-
export APL_LANGUAGE_BAR_FILE=${DYALOG}/languagebar.json
-if [ "$(uname)" = Linux ]; then
- if [ "x" = "x${LD_LIBRARY_PATH}" ]; then
- export LD_LIBRARY_PATH="${DYALOG}"
- else
- export LD_LIBRARY_PATH="${DYALOG}:${LD_LIBRARY_PATH}"
- fi
-fi
-
# Setup the configuration directory
MYCONFIGDIR=${HOME}/.dyalog
if [ ! -d "${MYCONFIGDIR}" ] ; then

View File

@ -1,6 +1,5 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchurl
, config
@ -9,28 +8,19 @@
, autoPatchelfHook
, dpkg
, makeWrapper
, copyDesktopItems
, makeDesktopItem
, glib
, ncurses5
, dotnet-sdk_6
, dotnet-sdk_8
, dotnetSupport ? false
, alsa-lib
, gtk2
, libXdamage
, libXtst
, libXScrnSaver
, gtk3
, libdrm
, libGL
, mesa
, nss
, htmlRendererSupport ? false
, R
, rPackages
, rSupport ? false
, unixODBC
, sqaplSupport ? false
@ -42,37 +32,7 @@
let
dyalogHome = "$out/lib/dyalog";
rscproxy = rPackages.buildRPackage {
name = "rscproxy";
src = fetchFromGitHub {
owner = "Dyalog";
repo = "rscproxy";
rev = "31de3323fb8596ff5ecbf4bacd030e542cfd8133";
hash = "sha256-SVoBoAWUmQ+jWaTG7hdmyRq6By4RnmmgWZXoua19/Kg=";
};
};
makeWrapperArgs = [
"--set DYALOG ${dyalogHome}"
# also needs to be set when the `-script` flag is used
"--add-flags DYALOG=${dyalogHome}"
# needed for default user commands to work
"--add-flags SESSION_FILE=${dyalogHome}/default.dse"
]
++ lib.optionals dotnetSupport [
# needs to be set to run .NET Bridge
"--set DOTNET_ROOT ${dotnet-sdk_6}"
# .NET Bridge files are runtime dependencies, but cannot be patchelf'd
"--prefix LD_LIBRARY_PATH : ${dyalogHome}"
]
++ lib.optionals rSupport [
# RConnect resolves R from PATH
"--prefix PATH : ${R}/bin"
# RConnect uses `ldd` to find `libR.so`
"--prefix LD_LIBRARY_PATH : ${R}/lib/R/lib"
# RConnect uses `rscproxy` to communicate with R
"--prefix R_LIBS_SITE : ${rscproxy}/library"
];
makeWrapperArgs = lib.optional dotnetSupport "--set DOTNET_ROOT ${dotnet-sdk_8}";
licenseUrl = "https://www.dyalog.com/uploads/documents/Developer_Software_Licence.pdf";
@ -91,14 +51,14 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "dyalog";
version = "18.2.45405";
version = "19.0.48958";
shortVersion = lib.versions.majorMinor finalAttrs.version;
src =
assert !acceptLicense -> throw licenseDisclaimer;
fetchurl {
url = "https://download.dyalog.com/download.php?file=${finalAttrs.shortVersion}/linux_64_${finalAttrs.version}_unicode.x86_64.deb";
sha256 = "sha256-pA/WGTA6YvwG4MgqbiPBLKSKPtLGQM7BzK6Bmyz5pmM=";
hash = "sha256-+L9XI7Knt91sG/0E3GFSeqjD9Zs+1n72MDfvsXnr77M=";
};
outputs = [ "out" ] ++ lib.optional enableDocs "doc";
@ -107,64 +67,54 @@ stdenv.mkDerivation (finalAttrs: {
sourceRoot=$sourceRoot/opt/mdyalog/${finalAttrs.shortVersion}/64/unicode
'';
patches = [ ./dyalogscript.patch ./mapl.patch ];
postPatch = lib.optionalString dotnetSupport ''
# Patch to use .NET 6.0 instead of .NET Core 3.1 (can be removed when Dyalog 19.0 releases)
substituteInPlace Dyalog.Net.Bridge.*.json --replace "3.1" "6.0"
'';
patches = [ ./dyalogscript.patch ];
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
dpkg
makeWrapper
];
buildInputs = [
glib # Used by Conga and .NET Bridge
ncurses5 # Used by the dyalog binary
stdenv.cc.cc.lib # Used by Conga and .NET Bridge
ncurses5 # Used by the dyalog binary to correctly display in the terminal
]
++ lib.optionals htmlRendererSupport [
alsa-lib
gtk2
libXdamage
libXtst
libXScrnSaver
gtk3
libdrm
libGL
mesa
nss
]
++ lib.optionals sqaplSupport [
unixODBC
];
++ lib.optional sqaplSupport unixODBC;
# See which files are not really important: `https://github.com/Dyalog/DyalogDocker/blob/master/rmfiles.sh`
installPhase = ''
runHook preInstall
mkdir -p ${dyalogHome}
cp -r aplfmt aplkeys apltrans fonts Library PublicCACerts SALT StartupSession ${dyalogHome}
cp aplkeys.sh default.dse dyalog dyalog.rt dyalog.dcfg.template dyalog.ver.dcfg.template languagebar.json mapl startup.dyalog ${dyalogHome}
cp -r aplfmt aplkeys apltrans Experimental fonts Library PublicCACerts SALT StartupSession ${dyalogHome}
cp aplkeys.sh default.dse dyalog dyalogc dyalog.rt dyalog.dcfg.template dyalog.ver.dcfg.template languagebar.json mapl StartupSession.aplf ${dyalogHome}
mkdir ${dyalogHome}/lib
cp lib/{conga34_64.so,dyalog64.so,libconga34ssl64.so} ${dyalogHome}/lib
cp lib/{conga35_64.so,dyalog64.so,libconga35ssl64.so} ${dyalogHome}/lib
# Only keep the most useful workspaces
mkdir ${dyalogHome}/ws
cp ws/{conga,dfns,isolate,loaddata,salt,sharpplot,util}.dws ${dyalogHome}/ws
''
+ lib.optionalString dotnetSupport ''
cp libnethost.so Dyalog.Net.Bridge.* ${dyalogHome}
cp libnethost.so Dyalog.Net.Bridge.* Lokad.ILPack.dll ${dyalogHome}
''
+ lib.optionalString htmlRendererSupport ''
cp -r locales swiftshader ${dyalogHome}
cp libcef.so libEGL.so libGLESv2.so chrome-sandbox natives_blob.bin snapshot_blob.bin icudtl.dat v8_context_snapshot.bin *.pak ${dyalogHome}
cp -r locales ${dyalogHome}
cp libcef.so libEGL.so libGLESv2.so libvk_swiftshader.so libvulkan.so.1 ${dyalogHome}
cp chrome-sandbox icudtl.dat snapshot_blob.bin v8_context_snapshot.bin vk_swiftshader_icd.json *.pak ${dyalogHome}
cp lib/htmlrenderer.so ${dyalogHome}/lib
''
+ lib.optionalString rSupport ''
cp ws/rconnect.dws ${dyalogHome}/ws
''
+ lib.optionalString sqaplSupport ''
cp lib/cxdya64u64u.so ${dyalogHome}/lib
cp lib/cxdya65u64u.so ${dyalogHome}/lib
cp ws/sqapl.dws ${dyalogHome}/ws
cp odbc.ini.sample sqapl.err sqapl.ini ${dyalogHome}
''
@ -177,10 +127,12 @@ stdenv.mkDerivation (finalAttrs: {
ln -s $doc/share/doc/dyalog ${dyalogHome}/help
''
+ ''
install -Dm644 dyalog.svg $out/share/icons/hicolor/scalable/apps/dyalog.svg
install -Dm644 dyalog.svg -t $out/share/icons/hicolor/scalable/apps
install -Dm644 dyalog.desktop -t $out/share/applications
makeWrapper ${dyalogHome}/dyalog $out/bin/dyalog ${lib.concatStringsSep " " makeWrapperArgs}
makeWrapper ${dyalogHome}/mapl $out/bin/mapl ${lib.concatStringsSep " " makeWrapperArgs}
for exec in "dyalog" "mapl"; do
makeWrapper ${dyalogHome}/$exec $out/bin/$exec ${toString makeWrapperArgs}
done
install -Dm755 scriptbin/dyalogscript $out/bin/dyalogscript
substituteInPlace $out/bin/dyalogscript \
@ -190,24 +142,14 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
preFixup = lib.optionalString htmlRendererSupport ''
# `libudev.so` is a runtime dependency of CEF
patchelf ${dyalogHome}/libcef.so --add-needed libudev.so
# Register some undeclared runtime dependencies to be patched in by autoPatchelfHook
preFixup = ''
patchelf ${dyalogHome}/dyalog --add-needed libncurses.so
''
+ lib.optionalString htmlRendererSupport ''
patchelf ${dyalogHome}/libcef.so --add-needed libudev.so --add-needed libGL.so
'';
desktopItems = [
(makeDesktopItem {
name = "dyalog";
desktopName = "Dyalog";
exec = finalAttrs.meta.mainProgram;
comment = finalAttrs.meta.description;
icon = "dyalog";
categories = [ "Development" ];
genericName = "APL interpreter";
terminal = true;
})
];
meta = {
changelog = "https://dyalog.com/dyalog/dyalog-versions/${lib.replaceStrings [ "." ] [ "" ] finalAttrs.shortVersion}.htm";
description = "The Dyalog APL interpreter";

View File

@ -7,16 +7,16 @@
let
finalAttrs = {
pname = "fm";
version = "0.16.0";
version = "1.0.0";
src = fetchFromGitHub {
owner = "mistakenelf";
repo = "fm";
rev = "v${finalAttrs.version}";
hash = "sha256-wiACaszbkO9jBYmIfeQpcx984RY41Emyu911nkJxUFY=";
hash = "sha256-j92xf75JTLBaVr8GjAwlqgrieZCifVaIBy9ZMoDIaEY=";
};
vendorHash = "sha256-AfRGoKiVZGVIbsDj5pV1zCkp2FpcfWKS0t+cTU51RRc=";
vendorHash = "sha256-iDKDUpxaV/ZGKvTeNu4m5X/tqQA311Nb+2gvrehpdpw=";
meta = {
homepage = "https://github.com/mistakenelf/fm";

View File

@ -7,19 +7,25 @@
, hyprlang
, librsvg
, libzip
, tomlplusplus
, nix-update-script
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hyprcursor";
version = "0.1.5";
version = "0.1.7";
src = fetchFromGitHub {
owner = "hyprwm";
repo = "hyprcursor";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-e6+fu30inlTIdflotS6l7qYusslKMNkhZVNLn9ZSogg=";
hash = "sha256-T0lV+xA07RzroRLwZsGbF9bWZNHInXS+oB0RJ6YdvWg=";
};
patches = [
# fix icon directories system search path
"${finalAttrs.src}/nix/dirs.patch"
];
nativeBuildInputs = [
cmake
pkg-config
@ -30,6 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
hyprlang
librsvg
libzip
tomlplusplus
];
outputs = [

View File

@ -23,14 +23,14 @@
}:
let
version = "1.32.2";
patterns_version = "1.32.2";
version = "1.33.2";
patterns_version = "1.33.2";
patterns_src = fetchFromGitHub {
owner = "WerWolv";
repo = "ImHex-Patterns";
rev = "ImHex-v${patterns_version}";
hash = "sha256-K+LiQvykCrOwhEVy37lh7VSf5YJyBQtLz8AGFsuRznQ=";
hash = "sha256-5a6aFT8R8vMzPS+Y+fcDV5+olhioEpLjdMqa7qOyGsw=";
};
in
@ -43,19 +43,9 @@ stdenv.mkDerivation rec {
owner = "WerWolv";
repo = pname;
rev = "v${version}";
hash = "sha256-MYOZHQMYbbP01z0FyoCgTzwY1/71eUCmJYYfYvN9+so=";
hash = "sha256-8Ehpk0TjE4itQ7D9Nx74plYwABVufuYmxfxyuSqak1c=";
};
patches = [
# Backport fixes (and fix to fix) for default plugin not being loaded.
(fetchpatch {
url = "https://github.com/WerWolv/PatternLanguage/compare/ImHex-v1.32.2..1adcdd358d3772681242267ddd3459c9d0913796.patch";
stripLen = 1;
extraPrefix = "lib/external/pattern_language/";
hash = "sha256-aGvt7vQ6PtFE3sw4rAXUP7Pq8cL29LEKyC0rJKkxOZI=";
})
];
nativeBuildInputs = [ cmake llvm python3 perl pkg-config rsync ];
buildInputs = [
@ -93,7 +83,7 @@ stdenv.mkDerivation rec {
description = "Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM";
homepage = "https://github.com/WerWolv/ImHex";
license = with licenses; [ gpl2Only ];
maintainers = with maintainers; [ luis kashw2 cafkafk ];
maintainers = with maintainers; [ kashw2 cafkafk ];
platforms = platforms.linux;
};
}

View File

@ -1,17 +1,27 @@
{ lib, buildNpmPackage, fetchFromGitHub }:
{ lib, stdenv, buildNpmPackage, fetchFromGitHub, cacert }:
buildNpmPackage rec {
pname = "inshellisense";
version = "0.0.1-rc.4";
version = "0.0.1-rc.12";
src = fetchFromGitHub {
owner = "microsoft";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-PYSonVyclGSH3ArbqJuKrBNGbJaQEp6XemwnHboVwPk=";
hash = "sha256-dDjIKVV1dSCIa2Y2d1AQQAw9Rcflh0AnKlwsQSblIhs=";
};
npmDepsHash = "sha256-sjr4Hy1/zWPAlVGsMkyQIQcBT86KLaN2/UAaAd7Mn6Q=";
npmDepsHash = "sha256-uBsPaUvEiR5oCl8rZvpyNPXSB/Vlcx937lT4WqgekHI=";
# Needed for dependency `@homebridge/node-pty-prebuilt-multiarch`
# On Darwin systems the build fails with,
#
# npm ERR! ../src/unix/pty.cc:413:13: error: use of undeclared identifier 'openpty'
# npm ERR! int ret = openpty(&master, &slave, nullptr, NULL, static_cast<winsi ze*>(&winp));
#
# when `node-gyp` tries to build the dep. The below allows `npm` to download the prebuilt binary.
makeCacheWritable = stdenv.isDarwin;
nativeBuildInputs = lib.optional stdenv.isDarwin cacert;
meta = with lib; {
description = "IDE style command line auto complete";

View File

@ -0,0 +1,48 @@
{ stdenv,
fetchurl,
lib,
dpkg,
gnome,
insync
}:
stdenv.mkDerivation (finalAttrs: {
pname = "insync-nautilus";
version = lib.getVersion insync;
pyproject = true;
# Download latest from: https://www.insynchq.com/downloads/linux#nautilus
src = fetchurl {
urls = [
"https://cdn.insynchq.com/builds/linux/insync-nautilus_${finalAttrs.version}_all.deb"
"https://web.archive.org/web/20240409080611/https://cdn.insynchq.com/builds/linux/insync-nautilus_${finalAttrs.version}_all.deb"
];
hash = "sha256-aB1/ZzcQH3T1lviMZO8jXbtdbe4TW20f0TAcv4HDOGI=";
};
nativeBuildInputs = [
dpkg
];
buildInputs = [
gnome.nautilus-python
insync
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R usr/share $out/
runHook postInstall
'';
meta = with lib; {
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ fromSource ];
license = licenses.unfree;
maintainers = with maintainers; [ hellwolf ];
homepage = "https://www.insynchq.com";
description = "This package contains the Python extension and icons for integrating Insync with Nautilus";
};
})

View File

@ -6,7 +6,6 @@
, autoPatchelfHook
, dpkg
, nss
, cacert
, alsa-lib
, libvorbis
, libdrm
@ -22,36 +21,24 @@ let
# Find a binary from https://www.insynchq.com/downloads/linux#ubuntu.
version = "3.8.7.50516";
ubuntu-dist = "mantic_amd64";
meta = with lib; {
platforms = ["x86_64-linux"];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ hellwolf ];
homepage = "https://www.insynchq.com";
description = "Google Drive sync and backup with multiple account support";
longDescription = ''
Insync is a commercial application that syncs your Drive files to your
computer. It has more advanced features than Google's official client
such as multiple account support, Google Doc conversion, symlink support,
and built in sharing.
There is a 15-day free trial, and it is a paid application after that.
Known bug(s):
1) Currently the system try icon does not render correctly.
'';
mainProgram = "insync";
};
insyncDeb = (fetchurl {
urls = [
"https://cdn.insynchq.com/builds/linux/insync_${version}-${ubuntu-dist}.deb"
"https://web.archive.org/web/20240409080945/https://cdn.insynchq.com/builds/linux/insync_${version}-${ubuntu-dist}.deb"
];
hash = "sha256-U7BcgghbdR7r9WiZpEOka+BzXwnxrzL6p4imGESuB/k=";
});
insyncEmblemIconsDeb = (fetchurl {
urls = [
"https://cdn.insynchq.com/builds/linux/insync-emblem-icons_${version}_all.deb"
"https://web.archive.org/web/20240409081214/https://cdn.insynchq.com/builds/linux/insync-emblem-icons_${version}_all.deb"
];
hash = "sha256-uALaIxETEEkjDTx331uIsb4VswWk2K0dGuDMYH8v5U8=";
});
insync-pkg = stdenvNoCC.mkDerivation {
name = "${pname}-pkg-${version}";
inherit version meta;
src = fetchurl {
url = "https://cdn.insynchq.com/builds/linux/insync_${version}-${ubuntu-dist}.deb";
sha256 = "sha256-U7BcgghbdR7r9WiZpEOka+BzXwnxrzL6p4imGESuB/k=";
};
srcs = [ insyncDeb insyncEmblemIconsDeb ];
nativeBuildInputs = [
dpkg
@ -71,7 +58,8 @@ let
];
unpackPhase = ''
dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner
dpkg-deb --fsys-tarfile ${insyncDeb} | tar -x --no-same-permissions --no-same-owner
dpkg-deb --fsys-tarfile ${insyncEmblemIconsDeb} | tar -x --no-same-permissions --no-same-owner
'';
installPhase = ''
@ -88,8 +76,7 @@ let
};
in buildFHSEnv {
name = pname;
inherit meta;
inherit pname version;
targetPkgs = pkgs: with pkgs; [
libudev0-shim
@ -97,7 +84,7 @@ in buildFHSEnv {
];
extraInstallCommands = ''
cp -rsHf "${insync-pkg}"/share $out
cp -rsHf "${insync-pkg}"/share $out/
'';
runScript = writeShellScript "insync-wrapper.sh" ''
@ -119,4 +106,26 @@ in buildFHSEnv {
unshareCgroup = false;
dieWithParent = true;
meta = with lib; {
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ hellwolf ];
homepage = "https://www.insynchq.com";
description = "Google Drive sync and backup with multiple account support";
longDescription = ''
Insync is a commercial application that syncs your Drive files to your
computer. It has more advanced features than Google's official client
such as multiple account support, Google Doc conversion, symlink support,
and built in sharing.
There is a 15-day free trial, and it is a paid application after that.
Known bug(s):
1) Currently the system try icon does not render correctly.
'';
mainProgram = "insync";
};
}

View File

@ -0,0 +1,106 @@
{
stdenv,
lib,
fetchFromGitHub,
libuuid,
curl,
pkg-config,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
tlsSupport ? !stdenv.hostPlatform.isStatic,
openssl,
jemalloc,
which,
tcl,
tcltls,
ps,
getconf,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "keydb";
version = "6.3.4";
src = fetchFromGitHub {
owner = "snapchat";
repo = "keydb";
rev = "v${version}";
hash = "sha256-j6qgK6P3Fv+b6k9jwKQ5zW7XLkKbXXcmHKBCQYvwEIU=";
};
postPatch = ''
substituteInPlace deps/lua/src/Makefile \
--replace-fail "ar rcu" "${stdenv.cc.targetPrefix}ar rcu"
substituteInPlace src/Makefile \
--replace-fail "as --64 -g" "${stdenv.cc.targetPrefix}as --64 -g"
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
jemalloc
curl
libuuid
] ++ lib.optionals tlsSupport [ openssl ] ++ lib.optionals withSystemd [ systemd ];
makeFlags =
[
"PREFIX=${placeholder "out"}"
"AR=${stdenv.cc.targetPrefix}ar"
"RANLIB=${stdenv.cc.targetPrefix}ranlib"
"USEASM=${if stdenv.isx86_64 then "true" else "false"}"
]
++ lib.optionals (!tlsSupport) [ "BUILD_TLS=no" ]
++ lib.optionals withSystemd [ "USE_SYSTEMD=yes" ]
++ lib.optionals (!stdenv.isx86_64) [ "MALLOC=libc" ];
enableParallelBuilding = true;
hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ];
# darwin currently lacks a pure `pgrep` which is extensively used here
doCheck = !stdenv.isDarwin;
nativeCheckInputs = [
which
tcl
ps
] ++ lib.optionals stdenv.hostPlatform.isStatic [ getconf ] ++ lib.optionals tlsSupport [ tcltls ];
checkPhase = ''
runHook preCheck
# disable test "Connect multiple replicas at the same time": even
# upstream find this test too timing-sensitive
substituteInPlace tests/integration/replication.tcl \
--replace-fail 'foreach mdl {no yes}' 'foreach mdl {}'
substituteInPlace tests/support/server.tcl \
--replace-fail 'exec /usr/bin/env' 'exec env'
sed -i '/^proc wait_load_handlers_disconnected/{n ; s/wait_for_condition 50 100/wait_for_condition 50 500/; }' \
tests/support/util.tcl
patchShebangs ./utils/gen-test-certs.sh
${if tlsSupport then "./utils/gen-test-certs.sh" else ""}
./runtest \
--no-latency \
--timeout 2000 \
--clients $NIX_BUILD_CORES \
--tags -leaks ${if tlsSupport then "--tls" else ""}
runHook postCheck
'';
passthru.tests.redis = nixosTests.redis;
passthru.serverBin = "keydb-server";
meta = with lib; {
homepage = "https://keydb.dev";
description = "A Multithreaded Fork of Redis";
license = licenses.bsd3;
platforms = platforms.all;
changelog = "https://github.com/Snapchat/KeyDB/raw/v${version}/00-RELEASENOTES";
maintainers = teams.helsinki-systems.members;
mainProgram = "keydb-cli";
};
}

View File

@ -8,13 +8,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "kokkos";
version = "4.2.01";
version = "4.3.00";
src = fetchFromGitHub {
owner = "kokkos";
repo = "kokkos";
rev = finalAttrs.version;
hash = "sha256-d8GB7+hHqpD5KPeYmiXmT5+6W64j3bbTs2hoFYJnfa8=";
hash = "sha256-0MMztgw+okZM/xr2vQucwkkT04iueQSlSQJ6MN/756I=";
};
nativeBuildInputs = [

View File

@ -12,7 +12,7 @@
}:
let
version = "7.3.0";
version = "7.3.1";
in
# The output of the derivation is a tool to create bootable images using Limine
# as bootloader for various platforms and corresponding binary and helper files.
@ -24,7 +24,7 @@ stdenv.mkDerivation {
# Packaging that in Nix is very cumbersome.
src = fetchurl {
url = "https://github.com/limine-bootloader/limine/releases/download/v${version}/limine-${version}.tar.gz";
sha256 = "sha256-iPi6u3iZOJfVRERrJVgH6q16aANnSGgBL5AtNuANrao=";
sha256 = "sha256-xlOBBb281W9QT5Fv2Hgw/eyh7K3oyaNY1yU6WktbFro=";
};
nativeBuildInputs = [

View File

@ -1,4 +1,5 @@
{ config
, callPackages
, stdenv
, lib
, addDriverRunpath
@ -14,8 +15,6 @@
, pkg-config
, buildGoModule
, makeWrapper
, runCommand
, testers
# apply feature parameter names according to
# https://github.com/NixOS/rfcs/pull/169
@ -27,9 +26,6 @@
, enable_f16c ? true
, enable_fma ? true
, with_tinydream ? false
, ncnn
, with_openblas ? false
, openblas
@ -41,24 +37,19 @@
, ocl-icd
, opencl-headers
, with_stablediffusion ? false
, with_tinydream ? false # do not compile with cublas
, ncnn
, with_stablediffusion ? true
, opencv
, with_tts ? false
, with_tts ? true
, onnxruntime
, sonic
, spdlog
, fmt
, espeak-ng
, piper-tts
# tests
, fetchzip
, fetchurl
, writeText
, symlinkJoin
, linkFarmFromDrvs
, jq
}:
let
BUILD_TYPE =
@ -68,21 +59,7 @@ let
else if with_clblas then "clblas"
else "";
inherit (cudaPackages) libcublas cuda_nvcc cuda_cccl cuda_cudart;
typedBuiltInputs =
lib.optionals with_cublas
[
cuda_nvcc # should be part of nativeBuildInputs
cuda_cudart
cuda_cccl
(lib.getDev libcublas)
(lib.getLib libcublas)
]
++ lib.optionals with_clblas
[ clblast ocl-icd opencl-headers ]
++ lib.optionals with_openblas
[ openblas.dev ];
inherit (cudaPackages) libcublas cuda_nvcc cuda_cccl cuda_cudart cudatoolkit;
go-llama-ggml = effectiveStdenv.mkDerivation {
name = "go-llama-ggml";
@ -97,9 +74,18 @@ let
"libbinding.a"
"BUILD_TYPE=${BUILD_TYPE}"
];
buildInputs = typedBuiltInputs;
buildInputs = [ ]
++ lib.optionals with_clblas [ clblast ocl-icd opencl-headers ]
++ lib.optionals with_openblas [ openblas.dev ];
nativeBuildInputs = [ cmake ]
# backward compatiblity with nixos-23.11
# use cuda_nvcc after release of nixos-24.05
++ lib.optionals with_cublas [ cudatoolkit ];
dontUseCmakeConfigure = true;
nativeBuildInputs = [ cmake ];
installPhase = ''
mkdir $out
tar cf - --exclude=build --exclude=CMakeFiles --exclude="*.o" . \
@ -112,8 +98,8 @@ let
src = fetchFromGitHub {
owner = "ggerganov";
repo = "llama.cpp";
rev = "b06c16ef9f81d84da520232c125d4d8a1d273736";
hash = "sha256-t1AIx/Ir5RhasjblH4BSpGOXVvO84SJPSqa7rXWj6b4=";
rev = "1b67731e184e27a465b8c5476061294a4af668ea";
hash = "sha256-0WWbsklpW6HhFRkvWpYh8Lhi8VIansS/zmyIKNQRkIs=";
fetchSubmodules = true;
};
postPatch = prev.postPatch + ''
@ -266,13 +252,20 @@ let
src = fetchFromGitHub {
owner = "ggerganov";
repo = "whisper.cpp";
rev = "1558ec5a16cb2b2a0bf54815df1d41f83dc3815b";
hash = "sha256-UAqWU3kvkHM+fV+T6gFVsAKuOG6N4FoFgTKGUptwjmE=";
rev = "8f253ef3af1c62c04316ba4afa7145fc4d701a8c";
hash = "sha256-yHHjhpQIn99A/hqFwAb7TfTf4Q9KnKat93zyXS70bT8=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = typedBuiltInputs;
nativeBuildInputs = [ cmake pkg-config ]
++ lib.optionals with_cublas [ cuda_nvcc ];
buildInputs = [ ]
++ lib.optionals with_cublas [ cuda_cccl cuda_cudart libcublas ]
++ lib.optionals with_clblas [ clblast ocl-icd opencl-headers ]
++ lib.optionals with_openblas [ openblas.dev ];
cmakeFlags = [
(lib.cmakeBool "WHISPER_CUBLAS" with_cublas)
(lib.cmakeBool "WHISPER_CUDA" with_cublas)
(lib.cmakeBool "WHISPER_CLBLAST" with_clblas)
(lib.cmakeBool "WHISPER_OPENBLAS" with_openblas)
(lib.cmakeBool "WHISPER_NO_AVX" (!enable_avx))
@ -342,19 +335,19 @@ let
];
});
go-tiny-dream = stdenv.mkDerivation {
go-tiny-dream = effectiveStdenv.mkDerivation {
name = "go-tiny-dream";
src = fetchFromGitHub {
owner = "M0Rf30";
repo = "go-tiny-dream";
rev = "772a9c0d9aaf768290e63cca3c904fe69faf677a";
hash = "sha256-r+wzFIjaI6cxAm/eXN3q8LRZZz+lE5EA4lCTk5+ZnIY=";
rev = "22a12a4bc0ac5455856f28f3b771331a551a4293";
hash = "sha256-DAVHD6E0OKHf4C2ldoI0Mm7813DIrmWFONUhSCQPCfc=";
fetchSubmodules = true;
};
postUnpack = ''
rm -rf source/ncnn
mkdir -p source/ncnn/build
cp -r --no-preserve=mode ${go-tiny-dream-ncnn} source/ncnn/build/install
mkdir -p source/ncnn/build/src
cp -r --no-preserve=mode ${go-tiny-dream-ncnn}/lib/. ${go-tiny-dream-ncnn}/include/. source/ncnn/build/src
'';
buildFlags = [ "libtinydream.a" ];
installPhase = ''
@ -378,18 +371,18 @@ let
stdenv;
pname = "local-ai";
version = "2.11.0";
version = "2.12.3";
src = fetchFromGitHub {
owner = "go-skynet";
repo = "LocalAI";
rev = "v${version}";
hash = "sha256-Sqo4NOggUNb1ZemT9TRknBmz8dThe/X43R+4JFfQJ4M=";
hash = "sha256-/Q0t5OozpgqmjUOYHvVAj1k7VnIixfOS8gNAguuu6p0=";
};
self = buildGoModule.override { stdenv = effectiveStdenv; } {
inherit pname version src;
vendorHash = "sha256-3bOr8DnAjTzOpVDB5wmlPxECNteWw3tI0yc1f2Wt4y0=";
vendorHash = "sha256-8Hu1y/PK21twnB7D22ltslFFzRrsB8d1R2hkgIFB/XY=";
env.NIX_CFLAGS_COMPILE = lib.optionalString with_stablediffusion " -isystem ${opencv}/include/opencv4";
@ -415,11 +408,15 @@ let
''
;
buildInputs = typedBuiltInputs
++ lib.optional with_stablediffusion go-stable-diffusion.buildInputs
++ lib.optional with_tts go-piper.buildInputs;
buildInputs = [ ]
++ lib.optionals with_cublas [ libcublas ]
++ lib.optionals with_clblas [ clblast ocl-icd opencl-headers ]
++ lib.optionals with_openblas [ openblas.dev ]
++ lib.optionals with_stablediffusion go-stable-diffusion.buildInputs
++ lib.optionals with_tts go-piper.buildInputs;
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper ]
++ lib.optionals with_cublas [ cuda_nvcc ];
enableParallelBuilding = false;
@ -500,84 +497,7 @@ let
with_tinydream with_clblas;
};
passthru.tests = {
version = testers.testVersion {
package = self;
version = "v" + version;
};
health =
let
port = "8080";
in
testers.runNixOSTest {
name = pname + "-health";
nodes.machine = {
systemd.services.local-ai = {
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${self}/bin/local-ai --debug --localai-config-dir . --address :${port}";
};
};
testScript = ''
machine.wait_for_open_port(${port})
machine.succeed("curl -f http://localhost:${port}/readyz")
'';
};
}
// lib.optionalAttrs with_tts {
# https://localai.io/features/text-to-audio/#piper
tts =
let
port = "8080";
voice-en-us = fetchzip {
url = "https://github.com/rhasspy/piper/releases/download/v0.0.2/voice-en-us-danny-low.tar.gz";
hash = "sha256-5wf+6H5HeQY0qgdqnAG1vSqtjIFM9lXH53OgouuPm0M=";
stripRoot = false;
};
ggml-tiny-en = fetchurl {
url = "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-tiny.en-q5_1.bin";
hash = "sha256-x3xXZvHO8JtrfUfyG1Rsvd1BV4hrO11tT3CekeZsfCs=";
};
whisper-en = {
name = "whisper-en";
backend = "whisper";
parameters.model = ggml-tiny-en.name;
};
models = symlinkJoin {
name = "models";
paths = [
voice-en-us
(linkFarmFromDrvs "whisper-en" [
(writeText "whisper-en.yaml" (builtins.toJSON whisper-en))
ggml-tiny-en
])
];
};
in
testers.runNixOSTest {
name = pname + "-tts";
nodes.machine = {
systemd.services.local-ai = {
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${self}/bin/local-ai --debug --models-path ${models} --localai-config-dir . --address :${port}";
};
};
testScript =
let
request = {
model = "en-us-danny-low.onnx";
backend = "piper";
input = "Hello, how are you?";
};
in
''
machine.wait_for_open_port(${port})
machine.succeed("curl -f http://localhost:${port}/readyz")
machine.succeed("curl -f http://localhost:${port}/tts --json @${writeText "request.json" (builtins.toJSON request)} --output out.wav")
machine.succeed("curl -f http://localhost:${port}/v1/audio/transcriptions --header 'Content-Type: multipart/form-data' --form file=@out.wav --form model=${whisper-en.name} --output transcription.json")
machine.succeed("${jq}/bin/jq --exit-status 'debug | .segments | first.text == \"${request.input}\"' transcription.json")
'';
};
};
passthru.tests = callPackages ./tests.nix { inherit self; };
meta = with lib; {
description = "OpenAI alternative to run local LLMs, image and audio generation";

View File

@ -0,0 +1,160 @@
{ self
, lib
, testers
, fetchzip
, fetchurl
, writers
, symlinkJoin
, linkFarmFromDrvs
, jq
}:
{
version = testers.testVersion {
package = self;
version = "v" + self.version;
};
health =
let
port = "8080";
in
testers.runNixOSTest {
name = self.name + "-health";
nodes.machine = {
systemd.services.local-ai = {
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${self}/bin/local-ai --debug --localai-config-dir . --address :${port}";
};
};
testScript = ''
machine.wait_for_open_port(${port})
machine.succeed("curl -f http://localhost:${port}/readyz")
'';
};
# https://localai.io/docs/getting-started/manual/
llama =
let
port = "8080";
gguf = fetchurl {
url = "https://huggingface.co/TheBloke/Luna-AI-Llama2-Uncensored-GGUF/resolve/main/luna-ai-llama2-uncensored.Q4_K_M.gguf";
sha256 = "6a9dc401c84f0d48996eaa405174999c3a33bf12c2bfd8ea4a1e98f376de1f15";
};
models = linkFarmFromDrvs "models" [
gguf
];
in
testers.runNixOSTest {
name = self.name + "-llama";
nodes.machine =
let
cores = 4;
in
{
virtualisation = {
inherit cores;
memorySize = 8192;
};
systemd.services.local-ai = {
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${self}/bin/local-ai --debug --threads ${toString cores} --models-path ${models} --localai-config-dir . --address :${port}";
};
};
testScript =
let
# https://localai.io/features/text-generation/#chat-completions
request-chat-completions = {
model = gguf.name;
messages = [{ role = "user"; content = "Say this is a test!"; }];
temperature = 0.7;
};
# https://localai.io/features/text-generation/#edit-completions
request-edit-completions = {
model = gguf.name;
instruction = "rephrase";
input = "Black cat jumped out of the window";
temperature = 0.7;
};
# https://localai.io/features/text-generation/#completions
request-completions = {
model = gguf.name;
prompt = "A long time ago in a galaxy far, far away";
temperature = 0.7;
};
in
''
machine.wait_for_open_port(${port})
machine.succeed("curl -f http://localhost:${port}/readyz")
machine.succeed("curl -f http://localhost:${port}/v1/models --output models.json")
machine.succeed("${jq}/bin/jq --exit-status 'debug | .data[].id == \"${gguf.name}\"' models.json")
machine.succeed("curl -f http://localhost:${port}/v1/chat/completions --json @${writers.writeJSON "request-chat-completions.json" request-chat-completions} --output chat-completions.json")
machine.succeed("${jq}/bin/jq --exit-status 'debug | .object == \"chat.completion\"' chat-completions.json")
machine.succeed("curl -f http://localhost:${port}/v1/edits --json @${writers.writeJSON "request-edit-completions.json" request-edit-completions} --output edit-completions.json")
machine.succeed("${jq}/bin/jq --exit-status 'debug | .object == \"edit\"' edit-completions.json")
machine.succeed("curl -f http://localhost:${port}/v1/completions --json @${writers.writeJSON "request-completions.json" request-completions} --output completions.json")
machine.succeed("${jq}/bin/jq --exit-status 'debug | .object ==\"text_completion\"' completions.json")
'';
};
} // lib.optionalAttrs self.features.with_tts {
# https://localai.io/features/text-to-audio/#piper
tts =
let
port = "8080";
voice-en-us = fetchzip {
url = "https://github.com/rhasspy/piper/releases/download/v0.0.2/voice-en-us-danny-low.tar.gz";
hash = "sha256-5wf+6H5HeQY0qgdqnAG1vSqtjIFM9lXH53OgouuPm0M=";
stripRoot = false;
};
ggml-tiny-en = fetchurl {
url = "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-tiny.en-q5_1.bin";
hash = "sha256-x3xXZvHO8JtrfUfyG1Rsvd1BV4hrO11tT3CekeZsfCs=";
};
whisper-en = {
name = "whisper-en";
backend = "whisper";
parameters.model = ggml-tiny-en.name;
};
models = symlinkJoin {
name = "models";
paths = [
voice-en-us
(linkFarmFromDrvs "whisper-en" [
(writers.writeYAML "whisper-en.yaml" whisper-en)
ggml-tiny-en
])
];
};
in
testers.runNixOSTest {
name = self.name + "-tts";
nodes.machine =
let
cores = 2;
in
{
virtualisation = {
inherit cores;
};
systemd.services.local-ai = {
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${self}/bin/local-ai --debug --threads ${toString cores} --models-path ${models} --localai-config-dir . --address :${port}";
};
};
testScript =
let
request = {
model = "en-us-danny-low.onnx";
backend = "piper";
input = "Hello, how are you?";
};
in
''
machine.wait_for_open_port(${port})
machine.succeed("curl -f http://localhost:${port}/readyz")
machine.succeed("curl -f http://localhost:${port}/tts --json @${writers.writeJSON "request.json" request} --output out.wav")
machine.succeed("curl -f http://localhost:${port}/v1/audio/transcriptions --header 'Content-Type: multipart/form-data' --form file=@out.wav --form model=${whisper-en.name} --output transcription.json")
machine.succeed("${jq}/bin/jq --exit-status 'debug | .segments | first.text == \"${request.input}\"' transcription.json")
'';
};
}

View File

@ -9,14 +9,14 @@
stdenv.mkDerivation (finalAttrs: {
pname = "loksh";
version = "7.4";
version = "7.5";
src = fetchFromGitHub {
owner = "dimkr";
repo = "loksh";
rev = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-gQK9gq6MsKVyOikOW0sW/SbIM1K/3I8pn58P/SqzKys=";
hash = "sha256-4cBO1FXUnN/swwEeM2lq5RJJGmLKInMLZkz942EKy6k=";
};
outputs = [ "out" "doc" "man" ];

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