Merge staging-next into staging

This commit is contained in:
github-actions[bot]
2023-04-05 18:02:12 +00:00
committed by GitHub
46 changed files with 16161 additions and 364 deletions
@@ -237,6 +237,10 @@ In addition to numerous new and upgraded packages, this release has the followin
- `services.openssh.ciphers` to `services.openssh.settings.Ciphers`
- `services.openssh.gatewayPorts` to `services.openssh.settings.GatewayPorts`
- `netbox` was updated to 3.4. NixOS' `services.netbox.package` still defaults to 3.3 if `stateVersion` is earlier than 23.05. Please review upstream's [breaking changes](https://github.com/netbox-community/netbox/releases/tag/v3.4.0), and upgrade NetBox by changing `services.netbox.package`. Database migrations will be run automatically.
- `services.netbox` now support RFC42-style options, through `services.netbox.settings`.
- `services.mastodon` gained a tootctl wrapped named `mastodon-tootctl` similar to `nextcloud-occ` which can be executed from any user and switches to the configured mastodon user with sudo and sources the environment variables.
- DocBook option documentation, which has been deprecated since 22.11, will now cause a warning when documentation is built. Out-of-tree modules should migrate to using CommonMark documentation as outlined in [](#sec-option-declarations) to silence this warning.
+124 -38
View File
@@ -4,45 +4,17 @@ with lib;
let
cfg = config.services.netbox;
pythonFmt = pkgs.formats.pythonVars {};
staticDir = cfg.dataDir + "/static";
configFile = pkgs.writeTextFile {
name = "configuration.py";
text = ''
STATIC_ROOT = '${staticDir}'
MEDIA_ROOT = '${cfg.dataDir}/media'
REPORTS_ROOT = '${cfg.dataDir}/reports'
SCRIPTS_ROOT = '${cfg.dataDir}/scripts'
ALLOWED_HOSTS = ['*']
DATABASE = {
'NAME': 'netbox',
'USER': 'netbox',
'HOST': '/run/postgresql',
}
# Redis database settings. Redis is used for caching and for queuing background tasks such as webhook events. A separate
# configuration exists for each. Full connection details are required in both sections, and it is strongly recommended
# to use two separate database IDs.
REDIS = {
'tasks': {
'URL': 'unix://${config.services.redis.servers.netbox.unixSocket}?db=0',
'SSL': False,
},
'caching': {
'URL': 'unix://${config.services.redis.servers.netbox.unixSocket}?db=1',
'SSL': False,
}
}
with open("${cfg.secretKeyFile}", "r") as file:
SECRET_KEY = file.readline()
${optionalString cfg.enableLdap "REMOTE_AUTH_BACKEND = 'netbox.authentication.LDAPBackend'"}
${cfg.extraConfig}
'';
settingsFile = pythonFmt.generate "netbox-settings.py" cfg.settings;
extraConfigFile = pkgs.writeTextFile {
name = "netbox-extraConfig.py";
text = cfg.extraConfig;
};
pkg = (pkgs.netbox.overrideAttrs (old: {
configFile = pkgs.concatText "configuration.py" [ settingsFile extraConfigFile ];
pkg = (cfg.package.overrideAttrs (old: {
installPhase = old.installPhase + ''
ln -s ${configFile} $out/opt/netbox/netbox/netbox/configuration.py
'' + optionalString cfg.enableLdap ''
@@ -70,6 +42,30 @@ in {
'';
};
settings = lib.mkOption {
description = lib.mdDoc ''
Configuration options to set in `configuration.py`.
See the [documentation](https://docs.netbox.dev/en/stable/configuration/) for more possible options.
'';
default = { };
type = lib.types.submodule {
freeformType = pythonFmt.type;
options = {
ALLOWED_HOSTS = lib.mkOption {
type = with lib.types; listOf str;
default = ["*"];
description = lib.mdDoc ''
A list of valid fully-qualified domain names (FQDNs) and/or IP
addresses that can be used to reach the NetBox service.
'';
};
};
};
};
listenAddress = mkOption {
type = types.str;
default = "[::1]";
@@ -78,6 +74,17 @@ in {
'';
};
package = mkOption {
type = types.package;
default = if versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox else pkgs.netbox_3_3;
defaultText = literalExpression ''
if versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox else pkgs.netbox_3_3;
'';
description = lib.mdDoc ''
NetBox package to use.
'';
};
port = mkOption {
type = types.port;
default = 8001;
@@ -117,7 +124,7 @@ in {
default = "";
description = lib.mdDoc ''
Additional lines of configuration appended to the `configuration.py`.
See the [documentation](https://netbox.readthedocs.io/en/stable/configuration/optional-settings/) for more possible options.
See the [documentation](https://docs.netbox.dev/en/stable/configuration/) for more possible options.
'';
};
@@ -138,11 +145,90 @@ in {
Path to the Configuration-File for LDAP-Authentication, will be loaded as `ldap_config.py`.
See the [documentation](https://netbox.readthedocs.io/en/stable/installation/6-ldap/#configuration) for possible options.
'';
example = ''
import ldap
from django_auth_ldap.config import LDAPSearch, PosixGroupType
AUTH_LDAP_SERVER_URI = "ldaps://ldap.example.com/"
AUTH_LDAP_USER_SEARCH = LDAPSearch(
"ou=accounts,ou=posix,dc=example,dc=com",
ldap.SCOPE_SUBTREE,
"(uid=%(user)s)",
)
AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
"ou=groups,ou=posix,dc=example,dc=com",
ldap.SCOPE_SUBTREE,
"(objectClass=posixGroup)",
)
AUTH_LDAP_GROUP_TYPE = PosixGroupType()
# Mirror LDAP group assignments.
AUTH_LDAP_MIRROR_GROUPS = True
# For more granular permissions, we can map LDAP groups to Django groups.
AUTH_LDAP_FIND_GROUP_PERMS = True
'';
};
};
config = mkIf cfg.enable {
services.netbox.plugins = mkIf cfg.enableLdap (ps: [ ps.django-auth-ldap ]);
services.netbox = {
plugins = mkIf cfg.enableLdap (ps: [ ps.django-auth-ldap ]);
settings = {
STATIC_ROOT = staticDir;
MEDIA_ROOT = "${cfg.dataDir}/media";
REPORTS_ROOT = "${cfg.dataDir}/reports";
SCRIPTS_ROOT = "${cfg.dataDir}/scripts";
DATABASE = {
NAME = "netbox";
USER = "netbox";
HOST = "/run/postgresql";
};
# Redis database settings. Redis is used for caching and for queuing
# background tasks such as webhook events. A separate configuration
# exists for each. Full connection details are required in both
# sections, and it is strongly recommended to use two separate database
# IDs.
REDIS = {
tasks = {
URL = "unix://${config.services.redis.servers.netbox.unixSocket}?db=0";
SSL = false;
};
caching = {
URL = "unix://${config.services.redis.servers.netbox.unixSocket}?db=1";
SSL = false;
};
};
REMOTE_AUTH_BACKEND = lib.mkIf cfg.enableLdap "netbox.authentication.LDAPBackend";
LOGGING = lib.mkDefault {
version = 1;
formatters.precise.format = "[%(levelname)s@%(name)s] %(message)s";
handlers.console = {
class = "logging.StreamHandler";
formatter = "precise";
};
# log to console/systemd instead of file
root = {
level = "INFO";
handlers = [ "console" ];
};
};
};
extraConfig = ''
with open("${cfg.secretKeyFile}", "r") as file:
SECRET_KEY = file.readline()
'';
};
services.redis.servers.netbox.enable = true;
+2 -1
View File
@@ -460,7 +460,8 @@ in {
netdata = handleTest ./netdata.nix {};
networking.networkd = handleTest ./networking.nix { networkd = true; };
networking.scripted = handleTest ./networking.nix { networkd = false; };
netbox = handleTest ./web-apps/netbox.nix {};
netbox = handleTest ./web-apps/netbox.nix { inherit (pkgs) netbox; };
netbox_3_3 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_3; };
# TODO: put in networking.nix after the test becomes more complete
networkingProxy = handleTest ./networking-proxy.nix {};
nextcloud = handleTest ./nextcloud {};
+8 -4
View File
@@ -1,5 +1,7 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "tracee-integration";
meta.maintainers = pkgs.tracee.meta.maintainers;
nodes = {
machine = { config, pkgs, ... }: {
# EventFilters/trace_only_events_from_new_containers and
@@ -7,11 +9,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
# require docker/dockerd
virtualisation.docker.enable = true;
environment.systemPackages = [
environment.systemPackages = with pkgs; [
# required by Test_EventFilters/trace_events_from_ls_and_which_binary_in_separate_scopes
pkgs.which
which
# build the go integration tests as a binary
(pkgs.tracee.overrideAttrs (oa: {
(tracee.overrideAttrs (oa: {
pname = oa.pname + "-integration";
postPatch = oa.postPatch or "" + ''
# prepare tester.sh (which will be embedded in the test binary)
@@ -20,10 +22,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
# fix the test to look at nixos paths for running programs
substituteInPlace tests/integration/integration_test.go \
--replace "bin=/usr/bin/" "comm=" \
--replace "binary=/usr/bin/" "comm=" \
--replace "/usr/bin/dockerd" "dockerd" \
--replace "/usr/bin" "/run/current-system/sw/bin"
'';
nativeBuildInputs = oa.nativeBuildInputs or [ ] ++ [ pkgs.makeWrapper ];
nativeBuildInputs = oa.nativeBuildInputs or [ ] ++ [ makeWrapper ];
buildPhase = ''
runHook preBuild
# just build the static lib we need for the go test binary
@@ -34,6 +37,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
runHook postBuild
'';
doCheck = false;
outputs = [ "out" ];
installPhase = ''
mkdir -p $out/bin
mv $GOPATH/tracee-integration $out/bin/
+292 -5
View File
@@ -1,21 +1,146 @@
import ../make-test-python.nix ({ lib, pkgs, ... }: {
let
ldapDomain = "example.org";
ldapSuffix = "dc=example,dc=org";
ldapRootUser = "admin";
ldapRootPassword = "foobar";
testUser = "alice";
testPassword = "verySecure";
testGroup = "netbox-users";
in import ../make-test-python.nix ({ lib, pkgs, netbox, ... }: {
name = "netbox";
meta = with lib.maintainers; {
maintainers = [ n0emis ];
maintainers = [ minijackson n0emis ];
};
nodes.machine = { ... }: {
nodes.machine = { config, ... }: {
services.netbox = {
enable = true;
package = netbox;
secretKeyFile = pkgs.writeText "secret" ''
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
'';
enableLdap = true;
ldapConfigPath = pkgs.writeText "ldap_config.py" ''
import ldap
from django_auth_ldap.config import LDAPSearch, PosixGroupType
AUTH_LDAP_SERVER_URI = "ldap://localhost/"
AUTH_LDAP_USER_SEARCH = LDAPSearch(
"ou=accounts,ou=posix,${ldapSuffix}",
ldap.SCOPE_SUBTREE,
"(uid=%(user)s)",
)
AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
"ou=groups,ou=posix,${ldapSuffix}",
ldap.SCOPE_SUBTREE,
"(objectClass=posixGroup)",
)
AUTH_LDAP_GROUP_TYPE = PosixGroupType()
# Mirror LDAP group assignments.
AUTH_LDAP_MIRROR_GROUPS = True
# For more granular permissions, we can map LDAP groups to Django groups.
AUTH_LDAP_FIND_GROUP_PERMS = True
'';
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts.netbox = {
default = true;
locations."/".proxyPass = "http://localhost:${toString config.services.netbox.port}";
locations."/static/".alias = "/var/lib/netbox/static/";
};
};
# Adapted from the sssd-ldap NixOS test
services.openldap = {
enable = true;
settings = {
children = {
"cn=schema".includes = [
"${pkgs.openldap}/etc/schema/core.ldif"
"${pkgs.openldap}/etc/schema/cosine.ldif"
"${pkgs.openldap}/etc/schema/inetorgperson.ldif"
"${pkgs.openldap}/etc/schema/nis.ldif"
];
"olcDatabase={1}mdb" = {
attrs = {
objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ];
olcDatabase = "{1}mdb";
olcDbDirectory = "/var/lib/openldap/db";
olcSuffix = ldapSuffix;
olcRootDN = "cn=${ldapRootUser},${ldapSuffix}";
olcRootPW = ldapRootPassword;
};
};
};
};
declarativeContents = {
${ldapSuffix} = ''
dn: ${ldapSuffix}
objectClass: top
objectClass: dcObject
objectClass: organization
o: ${ldapDomain}
dn: ou=posix,${ldapSuffix}
objectClass: top
objectClass: organizationalUnit
dn: ou=accounts,ou=posix,${ldapSuffix}
objectClass: top
objectClass: organizationalUnit
dn: uid=${testUser},ou=accounts,ou=posix,${ldapSuffix}
objectClass: person
objectClass: posixAccount
userPassword: ${testPassword}
homeDirectory: /home/${testUser}
uidNumber: 1234
gidNumber: 1234
cn: ""
sn: ""
dn: ou=groups,ou=posix,${ldapSuffix}
objectClass: top
objectClass: organizationalUnit
dn: cn=${testGroup},ou=groups,ou=posix,${ldapSuffix}
objectClass: posixGroup
gidNumber: 2345
memberUid: ${testUser}
'';
};
};
users.users.nginx.extraGroups = [ "netbox" ];
networking.firewall.allowedTCPPorts = [ 80 ];
};
testScript = ''
machine.start()
testScript = let
changePassword = pkgs.writeText "change-password.py" ''
from django.contrib.auth.models import User
u = User.objects.get(username='netbox')
u.set_password('netbox')
u.save()
'';
in ''
from typing import Any, Dict
import json
start_all()
machine.wait_for_unit("netbox.target")
machine.wait_until_succeeds("journalctl --since -1m --unit netbox --grep Listening")
@@ -26,5 +151,167 @@ import ../make-test-python.nix ({ lib, pkgs, ... }: {
with subtest("Staticfiles are generated"):
machine.succeed("test -e /var/lib/netbox/static/netbox.js")
with subtest("Superuser can be created"):
machine.succeed(
"netbox-manage createsuperuser --noinput --username netbox --email netbox@example.com"
)
# Django doesn't have a "clean" way of inputting the password from the command line
machine.succeed("cat '${changePassword}' | netbox-manage shell")
machine.wait_for_unit("network.target")
with subtest("Home screen loads from nginx"):
machine.succeed(
"curl -sSfL http://localhost | grep '<title>Home | NetBox</title>'"
)
with subtest("Staticfiles can be fetched"):
machine.succeed("curl -sSfL http://localhost/static/netbox.js")
machine.succeed("curl -sSfL http://localhost/static/docs/")
with subtest("Can interact with API"):
json.loads(
machine.succeed("curl -sSfL -H 'Accept: application/json' 'http://localhost/api/'")
)
def login(username: str, password: str):
encoded_data = json.dumps({"username": username, "password": password})
uri = "/users/tokens/provision/"
result = json.loads(
machine.succeed(
"curl -sSfL "
"-X POST "
"-H 'Accept: application/json' "
"-H 'Content-Type: application/json' "
f"'http://localhost/api{uri}' "
f"--data '{encoded_data}'"
)
)
return result["key"]
with subtest("Can login"):
auth_token = login("netbox", "netbox")
def get(uri: str):
return json.loads(
machine.succeed(
"curl -sSfL "
"-H 'Accept: application/json' "
f"-H 'Authorization: Token {auth_token}' "
f"'http://localhost/api{uri}'"
)
)
def delete(uri: str):
return machine.succeed(
"curl -sSfL "
f"-X DELETE "
"-H 'Accept: application/json' "
f"-H 'Authorization: Token {auth_token}' "
f"'http://localhost/api{uri}'"
)
def data_request(uri: str, method: str, data: Dict[str, Any]):
encoded_data = json.dumps(data)
return json.loads(
machine.succeed(
"curl -sSfL "
f"-X {method} "
"-H 'Accept: application/json' "
"-H 'Content-Type: application/json' "
f"-H 'Authorization: Token {auth_token}' "
f"'http://localhost/api{uri}' "
f"--data '{encoded_data}'"
)
)
def post(uri: str, data: Dict[str, Any]):
return data_request(uri, "POST", data)
def patch(uri: str, data: Dict[str, Any]):
return data_request(uri, "PATCH", data)
with subtest("Can create objects"):
result = post("/dcim/sites/", {"name": "Test site", "slug": "test-site"})
site_id = result["id"]
# Example from:
# http://netbox.extra.cea.fr/static/docs/integrations/rest-api/#creating-a-new-object
post("/ipam/prefixes/", {"prefix": "192.0.2.0/24", "site": site_id})
result = post(
"/dcim/manufacturers/",
{"name": "Test manufacturer", "slug": "test-manufacturer"}
)
manufacturer_id = result["id"]
# Had an issue with device-types before NetBox 3.4.0
result = post(
"/dcim/device-types/",
{
"model": "Test device type",
"manufacturer": manufacturer_id,
"slug": "test-device-type",
},
)
device_type_id = result["id"]
with subtest("Can list objects"):
result = get("/dcim/sites/")
assert result["count"] == 1
assert result["results"][0]["id"] == site_id
assert result["results"][0]["name"] == "Test site"
assert result["results"][0]["description"] == ""
result = get("/dcim/device-types/")
assert result["count"] == 1
assert result["results"][0]["id"] == device_type_id
assert result["results"][0]["model"] == "Test device type"
with subtest("Can update objects"):
new_description = "Test site description"
patch(f"/dcim/sites/{site_id}/", {"description": new_description})
result = get(f"/dcim/sites/{site_id}/")
assert result["description"] == new_description
with subtest("Can delete objects"):
# Delete a device-type since no object depends on it
delete(f"/dcim/device-types/{device_type_id}/")
result = get("/dcim/device-types/")
assert result["count"] == 0
with subtest("Can use the GraphQL API"):
encoded_data = json.dumps({
"query": "query { prefix_list { prefix, site { id, description } } }",
})
result = json.loads(
machine.succeed(
"curl -sSfL "
"-H 'Accept: application/json' "
"-H 'Content-Type: application/json' "
f"-H 'Authorization: Token {auth_token}' "
"'http://localhost/graphql/' "
f"--data '{encoded_data}'"
)
)
assert len(result["data"]["prefix_list"]) == 1
assert result["data"]["prefix_list"][0]["prefix"] == "192.0.2.0/24"
assert result["data"]["prefix_list"][0]["site"]["id"] == str(site_id)
assert result["data"]["prefix_list"][0]["site"]["description"] == new_description
with subtest("Can login with LDAP"):
machine.wait_for_unit("openldap.service")
login("alice", "${testPassword}")
with subtest("Can associate LDAP groups"):
result = get("/users/users/?username=${testUser}")
assert result["count"] == 1
assert any(group["name"] == "${testGroup}" for group in result["results"][0]["groups"])
'';
})
@@ -6,23 +6,24 @@
# adds support for handling removable media (vifm-media). Linux only!
, mediaSupport ? false, python3 ? null, udisks2 ? null, lib ? null
, gitUpdater
}:
let isFullPackage = mediaSupport;
in stdenv.mkDerivation rec {
pname = if isFullPackage then "vifm-full" else "vifm";
version = "0.12.1";
version = "0.13";
src = fetchurl {
url = "https://github.com/vifm/vifm/releases/download/v${version}/vifm-${version}.tar.bz2";
sha256 = "sha256-j+KBPr3Mz+ma7OArBdYqIJkVJdRrDM+67Dr2FMZlVog=";
hash = "sha256-DZKTdJp5QHat6Wfs3EfRQdheRQNwWUdlORvfGpvUUHU=";
};
nativeBuildInputs = [ perl pkg-config makeWrapper ];
buildInputs = [ ncurses libX11 util-linux file which groff ];
postPatch = ''
# Avoid '#!/usr/bin/env perl' reverences to build help.
# Avoid '#!/usr/bin/env perl' references to build help.
patchShebangs --build src/helpztags
'';
@@ -37,6 +38,12 @@ in stdenv.mkDerivation rec {
${lib.optionalString mediaSupport wrapVifmMedia}
'';
passthru.updateScript = gitUpdater {
url = "https://github.com/vifm/vifm.git";
rev-prefix = "v";
ignoredVersions = "beta";
};
meta = with lib; {
description = "A vi-like file manager${lib.optionalString isFullPackage "; Includes support for optional features"}";
maintainers = with maintainers; [ raskin ];
@@ -1,21 +1,21 @@
{
"stable": {
"version": "111.0.5563.146",
"sha256": "1zmm926fsifqaw60ilfav017xxnvnhvqbbq7qcrhdyjm3fiiyw0y",
"sha256bin64": "00z4rqgpd6sdmh5dlqbyk6c3ja8kyssw418rn6b3kc93zvn7df0p",
"version": "112.0.5615.49",
"sha256": "0hgzbbmz40235binfn3vkkxzvwxilaxg04dclqrz980z7hvkgzfx",
"sha256bin64": "0jq5pbyayk8pa9ksxp2dk3k7j2jic506mfpkq1a1z48j1l4fkr5i",
"deps": {
"gn": {
"version": "2022-12-12",
"version": "2023-02-17",
"url": "https://gn.googlesource.com/gn",
"rev": "5e19d2fb166fbd4f6f32147fbb2f497091a54ad8",
"sha256": "1b5fwldfmkkbpp5x63n1dxv0nc965hphc8rm8ah7zg44zscm9z30"
"rev": "b25a2f8c2d33f02082f0f258350f5e22c0973108",
"sha256": "075p4jwk1apvwmqmvhwfw5f669ci7nxwjq9mz5aa2g5lz4fkdm4c"
}
},
"chromedriver": {
"version": "111.0.5563.64",
"sha256_linux": "0f4v6hds5wl43hnmqxmzidlg5nqgr4iy04hmrmvzaihsdny3na8s",
"sha256_darwin": "0izdp36d4wid5hmz8wcna3gddly7nbkafqqf5k1ikb2jgx9ipp8f",
"sha256_darwin_aarch64": "0yzn7bibj36wrc980s9sa8cl0qds01n9i88jk95afx5lk5zb8rgc"
"version": "112.0.5615.28",
"sha256_linux": "13i2y1zd3dxjvs9575m00gg8xxll1g08sn7dayl7l8qr3zy74p98",
"sha256_darwin": "0mw8h7ijc0nf7c2j731w30ajh6djy1lk6nak81fpksgk98vkv64f",
"sha256_darwin_aarch64": "103b3n7vxqvim4ks8vi5b29d41wdldkj1rz94fnqvgw04lykm9sk"
}
},
"beta": {
@@ -32,9 +32,9 @@
}
},
"dev": {
"version": "113.0.5672.12",
"sha256": "1h0mll8xq096jzqg4hhwcaxg12j5pinjjyicm276f7r5m12l1c1x",
"sha256bin64": "1ffyhigs4x3c1cr4r8pv5jjg6qx9pxwy0hmyp9a1196jxkh65kpy",
"version": "113.0.5672.24",
"sha256": "1z7yv5lqi1n4ycymkf0kz1v8ig06n430a37ik8hri3a6db8r9lv8",
"sha256bin64": "0byksvk781gmh5fmjmc77jh19gvkzadf78yr9b4c42las44g4pn4",
"deps": {
"gn": {
"version": "2023-03-18",
+4 -1
View File
@@ -90,7 +90,10 @@ in llvmPackages_15.stdenv.mkDerivation {
description = "A Common Lisp implementation based on LLVM with C++ integration";
license = lib.licenses.lgpl21Plus ;
maintainers = [lib.maintainers.raskin lib.maintainers.uthar];
platforms = lib.platforms.linux;
platforms = ["x86_64-linux" "x86_64-darwin"];
# Upstream claims support, but breaks with:
# error: use of undeclared identifier 'aligned_alloc'
broken = llvmPackages_15.stdenv.isDarwin;
homepage = "https://github.com/clasp-developers/clasp";
};
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
maintainers = with maintainers; [ prusnak ];
maintainers = with maintainers; [ prusnak prtzl ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
@@ -3,6 +3,8 @@
, fetchurl
, ncurses5
, python38
, libxcrypt-legacy
, runtimeShell
}:
stdenv.mkDerivation rec {
@@ -38,10 +40,21 @@ stdenv.mkDerivation rec {
find $out -type f | while read f; do
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 ]} "$f" || true
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 libxcrypt-legacy ]} "$f" || true
done
'';
postFixup = ''
mv $out/bin/arm-none-eabi-gdb $out/bin/arm-none-eabi-gdb-unwrapped
cat <<EOF > $out/bin/arm-none-eabi-gdb
#!${runtimeShell}
export PYTHONPATH=${python38}/lib/python3.8
export PYTHONHOME=${python38}/bin/python3.8
$out/bin/arm-none-eabi-gdb-unwrapped
EOF
chmod +x $out/bin/arm-none-eabi-gdb
'';
meta = with lib; {
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
@@ -3,6 +3,8 @@
, fetchurl
, ncurses5
, python38
, libxcrypt-legacy
, runtimeShell
}:
stdenv.mkDerivation rec {
@@ -40,15 +42,26 @@ stdenv.mkDerivation rec {
find $out -type f | while read f; do
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 ]} "$f" || true
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 libxcrypt-legacy ]} "$f" || true
done
'';
postFixup = ''
mv $out/bin/arm-none-eabi-gdb $out/bin/arm-none-eabi-gdb-unwrapped
cat <<EOF > $out/bin/arm-none-eabi-gdb
#!${runtimeShell}
export PYTHONPATH=${python38}/lib/python3.8
export PYTHONHOME=${python38}/bin/python3.8
$out/bin/arm-none-eabi-gdb-unwrapped
EOF
chmod +x $out/bin/arm-none-eabi-gdb
'';
meta = with lib; {
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
maintainers = with maintainers; [ prusnak ];
maintainers = with maintainers; [ prusnak prtzl ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
@@ -270,6 +270,7 @@ in stdenv.mkDerivation (rec {
# Disables building of shared libs, -fPIC is still injected by cc-wrapper
"-DLLVM_ENABLE_PIC=OFF"
"-DLLVM_BUILD_STATIC=ON"
"-DLLVM_LINK_LLVM_DYLIB=off"
# libxml2 needs to be disabled because the LLVM build system ignores its .la
# file and doesn't link zlib as well.
# https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
@@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "sentry-native";
version = "0.6.0";
version = "0.6.1";
src = fetchFromGitHub {
owner = "getsentry";
repo = "sentry-native";
rev = version;
hash = "sha256-43THyqbujbXIW+y8KPkTiLg95XCV8l1fiWfd2V+/Fas=";
hash = "sha256-I4++of7P8AwTMh48UM+yXjbNykYwJJg1Y8bpGKKAicA=";
};
nativeBuildInputs = [
@@ -20,6 +20,7 @@
:database->nix-expression)
(:export :sqlite-database :init-db)
(:local-nicknames
(:hydra :org.lispbuilds.nix/hydra)
(:json :com.inuoe.jzon)))
(in-package org.lispbuilds.nix/database/sqlite)
@@ -167,7 +168,10 @@ in lib.makeScope pkgs.newScope (self: {")
(str:split-omit-nulls #\, deps)
(set-difference '("asdf" "uiop") :test #'string=)
(sort #'string<)))))
,@(when (or (find #\/ name)
(find name +broken-packages+ :test #'string=))
'(("meta" (:attrs ("broken" (:symbol "true")))))))))))))
("meta" (:attrs
,@(when (or (find #\/ name)
(find name +broken-packages+ :test #'string=))
'(("broken" (:symbol "true"))))
,@(unless (find name hydra:+allowlist+ :test #'string=)
'(("hydraPlatforms" (:list)))))))))))))
(format f "~%})~%"))))
@@ -0,0 +1,415 @@
(defpackage org.lispbuilds.nix/hydra
(:documentation "List of packages allowed to be build on Hydra")
(:use :cl)
(:export
:+allowlist+))
(in-package org.lispbuilds.nix/hydra)
(defparameter +allowlist+
(list
"_1am"
"_3bmd"
"_3bmd-ext-code-blocks"
"access"
"acclimation"
"agutil"
"alexandria"
"anaphora"
"arnesi"
"array-operations"
"array-utils"
"arrows"
"asdf-package-system"
"asdf-system-connections"
"babel"
"binomial-heap"
"binpack"
"blackbird"
"bordeaux-threads"
"buildnode"
"buildnode-xhtml"
"calispel"
"cffi"
"cffi-grovel"
"cffi-toolchain"
"cffi-uffi-compat"
"chanl"
"check-it"
"chipz"
"chunga"
"circular-streams"
"cl-aa"
"cl-ana"
"cl-annot"
"cl-anonfun"
"cl-ansi-text"
"cl-async"
"cl-async-base"
"cl-async-repl"
"cl-async-ssl"
"cl-async-util"
"cl-avro"
"cl-base64"
"cl-cairo2"
"cl-cairo2"
"cl-cairo2-xlib"
"cl-cffi-gtk"
"cl-cffi-gtk-cairo"
"cl-cffi-gtk-gdk"
"cl-cffi-gtk-gdk-pixbuf"
"cl-cffi-gtk-gio"
"cl-cffi-gtk-glib"
"cl-cffi-gtk-gobject"
"cl-cffi-gtk-pango"
"cl-change-case"
"cl-cli"
"cl-colors"
"cl-colors2"
"cl-containers"
"cl-cookie"
"cl-css"
"cl-csv"
"cl-cuda"
"cl-custom-hash-table"
"cl-dbi"
"cl-difflib"
"cl-digraph"
"cl-dot"
"cl-emb"
"cl-environments"
"cl-fad"
"cl-form-types"
"cl-freetype2"
"cl-fuse"
"cl-fuse-meta-fs"
"cl-fuzz"
"cl-geometry"
"cl-gobject-introspection"
"cl-gtk2-gdk"
"cl-gtk2-glib"
"cl-gtk2-pango"
"cl-gtk4"
"cl-gtk4.adw"
"cl-gtk4.webkit2"
"cl-heap"
"cl-hooks"
"cl-html-diff"
"cl-html-parse"
"cl-html5-parser"
"cl-interpol"
"cl-jpeg"
"cl-json"
"cl-l10n"
"cl-l10n-cldr"
"cl-libuv"
"cl-libxml2"
"cl-libyaml"
"cl-locale"
"cl-markup"
"cl-mustache"
"cl-mysql"
"cl-num-utils"
"cl-pango"
"cl-paths"
"cl-paths-ttf"
"cl-pattern"
"cl-pdf"
"cl-postgres"
"cl-postgres+local-time"
"cl-ppcre"
"cl-ppcre-template"
"cl-ppcre-unicode"
"cl-prevalence"
"cl-qprint"
"cl-qrencode"
"cl-readline"
"cl-reexport"
"cl-rsvg2"
"cl-sat"
"cl-sat.glucose"
"cl-sat.minisat"
"cl-shellwords"
"cl-slice"
"cl-smt-lib"
"cl-smtp"
"cl-speedy-queue"
"cl-store"
"cl-svg"
"cl-syntax"
"cl-syntax-annot"
"cl-syntax-anonfun"
"cl-syntax-markup"
"cl-syslog"
"cl-test-more"
"cl-typesetting"
"cl-unicode"
"cl-unification"
"cl-utilities"
"cl-vectors"
"cl-webkit2"
"cl-who"
"cl-xmlspam"
"cl+ssl"
"clack"
"clack-socket"
"classowary"
"clfswm"
"closer-mop"
"closure-common"
"closure-html"
"clsql"
"clsql-postgresql"
"clsql-postgresql-socket"
"clsql-sqlite3"
"clsql-uffi"
"clss"
"cluffer"
"clump"
"clump-2-3-tree"
"clump-binary-tree"
"clunit"
"clunit2"
"clx"
"clx-truetype"
"collectors"
"colorize"
"command-line-arguments"
"css-lite"
"css-selectors"
"css-selectors-simple-tree"
"css-selectors-stp"
"cxml"
"cxml-stp"
"data-table"
"dbd-mysql"
"dbd-postgres"
"dbd-sqlite3"
"dbi"
"dbi-test"
"dbus"
"defclass-std"
"dexador"
"dissect"
"djula"
"do-urlencode"
"documentation-utils"
"drakma"
"eager-future2"
"enchant"
"esrap"
"esrap-peg"
"external-program"
"fare-csv"
"fare-mop"
"fare-quasiquote"
"fare-quasiquote-extras"
"fare-quasiquote-optima"
"fare-quasiquote-readtable"
"fare-utils"
"fast-http"
"fast-io"
"fiasco"
"file-attributes"
"fiveam"
"flexi-streams"
"float-features"
"flow"
"fn"
"form-fiddle"
"fset"
"generic-cl"
"gettext"
"global-vars"
"glsl-docs"
"glsl-spec"
"glsl-symbols"
"gsll"
"heap"
"html-encode"
"http-body"
"hu.dwim.asdf"
"hu.dwim.common"
"hu.dwim.common-lisp"
"hu.dwim.def"
"hu.dwim.def+swank"
"hu.dwim.defclass-star"
"hu.dwim.stefil"
"hu.dwim.stefil+hu.dwim.def"
"hu.dwim.stefil+hu.dwim.def+swank"
"hu.dwim.stefil+swank"
"hunchensocket"
"hunchentoot"
"idna"
"ieee-floats"
"inferior-shell"
"introspect-environment"
"iolib"
"iolib.asdf"
"iolib.base"
"iolib.common-lisp"
"iolib.conf"
"ironclad"
"iterate"
"jonathan"
"jpl-queues"
"jpl-util"
"jsown"
"kmrcl"
"lack"
"lack-component"
"lack-middleware-backtrace"
"lack-util"
"lambda-fiddle"
"legit"
"let-plus"
"lev"
"lfarm-client"
"lfarm-common"
"lfarm-server"
"lfarm-ssl"
"lift"
"lisp-binary"
"lisp-namespace"
"lisp-unit"
"lisp-unit2"
"lla"
"local-time"
"log4cl"
"lparallel"
"lquery"
"ltk"
"marshal"
"md5"
"metabang-bind"
"metatilities-base"
"mgl"
"mgl-mat"
"mgl-pax"
"minheap"
"misc-extensions"
"mk-string-metrics"
"mmap"
"moptilities"
"more-conditions"
"mt19937"
"named-readtables"
"nbd"
"net-telent-date"
"net.didierverna.asdf-flv"
"nibbles"
"nyxt"
"optima"
"osicat"
"parachute"
"parenscript"
"parse-declarations-1.0"
"parse-float"
"parse-number"
"parseq"
"parser-combinators"
"parser.common-rules"
"pcall"
"pcall-queue"
"physical-quantities"
"plump"
"postmodern"
"proc-parse"
"prove"
"prove-asdf"
"ptester"
"puri"
"pythonic-string-reader"
"pzmq"
"pzmq-compat"
"pzmq-examples"
"pzmq-test"
"qt"
"qt-libs"
"qtools"
"quasiquote-2.0"
"query-fs"
"quri"
"rfc2388"
"rove"
"rt"
"s-sql"
"s-sysdeps"
"s-xml"
"salza2"
"serapeum"
"simple-date"
"simple-date-time"
"simple-inferiors"
"simple-tasks"
"slynk"
"smart-buffer"
"smug"
"spinneret"
"split-sequence"
"sqlite"
"static-dispatch"
"static-vectors"
"stefil"
"str"
"string-case"
"stumpwm"
"swank"
"swap-bytes"
"sycamore"
"symbol-munger"
"trees"
"trivia"
"trivia.balland2006"
"trivia.level0"
"trivia.level1"
"trivia.level2"
"trivia.quasiquote"
"trivia.trivial"
"trivial-arguments"
"trivial-backtrace"
"trivial-clipboard"
"trivial-cltl2"
"trivial-features"
"trivial-file-size"
"trivial-garbage"
"trivial-gray-streams"
"trivial-indent"
"trivial-macroexpand-all"
"trivial-main-thread"
"trivial-mimes"
"trivial-package-local-nicknames"
"trivial-package-manager"
"trivial-shell"
"trivial-types"
"trivial-utf-8"
"trivial-with-current-source-form"
"type-i"
"uax-15"
"uffi"
"unit-test"
"unix-options"
"unix-opts"
"usocket"
"usocket-server"
"utilities.print-items"
"utilities.print-tree"
"uuid"
"varjo"
"vas-string-metrics"
"vecto"
"vom"
"wild-package-inferred-system"
"woo"
"wookie"
"xembed"
"xkeyboard"
"xml.location"
"xmls"
"xpath"
"xsubseq"
"yacc"
"yason"
"zpb-ttf"
"zpng"
))
@@ -57,6 +57,8 @@
(defvar *nix-attrs-depth* 0)
(defun nix-attrs (keyvals)
(when (null keyvals)
(return-from nix-attrs "{}"))
(let ((*nix-attrs-depth* (1+ *nix-attrs-depth*)))
(format
nil
File diff suppressed because it is too large Load Diff
@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "vitess";
version = "16.0.0";
version = "16.0.1";
src = fetchFromGitHub {
owner = "vitessio";
repo = pname;
rev = "v${version}";
hash = "sha256-Gvk608nM7Uiazuf9qzmd0uzBP4vPSQfkpAWvnSeWm84=";
hash = "sha256-2iy80Ac8yh7lTiM53qXygVX/n3r2C/MmijoQRXIhoRk=";
};
vendorHash = "sha256-3GqEMoFYm0TZihoPINf8mwCl3Ky6Lt+LxueYLoFDj2g=";
vendorHash = "sha256-hC0skrEDXn6SXjH75ur77I0pHnGSURErAy97lmVvqro=";
buildInputs = [ sqlite ];
+3 -3
View File
@@ -2,18 +2,18 @@
rustPlatform.buildRustPackage rec {
pname = "viceroy";
version = "0.4.1";
version = "0.4.2";
src = fetchFromGitHub {
owner = "fastly";
repo = pname;
rev = "v${version}";
hash = "sha256-Q/FLvZqmih3StVmLvEmJ5tY7Lz3dqFPUEn9HNubLNMY=";
hash = "sha256-T0i0vgwWupCc6C1Cn+Mwo+5CsTmmjD6F6nzsIuOZr/M=";
};
buildInputs = lib.optional stdenv.isDarwin Security;
cargoHash = "sha256-SCaP6JtLztIO9Od75i4GkMPbLqpf52sAZVPHG86VcX0=";
cargoHash = "sha256-+CNsChYJU5ut9y7JlqhWZH9VuGwnrxZMguROFtdjFMU=";
cargoTestFlags = [
"--package viceroy-lib"
+2 -2
View File
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "crispy-doom";
version = "5.12.0";
version = "6.0";
src = fetchFromGitHub {
owner = "fabiangreffrath";
repo = pname;
rev = "${pname}-${version}";
sha256 = "sha256-ep48Lgxw0yKd7+Cx6wMEnOqu/1vjdCM36+TKv1sb1Tk=";
sha256 = "sha256-s/TAg0Di8Pkdjhk38c8OanmngjLqA8iEPweVRf1qwQI=";
};
postPatch = ''
+10 -1
View File
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub
{ stdenv, lib, fetchFromGitHub, imagemagick
, gettext, glibcLocalesUtf8, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, zlib
, gitUpdater
@@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Y1D9oLqO4al+1OXV9QhlzlZxSZtcQJtBQAzXqyhBFKI=";
};
nativeBuildInputs = [ imagemagick ];
buildInputs = [ gettext glibcLocalesUtf8 libpng SDL2 SDL2_image SDL2_mixer SDL2_ttf zlib ];
makeFlags = [
@@ -38,6 +40,13 @@ stdenv.mkDerivation rec {
install -Dm644 -t $out/share/fheroes2/files/lang $PWD/files/lang/*.mo
install -Dm644 -t $out/share/fheroes2/files/data $PWD/files/data/resurrection.h2d
install -Dm644 -t $out/share/applications $PWD/script/packaging/common/fheroes2.desktop
for size in 16 24 32 48 64 128; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
convert -resize "$size"x"$size" $PWD/src/resources/fheroes2.png $out/share/icons/hicolor/"$size"x"$size"/apps/fheroes2.png
done;
runHook postInstall
'';
+2 -2
View File
@@ -25,11 +25,11 @@ let
in
stdenv.mkDerivation rec {
pname = "unciv";
version = "4.5.13";
version = "4.5.15";
src = fetchurl {
url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar";
hash = "sha256-wagguIz4g4DT5aCw6DzFHpHcDznGnkeyG588cSiTtds=";
hash = "sha256-tZsWJ3Icd5c+NU0WK1wCz2+0fk5uL6frCEd+nc5VxpQ=";
};
dontUnpack = true;
+35
View File
@@ -417,4 +417,39 @@ rec {
'';
};
# Outputs a succession of Python variable assignments
# Useful for many Django-based services
pythonVars = {}: {
type = with lib.types; let
valueType = nullOr(oneOf [
bool
float
int
path
str
(attrsOf valueType)
(listOf valueType)
]) // {
description = "Python value";
};
in attrsOf valueType;
generate = name: value: pkgs.callPackage ({ runCommand, python3, black }: runCommand name {
nativeBuildInputs = [ python3 black ];
value = builtins.toJSON value;
pythonGen = ''
import json
import os
with open(os.environ["valuePath"], "r") as f:
for key, value in json.load(f).items():
print(f"{key} = {repr(value)}")
'';
passAsFile = [ "value" "pythonGen" ];
} ''
cat "$valuePath"
python3 "$pythonGenPath" > $out
black $out
'') {};
};
}
@@ -1,17 +1,17 @@
{ pkgs, lib, fetchFromGitHub, buildNpmPackage, python3, nodejs, nixosTests }:
{ lib, stdenv, fetchFromGitHub, buildNpmPackage, python3, nodejs, nixosTests }:
buildNpmPackage rec {
pname = "uptime-kuma";
version = "1.20.0";
version = "1.21.2";
src = fetchFromGitHub {
owner = "louislam";
repo = "uptime-kuma";
rev = version;
sha256 = "sha256-dMjhCsTjXOwxhvJeL25KNkFhRCbCuxG7Ccz8mP7P38A=";
sha256 = "sha256-Xu5mTerhLjOMnLXhjCdnw4yaznfta3h3D9VGk12JziE=";
};
npmDepsHash = "sha256-Ks6KYHP6+ym9PGJ1a5nMxT7JXZyknHeaCmAkjJuCTXU=";
npmDepsHash = "sha256-J00sLDfUOIy/ZJTqKrMY1dAyE3HY9Cqm9vTEm2lmLoY=";
patches = [
# Fixes the permissions of the database being not set correctly
@@ -38,7 +38,10 @@ buildNpmPackage rec {
meta = with lib; {
description = "A fancy self-hosted monitoring tool";
homepage = "https://github.com/louislam/uptime-kuma";
changelog = "https://github.com/louislam/uptime-kuma/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ julienmalka ];
# FileNotFoundError: [Errno 2] No such file or directory: 'xcrun'
broken = stdenv.isDarwin;
};
}
@@ -1,5 +1,5 @@
{ callPackage, ... }@args:
callPackage ./generic.nix ({
callPackage ../generic.nix ({
version = "11.3.5";
hash = "sha256-/InWly0jCiPBlgM/qgS6ErMv7Hhg5PW9sldda1oaUIg=";
vendorHash = "sha256-NkiFLEHBNjxUOSuAlVugAV14yCCo3z6yhX7LZQFKhvA=";
-8
View File
@@ -1,8 +0,0 @@
{ callPackage, ... }@args:
callPackage ./generic.nix ({
version = "12.1.0";
hash = "sha256-rM8ehf4Bb+IvbLLeZEfQZnq6ViAp4d3RiYv1lGYbrOc=";
vendorHash = "sha256-euzu6GROCZnmawLnh549ETlfLDqKFuUG9YM6klXO3z0=";
cargoHash = "sha256-p8N07EITd+EAMJxMqBtg+1kOuqa94e5c3NtT3Z4VL6g=";
yarnHash = "sha256-zwKjuP85VCCghpRdwGtaul9VtMF5ByMJ45QU7wgrteg=";
} // builtins.removeAttrs args [ "callPackage" ])
+1861
View File
File diff suppressed because it is too large Load Diff
+13
View File
@@ -0,0 +1,13 @@
{ callPackage, ... }@args:
callPackage ../generic.nix ({
version = "12.1.5";
hash = "sha256-bPnXZTe4LB50W2UT/sA+2Or/LJMqcEuPpTTF8ue/2Ak=";
vendorHash = "sha256-mznhfliYpsJJJSL17Q7WXX0SkIn+Bcb1fzYdLRTRDI0=";
yarnHash = "sha256-cElFTxolQnJAbpln2aGjlTJr/hbUML4QHeHQ3yrWVqU=";
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"rdp-rs-0.1.0" = "sha256-n4x4w7GZULxqaR109das12+ZGU0xvY3wGOTWngcwe4M=";
};
};
} // builtins.removeAttrs args [ "callPackage" ])
+3 -4
View File
@@ -4,14 +4,12 @@
, fetchFromGitHub
, fetchYarnDeps
, makeWrapper
, symlinkJoin
, CoreFoundation
, AppKit
, libfido2
, nodejs
, openssl
, pkg-config
, protobuf
, Security
, stdenv
, xdg-utils
@@ -24,7 +22,8 @@
, version
, hash
, vendorHash
, cargoHash
, cargoHash ? null
, cargoLock ? null
, yarnHash
}:
let
@@ -39,7 +38,7 @@ let
rdpClient = rustPlatform.buildRustPackage rec {
pname = "teleport-rdpclient";
inherit cargoHash;
inherit cargoHash cargoLock;
inherit version src;
buildAndTestSubdir = "lib/srv/desktop/rdp/rdpclient";
+8 -8
View File
@@ -1,30 +1,30 @@
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index d5a7bfaec..68754a8c5 100644
index 2de06dd10..00406af48 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -222,6 +222,7 @@ TASKS_REDIS_PASSWORD = TASKS_REDIS.get('PASSWORD', '')
TASKS_REDIS_DATABASE = TASKS_REDIS.get('DATABASE', 0)
@@ -236,6 +236,7 @@ TASKS_REDIS_DATABASE = TASKS_REDIS.get('DATABASE', 0)
TASKS_REDIS_SSL = TASKS_REDIS.get('SSL', False)
TASKS_REDIS_SKIP_TLS_VERIFY = TASKS_REDIS.get('INSECURE_SKIP_TLS_VERIFY', False)
TASKS_REDIS_CA_CERT_PATH = TASKS_REDIS.get('CA_CERT_PATH', False)
+TASKS_REDIS_URL = TASKS_REDIS.get('URL')
# Caching
if 'caching' not in REDIS:
@@ -236,11 +237,12 @@ CACHING_REDIS_SENTINELS = REDIS['caching'].get('SENTINELS', [])
CACHING_REDIS_SENTINEL_SERVICE = REDIS['caching'].get('SENTINEL_SERVICE', 'default')
@@ -253,11 +254,12 @@ CACHING_REDIS_SENTINEL_SERVICE = REDIS['caching'].get('SENTINEL_SERVICE', 'defau
CACHING_REDIS_PROTO = 'rediss' if REDIS['caching'].get('SSL', False) else 'redis'
CACHING_REDIS_SKIP_TLS_VERIFY = REDIS['caching'].get('INSECURE_SKIP_TLS_VERIFY', False)
CACHING_REDIS_CA_CERT_PATH = REDIS['caching'].get('CA_CERT_PATH', False)
+CACHING_REDIS_URL = REDIS['caching'].get('URL', f'{CACHING_REDIS_PROTO}://{CACHING_REDIS_HOST}:{CACHING_REDIS_PORT}/{CACHING_REDIS_DATABASE}')
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
- 'LOCATION': f'{CACHING_REDIS_PROTO}://{CACHING_REDIS_HOST}:{CACHING_REDIS_PORT}/{CACHING_REDIS_DATABASE}',
- 'LOCATION': f'{CACHING_REDIS_PROTO}://{CACHING_REDIS_USERNAME_HOST}:{CACHING_REDIS_PORT}/{CACHING_REDIS_DATABASE}',
+ 'LOCATION': CACHING_REDIS_URL,
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'PASSWORD': CACHING_REDIS_PASSWORD,
@@ -383,7 +385,7 @@ USE_X_FORWARDED_HOST = True
@@ -410,7 +412,7 @@ USE_X_FORWARDED_HOST = True
X_FRAME_OPTIONS = 'SAMEORIGIN'
# Static files (CSS, JavaScript, Images)
@@ -33,7 +33,7 @@ index d5a7bfaec..68754a8c5 100644
STATIC_URL = f'/{BASE_PATH}static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'project-static', 'dist'),
@@ -562,6 +564,14 @@ if TASKS_REDIS_USING_SENTINEL:
@@ -640,6 +642,14 @@ if TASKS_REDIS_USING_SENTINEL:
'socket_connect_timeout': TASKS_REDIS_SENTINEL_TIMEOUT
},
}
@@ -0,0 +1,50 @@
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index d5a7bfaec..68754a8c5 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -222,6 +222,7 @@ TASKS_REDIS_PASSWORD = TASKS_REDIS.get('PASSWORD', '')
TASKS_REDIS_DATABASE = TASKS_REDIS.get('DATABASE', 0)
TASKS_REDIS_SSL = TASKS_REDIS.get('SSL', False)
TASKS_REDIS_SKIP_TLS_VERIFY = TASKS_REDIS.get('INSECURE_SKIP_TLS_VERIFY', False)
+TASKS_REDIS_URL = TASKS_REDIS.get('URL')
# Caching
if 'caching' not in REDIS:
@@ -236,11 +237,12 @@ CACHING_REDIS_SENTINELS = REDIS['caching'].get('SENTINELS', [])
CACHING_REDIS_SENTINEL_SERVICE = REDIS['caching'].get('SENTINEL_SERVICE', 'default')
CACHING_REDIS_PROTO = 'rediss' if REDIS['caching'].get('SSL', False) else 'redis'
CACHING_REDIS_SKIP_TLS_VERIFY = REDIS['caching'].get('INSECURE_SKIP_TLS_VERIFY', False)
+CACHING_REDIS_URL = REDIS['caching'].get('URL', f'{CACHING_REDIS_PROTO}://{CACHING_REDIS_HOST}:{CACHING_REDIS_PORT}/{CACHING_REDIS_DATABASE}')
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
- 'LOCATION': f'{CACHING_REDIS_PROTO}://{CACHING_REDIS_HOST}:{CACHING_REDIS_PORT}/{CACHING_REDIS_DATABASE}',
+ 'LOCATION': CACHING_REDIS_URL,
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'PASSWORD': CACHING_REDIS_PASSWORD,
@@ -383,7 +385,7 @@ USE_X_FORWARDED_HOST = True
X_FRAME_OPTIONS = 'SAMEORIGIN'
# Static files (CSS, JavaScript, Images)
-STATIC_ROOT = BASE_DIR + '/static'
+STATIC_ROOT = getattr(configuration, 'STATIC_ROOT', os.path.join(BASE_DIR, 'static')).rstrip('/')
STATIC_URL = f'/{BASE_PATH}static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'project-static', 'dist'),
@@ -562,6 +564,14 @@ if TASKS_REDIS_USING_SENTINEL:
'socket_connect_timeout': TASKS_REDIS_SENTINEL_TIMEOUT
},
}
+elif TASKS_REDIS_URL:
+ RQ_PARAMS = {
+ 'URL': TASKS_REDIS_URL,
+ 'PASSWORD': TASKS_REDIS_PASSWORD,
+ 'SSL': TASKS_REDIS_SSL,
+ 'SSL_CERT_REQS': None if TASKS_REDIS_SKIP_TLS_VERIFY else 'required',
+ 'DEFAULT_TIMEOUT': RQ_DEFAULT_TIMEOUT,
+ }
else:
RQ_PARAMS = {
'HOST': TASKS_REDIS_HOST,
+23 -101
View File
@@ -1,37 +1,14 @@
{ lib
, pkgs
, fetchFromGitHub
, fetchpatch
, nixosTests
, python3
, plugins ? ps: [] }:
{ lib, nixosTests, callPackage, fetchpatch }:
let
py = python3 // {
pkgs = python3.pkgs.overrideScope (self: super: {
django = super.django_4;
});
};
extraBuildInputs = plugins py.pkgs;
generic = import ./generic.nix;
in
py.pkgs.buildPythonApplication rec {
pname = "netbox";
version = "3.3.9";
format = "other";
src = fetchFromGitHub {
owner = "netbox-community";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-KhnxD5pjlEIgISl4RMbhLCDwgUDfGFRi88ZcP1ndMhI=";
};
patches = [
{
netbox_3_3 = callPackage generic {
version = "3.3.10";
hash = "sha256-MeOfTU5IxNDoUh7FyvwAQNRC/CE0R6p40WnlF+3RuxA=";
extraPatches = [
# Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL
./config.patch
./config_3_3.patch
./graphql-3_2_0.patch
# fix compatibility ith django 4.1
(fetchpatch {
@@ -40,77 +17,22 @@ py.pkgs.buildPythonApplication rec {
})
];
propagatedBuildInputs = with py.pkgs; [
bleach
django_4
django-cors-headers
django-debug-toolbar
django-filter
django-graphiql-debug-toolbar
django-mptt
django-pglocks
django-prometheus
django-redis
django-rq
django-tables2
django-taggit
django-timezone-field
djangorestframework
drf-yasg
swagger-spec-validator # from drf-yasg[validation]
graphene-django
jinja2
markdown
markdown-include
netaddr
pillow
psycopg2
pyyaml
sentry-sdk
social-auth-core
social-auth-app-django
svgwrite
tablib
jsonschema
] ++ extraBuildInputs;
tests.netbox = nixosTests.netbox_3_3;
maintainers = with lib.maintainers; [ n0emis raitobezarius ];
eol = true;
};
buildInputs = with py.pkgs; [
mkdocs-material
mkdocs-material-extensions
mkdocstrings
mkdocstrings-python
netbox = callPackage generic {
version = "3.4.7";
hash = "sha256-pWHGyzLc0tqfehWbCMF1l96L1pewb5FXBUkw9EqPtP8=";
extraPatches = [
# Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL
./config.patch
];
nativeBuildInputs = [
py.pkgs.mkdocs
];
postBuild = ''
PYTHONPATH=$PYTHONPATH:netbox/
python -m mkdocs build
'';
installPhase = ''
mkdir -p $out/opt/netbox
cp -r . $out/opt/netbox
chmod +x $out/opt/netbox/netbox/manage.py
makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \
--prefix PYTHONPATH : "$PYTHONPATH"
'';
passthru = {
# PYTHONPATH of all dependencies used by the package
pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs;
tests = {
inherit (nixosTests) netbox;
};
tests = {
inherit (nixosTests) netbox;
};
meta = with lib; {
homepage = "https://github.com/netbox-community/netbox";
description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool";
license = licenses.asl20;
maintainers = with maintainers; [ n0emis raitobezarius ];
};
}
maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ];
};
}
+110
View File
@@ -0,0 +1,110 @@
{ lib
, fetchFromGitHub
, python3
, version
, hash
, plugins ? ps: []
, extraPatches ? []
, tests ? {}
, maintainers ? []
, eol ? false
}:
let
py = python3 // {
pkgs = python3.pkgs.overrideScope (self: super: {
django = super.django_4;
});
};
extraBuildInputs = plugins py.pkgs;
in
py.pkgs.buildPythonApplication rec {
pname = "netbox";
inherit version;
format = "other";
src = fetchFromGitHub {
owner = "netbox-community";
repo = pname;
rev = "refs/tags/v${version}";
inherit hash;
};
patches = extraPatches;
propagatedBuildInputs = with py.pkgs; [
bleach
django_4
django-cors-headers
django-debug-toolbar
django-filter
django-graphiql-debug-toolbar
django-mptt
django-pglocks
django-prometheus
django-redis
django-rq
django-tables2
django-taggit
django-timezone-field
djangorestframework
drf-yasg
swagger-spec-validator # from drf-yasg[validation]
graphene-django
jinja2
markdown
markdown-include
netaddr
pillow
psycopg2
pyyaml
sentry-sdk
social-auth-core
social-auth-app-django
svgwrite
tablib
jsonschema
] ++ extraBuildInputs;
buildInputs = with py.pkgs; [
mkdocs-material
mkdocs-material-extensions
mkdocstrings
mkdocstrings-python
];
nativeBuildInputs = [
py.pkgs.mkdocs
];
postBuild = ''
PYTHONPATH=$PYTHONPATH:netbox/
python -m mkdocs build
'';
installPhase = ''
mkdir -p $out/opt/netbox
cp -r . $out/opt/netbox
chmod +x $out/opt/netbox/netbox/manage.py
makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \
--prefix PYTHONPATH : "$PYTHONPATH"
'';
passthru = {
# PYTHONPATH of all dependencies used by the package
pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs;
inherit tests;
};
meta = {
homepage = "https://github.com/netbox-community/netbox";
description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool";
license = lib.licenses.asl20;
knownVulnerabilities = (lib.optional eol "Netbox version ${version} is EOL; please upgrade by following the current release notes instructions.");
# Warning:
# Notice the missing `lib` in the inherit: it is using this function argument rather than a `with lib;` argument.
# If you replace this by `with lib;`, pay attention it does not inherit all maintainers in nixpkgs.
inherit maintainers;
};
}
+6 -2
View File
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "mtools";
version = "4.0.42";
version = "4.0.43";
src = fetchurl {
url = "mirror://gnu/mtools/${pname}-${version}.tar.bz2";
sha256 = "sha256-ZL/f3k2Cr2si88HHLD4jHLthj0wjCcxG9U0W1VAszxU=";
sha256 = "sha256-VB4XlmXcTicrlgLyB0JDWRoVfaicxHBk2oxYKdvSszk=";
};
patches = lib.optional stdenv.isDarwin ./UNUSED-darwin.patch;
@@ -18,6 +18,10 @@ stdenv.mkDerivation rec {
doCheck = true;
passthru = {
updateScript = ./update.sh;
};
meta = with lib; {
homepage = "https://www.gnu.org/software/mtools/";
description = "Utilities to access MS-DOS disks";
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts
set -eu -o pipefail
version="$(curl -s --list-only ftp://ftp.gnu.org/gnu/mtools/ | sed 's/^.*-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' | sort -n | uniq | tail -n1)"
update-source-version mtools "$version"
+3 -3
View File
@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "wakapi";
version = "2.6.2";
version = "2.7.0";
src = fetchFromGitHub {
owner = "muety";
repo = pname;
rev = version;
sha256 = "sha256-yMxcePwBUteqrdfvDjZSRInOXMFmwaFoVBihcMQFTME=";
sha256 = "sha256-1EMSrHx6Tx58voz5veyNZg1gnubuGyg2K4dg2QdzmMw=";
};
vendorHash = "sha256-sfx8qlmJrS0hkD6DSvKqfnBDbxj8eNA3hnprSwA2fSI=";
vendorHash = "sha256-0wHXULDKyXYBTGxfSQXT/5NidPtSnx7ujb8vyczmE38=";
# Not a go module required by the project, contains development utilities
excludedPackages = [ "scripts" ];
+2 -2
View File
@@ -18,13 +18,13 @@
stdenv.mkDerivation rec {
pname = "driftnet";
version = "1.4.0";
version = "1.5.0";
src = fetchFromGitHub {
owner = "deiv";
repo = "driftnet";
rev = "refs/tags/v${version}";
hash = "sha256-szmezYnszlRanq8pMD0CIGA+zTYGSwSHcDaZ2Gx1KCA=";
hash = "sha256-lMn60vtOMPs1Tr+SnAOUZDrNIO7gEXdHpizjXiEkkoM=";
};
enableParallelBuilding = true;
+3 -3
View File
@@ -14,16 +14,16 @@ let
in
buildGoModule rec {
pname = "netbird";
version = "0.14.4";
version = "0.14.6";
src = fetchFromGitHub {
owner = "netbirdio";
repo = pname;
rev = "v${version}";
sha256 = "sha256-AzWYJGYlUsgR5ihXwY9ZyN/pL5avionql/jwqhYKsxc=";
sha256 = "sha256-S11PshEVwOYPb8RGs5joC3Cr8CNKAenK6JRd/oV4LNQ=";
};
vendorHash = "sha256-8cVEujVKwKvO81H+ukVxQouVVH7uZm/FwK9RAKJLN2c=";
vendorHash = "sha256-RyTfEZPwr2CNb9M8vGmo4gtbqQDh2KWApyz2Yx6qPmk=";
nativeBuildInputs = [ installShellFiles ] ++ lib.optional ui pkg-config;
+15 -18
View File
@@ -2,7 +2,7 @@
, buildGoModule
, fetchFromGitHub
, llvmPackages_13
, clang
, pkg-config
, zlib
@@ -14,20 +14,17 @@
, tracee
}:
let
inherit (llvmPackages_13) clang;
in
buildGoModule rec {
pname = "tracee";
version = "0.11.0";
version = "0.13.0";
src = fetchFromGitHub {
owner = "aquasecurity";
repo = pname;
rev = "v${version}";
sha256 = "sha256-fAbii/DEXx9WJpolc7amqF9TQj4oE5x0TCiNOtVasGo=";
hash = "sha256-55+eyulFbzR2ZzKbTN5sHIickpwXY8eJDDzf6Gzwhsk=";
};
vendorSha256 = "sha256-eenhIsiJhPLgwJo2spIGURPkcsec3kO4L5UJ0FWniQc=";
vendorHash = "sha256-qEubjzYGdiBntPOJw8dR/THcvK2Bml97SXHImIWbDm0=";
patches = [
./use-our-libbpf.patch
@@ -59,15 +56,16 @@ buildGoModule rec {
# see passthru.tests.integration
doCheck = false;
outputs = [ "out" "lib" "share" ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/tracee}
mkdir -p $out/bin $lib/lib/tracee $share/share/tracee
mv ./dist/tracee-{ebpf,rules} $out/bin/
mv ./dist/rules $out/share/tracee/
mv ./cmd/tracee-rules/templates $out/share/tracee/
mv ./dist/tracee $out/bin/
mv ./dist/tracee.bpf.core.o $lib/lib/tracee/
mv ./cmd/tracee-rules/templates $share/share/tracee/
runHook postInstall
'';
@@ -76,10 +74,8 @@ buildGoModule rec {
installCheckPhase = ''
runHook preInstallCheck
$out/bin/tracee-ebpf --help
$out/bin/tracee-ebpf --version | grep "v${version}"
$out/bin/tracee-rules --help
$out/bin/tracee --help
$out/bin/tracee --version | grep "v${version}"
runHook postInstallCheck
'';
@@ -89,7 +85,7 @@ buildGoModule rec {
version = testers.testVersion {
package = tracee;
version = "v${version}";
command = "tracee-ebpf --version";
command = "tracee --version";
};
};
@@ -111,6 +107,7 @@ buildGoModule rec {
gpl2Plus
];
maintainers = with maintainers; [ jk ];
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
outputsToInstall = [ "out" "share" ];
};
}
@@ -1,5 +1,5 @@
diff --git a/Makefile b/Makefile
index c72cf63d..e96b7eed 100644
index d7596a1a..dd7b97b6 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@ CMD_STATICCHECK ?= staticcheck
@@ -10,18 +10,7 @@ index c72cf63d..e96b7eed 100644
LIB_ELF ?= libelf
LIB_ZLIB ?= zlib
@@ -172,10 +173,6 @@ env:
@echo "KERN_BUILD_PATH $(KERN_BUILD_PATH)"
@echo "KERN_SRC_PATH $(KERN_SRC_PATH)"
@echo ---------------------------------------
- @echo "LIBBPF_CFLAGS $(LIBBPF_CFLAGS)"
- @echo "LIBBPF_LDLAGS $(LIBBPF_LDFLAGS)"
- @echo "LIBBPF_SRC $(LIBBPF_SRC)"
- @echo ---------------------------------------
@echo "STATIC $(STATIC)"
@echo ---------------------------------------
@echo "BPF_VCPU $(BPF_VCPU)"
@@ -274,8 +271,6 @@ OUTPUT_DIR = ./dist
@@ -279,8 +280,6 @@ OUTPUT_DIR = ./dist
$(OUTPUT_DIR):
#
@$(CMD_MKDIR) -p $@
@@ -30,61 +19,7 @@ index c72cf63d..e96b7eed 100644
#
# embedded btfhub
@@ -286,37 +281,6 @@ $(OUTPUT_DIR)/btfhub:
@$(CMD_MKDIR) -p $@
@$(CMD_TOUCH) $@/.place-holder # needed for embed.FS
-#
-# libbpf
-#
-
-LIBBPF_CFLAGS = "-fPIC"
-LIBBPF_LDLAGS =
-LIBBPF_SRC = ./3rdparty/libbpf/src
-
-$(OUTPUT_DIR)/libbpf/libbpf.a: \
- $(LIBBPF_SRC) \
- $(wildcard $(LIBBPF_SRC)/*.[ch]) \
- | .checkver_$(CMD_CLANG) $(OUTPUT_DIR)
-#
- CC="$(CMD_CLANG)" \
- CFLAGS="$(LIBBPF_CFLAGS)" \
- LD_FLAGS="$(LIBBPF_LDFLAGS)" \
- $(MAKE) \
- -C $(LIBBPF_SRC) \
- BUILD_STATIC_ONLY=1 \
- DESTDIR=$(abspath ./$(OUTPUT_DIR)/libbpf/) \
- OBJDIR=$(abspath ./$(OUTPUT_DIR)/libbpf/obj) \
- INCLUDEDIR= LIBDIR= UAPIDIR= prefix= libdir= \
- install install_uapi_headers
-
-$(LIBBPF_SRC): \
- | .check_$(CMD_GIT)
-#
-ifeq ($(wildcard $@), )
- @$(CMD_GIT) submodule update --init --recursive
-endif
-
#
# non co-re ebpf
#
@@ -333,7 +297,6 @@ BPF_NOCORE_TAG = $(subst .,_,$(KERN_RELEASE)).$(subst .,_,$(VERSION))
bpf-nocore: $(OUTPUT_DIR)/tracee.bpf.$(BPF_NOCORE_TAG).o
$(OUTPUT_DIR)/tracee.bpf.$(BPF_NOCORE_TAG).o: \
- $(OUTPUT_DIR)/libbpf/libbpf.a \
$(TRACEE_EBPF_OBJ_SRC)
#
MAKEFLAGS="--no-print-directory"
@@ -351,7 +314,6 @@ $(OUTPUT_DIR)/tracee.bpf.$(BPF_NOCORE_TAG).o: \
-I $(KERN_SRC_PATH)/include/uapi \
-I $(KERN_BUILD_PATH)/include/generated \
-I $(KERN_BUILD_PATH)/include/generated/uapi \
- -I $(OUTPUT_DIR)/libbpf \
-I ./3rdparty/include \
-Wunused \
-Wall \
@@ -412,7 +374,6 @@ TRACEE_EBPF_OBJ_CORE_HEADERS = $(shell find pkg/ebpf/c -name *.h)
@@ -418,7 +417,6 @@ TRACEE_EBPF_OBJ_CORE_HEADERS = $(shell find pkg/ebpf/c -name *.h)
bpf-core: $(OUTPUT_DIR)/tracee.bpf.core.o
$(OUTPUT_DIR)/tracee.bpf.core.o: \
@@ -92,15 +27,7 @@ index c72cf63d..e96b7eed 100644
$(TRACEE_EBPF_OBJ_SRC) \
$(TRACEE_EBPF_OBJ_CORE_HEADERS)
#
@@ -421,7 +382,6 @@ $(OUTPUT_DIR)/tracee.bpf.core.o: \
-D__BPF_TRACING__ \
-DCORE \
-I./pkg/ebpf/c/ \
- -I$(OUTPUT_DIR)/libbpf/ \
-I ./3rdparty/include \
-target bpf \
-O2 -g \
@@ -447,8 +407,8 @@ ifeq ($(STATIC), 1)
@@ -453,8 +451,8 @@ ifeq ($(STATIC), 1)
GO_TAGS_EBPF := $(GO_TAGS_EBPF),netgo
endif
@@ -111,7 +38,7 @@ index c72cf63d..e96b7eed 100644
GO_ENV_EBPF =
GO_ENV_EBPF += GOOS=linux
@@ -468,6 +428,7 @@ $(OUTPUT_DIR)/tracee-ebpf: \
@@ -474,6 +472,7 @@ $(OUTPUT_DIR)/tracee-ebpf: \
$(TRACEE_EBPF_SRC) \
./embedded-ebpf.go \
| .checkver_$(CMD_GO) \
@@ -119,11 +46,3 @@ index c72cf63d..e96b7eed 100644
.checklib_$(LIB_ELF) \
.checklib_$(LIB_ZLIB) \
btfhub
@@ -658,7 +619,6 @@ test-rules: \
.PHONY: test-upstream-libbpfgo
test-upstream-libbpfgo: \
.checkver_$(CMD_GO) \
- $(OUTPUT_DIR)/libbpf/libbpf.a
#
./tests/libbpfgo.sh $(GO_ENV_EBPF)
-1
View File
@@ -13,7 +13,6 @@ stdenv.mkDerivation rec {
patches = [
# issues with popt 1.19 (from upstream but not yet released):
# https://sourceforge.net/p/gptfdisk/code/ci/5d5e76d369a412bfb3d2cebb5fc0a7509cef878d/
# https://github.com/rpm-software-management/popt/issues/80
./popt-1-19.patch
@@ -1,3 +1,25 @@
commit 5d5e76d369a412bfb3d2cebb5fc0a7509cef878d
Author: Rod Smith <rodsmith@rodsbooks.com>
Date: Fri Apr 15 18:10:14 2022 -0400
Fix failure & crash of sgdisk when compiled with latest popt (commit 740; presumably eventually release 1.19)
diff --git a/NEWS b/NEWS
index c7add56..9e153fd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+1.0.10 (?/??/2022):
+-------------------
+
+- Fixed problem that caused sgdisk to crash with errors about being unable
+ to read the disk's partition table when compiled with the latest popt
+ (commit 740, which is pre-release as I type; presumably version 1.19 and
+ later once released).
+
1.0.9 (4/14/2022):
------------------
diff --git a/gptcl.cc b/gptcl.cc
index 34c9421..0d578eb 100644
--- a/gptcl.cc
@@ -11,3 +33,52 @@ index 34c9421..0d578eb 100644
poptResetContext(poptCon);
if (device != NULL) {
diff --git a/support.h b/support.h
index 8ba9ad1..f91f1bc 100644
--- a/support.h
+++ b/support.h
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <string>
-#define GPTFDISK_VERSION "1.0.9"
+#define GPTFDISK_VERSION "1.0.9.1"
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
// Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64
commit f5de3401b974ce103ffd93af8f9d43505a04aaf9
Author: Damian Kurek <starfire24680@gmail.com>
Date: Thu Jul 7 03:39:16 2022 +0000
Fix NULL dereference when duplicating string argument
poptGetArg can return NULL if there are no additional arguments, which
makes strdup dereference NULL on strlen
diff --git a/gptcl.cc b/gptcl.cc
index 0d578eb..ab95239 100644
--- a/gptcl.cc
+++ b/gptcl.cc
@@ -155,10 +155,11 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
} // while
// Assume first non-option argument is the device filename....
- device = strdup((char*) poptGetArg(poptCon));
- poptResetContext(poptCon);
+ device = (char*) poptGetArg(poptCon);
if (device != NULL) {
+ device = strdup(device);
+ poptResetContext(poptCon);
JustLooking(); // reset as necessary
BeQuiet(); // Tell called functions to be less verbose & interactive
if (LoadPartitions((string) device)) {
@@ -498,6 +499,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
cerr << "Error encountered; not saving changes.\n";
retval = 4;
} // if
+ free(device);
} // if (device != NULL)
poptFreeContext(poptCon);
return retval;
+3 -3
View File
@@ -8,16 +8,16 @@
buildGoModule rec {
pname = "d2";
version = "0.2.6";
version = "0.3.0";
src = fetchFromGitHub {
owner = "terrastruct";
repo = pname;
rev = "v${version}";
hash = "sha256-bZJu4l5xAVqm/1HIhHfnZF9JRswAE/c6OzuZ8mmHA9U=";
hash = "sha256-ll6kOmHJZRsN6DkQRAUXyxz61tjwwi+p5eOuLfGDpI8=";
};
vendorHash = "sha256-wXE2+a30KohIOuxFeBQPcV7X2Ka+4t7zqHdr48kifY0=";
vendorHash = "sha256-jfGolYHWX/9Zr5JHiWl8mCfaaRT2AU8v32PtgM1KI8c=";
ldflags = [
"-s"
+216 -19
View File
@@ -26,6 +26,46 @@ dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-wincon",
"concolor-override",
"concolor-query",
"is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2"
[[package]]
name = "anstyle-parse"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-wincon"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa"
dependencies = [
"anstyle",
"windows-sys 0.45.0",
]
[[package]]
name = "arrayref"
version = "0.3.7"
@@ -58,9 +98,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "biblatex"
version = "0.7.0"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bc17a7f4d461f93f5dbbae4c961746cb4aafb5c6c1a61089a86836614932a3c"
checksum = "cc9fd60378277e44cd400ec5f35e768ce0d5a63d8d18ac7b1a9231196251dae5"
dependencies = [
"chrono",
"numerals",
@@ -142,6 +182,48 @@ dependencies = [
"winapi",
]
[[package]]
name = "clap"
version = "4.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3"
dependencies = [
"clap_builder",
"clap_derive",
"once_cell",
]
[[package]]
name = "clap_builder"
version = "4.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f"
dependencies = [
"anstream",
"anstyle",
"bitflags",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.11",
]
[[package]]
name = "clap_lex"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1"
[[package]]
name = "codespan-reporting"
version = "0.11.1"
@@ -179,6 +261,21 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "concolor-override"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f"
[[package]]
name = "concolor-query"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf"
dependencies = [
"windows-sys 0.45.0",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.3"
@@ -258,7 +355,7 @@ dependencies = [
"proc-macro2",
"quote",
"scratch",
"syn 2.0.4",
"syn 2.0.11",
]
[[package]]
@@ -275,7 +372,7 @@ checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.4",
"syn 2.0.11",
]
[[package]]
@@ -333,6 +430,27 @@ dependencies = [
"stable_deref_trait",
]
[[package]]
name = "errno"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0"
dependencies = [
"errno-dragonfly",
"libc",
"windows-sys 0.45.0",
]
[[package]]
name = "errno-dragonfly"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "fancy-regex"
version = "0.7.1"
@@ -433,9 +551,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "hayagriva"
version = "0.2.0"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33f939b9606af811242f770582c89a2f8bb5de4e531c0a1df9d2d4906bcbc32a"
checksum = "d8a21ff266f0b113789bbf4a27da16330315eebbd7df8e844f95d29f92ad556d"
dependencies = [
"biblatex",
"chrono",
@@ -458,6 +576,12 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
[[package]]
name = "hypher"
version = "0.1.1"
@@ -577,6 +701,29 @@ dependencies = [
"libc",
]
[[package]]
name = "io-lifetimes"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.45.0",
]
[[package]]
name = "is-terminal"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "256017f749ab3117e93acb91063009e1f1bb56d03965b14c2c8df4eb02c524d8"
dependencies = [
"hermit-abi",
"io-lifetimes",
"rustix",
"windows-sys 0.45.0",
]
[[package]]
name = "isolang"
version = "2.2.0"
@@ -669,10 +816,17 @@ version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]]
name = "linux-raw-sys"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d"
[[package]]
name = "lipsum"
version = "0.8.2"
source = "git+https://github.com/reknih/lipsum#025427353ab32268daa3d96feda380a96db529c5"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c5e9ef2d2ad6fe67a59ace27c203c8d3a71d195532ee82e3bbe0d5f9a9ca541"
dependencies = [
"rand",
"rand_chacha",
@@ -798,12 +952,27 @@ version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
[[package]]
name = "open"
version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "075c5203b3a2b698bc72c6c10b1f6263182135751d5013ea66e8a4b3d0562a43"
dependencies = [
"pathdiff",
]
[[package]]
name = "paste"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
[[package]]
name = "pathdiff"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd"
[[package]]
name = "pdf-writer"
version = "0.6.0"
@@ -1005,6 +1174,20 @@ dependencies = [
"xmlparser",
]
[[package]]
name = "rustix"
version = "0.37.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e78cc525325c06b4a7ff02db283472f3c042b7ff0c391f96c6d5ac6f4f91b75"
dependencies = [
"bitflags",
"errno",
"io-lifetimes",
"libc",
"linux-raw-sys",
"windows-sys 0.45.0",
]
[[package]]
name = "rustversion"
version = "1.0.12"
@@ -1074,7 +1257,7 @@ checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.4",
"syn 2.0.11",
]
[[package]]
@@ -1127,6 +1310,12 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "strum"
version = "0.24.1"
@@ -1189,9 +1378,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.4"
version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c622ae390c9302e214c31013517c2061ecb2699935882c60a9b37f82f8625ae"
checksum = "21e3787bb71465627110e7d87ed4faaa36c1f61042ee67badb9e2ef173accc40"
dependencies = [
"proc-macro2",
"quote",
@@ -1251,7 +1440,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.4",
"syn 2.0.11",
]
[[package]]
@@ -1318,7 +1507,7 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
[[package]]
name = "typst"
version = "0.0.0"
version = "0.1.0"
dependencies = [
"bitflags",
"bytemuck",
@@ -1354,9 +1543,10 @@ dependencies = [
[[package]]
name = "typst-cli"
version = "0.0.0"
version = "0.1.0"
dependencies = [
"chrono",
"clap",
"codespan-reporting",
"comemo",
"dirs",
@@ -1364,7 +1554,7 @@ dependencies = [
"memmap2",
"notify",
"once_cell",
"pico-args",
"open",
"same-file",
"siphasher",
"typst",
@@ -1374,7 +1564,7 @@ dependencies = [
[[package]]
name = "typst-docs"
version = "0.0.0"
version = "0.1.0"
dependencies = [
"comemo",
"heck",
@@ -1392,7 +1582,7 @@ dependencies = [
[[package]]
name = "typst-library"
version = "0.0.0"
version = "0.1.0"
dependencies = [
"comemo",
"csv",
@@ -1406,6 +1596,7 @@ dependencies = [
"roxmltree",
"rustybuzz",
"serde_json",
"serde_yaml",
"smallvec",
"syntect",
"ttf-parser 0.18.1",
@@ -1420,7 +1611,7 @@ dependencies = [
[[package]]
name = "typst-macros"
version = "0.0.0"
version = "0.1.0"
dependencies = [
"heck",
"proc-macro2",
@@ -1431,7 +1622,7 @@ dependencies = [
[[package]]
name = "typst-tests"
version = "0.0.0"
version = "0.1.0"
dependencies = [
"comemo",
"elsa",
@@ -1584,6 +1775,12 @@ dependencies = [
"svgtypes",
]
[[package]]
name = "utf8parse"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "version_check"
version = "0.9.4"
+3 -9
View File
@@ -7,20 +7,19 @@
rustPlatform.buildRustPackage rec {
pname = "typst";
version = "23-03-28";
version = "0.1";
src = fetchFromGitHub {
owner = "typst";
repo = "typst";
rev = "v${version}";
hash = "sha256-0fTGbXdpzPadABWqdReQNZf2N7OMZ8cs9U5fmhfN6m4=";
hash = "sha256-fPcQlgmpViDsvd9OmnP1wZoMTOtyL5pfH6plktNG0JQ=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"iai-0.1.1" = "sha256-EdNzCPht5chg7uF9O8CtPWR/bzSYyfYIXNdLltqdlR0=";
"lipsum-0.8.2" = "sha256-deIbpn4YM7/NeuJ5Co48ivJmxwrcsbLl6c3cP3JZxAQ=";
};
};
@@ -28,15 +27,10 @@ rustPlatform.buildRustPackage rec {
darwin.apple_sdk.frameworks.CoreServices
];
cargoBuildFlags = [ "-p" "typst-cli" ];
cargoTestFlags = [ "-p" "typst-cli" ];
# https://github.com/typst/typst/blob/056d15a/cli/src/main.rs#L164
TYPST_VERSION = version;
meta = with lib; {
description = "A new markup-based typesetting system that is powerful and easy to learn";
homepage = "https://typst.app";
changelog = "https://github.com/typst/typst/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ drupol figsoda kanashimia ];
};
+10 -7
View File
@@ -10172,7 +10172,8 @@ with pkgs;
netbootxyz-efi = callPackage ../tools/misc/netbootxyz-efi { };
netbox = callPackage ../servers/web-apps/netbox { };
inherit (callPackage ../servers/web-apps/netbox { })
netbox_3_3 netbox;
netcat = libressl.nc;
@@ -12671,10 +12672,10 @@ with pkgs;
telegraf = callPackage ../servers/monitoring/telegraf { };
teleport_11 = callPackage ../servers/teleport/11.nix {
teleport_11 = callPackage ../servers/teleport/11 {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security AppKit;
};
teleport_12 = callPackage ../servers/teleport/12.nix {
teleport_12 = callPackage ../servers/teleport/12 {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security AppKit;
};
teleport = teleport_12;
@@ -12943,7 +12944,9 @@ with pkgs;
tracebox = callPackage ../tools/networking/tracebox { stdenv = gcc10StdenvCompat; };
tracee = callPackage ../tools/security/tracee { };
tracee = callPackage ../tools/security/tracee {
clang = clang_14;
};
tracefilegen = callPackage ../development/tools/analysis/garcosim/tracefilegen { };
@@ -24459,8 +24462,8 @@ with pkgs;
inherit clwrapper;
};
lispPackages = recurseIntoAttrs (quicklispPackages //
(lispPackagesFor (wrapLisp_old sbcl)));
lispPackages = quicklispPackages //
(lispPackagesFor (wrapLisp_old sbcl));
quicklispPackagesFor = clwrapper: callPackage ../development/lisp-modules-obsolete/quicklisp-to-nix.nix {
inherit clwrapper;
@@ -24474,7 +24477,7 @@ with pkgs;
quicklispPackages = quicklispPackagesSBCL;
# Alternative lisp-modules implementation
lispPackages_new = recurseIntoAttrs (callPackage ../development/lisp-modules-new-obsolete/lisp-packages.nix {});
lispPackages_new = callPackage ../development/lisp-modules-new-obsolete/lisp-packages.nix {};
## End of DEPRECATED