commit
9aa014c46a
@ -0,0 +1,22 @@ |
||||
let |
||||
nixpkgs = import ../../..; |
||||
inherit (nixpkgs {}) haskellPackages lib; |
||||
maintainedPkgs = lib.filterAttrs ( |
||||
_: v: builtins.length (v.meta.maintainers or []) > 0 |
||||
) haskellPackages; |
||||
brokenPkgs = lib.filterAttrs (_: v: v.meta.broken) maintainedPkgs; |
||||
transitiveBrokenPkgs = lib.filterAttrs |
||||
(_: v: !(builtins.tryEval (v.outPath or null)).success && !v.meta.broken) |
||||
maintainedPkgs; |
||||
infoList = pkgs: lib.concatStringsSep "\n" (lib.mapAttrsToList (name: drv: "${name} ${(builtins.elemAt drv.meta.maintainers 0).github}") pkgs); |
||||
in { |
||||
report = '' |
||||
BROKEN: |
||||
${infoList brokenPkgs} |
||||
|
||||
TRANSITIVE BROKEN: |
||||
${infoList transitiveBrokenPkgs} |
||||
''; |
||||
transitiveErrors = |
||||
builtins.attrValues transitiveBrokenPkgs; |
||||
} |
@ -0,0 +1,46 @@ |
||||
{ config, pkgs, lib, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
cfg = config.programs._1password; |
||||
in { |
||||
options = { |
||||
programs._1password = { |
||||
enable = mkEnableOption "The 1Password CLI tool with biometric unlock and integration with the 1Password GUI."; |
||||
|
||||
groupId = mkOption { |
||||
type = types.int; |
||||
example = literalExpression "5001"; |
||||
description = '' |
||||
The GroupID to assign to the onepassword-cli group, which is needed for integration with the 1Password GUI. The group ID must be 1000 or greater. |
||||
''; |
||||
}; |
||||
|
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs._1password; |
||||
defaultText = literalExpression "pkgs._1password"; |
||||
example = literalExpression "pkgs._1password"; |
||||
description = '' |
||||
The 1Password CLI derivation to use. |
||||
''; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
environment.systemPackages = [ cfg.package ]; |
||||
users.groups.onepassword-cli.gid = cfg.groupId; |
||||
|
||||
security.wrappers = { |
||||
"op" = { |
||||
source = "${cfg.package}/bin/op"; |
||||
owner = "root"; |
||||
group = "onepassword-cli"; |
||||
setuid = false; |
||||
setgid = true; |
||||
}; |
||||
}; |
||||
}; |
||||
} |
@ -0,0 +1,265 @@ |
||||
{ config, lib, pkgs, buildEnv, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
cfg = config.services.netbox; |
||||
staticDir = cfg.dataDir + "/static"; |
||||
configFile = pkgs.writeTextFile { |
||||
name = "configuration.py"; |
||||
text = '' |
||||
STATIC_ROOT = '${staticDir}' |
||||
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} |
||||
''; |
||||
}; |
||||
pkg = (pkgs.netbox.overrideAttrs (old: { |
||||
installPhase = old.installPhase + '' |
||||
ln -s ${configFile} $out/opt/netbox/netbox/netbox/configuration.py |
||||
'' + optionalString cfg.enableLdap '' |
||||
ln -s ${ldapConfigPath} $out/opt/netbox/netbox/netbox/ldap_config.py |
||||
''; |
||||
})).override { |
||||
plugins = ps: ((cfg.plugins ps) |
||||
++ optional cfg.enableLdap [ ps.django-auth-ldap ]); |
||||
}; |
||||
netboxManageScript = with pkgs; (writeScriptBin "netbox-manage" '' |
||||
#!${stdenv.shell} |
||||
export PYTHONPATH=${pkg.pythonPath} |
||||
sudo -u netbox ${pkg}/bin/netbox "$@" |
||||
''); |
||||
|
||||
in { |
||||
options.services.netbox = { |
||||
enable = mkOption { |
||||
type = lib.types.bool; |
||||
default = false; |
||||
description = '' |
||||
Enable Netbox. |
||||
|
||||
This module requires a reverse proxy that serves <literal>/static</literal> separately. |
||||
See this <link xlink:href="https://github.com/netbox-community/netbox/blob/develop/contrib/nginx.conf/">example</link> on how to configure this. |
||||
''; |
||||
}; |
||||
|
||||
listenAddress = mkOption { |
||||
type = types.str; |
||||
default = "[::1]"; |
||||
description = '' |
||||
Address the server will listen on. |
||||
''; |
||||
}; |
||||
|
||||
port = mkOption { |
||||
type = types.port; |
||||
default = 8001; |
||||
description = '' |
||||
Port the server will listen on. |
||||
''; |
||||
}; |
||||
|
||||
plugins = mkOption { |
||||
type = types.functionTo (types.listOf types.package); |
||||
default = _: []; |
||||
defaultText = literalExpression '' |
||||
python3Packages: with python3Packages; []; |
||||
''; |
||||
description = '' |
||||
List of plugin packages to install. |
||||
''; |
||||
}; |
||||
|
||||
dataDir = mkOption { |
||||
type = types.str; |
||||
default = "/var/lib/netbox"; |
||||
description = '' |
||||
Storage path of netbox. |
||||
''; |
||||
}; |
||||
|
||||
secretKeyFile = mkOption { |
||||
type = types.path; |
||||
description = '' |
||||
Path to a file containing the secret key. |
||||
''; |
||||
}; |
||||
|
||||
extraConfig = mkOption { |
||||
type = types.lines; |
||||
default = ""; |
||||
description = '' |
||||
Additional lines of configuration appended to the <literal>configuration.py</literal>. |
||||
See the <link xlink:href="https://netbox.readthedocs.io/en/stable/configuration/optional-settings/">documentation</link> for more possible options. |
||||
''; |
||||
}; |
||||
|
||||
enableLdap = mkOption { |
||||
type = types.bool; |
||||
default = false; |
||||
description = '' |
||||
Enable LDAP-Authentication for Netbox. |
||||
|
||||
This requires a configuration file being pass through <literal>ldapConfigPath</literal>. |
||||
''; |
||||
}; |
||||
|
||||
ldapConfigPath = mkOption { |
||||
type = types.path; |
||||
default = ""; |
||||
description = '' |
||||
Path to the Configuration-File for LDAP-Authentification, will be loaded as <literal>ldap_config.py</literal>. |
||||
See the <link xlink:href="https://netbox.readthedocs.io/en/stable/installation/6-ldap/#configuration">documentation</link> for possible options. |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
services.redis.servers.netbox.enable = true; |
||||
|
||||
services.postgresql = { |
||||
enable = true; |
||||
ensureDatabases = [ "netbox" ]; |
||||
ensureUsers = [ |
||||
{ |
||||
name = "netbox"; |
||||
ensurePermissions = { |
||||
"DATABASE netbox" = "ALL PRIVILEGES"; |
||||
}; |
||||
} |
||||
]; |
||||
}; |
||||
|
||||
environment.systemPackages = [ netboxManageScript ]; |
||||
|
||||
systemd.targets.netbox = { |
||||
description = "Target for all NetBox services"; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
after = [ "network-online.target" "redis-netbox.service" ]; |
||||
}; |
||||
|
||||
systemd.services = let |
||||
defaultServiceConfig = { |
||||
WorkingDirectory = "${cfg.dataDir}"; |
||||
User = "netbox"; |
||||
Group = "netbox"; |
||||
StateDirectory = "netbox"; |
||||
StateDirectoryMode = "0750"; |
||||
Restart = "on-failure"; |
||||
}; |
||||
in { |
||||
netbox-migration = { |
||||
description = "NetBox migrations"; |
||||
wantedBy = [ "netbox.target" ]; |
||||
|
||||
environment = { |
||||
PYTHONPATH = pkg.pythonPath; |
||||
}; |
||||
|
||||
serviceConfig = defaultServiceConfig // { |
||||
Type = "oneshot"; |
||||
ExecStart = '' |
||||
${pkg}/bin/netbox migrate |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
netbox = { |
||||
description = "NetBox WSGI Service"; |
||||
wantedBy = [ "netbox.target" ]; |
||||
after = [ "netbox-migration.service" ]; |
||||
|
||||
preStart = '' |
||||
${pkg}/bin/netbox trace_paths --no-input |
||||
${pkg}/bin/netbox collectstatic --no-input |
||||
${pkg}/bin/netbox remove_stale_contenttypes --no-input |
||||
''; |
||||
|
||||
environment = { |
||||
PYTHONPATH = pkg.pythonPath; |
||||
}; |
||||
|
||||
serviceConfig = defaultServiceConfig // { |
||||
ExecStart = '' |
||||
${pkgs.python3Packages.gunicorn}/bin/gunicorn netbox.wsgi \ |
||||
--bind ${cfg.listenAddress}:${toString cfg.port} \ |
||||
--pythonpath ${pkg}/opt/netbox/netbox |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
netbox-rq = { |
||||
description = "NetBox Request Queue Worker"; |
||||
wantedBy = [ "netbox.target" ]; |
||||
after = [ "netbox.service" ]; |
||||
|
||||
environment = { |
||||
PYTHONPATH = pkg.pythonPath; |
||||
}; |
||||
|
||||
serviceConfig = defaultServiceConfig // { |
||||
ExecStart = '' |
||||
${pkg}/bin/netbox rqworker high default low |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
netbox-housekeeping = { |
||||
description = "NetBox housekeeping job"; |
||||
after = [ "netbox.service" ]; |
||||
|
||||
environment = { |
||||
PYTHONPATH = pkg.pythonPath; |
||||
}; |
||||
|
||||
serviceConfig = defaultServiceConfig // { |
||||
Type = "oneshot"; |
||||
ExecStart = '' |
||||
${pkg}/bin/netbox housekeeping |
||||
''; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
systemd.timers.netbox-housekeeping = { |
||||
description = "Run NetBox housekeeping job"; |
||||
wantedBy = [ "timers.target" ]; |
||||
|
||||
timerConfig = { |
||||
OnCalendar = "daily"; |
||||
}; |
||||
}; |
||||
|
||||
users.users.netbox = { |
||||
home = "${cfg.dataDir}"; |
||||
isSystemUser = true; |
||||
group = "netbox"; |
||||
}; |
||||
users.groups.netbox = {}; |
||||
users.groups."${config.services.redis.servers.netbox.user}".members = [ "netbox" ]; |
||||
}; |
||||
} |
@ -0,0 +1,30 @@ |
||||
import ../make-test-python.nix ({ lib, pkgs, ... }: { |
||||
name = "netbox"; |
||||
|
||||
meta = with lib.maintainers; { |
||||
maintainers = [ n0emis ]; |
||||
}; |
||||
|
||||
machine = { ... }: { |
||||
services.netbox = { |
||||
enable = true; |
||||
secretKeyFile = pkgs.writeText "secret" '' |
||||
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
testScript = '' |
||||
machine.start() |
||||
machine.wait_for_unit("netbox.target") |
||||
machine.wait_until_succeeds("journalctl --since -1m --unit netbox --grep Listening") |
||||
|
||||
with subtest("Home screen loads"): |
||||
machine.succeed( |
||||
"curl -sSfL http://[::1]:8001 | grep '<title>Home | NetBox</title>'" |
||||
) |
||||
|
||||
with subtest("Staticfiles are generated"): |
||||
machine.succeed("test -e /var/lib/netbox/static/netbox.js") |
||||
''; |
||||
}) |
@ -0,0 +1,66 @@ |
||||
import ./make-test-python.nix ( |
||||
{ |
||||
nodes.host = {config, pkgs, ...}: { |
||||
config = { |
||||
# Prerequisites for ZFS and tests. |
||||
boot.supportedFilesystems = [ "zfs" ]; |
||||
environment.systemPackages = [ pkgs.zrepl ]; |
||||
networking.hostId = "deadbeef"; |
||||
services.zrepl = { |
||||
enable = true; |
||||
settings = { |
||||
# Enable Prometheus output for status assertions. |
||||
global.monitoring = [{ |
||||
type = "prometheus"; |
||||
listen = ":9811"; |
||||
}]; |
||||
# Create a periodic snapshot job for an ephemeral zpool. |
||||
jobs = [{ |
||||
name = "snap_test"; |
||||
type = "snap"; |
||||
|
||||
filesystems."test" = true; |
||||
snapshotting = { |
||||
type = "periodic"; |
||||
prefix = "zrepl_"; |
||||
interval = "1s"; |
||||
}; |
||||
|
||||
pruning.keep = [{ |
||||
type = "last_n"; |
||||
count = 8; |
||||
}]; |
||||
}]; |
||||
}; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
testScript = '' |
||||
start_all() |
||||
|
||||
with subtest("Wait for zrepl and network ready"): |
||||
host.wait_for_unit("network-online.target") |
||||
host.wait_for_unit("zrepl.service") |
||||
|
||||
with subtest("Create test zpool"): |
||||
# ZFS requires 64MiB minimum pool size. |
||||
host.succeed("fallocate -l 64MiB /root/zpool.img") |
||||
host.succeed("zpool create test /root/zpool.img") |
||||
|
||||
with subtest("Check for completed zrepl snapshot"): |
||||
# zrepl periodic snapshot job creates a snapshot with this prefix. |
||||
host.wait_until_succeeds("zfs list -t snapshot | grep -q zrepl_") |
||||
|
||||
with subtest("Verify HTTP monitoring server is configured"): |
||||
out = host.succeed("curl -f localhost:9811/metrics") |
||||
|
||||
assert ( |
||||
"zrepl_version_daemon" in out |
||||
), "zrepl version metric was not found in Prometheus output" |
||||
|
||||
assert ( |
||||
"zrepl_zfs_snapshot_duration_count{filesystem=\"test\"}" in out |
||||
), "zrepl snapshot counter for test was not found in Prometheus output" |
||||
''; |
||||
}) |
@ -0,0 +1,191 @@ |
||||
{ channel, version, revision, sha256 }: |
||||
|
||||
{ stdenv |
||||
, fetchurl |
||||
, lib |
||||
|
||||
, binutils-unwrapped |
||||
, xz |
||||
, gnutar |
||||
, file |
||||
|
||||
, glibc |
||||
, glib |
||||
, nss |
||||
, nspr |
||||
, atk |
||||
, at-spi2-atk |
||||
, xorg |
||||
, cups |
||||
, dbus |
||||
, expat |
||||
, libdrm |
||||
, libxkbcommon |
||||
, gtk3 |
||||
, pango |
||||
, cairo |
||||
, gdk-pixbuf |
||||
, mesa |
||||
, alsa-lib |
||||
, at-spi2-core |
||||
, libuuid |
||||
, systemd |
||||
}: |
||||
|
||||
let |
||||
|
||||
baseName = "microsoft-edge"; |
||||
|
||||
shortName = if channel == "stable" |
||||
then "msedge" |
||||
else "msedge-" + channel; |
||||
|
||||
longName = if channel == "stable" |
||||
then baseName |
||||
else baseName + "-" + channel; |
||||
|
||||
iconSuffix = if channel == "stable" |
||||
then "" |
||||
else "_${channel}"; |
||||
|
||||
desktopSuffix = if channel == "stable" |
||||
then "" |
||||
else "-${channel}"; |
||||
in |
||||
|
||||
stdenv.mkDerivation rec { |
||||
name="${baseName}-${channel}-${version}"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://packages.microsoft.com/repos/edge/pool/main/m/${baseName}-${channel}/${baseName}-${channel}_${version}-${revision}_amd64.deb"; |
||||
inherit sha256; |
||||
}; |
||||
|
||||
unpackCmd = "${binutils-unwrapped}/bin/ar p $src data.tar.xz | ${xz}/bin/xz -dc | ${gnutar}/bin/tar -xf -"; |
||||
sourceRoot = "."; |
||||
|
||||
dontPatch = true; |
||||
dontConfigure = true; |
||||
dontPatchELF = true; |
||||
|
||||
buildPhase = let |
||||
libPath = { |
||||
msedge = lib.makeLibraryPath [ |
||||
glibc glib nss nspr atk at-spi2-atk xorg.libX11 |
||||
xorg.libxcb cups.lib dbus.lib expat libdrm |
||||
xorg.libXcomposite xorg.libXdamage xorg.libXext |
||||
xorg.libXfixes xorg.libXrandr libxkbcommon |
||||
gtk3 pango cairo gdk-pixbuf mesa |
||||
alsa-lib at-spi2-core xorg.libxshmfence systemd |
||||
]; |
||||
naclHelper = lib.makeLibraryPath [ |
||||
glib nspr atk libdrm xorg.libxcb mesa xorg.libX11 |
||||
xorg.libXext dbus.lib libxkbcommon |
||||
]; |
||||
libwidevinecdm = lib.makeLibraryPath [ |
||||
glib nss nspr |
||||
]; |
||||
libGLESv2 = lib.makeLibraryPath [ |
||||
xorg.libX11 xorg.libXext xorg.libxcb |
||||
]; |
||||
libsmartscreen = lib.makeLibraryPath [ |
||||
libuuid stdenv.cc.cc.lib |
||||
]; |
||||
libsmartscreenn = lib.makeLibraryPath [ |
||||
libuuid |
||||
]; |
||||
liboneauth = lib.makeLibraryPath [ |
||||
libuuid xorg.libX11 |
||||
]; |
||||
}; |
||||
in '' |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath "${libPath.msedge}" \ |
||||
opt/microsoft/${shortName}/msedge |
||||
|
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
opt/microsoft/${shortName}/msedge-sandbox |
||||
|
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
opt/microsoft/${shortName}/msedge_crashpad_handler |
||||
|
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath "${libPath.naclHelper}" \ |
||||
opt/microsoft/${shortName}/nacl_helper |
||||
|
||||
patchelf \ |
||||
--set-rpath "${libPath.libwidevinecdm}" \ |
||||
opt/microsoft/${shortName}/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so |
||||
|
||||
patchelf \ |
||||
--set-rpath "${libPath.libGLESv2}" \ |
||||
opt/microsoft/${shortName}/libGLESv2.so |
||||
|
||||
patchelf \ |
||||
--set-rpath "${libPath.libsmartscreen}" \ |
||||
opt/microsoft/${shortName}/libsmartscreen.so |
||||
|
||||
patchelf \ |
||||
--set-rpath "${libPath.libsmartscreenn}" \ |
||||
opt/microsoft/${shortName}/libsmartscreenn.so |
||||
|
||||
patchelf \ |
||||
--set-rpath "${libPath.liboneauth}" \ |
||||
opt/microsoft/${shortName}/liboneauth.so |
||||
''; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out |
||||
cp -R opt usr/bin usr/share $out |
||||
|
||||
${if channel == "stable" |
||||
then "" |
||||
else "ln -sf $out/opt/microsoft/${shortName}/${baseName}-${channel} $out/opt/microsoft/${shortName}/${baseName}"} |
||||
|
||||
ln -sf $out/opt/microsoft/${shortName}/${longName} $out/bin/${longName} |
||||
|
||||
rm -rf $out/share/doc |
||||
rm -rf $out/opt/microsoft/${shortName}/cron |
||||
|
||||
for icon in '16' '24' '32' '48' '64' '128' '256' |
||||
do |
||||
${ "icon_source=$out/opt/microsoft/${shortName}/product_logo_\${icon}${iconSuffix}.png" } |
||||
${ "icon_target=$out/share/icons/hicolor/\${icon}x\${icon}/apps" } |
||||
mkdir -p $icon_target |
||||
cp $icon_source $icon_target/microsoft-edge${desktopSuffix}.png |
||||
done |
||||
|
||||
substituteInPlace $out/share/applications/${longName}.desktop \ |
||||
--replace /usr/bin/${baseName}-${channel} $out/bin/${longName} |
||||
|
||||
substituteInPlace $out/share/gnome-control-center/default-apps/${longName}.xml \ |
||||
--replace /opt/microsoft/${shortName} $out/opt/microsoft/${shortName} |
||||
|
||||
substituteInPlace $out/share/menu/${longName}.menu \ |
||||
--replace /opt/microsoft/${shortName} $out/opt/microsoft/${shortName} |
||||
|
||||
substituteInPlace $out/opt/microsoft/${shortName}/xdg-mime \ |
||||
--replace "''${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" "''${XDG_DATA_DIRS:-/run/current-system/sw/share}" \ |
||||
--replace "xdg_system_dirs=/usr/local/share/:/usr/share/" "xdg_system_dirs=/run/current-system/sw/share/" \ |
||||
--replace /usr/bin/file ${file}/bin/file |
||||
|
||||
substituteInPlace $out/opt/microsoft/${shortName}/default-app-block \ |
||||
--replace /opt/microsoft/${shortName} $out/opt/microsoft/${shortName} |
||||
|
||||
substituteInPlace $out/opt/microsoft/${shortName}/xdg-settings \ |
||||
--replace "''${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" "''${XDG_DATA_DIRS:-/run/current-system/sw/share}" \ |
||||
--replace "''${XDG_CONFIG_DIRS:-/etc/xdg}" "''${XDG_CONFIG_DIRS:-/run/current-system/sw/etc/xdg}" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://www.microsoft.com/en-us/edge"; |
||||
description = "The web browser from Microsoft"; |
||||
license = licenses.unfree; |
||||
platforms = [ "x86_64-linux" ]; |
||||
maintainers = with maintainers; [ zanculmarktum kuwii ]; |
||||
}; |
||||
} |
@ -0,0 +1,20 @@ |
||||
{ |
||||
beta = import ./browser.nix { |
||||
channel = "beta"; |
||||
version = "99.0.1150.16"; |
||||
revision = "1"; |
||||
sha256 = "sha256:0qsgs889d6qwxz9qf42psmjqfhmrqgp07srq5r38npl5pncr137h"; |
||||
}; |
||||
dev = import ./browser.nix { |
||||
channel = "dev"; |
||||
version = "100.0.1163.1"; |
||||
revision = "1"; |
||||
sha256 = "sha256:153faqxyw5f5b6cqnvd71dl7941znkzci8dwbcgaxway0b6882jq"; |
||||
}; |
||||
stable = import ./browser.nix { |
||||
channel = "stable"; |
||||
version = "98.0.1108.56"; |
||||
revision = "1"; |
||||
sha256 = "sha256:03jbj2s2fs60fzfgsmyb284q7nckji87qgb86mvl5g0hbl19aza7"; |
||||
}; |
||||
} |
@ -0,0 +1,50 @@ |
||||
#! /usr/bin/env nix-shell |
||||
#! nix-shell -i bash -p curl gzip |
||||
|
||||
# To update: ./update.sh > default.nix |
||||
|
||||
index_file=$(curl -sL https://packages.microsoft.com/repos/edge/dists/stable/main/binary-amd64/Packages.gz | gzip -dc) |
||||
|
||||
echo "{" |
||||
|
||||
packages=() |
||||
echo "$index_file" | while read -r line; do |
||||
if [[ "$line" =~ ^Package:[[:space:]]*(.*) ]]; then |
||||
Package="${BASH_REMATCH[1]}" |
||||
fi |
||||
if [[ "$line" =~ ^Version:[[:space:]]*(.*)-([a-zA-Z0-9+.~]*) ]]; then |
||||
Version="${BASH_REMATCH[1]}" |
||||
Revision="${BASH_REMATCH[2]}" |
||||
fi |
||||
if [[ "$line" =~ ^SHA256:[[:space:]]*(.*) ]]; then |
||||
SHA256="${BASH_REMATCH[1]}" |
||||
fi |
||||
|
||||
if ! [[ "$line" ]]; then |
||||
found=0 |
||||
for i in "${packages[@]}"; do |
||||
if [[ "$i" == "$Package" ]]; then |
||||
found=1 |
||||
fi |
||||
done |
||||
|
||||
if (( ! $found )); then |
||||
channel="${Package##*-}" |
||||
name="${Package%-${channel}}" |
||||
cat <<EOF |
||||
${channel} = import ./browser.nix { |
||||
channel = "${channel}"; |
||||
version = "${Version}"; |
||||
revision = "${Revision}"; |
||||
sha256 = "sha256:$(nix-hash --type sha256 --to-base32 ${SHA256})"; |
||||
}; |
||||
EOF |
||||
fi |
||||
|
||||
packages+=($Package) |
||||
Package="" |
||||
Version="" |
||||
fi |
||||
done |
||||
|
||||
echo "}" |
@ -1,84 +1,68 @@ |
||||
{ lib, fetchFromGitHub, buildGoPackage, which, go-bindata, rsync, util-linux |
||||
, coreutils, libkrb5, ncurses, clang, installShellFiles |
||||
, components ? [ |
||||
"cmd/oc" |
||||
"cmd/openshift" |
||||
] |
||||
{ lib |
||||
, buildGoModule |
||||
, fetchFromGitHub |
||||
, libkrb5 |
||||
, git |
||||
, installShellFiles |
||||
, testVersion |
||||
, openshift |
||||
}: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
version = "4.1.0"; |
||||
ver = lib.elemAt (lib.splitVersion version); |
||||
versionMajor = ver 0; |
||||
versionMinor = ver 1; |
||||
versionPatch = ver 2; |
||||
gitCommit = "b4261e0"; |
||||
# version is in vendor/k8s.io/kubernetes/pkg/version/base.go |
||||
k8sversion = "v1.11.1"; |
||||
k8sgitcommit = "b1b2997"; |
||||
k8sgitMajor = "0"; |
||||
k8sgitMinor = "1"; |
||||
in buildGoPackage rec { |
||||
pname = "openshift-origin"; |
||||
inherit version; |
||||
buildGoModule rec { |
||||
pname = "openshift"; |
||||
version = "4.10.0"; |
||||
gitCommit = "346b183"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "openshift"; |
||||
repo = "origin"; |
||||
rev = "v${version}"; |
||||
sha256 = "16bc6ljm418kxz92gz8ldm82491mvlqamrvigyr6ff72rf7ml7ba"; |
||||
repo = "oc"; |
||||
rev = "release-4.10"; |
||||
sha256 = "Pdq3OwT5P7vvB70X+GVglT9CdJbhkm35nvEGurO1HPc="; |
||||
}; |
||||
|
||||
goPackagePath = "github.com/openshift/origin"; |
||||
vendorSha256 = null; |
||||
|
||||
buildInputs = [ libkrb5 ]; |
||||
|
||||
nativeBuildInputs = [ |
||||
clang |
||||
go-bindata |
||||
installShellFiles |
||||
ncurses |
||||
rsync |
||||
which |
||||
]; |
||||
nativeBuildInputs = [ installShellFiles ]; |
||||
|
||||
patchPhase = '' |
||||
patchShebangs ./hack |
||||
''; |
||||
|
||||
buildPhase = '' |
||||
cd go/src/${goPackagePath} |
||||
# Openshift build require this variables to be set |
||||
# unless there is a .git folder which is not the case with fetchFromGitHub |
||||
echo "OS_GIT_VERSION=v${version}" >> os-version-defs |
||||
echo "OS_GIT_TREE_STATE=clean" >> os-version-defs |
||||
echo "OS_GIT_MAJOR=${versionMajor}" >> os-version-defs |
||||
echo "OS_GIT_MINOR=${versionMinor}" >> os-version-defs |
||||
echo "OS_GIT_PATCH=${versionPatch}" >> os-version-defs |
||||
echo "OS_GIT_COMMIT=${gitCommit}" >> os-version-defs |
||||
echo "KUBE_GIT_VERSION=${k8sversion}" >> os-version-defs |
||||
echo "KUBE_GIT_COMMIT=${k8sgitcommit}" >> os-version-defs |
||||
echo "KUBE_GIT_MAJOR=${k8sgitMajor}" >> os-version-defs |
||||
echo "KUBE_GIT_MINOR=${k8sgitMinor}" >> os-version-defs |
||||
export OS_VERSION_FILE="os-version-defs" |
||||
export CC=clang |
||||
make all WHAT='${concatStringsSep " " components}' |
||||
export SOURCE_GIT_COMMIT=${gitCommit} |
||||
export SOURCE_GIT_TAG=v${version} |
||||
export SOURCE_GIT_TREE_STATE=clean |
||||
|
||||
make all |
||||
''; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out/bin |
||||
cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$out/bin/" |
||||
cp oc $out/bin |
||||
|
||||
mkdir -p man |
||||
./genman man oc |
||||
installManPage man/*.1 |
||||
|
||||
installShellCompletion --bash contrib/completions/bash/* |
||||
installShellCompletion --zsh contrib/completions/zsh/* |
||||
''; |
||||
|
||||
passthru.tests.version = testVersion { |
||||
package = openshift; |
||||
command = "oc version"; |
||||
version = "v${version}"; |
||||
}; |
||||
|
||||
meta = with lib; { |
||||
description = "Build, deploy, and manage your applications with Docker and Kubernetes"; |
||||
license = licenses.asl20; |
||||
homepage = "http://www.openshift.org"; |
||||
maintainers = with maintainers; [offline bachp moretea]; |
||||
maintainers = with maintainers; [ offline bachp moretea stehessel ]; |
||||
platforms = platforms.unix; |
||||
}; |
||||
} |
||||
|
@ -1,6 +1,6 @@ |
||||
{ |
||||
"version": "1.10.7", |
||||
"desktopSrcHash": "HkGny9t8dNzVGyyqgr4tABbFZgWV4xqGZt9xH4ejkew=", |
||||
"desktopYarnHash": "038rqg26dn8chzscck5mlhnw2viy6gr8pjb7zrcmi7ipx9h038a0", |
||||
"webHash": "0gim79a1zpfc56ca5fndp2whmlv9jz1s32z666i268xppn4z53k1" |
||||
"version": "1.10.8", |
||||
"desktopSrcHash": "S9MQIn773BzCH4dsTkD1DpIThDzoIGr4Heaie2Qs0jY=", |
||||
"desktopYarnHash": "1imx43qbpj08l6d0fji31kcxqshcpr0ch8dzfbbgxyjvblq2p8ln", |
||||
"webHash": "02i6l3armzr19kki3hgshhzkdpb3001nilh4h10hr3xw5z711ppr" |
||||
} |
||||
|
@ -0,0 +1,34 @@ |
||||
{ stdenv, lib, fetchFromGitHub, cmake, folly, boost, gflags, glog, openssl, double-conversion, fmt }: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "wdt"; |
||||
version = "unstable-2022-03-24"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "facebook"; |
||||
repo = "wdt"; |
||||
rev = "43319e59d0c77092468367cdadab37d12d7a2383"; |
||||
sha256 = "sha256-MajYK2eTUbWhEql0iTlgW5yLg9xAGZQk+Dx4fNxFFqw="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ cmake ]; |
||||
buildInputs = [ folly boost gflags glog openssl double-conversion fmt ]; |
||||
|
||||
# source is expected to be named wdt |
||||
# https://github.com/facebook/wdt/blob/43319e59d0c77092468367cdadab37d12d7a2383/CMakeLists.txt#L238 |
||||
postUnpack = '' |
||||
ln -s $sourceRoot wdt |
||||
''; |
||||
|
||||
cmakeFlags = [ |
||||
"-DWDT_USE_SYSTEM_FOLLY=ON" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Warp speed Data Transfer"; |
||||
homepage = "https://github.com/facebook/wdt"; |
||||
license = licenses.bsd3; |
||||
maintainers = with maintainers; [ nickcao ]; |
||||
platforms = [ "x86_64-linux" ]; |
||||
}; |
||||
} |
@ -1,25 +1,33 @@ |
||||
{ lib, stdenv, fetchurl }: |
||||
{ lib, stdenv, fetchurl, gmp, makeWrapper }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "nuXmv"; |
||||
version = "2.0.0"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://es-static.fbk.eu/tools/nuxmv/downloads/nuXmv-${version}-linux64.tar.gz"; |
||||
sha256 = "0nndrw994clf8lnlcfzdf1mf00vif3fvd4xsiwcjpbyk12091zqr"; |
||||
url = "https://es-static.fbk.eu/tools/nuxmv/downloads/nuXmv-${version}-${if stdenv.isDarwin then "macosx64" else "linux64"}.tar.gz"; |
||||
sha256 = if stdenv.isDarwin |
||||
then "sha256-48I+FhJUUam1nMCMMM47CwGO82BYsNz0eHDHXBfqO2E=" |
||||
else "sha256-Gf+QgAjTrysZj7qTtt1wcQPganDtO0YtRY4ykhLPzVo="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ makeWrapper ]; |
||||
buildInputs = lib.optionals stdenv.isDarwin [ gmp ]; |
||||
installPhase= '' |
||||
runHook preInstall |
||||
install -Dm755 -t $out/bin ./bin/nuXmv |
||||
runHook postInstall |
||||
''; |
||||
|
||||
postFixup = lib.optionalString stdenv.isDarwin '' |
||||
wrapProgram $out/bin/nuXmv --prefix DYLD_LIBRARY_PATH : ${gmp}/lib |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Symbolic model checker for analysis of finite and infinite state systems"; |
||||
homepage = "https://nuxmv.fbk.eu/pmwiki.php"; |
||||
license = licenses.unfree; |
||||
maintainers = with maintainers; [ siraben ]; |
||||
platforms = [ "x86_64-linux" ]; |
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ]; |
||||
}; |
||||
} |
||||
|
@ -1,6 +1,6 @@ |
||||
{ |
||||
"commit": "aa8f2230d08c540df249147ea681a5c22314d083", |
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/aa8f2230d08c540df249147ea681a5c22314d083.tar.gz", |
||||
"sha256": "1h92r4si1vmf3v2m843xaqwr99hpnn1s0x08qcvd2gwjkc2qq10a", |
||||
"msg": "Update from Hackage at 2022-02-14T17:17:31Z" |
||||
"commit": "f504760b580057f368d85ed6f6c4e78a38968ff4", |
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/f504760b580057f368d85ed6f6c4e78a38968ff4.tar.gz", |
||||
"sha256": "0m3w7bawx0qxj2qn3yx1d4j90dq89k5c4604f6z38cxxx0rszmzj", |
||||
"msg": "Update from Hackage at 2022-03-26T03:24:04Z" |
||||
} |
||||
|
@ -0,0 +1,14 @@ |
||||
diff --git a/editor/source-manager.vala b/editor/source-manager.vala
|
||||
index 27b2b17a..87f7ba86 100644
|
||||
--- a/editor/source-manager.vala
|
||||
+++ b/editor/source-manager.vala
|
||||
@@ -121,6 +121,9 @@ private class SourceManager : Object
|
||||
source = try_prepend_dir (source, Path.build_filename (system_data_dirs [i], "glib-2.0", "schemas"));
|
||||
string user_data_dir = GLib.Environment.get_user_data_dir ();
|
||||
source = try_prepend_dir (source, Path.build_filename (user_data_dir, "glib-2.0", "schemas"));
|
||||
+ string? nix_var_schema_dir = GLib.Environment.get_variable ("NIX_GSETTINGS_OVERRIDES_DIR");
|
||||
+ if (nix_var_schema_dir != null)
|
||||
+ source = try_prepend_dir (source, (!) nix_var_schema_dir);
|
||||
string? var_schema_dir = GLib.Environment.get_variable ("GSETTINGS_SCHEMA_DIR");
|
||||
if (var_schema_dir != null)
|
||||
source = try_prepend_dir (source, (!) var_schema_dir);
|
File diff suppressed because one or more lines are too long
@ -1,61 +0,0 @@ |
||||
{ lib |
||||
, stdenv |
||||
, fetchFromGitHub |
||||
, glib |
||||
, substituteAll |
||||
, hddtemp |
||||
, liquidctl |
||||
, lm_sensors |
||||
, netcat-gnu |
||||
, nvme-cli |
||||
, procps |
||||
, smartmontools |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "gnome-shell-extension-freon"; |
||||
version = "unstable-2022-02-05"; |
||||
|
||||
passthru = { |
||||
extensionUuid = "freon@UshakovVasilii_Github.yahoo.com"; |
||||
extensionPortalSlug = "freon"; |
||||
}; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "UshakovVasilii"; |
||||
repo = "gnome-shell-extension-freon"; |
||||
rev = "010c363d9bff8ed28000cbf8df2226dad65078fb"; |
||||
hash = "sha256-Fb8y+HoWq+205gqwAD2DVYym1eThGZqDML5HlyhS+4M="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ glib ]; |
||||
|
||||
patches = [ |
||||
(substituteAll { |
||||
src = ./fix_paths.patch; |
||||
inherit hddtemp liquidctl lm_sensors procps smartmontools; |
||||
netcat = netcat-gnu; |
||||
nvmecli = nvme-cli; |
||||
}) |
||||
]; |
||||
|
||||
buildPhase = '' |
||||
runHook preBuild |
||||
glib-compile-schemas --strict --targetdir="freon@UshakovVasilii_Github.yahoo.com/schemas" "freon@UshakovVasilii_Github.yahoo.com/schemas" |
||||
runHook postBuild |
||||
''; |
||||
|
||||
installPhase = '' |
||||
runHook preInstall |
||||
mkdir -p $out/share/gnome-shell/extensions |
||||
cp -r "freon@UshakovVasilii_Github.yahoo.com" $out/share/gnome-shell/extensions |
||||
runHook postInstall |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "GNOME Shell extension for displaying CPU, GPU, disk temperatures, voltage and fan RPM in the top panel"; |
||||
license = licenses.gpl2; |
||||
maintainers = with maintainers; [ justinas ]; |
||||
homepage = "https://github.com/UshakovVasilii/gnome-shell-extension-freon"; |
||||
}; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue