···3030 Whether to run the exporter as the local 'postgres' super user.
3131 '';
3232 };
3333+3434+ # TODO perhaps LoadCredential would be more appropriate
3535+ environmentFile = mkOption {
3636+ type = types.nullOr types.path;
3737+ default = null;
3838+ example = "/root/prometheus-postgres-exporter.env";
3939+ description = ''
4040+ Environment file as defined in <citerefentry>
4141+ <refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum>
4242+ </citerefentry>.
4343+4444+ Secrets may be passed to the service without adding them to the
4545+ world-readable Nix store, by specifying placeholder variables as
4646+ the option value in Nix and setting these variables accordingly in the
4747+ environment file.
4848+4949+ Environment variables from this file will be interpolated into the
5050+ config file using envsubst with this syntax:
5151+ <literal>$ENVIRONMENT ''${VARIABLE}</literal>
5252+5353+ The main use is to set the DATA_SOURCE_NAME that contains the
5454+ postgres password
5555+5656+ note that contents from this file will override dataSourceName
5757+ if you have set it from nix.
5858+5959+ <programlisting>
6060+ # Content of the environment file
6161+ DATA_SOURCE_NAME=postgresql://username:password@localhost:5432/postgres?sslmode=disable
6262+ </programlisting>
6363+6464+ Note that this file needs to be available on the host on which
6565+ this exporter is running.
6666+ '';
6767+ };
6868+3369 };
3470 serviceOpts = {
3571 environment.DATA_SOURCE_NAME = cfg.dataSourceName;
3672 serviceConfig = {
3773 DynamicUser = false;
3874 User = mkIf cfg.runAsLocalSuperUser (mkForce "postgres");
7575+ EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
3976 ExecStart = ''
4077 ${pkgs.prometheus-postgres-exporter}/bin/postgres_exporter \
4178 --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+365
nixos/modules/services/web-apps/bookstack.nix
···11+{ config, lib, pkgs, ... }:
22+33+with lib;
44+55+let
66+ cfg = config.services.bookstack;
77+ bookstack = pkgs.bookstack.override {
88+ dataDir = cfg.dataDir;
99+ };
1010+ db = cfg.database;
1111+ mail = cfg.mail;
1212+1313+ user = cfg.user;
1414+ group = cfg.group;
1515+1616+ # shell script for local administration
1717+ artisan = pkgs.writeScriptBin "bookstack" ''
1818+ #! ${pkgs.runtimeShell}
1919+ cd ${bookstack}
2020+ sudo=exec
2121+ if [[ "$USER" != ${user} ]]; then
2222+ sudo='exec /run/wrappers/bin/sudo -u ${user}'
2323+ fi
2424+ $sudo ${pkgs.php}/bin/php artisan $*
2525+ '';
2626+2727+2828+in {
2929+ options.services.bookstack = {
3030+3131+ enable = mkEnableOption "BookStack";
3232+3333+ user = mkOption {
3434+ default = "bookstack";
3535+ description = "User bookstack runs as.";
3636+ type = types.str;
3737+ };
3838+3939+ group = mkOption {
4040+ default = "bookstack";
4141+ description = "Group bookstack runs as.";
4242+ type = types.str;
4343+ };
4444+4545+ appKeyFile = mkOption {
4646+ description = ''
4747+ A file containing the AppKey.
4848+ Used for encryption where needed. Can be generated with <code>head -c 32 /dev/urandom| base64</code> and must be prefixed with <literal>base64:</literal>.
4949+ '';
5050+ example = "/run/keys/bookstack-appkey";
5151+ type = types.path;
5252+ };
5353+5454+ appURL = mkOption {
5555+ description = ''
5656+ The root URL that you want to host BookStack on. All URLs in BookStack will be generated using this value.
5757+ If you change this in the future you may need to run a command to update stored URLs in the database. Command example: <code>php artisan bookstack:update-url https://old.example.com https://new.example.com</code>
5858+ '';
5959+ example = "https://example.com";
6060+ type = types.str;
6161+ };
6262+6363+ cacheDir = mkOption {
6464+ description = "BookStack cache directory";
6565+ default = "/var/cache/bookstack";
6666+ type = types.path;
6767+ };
6868+6969+ dataDir = mkOption {
7070+ description = "BookStack data directory";
7171+ default = "/var/lib/bookstack";
7272+ type = types.path;
7373+ };
7474+7575+ database = {
7676+ host = mkOption {
7777+ type = types.str;
7878+ default = "localhost";
7979+ description = "Database host address.";
8080+ };
8181+ port = mkOption {
8282+ type = types.port;
8383+ default = 3306;
8484+ description = "Database host port.";
8585+ };
8686+ name = mkOption {
8787+ type = types.str;
8888+ default = "bookstack";
8989+ description = "Database name.";
9090+ };
9191+ user = mkOption {
9292+ type = types.str;
9393+ default = user;
9494+ defaultText = "\${user}";
9595+ description = "Database username.";
9696+ };
9797+ passwordFile = mkOption {
9898+ type = with types; nullOr path;
9999+ default = null;
100100+ example = "/run/keys/bookstack-dbpassword";
101101+ description = ''
102102+ A file containing the password corresponding to
103103+ <option>database.user</option>.
104104+ '';
105105+ };
106106+ createLocally = mkOption {
107107+ type = types.bool;
108108+ default = false;
109109+ description = "Create the database and database user locally.";
110110+ };
111111+ };
112112+113113+ mail = {
114114+ driver = mkOption {
115115+ type = types.enum [ "smtp" "sendmail" ];
116116+ default = "smtp";
117117+ description = "Mail driver to use.";
118118+ };
119119+ host = mkOption {
120120+ type = types.str;
121121+ default = "localhost";
122122+ description = "Mail host address.";
123123+ };
124124+ port = mkOption {
125125+ type = types.port;
126126+ default = 1025;
127127+ description = "Mail host port.";
128128+ };
129129+ fromName = mkOption {
130130+ type = types.str;
131131+ default = "BookStack";
132132+ description = "Mail \"from\" name.";
133133+ };
134134+ from = mkOption {
135135+ type = types.str;
136136+ default = "mail@bookstackapp.com";
137137+ description = "Mail \"from\" email.";
138138+ };
139139+ user = mkOption {
140140+ type = with types; nullOr str;
141141+ default = null;
142142+ example = "bookstack";
143143+ description = "Mail username.";
144144+ };
145145+ passwordFile = mkOption {
146146+ type = with types; nullOr path;
147147+ default = null;
148148+ example = "/run/keys/bookstack-mailpassword";
149149+ description = ''
150150+ A file containing the password corresponding to
151151+ <option>mail.user</option>.
152152+ '';
153153+ };
154154+ encryption = mkOption {
155155+ type = with types; nullOr (enum [ "tls" ]);
156156+ default = null;
157157+ description = "SMTP encryption mechanism to use.";
158158+ };
159159+ };
160160+161161+ maxUploadSize = mkOption {
162162+ type = types.str;
163163+ default = "18M";
164164+ example = "1G";
165165+ description = "The maximum size for uploads (e.g. images).";
166166+ };
167167+168168+ poolConfig = mkOption {
169169+ type = with types; attrsOf (oneOf [ str int bool ]);
170170+ default = {
171171+ "pm" = "dynamic";
172172+ "pm.max_children" = 32;
173173+ "pm.start_servers" = 2;
174174+ "pm.min_spare_servers" = 2;
175175+ "pm.max_spare_servers" = 4;
176176+ "pm.max_requests" = 500;
177177+ };
178178+ description = ''
179179+ Options for the bookstack PHP pool. See the documentation on <literal>php-fpm.conf</literal>
180180+ for details on configuration directives.
181181+ '';
182182+ };
183183+184184+ nginx = mkOption {
185185+ type = types.submodule (
186186+ recursiveUpdate
187187+ (import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) {}
188188+ );
189189+ default = {};
190190+ example = {
191191+ serverAliases = [
192192+ "bookstack.\${config.networking.domain}"
193193+ ];
194194+ # To enable encryption and let let's encrypt take care of certificate
195195+ forceSSL = true;
196196+ enableACME = true;
197197+ };
198198+ description = ''
199199+ With this option, you can customize the nginx virtualHost settings.
200200+ '';
201201+ };
202202+203203+ extraConfig = mkOption {
204204+ type = types.nullOr types.lines;
205205+ default = null;
206206+ example = ''
207207+ ALLOWED_IFRAME_HOSTS="https://example.com"
208208+ WKHTMLTOPDF=/home/user/bins/wkhtmltopdf
209209+ '';
210210+ description = ''
211211+ Lines to be appended verbatim to the BookStack configuration.
212212+ Refer to <link xlink:href="https://www.bookstackapp.com/docs/"/> for details on supported values.
213213+ '';
214214+ };
215215+216216+ };
217217+218218+ config = mkIf cfg.enable {
219219+220220+ assertions = [
221221+ { assertion = db.createLocally -> db.user == user;
222222+ message = "services.bookstack.database.user must be set to ${user} if services.mediawiki.database.createLocally is set true.";
223223+ }
224224+ { assertion = db.createLocally -> db.passwordFile == null;
225225+ message = "services.bookstack.database.passwordFile cannot be specified if services.bookstack.database.createLocally is set to true.";
226226+ }
227227+ ];
228228+229229+ environment.systemPackages = [ artisan ];
230230+231231+ services.mysql = mkIf db.createLocally {
232232+ enable = true;
233233+ package = mkDefault pkgs.mariadb;
234234+ ensureDatabases = [ db.name ];
235235+ ensureUsers = [
236236+ { name = db.user;
237237+ ensurePermissions = { "${db.name}.*" = "ALL PRIVILEGES"; };
238238+ }
239239+ ];
240240+ };
241241+242242+ services.phpfpm.pools.bookstack = {
243243+ inherit user;
244244+ inherit group;
245245+ phpOptions = ''
246246+ log_errors = on
247247+ post_max_size = ${cfg.maxUploadSize}
248248+ upload_max_filesize = ${cfg.maxUploadSize}
249249+ '';
250250+ settings = {
251251+ "listen.mode" = "0660";
252252+ "listen.owner" = user;
253253+ "listen.group" = group;
254254+ } // cfg.poolConfig;
255255+ };
256256+257257+ services.nginx = {
258258+ enable = mkDefault true;
259259+ virtualHosts.bookstack = mkMerge [ cfg.nginx {
260260+ root = mkForce "${bookstack}/public";
261261+ extraConfig = optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;";
262262+ locations = {
263263+ "/" = {
264264+ index = "index.php";
265265+ extraConfig = ''try_files $uri $uri/ /index.php?$query_string;'';
266266+ };
267267+ "~ \.php$" = {
268268+ extraConfig = ''
269269+ try_files $uri $uri/ /index.php?$query_string;
270270+ include ${pkgs.nginx}/conf/fastcgi_params;
271271+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
272272+ fastcgi_param REDIRECT_STATUS 200;
273273+ fastcgi_pass unix:${config.services.phpfpm.pools."bookstack".socket};
274274+ ${optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;"}
275275+ '';
276276+ };
277277+ "~ \.(js|css|gif|png|ico|jpg|jpeg)$" = {
278278+ extraConfig = "expires 365d;";
279279+ };
280280+ };
281281+ }];
282282+ };
283283+284284+ systemd.services.bookstack-setup = {
285285+ description = "Preperation tasks for BookStack";
286286+ before = [ "phpfpm-bookstack.service" ];
287287+ after = optional db.createLocally "mysql.service";
288288+ wantedBy = [ "multi-user.target" ];
289289+ serviceConfig = {
290290+ Type = "oneshot";
291291+ User = user;
292292+ WorkingDirectory = "${bookstack}";
293293+ };
294294+ script = ''
295295+ # create .env file
296296+ echo "
297297+ APP_KEY=base64:$(head -n1 ${cfg.appKeyFile})
298298+ APP_URL=${cfg.appURL}
299299+ DB_HOST=${db.host}
300300+ DB_PORT=${toString db.port}
301301+ DB_DATABASE=${db.name}
302302+ DB_USERNAME=${db.user}
303303+ MAIL_DRIVER=${mail.driver}
304304+ MAIL_FROM_NAME=\"${mail.fromName}\"
305305+ MAIL_FROM=${mail.from}
306306+ MAIL_HOST=${mail.host}
307307+ MAIL_PORT=${toString mail.port}
308308+ ${optionalString (mail.user != null) "MAIL_USERNAME=${mail.user};"}
309309+ ${optionalString (mail.encryption != null) "MAIL_ENCRYPTION=${mail.encryption};"}
310310+ ${optionalString (db.passwordFile != null) "DB_PASSWORD=$(head -n1 ${db.passwordFile})"}
311311+ ${optionalString (mail.passwordFile != null) "MAIL_PASSWORD=$(head -n1 ${mail.passwordFile})"}
312312+ APP_SERVICES_CACHE=${cfg.cacheDir}/services.php
313313+ APP_PACKAGES_CACHE=${cfg.cacheDir}/packages.php
314314+ APP_CONFIG_CACHE=${cfg.cacheDir}/config.php
315315+ APP_ROUTES_CACHE=${cfg.cacheDir}/routes-v7.php
316316+ APP_EVENTS_CACHE=${cfg.cacheDir}/events.php
317317+ ${optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "SESSION_SECURE_COOKIE=true"}
318318+ ${toString cfg.extraConfig}
319319+ " > "${cfg.dataDir}/.env"
320320+ # set permissions
321321+ chmod 700 "${cfg.dataDir}/.env"
322322+323323+ # migrate db
324324+ ${pkgs.php}/bin/php artisan migrate --force
325325+326326+ # create caches
327327+ ${pkgs.php}/bin/php artisan config:cache
328328+ ${pkgs.php}/bin/php artisan route:cache
329329+ ${pkgs.php}/bin/php artisan view:cache
330330+ '';
331331+ };
332332+333333+ systemd.tmpfiles.rules = [
334334+ "d ${cfg.cacheDir} 0700 ${user} ${group} - -"
335335+ "d ${cfg.dataDir} 0710 ${user} ${group} - -"
336336+ "d ${cfg.dataDir}/public 0750 ${user} ${group} - -"
337337+ "d ${cfg.dataDir}/public/uploads 0750 ${user} ${group} - -"
338338+ "d ${cfg.dataDir}/storage 0700 ${user} ${group} - -"
339339+ "d ${cfg.dataDir}/storage/app 0700 ${user} ${group} - -"
340340+ "d ${cfg.dataDir}/storage/fonts 0700 ${user} ${group} - -"
341341+ "d ${cfg.dataDir}/storage/framework 0700 ${user} ${group} - -"
342342+ "d ${cfg.dataDir}/storage/framework/cache 0700 ${user} ${group} - -"
343343+ "d ${cfg.dataDir}/storage/framework/sessions 0700 ${user} ${group} - -"
344344+ "d ${cfg.dataDir}/storage/framework/views 0700 ${user} ${group} - -"
345345+ "d ${cfg.dataDir}/storage/logs 0700 ${user} ${group} - -"
346346+ "d ${cfg.dataDir}/storage/uploads 0700 ${user} ${group} - -"
347347+ ];
348348+349349+ users = {
350350+ users = mkIf (user == "bookstack") {
351351+ bookstack = {
352352+ inherit group;
353353+ isSystemUser = true;
354354+ };
355355+ "${config.services.nginx.user}".extraGroups = [ group ];
356356+ };
357357+ groups = mkIf (group == "bookstack") {
358358+ bookstack = {};
359359+ };
360360+ };
361361+362362+ };
363363+364364+ meta.maintainers = with maintainers; [ ymarkus ];
365365+}
+12-1
nixos/modules/system/boot/systemd-lib.nix
···182182 # upstream unit.
183183 for i in ${toString (mapAttrsToList (n: v: v.unit) units)}; do
184184 fn=$(basename $i/*)
185185- if [ -e $out/$fn ]; then
185185+186186+ case $fn in
187187+ # if file name is a template specialization, use the template's name
188188+ *@?*.service)
189189+ # remove @foo.service and replace it with @.service
190190+ ofn="''${fn%@*.service}@.service"
191191+ ;;
192192+ *)
193193+ ofn="$fn"
194194+ esac
195195+196196+ if [ -e $out/$ofn ]; then
186197 if [ "$(readlink -f $i/$fn)" = /dev/null ]; then
187198 ln -sfn /dev/null $out/$fn
188199 else
···8282 echo "Adding runtime dependencies to RPATH of Node module $mod"
8383 patchelf --set-rpath "$runtime_rpath:$mod_rpath" "$mod"
8484 done;
8585+8686+ # fix for https://docs.microsoft.com/en-us/answers/questions/298724/open-teams-meeting-link-on-linux-doens39t-work.html?childToView=309406#comment-309406
8787+ # while we create the wrapper ourselves, gappsWrapperArgs leads to the same issue
8888+ # another option would be to introduce gappsWrapperAppendedArgs, to allow control of positioning
8989+ substituteInPlace "$out/bin/teams" --replace '.teams-wrapped" --disable-namespace-sandbox --disable-setuid-sandbox "$@"' '.teams-wrapped" "$@" --disable-namespace-sandbox --disable-setuid-sandbox'
8590 '';
86918792 meta = with lib; {
···11+{ lib
22+, stdenv
33+, fetchFromGitHub
44+, cmake
55+, pkg-config
66+}:
77+88+stdenv.mkDerivation rec {
99+ pname = "md4c";
1010+ version = "0.4.7";
1111+1212+ src = fetchFromGitHub {
1313+ owner = "mity";
1414+ repo = pname;
1515+ rev = "release-${version}";
1616+ hash = "sha256-nfMXUP1wu3ifn1QVTO/+XcfFRsThG8PlmYRv+b8AYlQ=";
1717+ };
1818+1919+ nativeBuildInputs = [
2020+ cmake
2121+ pkg-config
2222+ ];
2323+2424+ meta = with lib; {
2525+ homepage = "https://github.com/mity/md4c";
2626+ description = "Markdown parser made in C";
2727+ longDescription = ''
2828+ MD4C is Markdown parser implementation in C, with the following features:
2929+3030+ - Compliance: Generally, MD4C aims to be compliant to the latest version
3131+ of CommonMark specification. Currently, we are fully compliant to
3232+ CommonMark 0.29.
3333+ - Extensions: MD4C supports some commonly requested and accepted
3434+ extensions. See below.
3535+ - Performance: MD4C is very fast.
3636+ - Compactness: MD4C parser is implemented in one source file and one
3737+ header file. There are no dependencies other than standard C library.
3838+ - Embedding: MD4C parser is easy to reuse in other projects, its API is
3939+ very straightforward: There is actually just one function, md_parse().
4040+ - Push model: MD4C parses the complete document and calls few callback
4141+ functions provided by the application to inform it about a start/end of
4242+ every block, a start/end of every span, and with any textual contents.
4343+ - Portability: MD4C builds and works on Windows and POSIX-compliant
4444+ OSes. (It should be simple to make it run also on most other platforms,
4545+ at least as long as the platform provides C standard library, including
4646+ a heap memory management.)
4747+ - Encoding: MD4C by default expects UTF-8 encoding of the input
4848+ document. But it can be compiled to recognize ASCII-only control
4949+ characters (i.e. to disable all Unicode-specific code), or (on Windows)
5050+ to expect UTF-16 (i.e. what is on Windows commonly called just
5151+ "Unicode"). See more details below.
5252+ - Permissive license: MD4C is available under the MIT license.
5353+ '';
5454+ license = licenses.mit;
5555+ maintainers = with maintainers; [ AndersonTorres ];
5656+ platforms = platforms.all;
5757+ };
5858+}
5959+# TODO: enable tests (needs Python)
···88, cudatoolkit
99, fetchurl
1010, addOpenGLRunpath
1111+, # The distributed version of CUDNN includes both dynamically liked .so files,
1212+ # as well as statically linked .a files. However, CUDNN is quite large
1313+ # (multiple gigabytes), so you can save some space in your nix store by
1414+ # removing the statically linked libraries if you are not using them.
1515+ #
1616+ # Setting this to true removes the statically linked .a files.
1717+ # Setting this to false keeps these statically linked .a files.
1818+ removeStatic ? false
1119}:
12201321stdenv.mkDerivation {
···2331 nativeBuildInputs = [ addOpenGLRunpath ];
24322533 installPhase = ''
3434+ runHook preInstall
3535+2636 function fixRunPath {
2737 p=$(patchelf --print-rpath $1)
2838 patchelf --set-rpath "''${p:+$p:}${lib.makeLibraryPath [ stdenv.cc.cc ]}:\$ORIGIN/" $1
···3545 mkdir -p $out
3646 cp -a include $out/include
3747 cp -a lib64 $out/lib64
4848+ '' + lib.optionalString removeStatic ''
4949+ rm -f $out/lib64/*.a
5050+ '' + ''
5151+ runHook postInstall
3852 '';
39534054 # Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found.
···12121313buildPythonPackage rec {
1414 pname = "botocore";
1515- version = "1.20.27"; # N.B: if you change this, change boto3 and awscli to a matching version
1515+ version = "1.20.29"; # N.B: if you change this, change boto3 and awscli to a matching version
16161717 src = fetchPypi {
1818 inherit pname version;
1919- sha256 = "sha256-RHeAPwdkn02AsX0FSCDnoJuyyweS0N7MKBIQi8N1nEo=";
1919+ sha256 = "sha256-GEt9JrBmn9ZayBk2YjdtEmfYAOAFtpQStXzILF/76TU=";
2020 };
21212222 propagatedBuildInputs = [
···11-{ lib, buildPythonPackage, fetchPypi }:
11+{ lib
22+, buildPythonPackage
33+, fetchPypi
44+, nose
55+}:
2637buildPythonPackage rec {
48 pname = "yapf";
55- version = "0.30.0";
99+ version = "0.31.0";
610711 src = fetchPypi {
812 inherit pname version;
99- sha256 = "3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427";
1313+ hash = "sha256-QI+5orJUwwL0nbg8WfmqC0sP0OwlvjpcURgTJ5Iv9j0=";
1014 };
11151616+ checkInputs = [
1717+ nose
1818+ ];
1919+1220 meta = with lib; {
1313- description = "A formatter for Python code.";
1414- homepage = "https://github.com/google/yapf";
1515- license = licenses.asl20;
1616- maintainers = with maintainers; [ siddharthist ];
2121+ homepage = "https://github.com/google/yapf";
2222+ description = "Yet Another Python Formatter";
2323+ longDescription = ''
2424+ Most of the current formatters for Python --- e.g., autopep8, and pep8ify
2525+ --- are made to remove lint errors from code. This has some obvious
2626+ limitations. For instance, code that conforms to the PEP 8 guidelines may
2727+ not be reformatted. But it doesn't mean that the code looks good.
2828+2929+ YAPF takes a different approach. It's based off of 'clang-format',
3030+ developed by Daniel Jasper. In essence, the algorithm takes the code and
3131+ reformats it to the best formatting that conforms to the style guide, even
3232+ if the original code didn't violate the style guide. The idea is also
3333+ similar to the 'gofmt' tool for the Go programming language: end all holy
3434+ wars about formatting - if the whole codebase of a project is simply piped
3535+ through YAPF whenever modifications are made, the style remains consistent
3636+ throughout the project and there's no point arguing about style in every
3737+ code review.
3838+3939+ The ultimate goal is that the code YAPF produces is as good as the code
4040+ that a programmer would write if they were following the style guide. It
4141+ takes away some of the drudgery of maintaining your code.
4242+ '';
4343+ license = licenses.asl20;
4444+ maintainers = with maintainers; [ AndersonTorres siddharthist ];
1745 };
1818-1946}
···11-{ lib, stdenv, binutils-unwrapped, cctools, llvm }:
11+{ lib, stdenv, makeWrapper, binutils-unwrapped, cctools, llvm, clang-unwrapped }:
2233# Make sure both underlying packages claim to have prepended their binaries
44# with the same targetPrefix.
···4949 ln -sv "$path" "$dest_path"
5050 done
5151 done
5252+ ''
5353+ # On aarch64-darwin we must use clang, because "as" from cctools just doesn't
5454+ # handle the arch. Proxying calls to clang produces quite a bit of warnings,
5555+ # and using clang directly here is a better option than relying on cctools.
5656+ # On x86_64-darwin the Clang version is too old to support this mode.
5757+ + lib.optionalString stdenv.isAarch64 ''
5858+ rm $out/bin/as
5959+ makeWrapper "${clang-unwrapped}/bin/clang" "$out/bin/as" \
6060+ --add-flags "-x assembler -integrated-as -c"
5261 '';
6262+6363+ nativeBuildInputs = lib.optionals stdenv.isAarch64 [ makeWrapper ];
53645465 passthru = {
5566 inherit targetPrefix;
···2828in
2929with py.pkgs; buildPythonApplication rec {
3030 pname = "awscli";
3131- version = "1.19.27"; # N.B: if you change this, change botocore and boto3 to a matching version too
3131+ version = "1.19.29"; # N.B: if you change this, change botocore and boto3 to a matching version too
32323333 src = fetchPypi {
3434 inherit pname version;
3535- sha256 = "sha256-xScwrjQaqPqssuFTUrTrLVRIUnnFp1OkHAjAA1MpcJU=";
3535+ sha256 = "sha256-d4PdFzIJSMJSpQta7JqCRwIkcgfh8XHgBKOEc/95r3w=";
3636 };
37373838 # https://github.com/aws/aws-cli/issues/4837
···1818 # The websites youtube-dl deals with are a very moving target. That means that
1919 # downloads break constantly. Because of that, updates should always be backported
2020 # to the latest stable release.
2121- version = "2021.03.03";
2121+ version = "2021.03.14";
22222323 src = fetchurl {
2424 url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
2525- sha256 = "11z2v8mdii0bl13850mc6hgz80d0kgzb4hdxyikc3wa4jqfwrq7f";
2525+ sha256 = "1bh74f9q6dv17ah5x8zcxw03dq6jbh959xd39kw374cf9ifrgnd3";
2626 };
27272828 nativeBuildInputs = [ installShellFiles makeWrapper ];
···11+{ lib
22+, buildPythonApplication
33+, fetchFromGitHub
44+, lxml
55+, six
66+}:
77+88+buildPythonApplication rec {
99+ pname = "xmldiff";
1010+ version = "2.4";
1111+1212+ src = fetchFromGitHub {
1313+ owner = "Shoobx";
1414+ repo = pname;
1515+ rev = version;
1616+ hash = "sha256-xqudHYfwOce2C0pcFzId0JDIIC6R5bllmVKsH+CvTdE=";
1717+ };
1818+1919+ buildInputs = [
2020+ lxml
2121+ six
2222+ ];
2323+2424+ meta = with lib; {
2525+ homepage = "https://xmldiff.readthedocs.io/en/stable/";
2626+ description = "A library and command line utility for diffing xml";
2727+ longDescription = ''
2828+ xmldiff is a library and a command-line utility for making diffs out of
2929+ XML. This may seem like something that doesn't need a dedicated utility,
3030+ but change detection in hierarchical data is very different from change
3131+ detection in flat data. XML type formats are also not only used for
3232+ computer readable data, it is also often used as a format for hierarchical
3333+ data that can be rendered into human readable formats. A traditional diff
3434+ on such a format would tell you line by line the differences, but this
3535+ would not be be readable by a human. xmldiff provides tools to make human
3636+ readable diffs in those situations.
3737+ '';
3838+ license = licenses.mit;
3939+ maintainers = with maintainers; [ AndersonTorres ];
4040+ };
4141+}