commit
61c16f5ec8
@ -1,13 +0,0 @@ |
||||
<section xmlns="http://docbook.org/ns/docbook" |
||||
xmlns:xlink="http://www.w3.org/1999/xlink" |
||||
xml:id="unfree-software"> |
||||
<title>Unfree software</title> |
||||
|
||||
<para> |
||||
All users of Nixpkgs are free software users, and many users (and developers) of Nixpkgs want to limit and tightly control their exposure to unfree software. At the same time, many users need (or want) to run some specific pieces of proprietary software. Nixpkgs includes some expressions for unfree software packages. By default unfree software cannot be installed and doesn’t show up in searches. To allow installing unfree software in a single Nix invocation one can export <literal>NIXPKGS_ALLOW_UNFREE=1</literal>. For a persistent solution, users can set <literal>allowUnfree</literal> in the Nixpkgs configuration. |
||||
</para> |
||||
|
||||
<para> |
||||
Fine-grained control is possible by defining <literal>allowUnfreePredicate</literal> function in config; it takes the <literal>mkDerivation</literal> parameter attrset and returns <literal>true</literal> for unfree packages that should be allowed. |
||||
</para> |
||||
</section> |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,52 @@ |
||||
#!/usr/bin/env nix-shell |
||||
#!nix-shell -i perl -p perl -p perlPackages.LWP -p perlPackages.LWPProtocolHttps -p perlPackages.LWPUserAgent -p perlPackages.JSON -p perlPackages.PathTiny |
||||
use LWP::UserAgent; |
||||
use JSON; |
||||
use Path::Tiny; |
||||
use strict; |
||||
use warnings; |
||||
|
||||
my $maintainers_list_nix = "../maintainer-list.nix"; |
||||
my $maintainers_json = from_json(`nix-instantiate --json --eval --expr 'builtins.fromJSON (builtins.toJSON (import $maintainers_list_nix))'`); |
||||
|
||||
STDOUT->autoflush(1); |
||||
|
||||
my $ua = LWP::UserAgent->new(); |
||||
|
||||
keys %$maintainers_json; # reset the internal iterator so a prior each() doesn't affect the loop |
||||
while(my($k, $v) = each %$maintainers_json) { |
||||
my $current_user = %$v{'github'}; |
||||
if (!defined $current_user) { |
||||
print "$k has no github handle\n"; |
||||
next; |
||||
} |
||||
my $github_id = %$v{'githubId'}; |
||||
if (!defined $github_id) { |
||||
print "$k has no githubId\n"; |
||||
next; |
||||
} |
||||
my $url = 'https://api.github.com/user/' . $github_id; |
||||
my $resp = $ua->get( |
||||
$url, |
||||
"Authorization" => "Token $ENV{GH_TOKEN}" |
||||
); |
||||
|
||||
if ($resp->header("X-RateLimit-Remaining") == 0) { |
||||
my $ratelimit_reset = $resp->header("X-RateLimit-Reset"); |
||||
print "Request limit exceeded, waiting until " . scalar localtime $ratelimit_reset . "\n"; |
||||
sleep($ratelimit_reset - time() + 5); |
||||
} |
||||
if ($resp->code != 200) { |
||||
print $current_user . " likely deleted their github account\n"; |
||||
next; |
||||
} |
||||
my $resp_json = from_json($resp->content); |
||||
my $api_user = %$resp_json{"login"}; |
||||
if ($current_user ne $api_user) { |
||||
print $current_user . " is now known on github as " . $api_user . ". Editing maintainer-list.nix…\n"; |
||||
my $file = path($maintainers_list_nix); |
||||
my $data = $file->slurp_utf8; |
||||
$data =~ s/github = "$current_user";$/github = "$api_user";/m; |
||||
$file->spew_utf8($data); |
||||
} |
||||
} |
Can't render this file because it has a wrong number of fields in line 72.
|
@ -0,0 +1,83 @@ |
||||
#! /usr/bin/env nix-shell |
||||
#! nix-shell -I nixpkgs=. -i bash -p delta jq perl |
||||
|
||||
set -euo pipefail |
||||
shopt -s inherit_errexit |
||||
|
||||
cat <<'EOF' |
||||
This script attempts to automatically convert option descriptions from |
||||
DocBook syntax to markdown. Naturally this process is incomplete and |
||||
imperfect, so any changes generated by this script MUST be reviewed. |
||||
|
||||
Possible problems include: incorrectly replaced tags, badly formatted |
||||
markdown, DocBook tags this script doesn't recognize remaining in the |
||||
output and crashing the docs build, incorrect escaping of markdown |
||||
metacharacters, incorrect unescaping of XML entities—and the list goes on. |
||||
|
||||
Always review the generated changes! |
||||
|
||||
Some known limitations: |
||||
- Does not transform literalDocBook items |
||||
- Replacements can occur in non-option code, such as string literals |
||||
|
||||
|
||||
EOF |
||||
|
||||
|
||||
|
||||
build-options-json() { |
||||
nix-build --no-out-link --expr ' |
||||
let |
||||
sys = import ./nixos/default.nix { |
||||
configuration = {}; |
||||
}; |
||||
in |
||||
[ |
||||
sys.config.system.build.manual.optionsJSON |
||||
] |
||||
' |
||||
} |
||||
|
||||
|
||||
|
||||
git diff --quiet || { |
||||
echo "Worktree is dirty. Please stash or commit first." |
||||
exit 1 |
||||
} |
||||
|
||||
echo "Building options.json ..." |
||||
old_options=$(build-options-json) |
||||
|
||||
echo "Applying replacements ..." |
||||
perl -pi -e ' |
||||
BEGIN { |
||||
undef $/; |
||||
} |
||||
|
||||
s,<literal>([^`]*?)</literal>,`$1`,smg; |
||||
s,<replaceable>([^»]*?)</replaceable>,«$1»,smg; |
||||
s,<filename>([^`]*?)</filename>,{file}`$1`,smg; |
||||
s,<option>([^`]*?)</option>,{option}`$1`,smg; |
||||
s,<code>([^`]*?)</code>,`$1`,smg; |
||||
s,<command>([^`]*?)</command>,{command}`$1`,smg; |
||||
s,<link xlink:href="(.+?)" ?/>,<$1>,smg; |
||||
s,<link xlink:href="(.+?)">(.*?)</link>,[$2]($1),smg; |
||||
s,<package>([^`]*?)</package>,`$1`,smg; |
||||
s,<emphasis>([^*]*?)</emphasis>,*$1*,smg; |
||||
s,<citerefentry>\s* |
||||
<refentrytitle>\s*(.*?)\s*</refentrytitle>\s* |
||||
<manvolnum>\s*(.*?)\s*</manvolnum>\s* |
||||
</citerefentry>,{manpage}`$1($2)`,smgx; |
||||
s,^( +description =),\1 lib.mdDoc,smg; |
||||
' "$@" |
||||
|
||||
echo "Building options.json again ..." |
||||
new_options=$(build-options-json) |
||||
|
||||
|
||||
! cmp -s {$old_options,$new_options}/share/doc/nixos/options.json && { |
||||
diff -U10 \ |
||||
<(jq . <$old_options/share/doc/nixos/options.json) \ |
||||
<(jq . <$new_options/share/doc/nixos/options.json) \ |
||||
| delta |
||||
} |
@ -0,0 +1,49 @@ |
||||
{ config, pkgs, lib, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
cfg = config.xdg.portal.lxqt; |
||||
|
||||
in |
||||
{ |
||||
meta = { |
||||
maintainers = teams.lxqt.members; |
||||
}; |
||||
|
||||
options.xdg.portal.lxqt = { |
||||
enable = mkEnableOption '' |
||||
the desktop portal for the LXQt desktop environment. |
||||
|
||||
This will add the <package>lxqt.xdg-desktop-portal-lxqt</package> |
||||
package (with the extra Qt styles) into the |
||||
<option>xdg.portal.extraPortals</option> option |
||||
''; |
||||
|
||||
styles = mkOption { |
||||
type = types.listOf types.package; |
||||
default = []; |
||||
example = literalExpression ''[ |
||||
pkgs.libsForQt5.qtstyleplugin-kvantum |
||||
pkgs.breeze-qt5 |
||||
pkgs.qtcurve |
||||
]; |
||||
''; |
||||
description = '' |
||||
Extra Qt styles that will be available to the |
||||
<package>lxqt.xdg-desktop-portal-lxqt</package>. |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
xdg.portal = { |
||||
enable = true; |
||||
extraPortals = [ |
||||
(pkgs.lxqt.xdg-desktop-portal-lxqt.override { extraQtStyles = cfg.styles; }) |
||||
]; |
||||
}; |
||||
|
||||
environment.systemPackages = cfg.styles; |
||||
}; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue