diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 408688e90778..d368a4cf08b5 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7896,6 +7896,12 @@ githubId = 1047859; name = "Kaz Wesley"; }; + kazenyuk = { + email = "kazenyuk@pm.me"; + github = "nvmd"; + githubId = 524492; + name = "Sergey Kazenyuk"; + }; kcalvinalvin = { email = "calvin@kcalvinalvin.info"; github = "kcalvinalvin"; diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index bed50b81604d..5b278b5e8062 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -233,7 +233,7 @@ in # nix-serve = 199; # unused, removed 2020-12-12 #tvheadend = 200; # dynamically allocated as of 2021-09-18 uwsgi = 201; - gitit = 202; + # gitit = 202; # unused, module was removed 2023-04-03 riemanntools = 203; subsonic = 204; # riak = 205; # unused, remove 2022-07-22 diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 7b9736e90d35..bac096efac2c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -616,7 +616,6 @@ ./services/misc/gammu-smsd.nix ./services/misc/geoipupdate.nix ./services/misc/gitea.nix - # ./services/misc/gitit.nix ./services/misc/gitlab.nix ./services/misc/gitolite.nix ./services/misc/gitweb.nix diff --git a/nixos/modules/services/misc/gitit.nix b/nixos/modules/services/misc/gitit.nix deleted file mode 100644 index 0fafa76b5487..000000000000 --- a/nixos/modules/services/misc/gitit.nix +++ /dev/null @@ -1,725 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - cfg = config.services.gitit; - - homeDir = "/var/lib/gitit"; - - toYesNo = b: if b then "yes" else "no"; - - gititShared = with cfg.haskellPackages; gitit + "/share/" + ghc.targetPrefix + ghc.haskellCompilerName + "/" + gitit.pname + "-" + gitit.version; - - gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self)); - - gititSh = hsPkgs: extras: with pkgs; let - env = gititWithPkgs hsPkgs extras; - in writeScript "gitit" '' - #!${runtimeShell} - cd $HOME - export NIX_GHC="${env}/bin/ghc" - export NIX_GHCPKG="${env}/bin/ghc-pkg" - export NIX_GHC_DOCDIR="${env}/share/doc/ghc/html" - export NIX_GHC_LIBDIR=$( $NIX_GHC --print-libdir ) - ${env}/bin/gitit -f ${configFile} - ''; - - gititOptions = { - - enable = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc "Enable the gitit service."; - }; - - haskellPackages = mkOption { - default = pkgs.haskellPackages; - defaultText = literalExpression "pkgs.haskellPackages"; - example = literalExpression "pkgs.haskell.packages.ghc784"; - description = lib.mdDoc "haskellPackages used to build gitit and plugins."; - }; - - extraPackages = mkOption { - type = types.functionTo (types.listOf types.package); - default = self: []; - example = literalExpression '' - haskellPackages: [ - haskellPackages.wreq - ] - ''; - description = lib.mdDoc '' - Extra packages available to ghc when running gitit. The - value must be a function which receives the attrset defined - in {var}`haskellPackages` as the sole argument. - ''; - }; - - address = mkOption { - type = types.str; - default = "0.0.0.0"; - description = lib.mdDoc "IP address on which the web server will listen."; - }; - - port = mkOption { - type = types.int; - default = 5001; - description = lib.mdDoc "Port on which the web server will run."; - }; - - wikiTitle = mkOption { - type = types.str; - default = "Gitit!"; - description = lib.mdDoc "The wiki title."; - }; - - repositoryType = mkOption { - type = types.enum ["git" "darcs" "mercurial"]; - default = "git"; - description = lib.mdDoc "Specifies the type of repository used for wiki content."; - }; - - repositoryPath = mkOption { - type = types.path; - default = homeDir + "/wiki"; - description = lib.mdDoc '' - Specifies the path of the repository directory. If it does not - exist, gitit will create it on startup. - ''; - }; - - requireAuthentication = mkOption { - type = types.enum [ "none" "modify" "read" ]; - default = "modify"; - description = lib.mdDoc '' - If 'none', login is never required, and pages can be edited - anonymously. If 'modify', login is required to modify the wiki - (edit, add, delete pages, upload files). If 'read', login is - required to see any wiki pages. - ''; - }; - - authenticationMethod = mkOption { - type = types.enum [ "form" "http" "generic" "github" ]; - default = "form"; - description = lib.mdDoc '' - 'form' means that users will be logged in and registered using forms - in the gitit web interface. 'http' means that gitit will assume that - HTTP authentication is in place and take the logged in username from - the "Authorization" field of the HTTP request header (in addition, - the login/logout and registration links will be suppressed). - 'generic' means that gitit will assume that some form of - authentication is in place that directly sets REMOTE_USER to the name - of the authenticated user (e.g. mod_auth_cas on apache). 'rpx' means - that gitit will attempt to log in through https://rpxnow.com. This - requires that 'rpx-domain', 'rpx-key', and 'base-url' be set below, - and that 'curl' be in the system path. - ''; - }; - - userFile = mkOption { - type = types.path; - default = homeDir + "/gitit-users"; - description = lib.mdDoc '' - Specifies the path of the file containing user login information. If - it does not exist, gitit will create it (with an empty user list). - This file is not used if 'http' is selected for - authentication-method. - ''; - }; - - sessionTimeout = mkOption { - type = types.int; - default = 60; - description = lib.mdDoc '' - Number of minutes of inactivity before a session expires. - ''; - }; - - staticDir = mkOption { - type = types.path; - default = gititShared + "/data/static"; - description = lib.mdDoc '' - Specifies the path of the static directory (containing javascript, - css, and images). If it does not exist, gitit will create it and - populate it with required scripts, stylesheets, and images. - ''; - }; - - defaultPageType = mkOption { - type = types.enum [ "markdown" "rst" "latex" "html" "markdown+lhs" "rst+lhs" "latex+lhs" ]; - default = "markdown"; - description = lib.mdDoc '' - Specifies the type of markup used to interpret pages in the wiki. - Possible values are markdown, rst, latex, html, markdown+lhs, - rst+lhs, and latex+lhs. (the +lhs variants treat the input as - literate Haskell. See pandoc's documentation for more details.) If - Markdown is selected, pandoc's syntax extensions (for footnotes, - delimited code blocks, etc.) will be enabled. Note that pandoc's - restructuredtext parser is not complete, so some pages may not be - rendered correctly if rst is selected. The same goes for latex and - html. - ''; - }; - - math = mkOption { - type = types.enum [ "mathml" "raw" "mathjax" "jsmath" "google" ]; - default = "mathml"; - description = lib.mdDoc '' - Specifies how LaTeX math is to be displayed. Possible values are - mathml, raw, mathjax, jsmath, and google. If mathml is selected, - gitit will convert LaTeX math to MathML and link in a script, - MathMLinHTML.js, that allows the MathML to be seen in Gecko browsers, - IE + mathplayer, and Opera. In other browsers you may get a jumble of - characters. If raw is selected, the LaTeX math will be displayed as - raw LaTeX math. If mathjax is selected, gitit will link to the - remote mathjax script. If jsMath is selected, gitit will link to the - script /js/jsMath/easy/load.js, and will assume that jsMath has been - installed into the js/jsMath directory. This is the most portable - solution. If google is selected, the google chart API is called to - render the formula as an image. This requires a connection to google, - and might raise a technical or a privacy problem. - ''; - }; - - mathJaxScript = mkOption { - type = types.str; - default = "https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"; - description = lib.mdDoc '' - Specifies the path to MathJax rendering script. You might want to - use your own MathJax script to render formulas without Internet - connection or if you want to use some special LaTeX packages. Note: - path specified there cannot be an absolute path to a script on your - hdd, instead you should run your (local if you wish) HTTP server - which will serve the MathJax.js script. You can easily (in four lines - of code) serve MathJax.js using - http://happstack.com/docs/crashcourse/FileServing.html Do not forget - the "http://" prefix (e.g. http://localhost:1234/MathJax.js). - ''; - }; - - showLhsBirdTracks = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Specifies whether to show Haskell code blocks in "bird style", with - "> " at the beginning of each line. - ''; - }; - - templatesDir = mkOption { - type = types.path; - default = gititShared + "/data/templates"; - description = lib.mdDoc '' - Specifies the path of the directory containing page templates. If it - does not exist, gitit will create it with default templates. Users - may wish to edit the templates to customize the appearance of their - wiki. The template files are HStringTemplate templates. Variables to - be interpolated appear between $\'s. Literal $\'s must be - backslash-escaped. - ''; - }; - - logFile = mkOption { - type = types.path; - default = homeDir + "/gitit.log"; - description = lib.mdDoc '' - Specifies the path of gitit's log file. If it does not exist, gitit - will create it. The log is in Apache combined log format. - ''; - }; - - logLevel = mkOption { - type = types.enum [ "DEBUG" "INFO" "NOTICE" "WARNING" "ERROR" "CRITICAL" "ALERT" "EMERGENCY" ]; - default = "ERROR"; - description = lib.mdDoc '' - Determines how much information is logged. Possible values (from - most to least verbose) are DEBUG, INFO, NOTICE, WARNING, ERROR, - CRITICAL, ALERT, EMERGENCY. - ''; - }; - - frontPage = mkOption { - type = types.str; - default = "Front Page"; - description = lib.mdDoc '' - Specifies which wiki page is to be used as the wiki's front page. - Gitit creates a default front page on startup, if one does not exist - already. - ''; - }; - - noDelete = mkOption { - type = types.str; - default = "Front Page, Help"; - description = lib.mdDoc '' - Specifies pages that cannot be deleted through the web interface. - (They can still be deleted directly using git or darcs.) A - comma-separated list of page names. Leave blank to allow every page - to be deleted. - ''; - }; - - noEdit = mkOption { - type = types.str; - default = "Help"; - description = lib.mdDoc '' - Specifies pages that cannot be edited through the web interface. - Leave blank to allow every page to be edited. - ''; - }; - - defaultSummary = mkOption { - type = types.str; - default = ""; - description = lib.mdDoc '' - Specifies text to be used in the change description if the author - leaves the "description" field blank. If default-summary is blank - (the default), the author will be required to fill in the description - field. - ''; - }; - - tableOfContents = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Specifies whether to print a tables of contents (with links to - sections) on each wiki page. - ''; - }; - - plugins = mkOption { - type = with types; listOf str; - default = [ (gititShared + "/plugins/Dot.hs") ]; - description = lib.mdDoc '' - Specifies a list of plugins to load. Plugins may be specified either - by their path or by their module name. If the plugin name starts - with Gitit.Plugin., gitit will assume that the plugin is an installed - module and will not try to find a source file. - ''; - }; - - useCache = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Specifies whether to cache rendered pages. Note that if use-feed is - selected, feeds will be cached regardless of the value of use-cache. - ''; - }; - - cacheDir = mkOption { - type = types.path; - default = homeDir + "/cache"; - description = lib.mdDoc "Path where rendered pages will be cached."; - }; - - maxUploadSize = mkOption { - type = types.str; - default = "1000K"; - description = lib.mdDoc '' - Specifies an upper limit on the size (in bytes) of files uploaded - through the wiki's web interface. To disable uploads, set this to - 0K. This will result in the uploads link disappearing and the - _upload url becoming inactive. - ''; - }; - - maxPageSize = mkOption { - type = types.str; - default = "1000K"; - description = lib.mdDoc "Specifies an upper limit on the size (in bytes) of pages."; - }; - - debugMode = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc "Causes debug information to be logged while gitit is running."; - }; - - compressResponses = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc "Specifies whether HTTP responses should be compressed."; - }; - - mimeTypesFile = mkOption { - type = types.path; - default = "/etc/mime/types.info"; - description = lib.mdDoc '' - Specifies the path of a file containing mime type mappings. Each - line of the file should contain two fields, separated by whitespace. - The first field is the mime type, the second is a file extension. - For example: - ``` - video/x-ms-wmx wmx - ``` - If the file is not found, some simple defaults will be used. - ''; - }; - - useReCaptcha = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - If true, causes gitit to use the reCAPTCHA service - (http://recaptcha.net) to prevent bots from creating accounts. - ''; - }; - - reCaptchaPrivateKey = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specifies the private key for the reCAPTCHA service. To get - these, you need to create an account at http://recaptcha.net. - ''; - }; - - reCaptchaPublicKey = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specifies the public key for the reCAPTCHA service. To get - these, you need to create an account at http://recaptcha.net. - ''; - }; - - accessQuestion = mkOption { - type = types.str; - default = "What is the code given to you by Ms. X?"; - description = lib.mdDoc '' - Specifies a question that users must answer when they attempt to - create an account - ''; - }; - - accessQuestionAnswers = mkOption { - type = types.str; - default = "RED DOG, red dog"; - description = lib.mdDoc '' - Specifies a question that users must answer when they attempt to - create an account, along with a comma-separated list of acceptable - answers. This can be used to institute a rudimentary password for - signing up as a user on the wiki, or as an alternative to reCAPTCHA. - Example: - access-question: What is the code given to you by Ms. X? - access-question-answers: RED DOG, red dog - ''; - }; - - rpxDomain = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specifies the domain and key of your RPX account. The domain is just - the prefix of the complete RPX domain, so if your full domain is - 'https://foo.rpxnow.com/', use 'foo' as the value of rpx-domain. - ''; - }; - - rpxKey = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc "RPX account access key."; - }; - - mailCommand = mkOption { - type = types.str; - default = "sendmail %s"; - description = lib.mdDoc '' - Specifies the command to use to send notification emails. '%s' will - be replaced by the destination email address. The body of the - message will be read from stdin. If this field is left blank, - password reset will not be offered. - ''; - }; - - resetPasswordMessage = mkOption { - type = types.lines; - default = '' - > From: gitit@$hostname$ - > To: $useremail$ - > Subject: Wiki password reset - > - > Hello $username$, - > - > To reset your password, please follow the link below: - > http://$hostname$:$port$$resetlink$ - > - > Regards - ''; - description = lib.mdDoc '' - Gives the text of the message that will be sent to the user should - she want to reset her password, or change other registration info. - The lines must be indented, and must begin with '>'. The initial - spaces and '> ' will be stripped off. $username$ will be replaced by - the user's username, $useremail$ by her email address, $hostname$ by - the hostname on which the wiki is running (as returned by the - hostname system call), $port$ by the port on which the wiki is - running, and $resetlink$ by the relative path of a reset link derived - from the user's existing hashed password. If your gitit wiki is being - proxied to a location other than the root path of $port$, you should - change the link to reflect this: for example, to - http://$hostname$/path/to/wiki$resetlink$ or - http://gitit.$hostname$$resetlink$ - ''; - }; - - useFeed = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Specifies whether an ATOM feed should be enabled (for the site and - for individual pages). - ''; - }; - - baseUrl = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - The base URL of the wiki, to be used in constructing feed IDs and RPX - token_urls. Set this if useFeed is false or authentication-method - is 'rpx'. - ''; - }; - - absoluteUrls = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Make wikilinks absolute with respect to the base-url. So, for - example, in a wiki served at the base URL '/wiki', on a page - Sub/Page, the wikilink `[Cactus]()` will produce a link to - '/wiki/Cactus' if absoluteUrls is true, and a relative link to - 'Cactus' (referring to '/wiki/Sub/Cactus') if absolute-urls is 'no'. - ''; - }; - - feedDays = mkOption { - type = types.int; - default = 14; - description = lib.mdDoc "Number of days to be included in feeds."; - }; - - feedRefreshTime = mkOption { - type = types.int; - default = 60; - description = lib.mdDoc "Number of minutes to cache feeds before refreshing."; - }; - - pdfExport = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - If true, PDF will appear in export options. PDF will be created using - pdflatex, which must be installed and in the path. Note that PDF - exports create significant additional server load. - ''; - }; - - pandocUserData = mkOption { - type = with types; nullOr path; - default = null; - description = lib.mdDoc '' - If a directory is specified, this will be searched for pandoc - customizations. These can include a templates/ directory for custom - templates for various export formats, an S5 directory for custom S5 - styles, and a reference.odt for ODT exports. If no directory is - specified, $HOME/.pandoc will be searched. See pandoc's README for - more information. - ''; - }; - - xssSanitize = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - If true, all HTML (including that produced by pandoc) is filtered - through xss-sanitize. Set to no only if you trust all of your users. - ''; - }; - - oauthClientId = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc "OAuth client ID"; - }; - - oauthClientSecret = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc "OAuth client secret"; - }; - - oauthCallback = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc "OAuth callback URL"; - }; - - oauthAuthorizeEndpoint = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc "OAuth authorize endpoint"; - }; - - oauthAccessTokenEndpoint = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc "OAuth access token endpoint"; - }; - - githubOrg = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc "Github organization"; - }; - }; - - configFile = pkgs.writeText "gitit.conf" '' - address: ${cfg.address} - port: ${toString cfg.port} - wiki-title: ${cfg.wikiTitle} - repository-type: ${cfg.repositoryType} - repository-path: ${cfg.repositoryPath} - require-authentication: ${cfg.requireAuthentication} - authentication-method: ${cfg.authenticationMethod} - user-file: ${cfg.userFile} - session-timeout: ${toString cfg.sessionTimeout} - static-dir: ${cfg.staticDir} - default-page-type: ${cfg.defaultPageType} - math: ${cfg.math} - mathjax-script: ${cfg.mathJaxScript} - show-lhs-bird-tracks: ${toYesNo cfg.showLhsBirdTracks} - templates-dir: ${cfg.templatesDir} - log-file: ${cfg.logFile} - log-level: ${cfg.logLevel} - front-page: ${cfg.frontPage} - no-delete: ${cfg.noDelete} - no-edit: ${cfg.noEdit} - default-summary: ${cfg.defaultSummary} - table-of-contents: ${toYesNo cfg.tableOfContents} - plugins: ${concatStringsSep "," cfg.plugins} - use-cache: ${toYesNo cfg.useCache} - cache-dir: ${cfg.cacheDir} - max-upload-size: ${cfg.maxUploadSize} - max-page-size: ${cfg.maxPageSize} - debug-mode: ${toYesNo cfg.debugMode} - compress-responses: ${toYesNo cfg.compressResponses} - mime-types-file: ${cfg.mimeTypesFile} - use-recaptcha: ${toYesNo cfg.useReCaptcha} - recaptcha-private-key: ${toString cfg.reCaptchaPrivateKey} - recaptcha-public-key: ${toString cfg.reCaptchaPublicKey} - access-question: ${cfg.accessQuestion} - access-question-answers: ${cfg.accessQuestionAnswers} - rpx-domain: ${toString cfg.rpxDomain} - rpx-key: ${toString cfg.rpxKey} - mail-command: ${cfg.mailCommand} - reset-password-message: ${cfg.resetPasswordMessage} - use-feed: ${toYesNo cfg.useFeed} - base-url: ${toString cfg.baseUrl} - absolute-urls: ${toYesNo cfg.absoluteUrls} - feed-days: ${toString cfg.feedDays} - feed-refresh-time: ${toString cfg.feedRefreshTime} - pdf-export: ${toYesNo cfg.pdfExport} - pandoc-user-data: ${toString cfg.pandocUserData} - xss-sanitize: ${toYesNo cfg.xssSanitize} - - [Github] - oauthclientid: ${toString cfg.oauthClientId} - oauthclientsecret: ${toString cfg.oauthClientSecret} - oauthcallback: ${toString cfg.oauthCallback} - oauthauthorizeendpoint: ${toString cfg.oauthAuthorizeEndpoint} - oauthaccesstokenendpoint: ${toString cfg.oauthAccessTokenEndpoint} - github-org: ${toString cfg.githubOrg} - ''; - -in - -{ - - options.services.gitit = gititOptions; - - config = mkIf cfg.enable { - - users.users.gitit = { - group = config.users.groups.gitit.name; - description = "Gitit user"; - home = homeDir; - createHome = true; - uid = config.ids.uids.gitit; - }; - - users.groups.gitit.gid = config.ids.gids.gitit; - - systemd.services.gitit = let - uid = toString config.ids.uids.gitit; - gid = toString config.ids.gids.gitit; - in { - description = "Git and Pandoc Powered Wiki"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - path = with pkgs; [ curl ] - ++ optional cfg.pdfExport texlive.combined.scheme-basic - ++ optional (cfg.repositoryType == "darcs") darcs - ++ optional (cfg.repositoryType == "mercurial") mercurial - ++ optional (cfg.repositoryType == "git") git; - - preStart = let - gm = "gitit@${config.networking.hostName}"; - in - with cfg; '' - chown ${uid}:${gid} -R ${homeDir} - for dir in ${repositoryPath} ${staticDir} ${templatesDir} ${cacheDir} - do - if [ ! -d $dir ] - then - mkdir -p $dir - find $dir -type d -exec chmod 0750 {} + - find $dir -type f -exec chmod 0640 {} + - fi - done - cd ${repositoryPath} - ${ - if repositoryType == "darcs" then - '' - if [ ! -d _darcs ] - then - darcs initialize - echo "${gm}" > _darcs/prefs/email - '' - else if repositoryType == "mercurial" then - '' - if [ ! -d .hg ] - then - hg init - cat >> .hg/hgrc < 0.1.0', path: 'vendor/gems/mail-smtp_pool', require: false gem 'microsoft_graph_mailer', '~> 0.1.0', path: 'vendor/gems/microsoft_graph_mailer' @@ -593,12 +593,8 @@ gem 'app_store_connect' # For phone verification gem 'telesignenterprise', '~> 2.2' -# Ruby 3 extracts net-protocol into a separate gem, while Ruby 2 has it built-in -# This condition installs the gem only for Ruby 3 to avoid warnings on Ruby 2 -# Can be removed when support for Ruby 2 is dropped -install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0.0") } do - # BufferedIO patch - gem 'net-protocol', '~> 0.1.3' -end +# BufferedIO patch +# Updating this version will require updating scripts/allowed_warnings.txt +gem 'net-protocol', '~> 0.1.3' gem 'duo_api', '~> 1.3' diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock index 1f1f566be37c..b624e3908515 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock @@ -344,6 +344,7 @@ GEM danger gitlab (~> 4.2, >= 4.2.0) database_cleaner (1.7.0) + date (3.3.3) dead_end (3.1.1) debug_inspector (1.1.0) deckar01-task_list (2.3.2) @@ -927,8 +928,11 @@ GEM zeitwerk (~> 2.5) lru_redux (1.1.0) lumberjack (1.2.7) - mail (2.7.1) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) marginalia (1.11.1) actionpack (>= 5.2) @@ -972,12 +976,19 @@ GEM nenv (0.3.0) net-http-persistent (4.0.1) connection_pool (~> 2.2) + net-imap (0.3.4) + date + net-protocol net-ldap (0.17.1) net-ntp (2.1.3) + net-pop (0.1.2) + net-protocol net-protocol (0.1.3) timeout net-scp (3.0.0) net-ssh (>= 2.6.5, < 7.0.0) + net-smtp (0.3.3) + net-protocol net-ssh (6.0.0) netrc (0.11.0) nio4r (2.5.8) @@ -1790,7 +1801,7 @@ DEPENDENCIES loofah (~> 2.19.1) lookbook (~> 1.5, >= 1.5.3) lru_redux - mail (= 2.7.1) + mail (= 2.8.1) mail-smtp_pool (~> 0.1.0)! marginalia (~> 1.11.1) memory_profiler (~> 1.0) diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix index fe75ce4a2a9c..4b90619af0cf 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix +++ b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix @@ -1064,6 +1064,16 @@ src: }; version = "1.7.0"; }; + date = { + groups = ["default" "development" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "03skfikihpx37rc27vr3hwrb057gxnmdzxhmzd4bf4jpkl0r55w1"; + type = "gem"; + }; + version = "3.3.3"; + }; dead_end = { groups = ["default" "test"]; platforms = []; @@ -3416,15 +3426,15 @@ src: version = "1.2.7"; }; mail = { - dependencies = ["mini_mime"]; + dependencies = ["mini_mime" "net-imap" "net-pop" "net-smtp"]; groups = ["default" "development" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "00wwz6ys0502dpk8xprwcqfwyf3hmnx6lgxaiq6vj43mkx43sapc"; + sha256 = "1bf9pysw1jfgynv692hhaycfxa8ckay1gjw5hz3madrbrynryfzc"; type = "gem"; }; - version = "2.7.1"; + version = "2.8.1"; }; mail-smtp_pool = { dependencies = ["connection_pool" "mail"]; @@ -3739,6 +3749,17 @@ src: }; version = "4.0.1"; }; + net-imap = { + dependencies = ["date" "net-protocol"]; + groups = ["default" "development" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1d996zf3g8xz244791b0qsl9vr7zg4lqnnmf9k2kshr9lki5jam8"; + type = "gem"; + }; + version = "0.3.4"; + }; net-ldap = { groups = ["default"]; platforms = []; @@ -3759,6 +3780,17 @@ src: }; version = "2.1.3"; }; + net-pop = { + dependencies = ["net-protocol"]; + groups = ["default" "development" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1wyz41jd4zpjn0v1xsf9j778qx1vfrl24yc20cpmph8k42c4x2w4"; + type = "gem"; + }; + version = "0.1.2"; + }; net-protocol = { dependencies = ["timeout"]; groups = ["default"]; @@ -3781,6 +3813,17 @@ src: }; version = "3.0.0"; }; + net-smtp = { + dependencies = ["net-protocol"]; + groups = ["default" "development" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1c6md06hm5bf6rv53sk54dl2vg038pg8kglwv3rayx0vk2mdql9x"; + type = "gem"; + }; + version = "0.3.3"; + }; net-ssh = { groups = ["default"]; platforms = []; diff --git a/pkgs/applications/version-management/lefthook/default.nix b/pkgs/applications/version-management/lefthook/default.nix index cd8c2482dd4a..7f4affc34fe9 100644 --- a/pkgs/applications/version-management/lefthook/default.nix +++ b/pkgs/applications/version-management/lefthook/default.nix @@ -6,7 +6,7 @@ let pname = "lefthook"; - version = "1.3.8"; + version = "1.3.9"; in buildGoModule rec { inherit pname version; @@ -15,7 +15,7 @@ buildGoModule rec { owner = "evilmartians"; repo = "lefthook"; rev = "v${version}"; - hash = "sha256-AtqCRGl+xvFA3mW9hYZALSrknUbuJ83LOKgOvLDLIPU="; + hash = "sha256-6XsSnFrYRsVNzp5Kr1+GghbNh2uOOyT4BQm9yBw3jRU="; }; vendorHash = "sha256-cMRl+TqSLlfoAja+JNaNKfHDR9fkvMTWdB1FT3XxPd4="; diff --git a/pkgs/applications/video/hyperion-ng/default.nix b/pkgs/applications/video/hyperion-ng/default.nix index d9a1e251e4d0..a1eb4086e89c 100644 --- a/pkgs/applications/video/hyperion-ng/default.nix +++ b/pkgs/applications/video/hyperion-ng/default.nix @@ -1,51 +1,73 @@ -{ stdenv, avahi-compat, cmake, fetchFromGitHub, flatbuffers, hidapi, lib, libcec -, libusb1, libX11, libxcb, libXrandr, mbedtls, mkDerivation, protobuf, python3 -, qtbase, qtserialport, qtsvg, qtx11extras, wrapQtAppsHook }: +{ stdenv, lib, fetchFromGitHub +, cmake, wrapQtAppsHook, perl +, flatbuffers, protobuf, mbedtls +, hidapi, libcec, libusb1 +, libX11, libxcb, libXrandr, python3 +, qtbase, qtserialport, qtsvg, qtx11extras +, withRPiDispmanx ? false, libraspberrypi +}: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "hyperion.ng"; - version = "2.0.12"; + version = "2.0.14"; src = fetchFromGitHub { owner = "hyperion-project"; repo = pname; rev = version; - sha256 = "sha256-J31QaWwGNhIpnZmWN9lZEI6fC0VheY5X8fGchQqtAlQ="; + sha256 = "sha256-Y1PZ+YyPMZEX4fBpMG6IVT1gtXR9ZHlavJMCQ4KAenc="; + # needed for `dependencies/external/`: + # * rpi_ws281x` - not possible to use as a "system" lib + # * qmdnsengine - not in nixpkgs yet + fetchSubmodules = true; }; buildInputs = [ - avahi-compat - flatbuffers hidapi - libcec libusb1 libX11 libxcb libXrandr - mbedtls + flatbuffers protobuf + mbedtls python3 qtbase qtserialport qtsvg qtx11extras - ]; + ] ++ lib.optional stdenv.isLinux libcec + ++ lib.optional withRPiDispmanx libraspberrypi; - nativeBuildInputs = [ cmake wrapQtAppsHook ]; + nativeBuildInputs = [ + cmake wrapQtAppsHook + ] ++ lib.optional stdenv.isDarwin perl; # for macos bundle + + patchPhase = '' + patchShebangs test/testrunner.sh + patchShebangs src/hyperiond/CMakeLists.txt + '' ; cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" - "-DUSE_SYSTEM_MBEDTLS_LIBS=ON" + "-DENABLE_DEPLOY_DEPENDENCIES=OFF" "-DUSE_SYSTEM_FLATBUFFERS_LIBS=ON" "-DUSE_SYSTEM_PROTO_LIBS=ON" - ]; + "-DUSE_SYSTEM_MBEDTLS_LIBS=ON" + # "-DUSE_SYSTEM_QMDNS_LIBS=ON" # qmdnsengine not in nixpkgs yet + "-DENABLE_TESTS=ON" + ] ++ lib.optional (withRPiDispmanx == false) "-DENABLE_DISPMANX=OFF"; + + doCheck = true; + checkPhase = '' + cd ../ && ./test/testrunner.sh && cd - + ''; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); - description = "Open Source Ambilight solution"; + description = "An opensource Bias or Ambient Lighting implementation"; homepage = "https://github.com/hyperion-project/hyperion.ng"; license = licenses.mit; - maintainers = with maintainers; [ algram ]; + maintainers = with maintainers; [ algram kazenyuk ]; platforms = platforms.unix; }; } diff --git a/pkgs/build-support/build-fhs-userenv-bubblewrap/buildFHSEnv.nix b/pkgs/build-support/build-fhs-userenv-bubblewrap/buildFHSEnv.nix index 0d98c0a2bc64..78da74c82849 100644 --- a/pkgs/build-support/build-fhs-userenv-bubblewrap/buildFHSEnv.nix +++ b/pkgs/build-support/build-fhs-userenv-bubblewrap/buildFHSEnv.nix @@ -1,11 +1,22 @@ -{ stdenv, lib, buildEnv, writeText, writeShellScriptBin, pkgs, pkgsi686Linux }: - -args@{ name, profile ? "" -, targetPkgs ? pkgs: [], multiPkgs ? pkgs: [] -, extraBuildCommands ? "", extraBuildCommandsMulti ? "" -, extraOutputsToInstall ? [] +{ lib +, stdenv +, runCommandLocal +, buildEnv +, writeText +, writeShellScriptBin +, pkgs +, pkgsi686Linux }: +{ name ? null +, profile ? "" +, targetPkgs ? pkgs: [] +, multiPkgs ? pkgs: [] +, extraBuildCommands ? "" +, extraBuildCommandsMulti ? "" +, extraOutputsToInstall ? [] +} @ args: + # HOWTO: # All packages (most likely programs) returned from targetPkgs will only be # installed once--matching the host's architecture (64bit on x86_64 and 32bit on @@ -78,19 +89,16 @@ let ''; # Compose /etc for the chroot environment - etcPkg = stdenv.mkDerivation { - name = "${name}-chrootenv-etc"; - buildCommand = '' - mkdir -p $out/etc - cd $out/etc + etcPkg = runCommandLocal "${name}-chrootenv-etc" { } '' + mkdir -p $out/etc + cd $out/etc - # environment variables - ln -s ${etcProfile} profile + # environment variables + ln -s ${etcProfile} profile - # symlink /etc/mtab -> /proc/mounts (compat for old userspace progs) - ln -s /proc/mounts mtab - ''; - }; + # symlink /etc/mtab -> /proc/mounts (compat for old userspace progs) + ln -s /proc/mounts mtab + ''; # Composes a /usr-like directory structure staticUsrProfileTarget = buildEnv { @@ -163,8 +171,9 @@ let ln -Ls ${staticUsrProfileTarget}/lib/32/ld-linux.so.2 lib/ ''; - setupLibDirs = if isTargetBuild then setupLibDirsTarget - else setupLibDirsMulti; + setupLibDirs = if isTargetBuild + then setupLibDirsTarget + else setupLibDirsMulti; # the target profile is the actual profile that will be used for the chroot setupTargetProfile = '' @@ -203,21 +212,16 @@ let done ''; -in stdenv.mkDerivation { - name = "${name}-fhs"; - buildCommand = '' - mkdir -p $out - cd $out - ${setupTargetProfile} - cd $out - ${extraBuildCommands} - cd $out - ${lib.optionalString isMultiBuild extraBuildCommandsMulti} - ''; - preferLocalBuild = true; - allowSubstitutes = false; - +in runCommandLocal "${name}-fhs" { passthru = { inherit args multiPaths targetPaths; }; -} +} '' + mkdir -p $out + cd $out + ${setupTargetProfile} + cd $out + ${extraBuildCommands} + cd $out + ${lib.optionalString isMultiBuild extraBuildCommandsMulti} +'' diff --git a/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix b/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix index ce807b932a19..5d94c309fe08 100644 --- a/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix +++ b/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix @@ -1,7 +1,15 @@ -{ lib, callPackage, runCommandLocal, writeShellScriptBin, glibc, pkgsi686Linux, coreutils, bubblewrap }: +{ lib +, callPackage +, runCommandLocal +, writeShellScript +, glibc +, pkgsi686Linux +, coreutils +, bubblewrap +}: -args @ { - name +{ name ? null +, pname ? null , version ? null , runScript ? "bash" , extraInstallCommands ? "" @@ -16,16 +24,22 @@ args @ { , unshareCgroup ? true , dieWithParent ? true , ... -}: +} @ args: + +assert (pname != null || version != null) -> (name == null && pname != null); # You must declare either a name or pname + version (preferred). with builtins; let + pname = if args.name != null then args.name else args.pname; + versionStr = lib.optionalString (version != null) ("-" + version); + name = pname + versionStr; + buildFHSEnv = callPackage ./buildFHSEnv.nix { }; - fhsenv = buildFHSEnv (removeAttrs args [ + fhsenv = buildFHSEnv (removeAttrs (args // { inherit name; }) [ "runScript" "extraInstallCommands" "meta" "passthru" "extraBwrapArgs" "dieWithParent" "unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc" - "version" + "pname" "version" ]); etcBindEntries = let @@ -93,7 +107,7 @@ let EOF ldconfig &> /dev/null ''; - init = run: writeShellScriptBin "${name}-init" '' + init = run: writeShellScript "${name}-init" '' source /etc/profile ${createLdConfCache} exec ${run} "$@" @@ -198,18 +212,13 @@ let "''${auto_mounts[@]}" "''${x11_args[@]}" ${concatStringsSep "\n " extraBwrapArgs} - ${init runScript}/bin/${name}-init ${initArgs} + ${init runScript} ${initArgs} ) exec "''${cmd[@]}" ''; - bin = writeShellScriptBin name (bwrapCmd { initArgs = ''"$@"''; }); - - versionStr = lib.optionalString (version != null) ("-" + version); - - nameAndVersion = name + versionStr; - -in runCommandLocal nameAndVersion { + bin = writeShellScript "${name}-bwrap" (bwrapCmd { initArgs = ''"$@"''; }); +in runCommandLocal name { inherit meta; passthru = passthru // { @@ -225,6 +234,7 @@ in runCommandLocal nameAndVersion { }; } '' mkdir -p $out/bin - ln -s ${bin}/bin/${name} $out/bin/${name} + ln -s ${bin} $out/bin/${pname} + ${extraInstallCommands} '' diff --git a/pkgs/development/interpreters/mujs/default.nix b/pkgs/development/interpreters/mujs/default.nix index 319e039f5c59..881d0bbf1b46 100644 --- a/pkgs/development/interpreters/mujs/default.nix +++ b/pkgs/development/interpreters/mujs/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchurl -, fetchpatch , readline , gitUpdater }: @@ -15,16 +14,6 @@ stdenv.mkDerivation rec { hash = "sha256-4sXuVBbf2iIwx6DLeJXfmpstWyBluxjn5k3sKnlqvhs="; }; - patches = lib.optionals stdenv.isDarwin [ - (fetchpatch { - # ld: library not found for -l:libmujs.a - name = "darwin-failures.patch"; - url = "https://git.ghostscript.com/?p=mujs.git;a=patch;h=d592c785c0b2f9fea982ac3fe7b88fdd7c4817fc"; - sha256 = "sha256-/57A7S65LWZFyQIGe+LtqDMu85K1N/hbztXB+/nCDJk="; - revert = true; - }) - ]; - buildInputs = [ readline ]; makeFlags = [ "prefix=$(out)" ]; diff --git a/pkgs/development/libraries/itk/generic.nix b/pkgs/development/libraries/itk/generic.nix index 78f4d56bfac6..3a6b2afee0d9 100644 --- a/pkgs/development/libraries/itk/generic.nix +++ b/pkgs/development/libraries/itk/generic.nix @@ -3,10 +3,7 @@ { lib, stdenv, fetchFromGitHub, cmake, makeWrapper , pkg-config, libX11, libuuid, xz, vtk, Cocoa }: -stdenv.mkDerivation rec { - pname = "itk"; - inherit version; - +let itkGenericLabelInterpolatorSrc = fetchFromGitHub { owner = "InsightSoftwareConsortium"; repo = "ITKGenericLabelInterpolator"; @@ -21,6 +18,18 @@ stdenv.mkDerivation rec { hash = "sha256-deJbza36c0Ohf9oKpO2T4po37pkyI+2wCSeGL4r17Go="; }; + itkSimpleITKFiltersSrc = fetchFromGitHub { + owner = "InsightSoftwareConsortium"; + repo = "ITKSimpleITKFilters"; + rev = "bb896868fc6480835495d0da4356d5db009592a6"; + hash = "sha256-MfaIA0xxA/pzUBSwnAevr17iR23Bo5iQO2cSyknS3o4="; + }; +in + +stdenv.mkDerivation { + pname = "itk"; + inherit version; + src = fetchFromGitHub { owner = "InsightSoftwareConsortium"; repo = "ITK"; @@ -36,6 +45,7 @@ stdenv.mkDerivation rec { --replace "@OPENJPEG_INSTALL_LIB_DIR@" "@OPENJPEG_INSTALL_FULL_LIB_DIR@" ln -sr ${itkGenericLabelInterpolatorSrc} Modules/External/ITKGenericLabelInterpolator ln -sr ${itkAdaptiveDenoisingSrc} Modules/External/ITKAdaptiveDenoising + ln -sr ${itkSimpleITKFiltersSrc} Modules/External/ITKSimpleITKFilters ''; cmakeFlags = [ @@ -45,6 +55,7 @@ stdenv.mkDerivation rec { "-DModule_ITKMINC=ON" "-DModule_ITKIOMINC=ON" "-DModule_ITKIOTransformMINC=ON" + "-DModule_SimpleITKFilters=ON" "-DModule_ITKVtkGlue=ON" "-DModule_ITKReview=ON" "-DModule_MGHIO=ON" @@ -69,7 +80,7 @@ stdenv.mkDerivation rec { meta = { description = "Insight Segmentation and Registration Toolkit"; - homepage = "https://www.itk.org/"; + homepage = "https://www.itk.org"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [viric]; }; diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 7d5305fe62da..261143b8d99c 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -158,6 +158,7 @@ stdenv.mkDerivation rec { sed -i '/domaincapstest/d' tests/meson.build sed -i '/qemufirmwaretest/d' tests/meson.build sed -i '/qemuvhostusertest/d' tests/meson.build + sed -i '/qemuxml2xmltest/d' tests/meson.build '' + lib.optionalString (isDarwin && isx86_64) '' sed -i '/qemucaps2xmltest/d' tests/meson.build sed -i '/qemuhotplugtest/d' tests/meson.build diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index 5cadcf7bf35d..7bfb2615a72c 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -48,6 +48,8 @@ , libopus , nativeHspSupport ? true , nativeHfpSupport ? true +, nativeModemManagerSupport ? true +, modemmanager , ofonoSupport ? true , hsphfpdSupport ? true , pulseTunnelSupport ? true @@ -105,6 +107,13 @@ let ./0090-pipewire-config-template-paths.patch # Place SPA data files in lib output to avoid dependency cycles ./0095-spa-data-dir.patch + + # backport patch fixing no sound in some cases + # FIXME: remove for next release + (fetchpatch { + url = "https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/8748c77451ce332dd24549b414200499ede4f184.diff"; + hash = "sha256-nxWszqLUbO1XS/DWIBYrGpVZFy2c5+E2V9dlBMekShM="; + }) ]; strictDeps = true; @@ -139,6 +148,7 @@ let ++ lib.optionals libcameraSupport [ libcamera libdrm ] ++ lib.optional ffmpegSupport ffmpeg ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt liblc3 sbc fdk_aac libopus ] + ++ lib.optional nativeModemManagerSupport modemmanager ++ lib.optional pulseTunnelSupport libpulseaudio ++ lib.optional zeroconfSupport avahi ++ lib.optional raopSupport openssl @@ -169,8 +179,10 @@ let "-Dbluez5=${mesonEnableFeature bluezSupport}" "-Dbluez5-backend-hsp-native=${mesonEnableFeature nativeHspSupport}" "-Dbluez5-backend-hfp-native=${mesonEnableFeature nativeHfpSupport}" + "-Dbluez5-backend-native-mm=${mesonEnableFeature nativeModemManagerSupport}" "-Dbluez5-backend-ofono=${mesonEnableFeature ofonoSupport}" "-Dbluez5-backend-hsphfpd=${mesonEnableFeature hsphfpdSupport}" + # source code is not easily obtainable "-Dbluez5-codec-lc3plus=disabled" "-Dbluez5-codec-lc3=${mesonEnableFeature bluezSupport}" "-Dsysconfdir=/etc" diff --git a/pkgs/development/libraries/simpleitk/default.nix b/pkgs/development/libraries/simpleitk/default.nix index a09ac168ba46..88b1d1ade174 100644 --- a/pkgs/development/libraries/simpleitk/default.nix +++ b/pkgs/development/libraries/simpleitk/default.nix @@ -4,12 +4,10 @@ stdenv.mkDerivation rec { pname = "simpleitk"; version = "2.2.1"; - outputs = [ "out" "dev" ]; - src = fetchFromGitHub { owner = "SimpleITK"; repo = "SimpleITK"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-0YxmixUTXpjegZQv7DDCNTWFTH8QEWqQQszee7aQ5EI="; }; diff --git a/pkgs/development/python-modules/aioesphomeapi/default.nix b/pkgs/development/python-modules/aioesphomeapi/default.nix index d0add0b62eba..4502f4985020 100644 --- a/pkgs/development/python-modules/aioesphomeapi/default.nix +++ b/pkgs/development/python-modules/aioesphomeapi/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, async-timeout , mock , noiseprotocol , protobuf @@ -12,7 +13,7 @@ buildPythonPackage rec { pname = "aioesphomeapi"; - version = "13.6.1"; + version = "13.7.0"; format = "setuptools"; disabled = pythonOlder "3.9"; @@ -21,10 +22,11 @@ buildPythonPackage rec { owner = "esphome"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-S2a5v4OeE0DC9J2JAHFQ6YyhWt6RXp3cP+zkONp+Bzc="; + hash = "sha256-05UT9CsfO8onEHqnJlXNfzf1acfwiIC07ewCWBE8HPA="; }; propagatedBuildInputs = [ + async-timeout noiseprotocol protobuf zeroconf diff --git a/pkgs/development/python-modules/expiring-dict/default.nix b/pkgs/development/python-modules/expiring-dict/default.nix new file mode 100644 index 000000000000..cd3d92508848 --- /dev/null +++ b/pkgs/development/python-modules/expiring-dict/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchPypi +, sortedcontainers +}: + +buildPythonPackage rec { + pname = "expiring-dict"; + version = "1.1.0"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-PEBK2x5DaUaMt+Ub+8nEcNfi6GPv4qHHXU7XBtDc4aY="; + }; + + propagatedBuildInputs = [ + sortedcontainers + ]; + + pythonImportsCheck = [ + "expiring_dict" + ]; + + meta = with lib; { + description = "Python dict with TTL support for auto-expiring caches"; + homepage = "https://github.com/dparker2/py-expiring-dict"; + license = licenses.mit; + maintainers = with maintainers; [ ajs124 ]; + }; +} diff --git a/pkgs/development/python-modules/frigidaire/default.nix b/pkgs/development/python-modules/frigidaire/default.nix index 92ce118638c7..16d871ccd09a 100644 --- a/pkgs/development/python-modules/frigidaire/default.nix +++ b/pkgs/development/python-modules/frigidaire/default.nix @@ -19,10 +19,17 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "bm1549"; repo = pname; - rev = version; + rev = "regs/tags/${version}"; hash = "sha256-U2ixBtigY15RzMNIeUK71uNOndUepK2kE/CTFwl855w="; }; + postPatch = '' + # https://github.com/bm1549/frigidaire/pull/13 + substituteInPlace setup.py \ + --replace "urllib3>==1.26.42" "urllib3" \ + --replace 'version = "SNAPSHOT"' 'version = "${version}"' + ''; + propagatedBuildInputs = [ certifi chardet @@ -41,6 +48,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python API for the Frigidaire devices"; homepage = "https://github.com/bm1549/frigidaire"; + changelog = "https://github.com/bm1549/frigidaire/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; diff --git a/pkgs/development/python-modules/galois/default.nix b/pkgs/development/python-modules/galois/default.nix index 1e3b5e0fd915..1f5ef06ea1c4 100644 --- a/pkgs/development/python-modules/galois/default.nix +++ b/pkgs/development/python-modules/galois/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , setuptools-scm , pythonOlder +, pythonRelaxDepsHook , fetchFromGitHub , pytestCheckHook , pytest-xdist @@ -28,6 +29,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-scm + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -41,19 +43,15 @@ buildPythonPackage rec { pytest-xdist ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "numpy >= 1.18.4, < 1.24" "numpy >= 1.18.4" \ - --replace "numba >= 0.53, < 0.57" "numba >= 0.53" \ - ''; + pythonRelaxDeps = [ "numpy" "numba" ]; pythonImportsCheck = [ "galois" ]; - meta = { - description = "A Python 3 package that extends NumPy arrays to operate over finite fields"; + meta = with lib; { + description = "Python package that extends NumPy arrays to operate over finite fields"; homepage = "https://github.com/mhostetter/galois"; - downloadPage = "https://github.com/mhostetter/galois/releases"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ chrispattison ]; + downloadPage = "https://github.com/mhostetter/galois/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ chrispattison ]; }; } diff --git a/pkgs/development/python-modules/httpx-ntlm/default.nix b/pkgs/development/python-modules/httpx-ntlm/default.nix index c23f928d20d7..83d427c73ef1 100644 --- a/pkgs/development/python-modules/httpx-ntlm/default.nix +++ b/pkgs/development/python-modules/httpx-ntlm/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , httpx , pyspnego , pythonOlder @@ -19,6 +20,15 @@ buildPythonPackage rec { hash = "sha256-a1a5laZ4tNOtpVDFCK1t2IXWbyJytZMhuad2JtmA52I="; }; + patches = [ + # Update version specifiers, https://github.com/ulodciv/httpx-ntlm/pull/15 + (fetchpatch { + name = "update-version-specifiers.patch"; + url = "https://github.com/ulodciv/httpx-ntlm/commit/dac67a957c5c23df29d4790ddbc7cc4bccfc0e35.patch"; + hash = "sha256-YtgRrgGG/x7jvNg+NuQIrkOUdyD6Bk53fRaiXBwiV+o="; + }) + ]; + propagatedBuildInputs = [ httpx pyspnego diff --git a/pkgs/development/python-modules/pdm-backend/default.nix b/pkgs/development/python-modules/pdm-backend/default.nix index 715a4b528b31..1eb371be0630 100644 --- a/pkgs/development/python-modules/pdm-backend/default.nix +++ b/pkgs/development/python-modules/pdm-backend/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "pdm-backend"; - version = "2.0.5"; + version = "2.0.6"; format = "pyproject"; src = fetchFromGitHub { owner = "pdm-project"; repo = "pdm-backend"; rev = "refs/tags/${version}"; - hash = "sha256-d5kr5pr9tBc6So0wTy3/ASgk8KTOf2AV8Vfsmml5Qh0="; + hash = "sha256-NMnb9DiW5xvfsI1nHFNIwvA/yH2boqe+WeD5re/ojAM="; }; propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ diff --git a/pkgs/development/python-modules/playwright/default.nix b/pkgs/development/python-modules/playwright/default.nix index 71d50c67f7ca..39e3b08acd54 100644 --- a/pkgs/development/python-modules/playwright/default.nix +++ b/pkgs/development/python-modules/playwright/default.nix @@ -83,22 +83,19 @@ let pname = "playwright-browsers"; version = driverVersion; - src = runCommand "playwright-browsers-base" { - outputHashMode = "recursive"; - outputHashAlgo = "sha256"; - outputHash = { - x86_64-darwin = "0z2kww4iby1izkwn6z2ai94y87bkjvwak8awdmjm8sgg00pa9l1a"; - }.${system} or throwSystem; - } '' + dontUnpack = true; + + installPhase = '' + runHook preInstall + export PLAYWRIGHT_BROWSERS_PATH=$out ${driver}/bin/playwright install rm -r $out/.links + + runHook postInstall ''; - installPhase = '' - mkdir $out - cp -r * $out/ - ''; + meta.platforms = lib.platforms.darwin; }; browsers-linux = { withFirefox ? true, withChromium ? true }: let diff --git a/pkgs/development/python-modules/simpleitk/default.nix b/pkgs/development/python-modules/simpleitk/default.nix new file mode 100644 index 000000000000..cc138695e3fd --- /dev/null +++ b/pkgs/development/python-modules/simpleitk/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, cmake +, swig4 +, itk +, numpy +, simpleitk +, scikit-build +}: + +buildPythonPackage rec { + inherit (simpleitk) pname version src meta; + format = "pyproject"; + disabled = pythonOlder "3.8"; + + sourceRoot = "source/Wrapping/Python"; + preBuild = '' + make + ''; + + nativeBuildInputs = [ cmake swig4 scikit-build ]; + propagatedBuildInputs = [ itk simpleitk numpy ]; + + pythonImportsCheck = [ "SimpleITK" ]; +} diff --git a/pkgs/development/python-modules/woob/default.nix b/pkgs/development/python-modules/woob/default.nix index fb9f9f930d19..a1d006fb15ee 100644 --- a/pkgs/development/python-modules/woob/default.nix +++ b/pkgs/development/python-modules/woob/default.nix @@ -9,9 +9,9 @@ , lxml , nose , packaging -, pdm-pep517 , pillow , prettytable +, pycountry , python-dateutil , pythonOlder , pyyaml @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "woob"; - version = "3.4"; + version = "3.5"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -33,12 +33,11 @@ buildPythonPackage rec { owner = "woob"; repo = pname; rev = version; - hash = "sha256-qVE1FQK3+jBKIHW+s1iNZwy8Srb2kQhWNTlZyzc1/jE="; + hash = "sha256-Yb3AgUSqr9r2TIymiEUIhKThNC7yjQEkhi8GSI9fqNA="; }; nativeBuildInputs = [ packaging - pdm-pep517 ]; propagatedBuildInputs = [ @@ -51,19 +50,13 @@ buildPythonPackage rec { packaging pillow prettytable + pycountry pyyaml requests termcolor unidecode ]; - patches = [ - (fetchpatch { - url = "https://gitlab.com/woob/woob/-/commit/861b1bb92be53998d8174dcca6fa643d1c7cde12.patch"; - sha256 = "sha256-IXcE59pMFtPLTOYa2inIvuA14USQvck6Q4hrKZTC0DE="; - }) - ]; - nativeCheckInputs = [ nose ]; diff --git a/pkgs/development/tools/checkmake/default.nix b/pkgs/development/tools/checkmake/default.nix index b5554e250fda..25da89281d77 100644 --- a/pkgs/development/tools/checkmake/default.nix +++ b/pkgs/development/tools/checkmake/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "checkmake"; - version = "0.2.1"; + version = "0.2.2"; src = fetchFromGitHub { owner = "mrtazz"; repo = pname; rev = version; - sha256 = "sha256-Zkrr1BrP8ktRGf6EYhDpz3oTnX6msrSpfFqkqi9pmlc="; + sha256 = "sha256-Ql8XSQA/w7wT9GbmYOM2vG15GVqj9LxOGIu8Wqp9Wao="; }; vendorSha256 = null; @@ -41,7 +41,6 @@ buildGoModule rec { homepage = "https://github.com/mrtazz/checkmake"; license = licenses.mit; maintainers = with maintainers; [ vidbina ]; - platforms = platforms.linux; longDescription = '' checkmake is an experimental tool for linting and checking Makefiles. It may not do what you want it to. diff --git a/pkgs/development/tools/misc/tockloader/default.nix b/pkgs/development/tools/misc/tockloader/default.nix index 8924cbf2fae5..931edf0cf23c 100644 --- a/pkgs/development/tools/misc/tockloader/default.nix +++ b/pkgs/development/tools/misc/tockloader/default.nix @@ -1,26 +1,28 @@ { lib -, python3Packages +, python3 }: -python3Packages.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "tockloader"; - version = "1.6.0"; + version = "1.9.0"; - src = python3Packages.fetchPypi { + src = python3.pkgs.fetchPypi { inherit pname version; - sha256 = "1aqkj1nplcw3gmklrhq6vxy6v9ad5mqiw4y1svasak2zkqdk1wyc"; + hash = "sha256-7W55jugVtamFUL8N3dD1LFLJP2UDQb74V6o96rd/tEg="; }; - propagatedBuildInputs = with python3Packages; [ + propagatedBuildInputs = with python3.pkgs; [ argcomplete colorama crcmod + pycryptodome pyserial - pytoml + questionary + toml tqdm ]; - # has no test suite + # Project has no test suite checkPhase = '' runHook preCheck $out/bin/tockloader --version | grep -q ${version} @@ -28,9 +30,10 @@ python3Packages.buildPythonApplication rec { ''; meta = with lib; { - homepage = "https://github.com/tock/tockloader"; - license = licenses.mit; description = "Tool for programming Tock onto hardware boards"; + homepage = "https://github.com/tock/tockloader"; + changelog = "https://github.com/tock/tockloader/releases/tag/v${version}"; + license = licenses.mit; maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/games/anki/bin.nix b/pkgs/games/anki/bin.nix index 552581a80842..39b10bcb15c1 100644 --- a/pkgs/games/anki/bin.nix +++ b/pkgs/games/anki/bin.nix @@ -51,7 +51,8 @@ let passthru = { inherit sources; }; fhsUserEnvAnki = buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { - name = "anki"; + inherit pname version; + name = null; # Appimage sets it to "appimage-env" # Dependencies of anki targetPkgs = pkgs: (with pkgs; [ xorg.libxkbfile krb5 ]); @@ -61,6 +62,8 @@ let ''; extraInstallCommands = '' + ln -s ${pname} $out/bin/anki + mkdir -p $out/share cp -R ${unpacked}/share/applications \ ${unpacked}/share/man \ @@ -70,17 +73,9 @@ let inherit meta passthru; }); - - fhsUserEnvAnkiWithVersion = fhsUserEnvAnki.overrideAttrs (oldAttrs: { - # buildFHSUserEnv doesn't have an easy way to set the version of the - # resulting derivation, so we manually override it here. This makes - # it clear to end users the version of anki-bin. Without this, users - # might assume anki-bin is an old version of Anki. - name = "${pname}-${version}"; - }); in -if stdenv.isLinux then fhsUserEnvAnkiWithVersion +if stdenv.isLinux then fhsUserEnvAnki else stdenv.mkDerivation { inherit pname version passthru; diff --git a/pkgs/games/nsnake/default.nix b/pkgs/games/nsnake/default.nix new file mode 100644 index 000000000000..aa3f568ec009 --- /dev/null +++ b/pkgs/games/nsnake/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, lib, ncurses }: + +stdenv.mkDerivation rec { + pname = "nsnake"; + version = "3.0.1"; + + src = fetchFromGitHub { + owner = "alexdantas"; + repo = "nSnake"; + rev = "v${version}"; + sha256 = "sha256-MixwIhyymruruV8G8PjmR9EoZBpaDVBCKBccSFL0lS8="; + }; + + buildInputs = [ ncurses ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = { + description = "ncurses based snake game for the terminal"; + homepage = "https://github.com/alexdantas/nSnake"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ clerie ]; + }; +} diff --git a/pkgs/os-specific/linux/kernel/zen-kernels.nix b/pkgs/os-specific/linux/kernel/zen-kernels.nix index c3c149aea117..cee38c518967 100644 --- a/pkgs/os-specific/linux/kernel/zen-kernels.nix +++ b/pkgs/os-specific/linux/kernel/zen-kernels.nix @@ -11,9 +11,9 @@ let }; # ./update-zen.py lqx lqxVariant = { - version = "6.2.9"; #lqx + version = "6.2.10"; #lqx suffix = "lqx1"; #lqx - sha256 = "1rw85gallk7r15adrvi8597zwkib2qsq9ir2lg7v2ivk85mivbq9"; #lqx + sha256 = "0lrpwn1s0mlh03wlx1gxqy68v84c2yaswd0fxwh28dqiy0sk8zgj"; #lqx isLqx = true; }; zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // { diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 98d1fceecaf1..29ef497b73a5 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -53,11 +53,11 @@ rec { # Vulkan developer beta driver # See here for more information: https://developer.nvidia.com/vulkan-driver vulkan_beta = generic rec { - version = "525.47.11"; + version = "525.47.18"; persistencedVersion = "525.85.05"; settingsVersion = "525.85.05"; - sha256_64bit = "sha256-R3W0Nn9HDluzF316kWDlBnmCgS/O3Atic4poJnjAdPU="; - openSha256 = "sha256-tZXzYQBx/3PzmHYrxmUD6iwxqwbi5/uVlN/7DU82oig="; + sha256_64bit = "sha256-L0H7o7zkN1pHHadaIC8nH+JMGt1IzuubEH6KgViU2Ic="; + openSha256 = "sha256-xlRTE+QdAxSomIdvLb5dxklSeu/JVjI8IeYDzSloOo4="; settingsSha256 = "sha256-ck6ra8y8nn5kA3L9/VcRR2W2RaWvfVbgBiOh2dRJr/8="; persistencedSha256 = "sha256-dt/Tqxp7ZfnbLel9BavjWDoEdLJvdJRwFjTFOBYYKLI="; url = "https://developer.nvidia.com/downloads/vulkan-beta-${lib.concatStrings (lib.splitString "." version)}-linux"; diff --git a/pkgs/servers/audiobookshelf/default.nix b/pkgs/servers/audiobookshelf/default.nix index fb569fc54bec..dbb067b1922f 100644 --- a/pkgs/servers/audiobookshelf/default.nix +++ b/pkgs/servers/audiobookshelf/default.nix @@ -4,13 +4,13 @@ let nodejs = nodejs-16_x; pname = "audiobookshelf"; - version = "2.2.15"; + version = "2.2.18"; src = fetchFromGitHub { owner = "advplyr"; repo = pname; rev = "v${version}"; - sha256 = "sha256-BrIXbembbcfSPOPknoY2Vn9I85eHyOQLDCMsFOMORgM="; + sha256 = "sha256-Ar+OK6HiKf2/47HE+1iTw8MVz9A6qZg1hpZQdZ/40UM="; }; client = buildNpmPackage { @@ -24,7 +24,7 @@ let NODE_OPTIONS = "--openssl-legacy-provider"; npmBuildScript = "generate"; - npmDepsHash = "sha256-eyZdeBsZ5XBoO/4djXZzOOr/h9kDSUULbqgdOZJNNCg="; + npmDepsHash = "sha256-Hsa7ZauUTtYQcCxw1cpuxQ/RfdRvBIh3PO1DXDUbELk="; }; wrapper = import ./wrapper.nix { @@ -38,7 +38,7 @@ in buildNpmPackage { dontNpmBuild = true; npmInstallFlags = "--only-production"; - npmDepsHash = "sha256-KbewULna+0mftIcdO5Z4A5rOrheBndpgzjkE1Jytfr4="; + npmDepsHash = "sha256-0PFeXiS8RSffhrocrHODNpb6d9+nbpulCW5qYIrytDI="; installPhase = '' mkdir -p $out/opt/client diff --git a/pkgs/servers/monitoring/loki/default.nix b/pkgs/servers/monitoring/loki/default.nix index 8179d5bfca65..4249a1e179b5 100644 --- a/pkgs/servers/monitoring/loki/default.nix +++ b/pkgs/servers/monitoring/loki/default.nix @@ -8,17 +8,17 @@ }: buildGoModule rec { - version = "2.7.4"; + version = "2.8.0"; pname = "grafana-loki"; src = fetchFromGitHub { - rev = "v${version}"; owner = "grafana"; repo = "loki"; - sha256 = "sha256-afa4uInoNyEgNDJ7nB1yr+YYoOsU+S7XWhKvkeApgRQ="; + rev = "v${version}"; + hash = "sha256-RPa3G1zrWzunyQOdNUQ/dZGJ/7sh2OGvoEqeYaT7Qv0="; }; - vendorSha256 = null; + vendorHash = null; subPackages = [ # TODO split every executable into its own package @@ -48,13 +48,10 @@ buildGoModule rec { "-X ${t}.Revision=unknown" ]; - doCheck = true; - meta = with lib; { description = "Like Prometheus, but for logs"; license = with licenses; [ agpl3Only asl20 ]; homepage = "https://grafana.com/oss/loki/"; - maintainers = with maintainers; [ willibutz globin mmahut ]; - platforms = platforms.unix; + maintainers = with maintainers; [ willibutz globin mmahut indeednotjames ]; }; } diff --git a/pkgs/tools/backup/fabs/default.nix b/pkgs/tools/backup/fabs/default.nix index 9a2a6045c142..47e36b2139fa 100644 --- a/pkgs/tools/backup/fabs/default.nix +++ b/pkgs/tools/backup/fabs/default.nix @@ -23,7 +23,7 @@ python3.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python3.pkgs; [ alembic - dateutil + python-dateutil pyyaml setuptools sqlalchemy diff --git a/pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch b/pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch deleted file mode 100644 index a117408b000f..000000000000 --- a/pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/cmake/modules/BuildSPDK.cmake -+++ b/cmake/modules/BuildSPDK.cmake -@@ -35,7 +35,7 @@ macro(build_spdk) - # unset $CFLAGS, otherwise it will interfere with how SPDK sets - # its include directory. - # unset $LDFLAGS, otherwise SPDK will fail to mock some functions. -- BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS="${spdk_CFLAGS}" -+ BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS="${spdk_CFLAGS}" C_OPT="-mssse3" - BUILD_IN_SOURCE 1 - INSTALL_COMMAND "true") - unset(make_cmd) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 15e5071f963a..34befedf18b7 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -1,44 +1,82 @@ -{ lib, stdenv, runCommand, fetchurl, fetchpatch +{ lib +, stdenv +, runCommand +, fetchurl +, fetchFromGitHub + +# Build time +, cmake , ensureNewerSourcesHook -, cmake, pkg-config -, which, git -, boost175, xz -, libxml2, zlib, lz4 -, openldap, lttng-ust -, babeltrace, gperf -, gtest -, cunit, snappy -, makeWrapper -, leveldb, oath-toolkit -, libnl, libcap_ng -, rdkafka -, nixosTests -, cryptsetup -, sqlite -, lua -, icu -, bzip2 -, doxygen -, graphviz , fmt -, python39 +, git +, makeWrapper +, pkg-config +, which + +# Tests +, nixosTests + +# Runtime dependencies +, arrow-cpp +, babeltrace +, boost179 +, bzip2 +, cryptsetup +, cimg +, cunit +, doxygen +, gperf +, graphviz +, gtest +, icu +, jsoncpp +, libcap_ng +, libnl +, libxml2 +, lttng-ust +, lua +, lz4 +, oath-toolkit +, openldap +, python310 +, rdkafka +, rocksdb +, snappy +, sqlite +, utf8proc +, zlib +, zstd # Optional Dependencies -, yasm ? null, fcgi ? null, expat ? null -, curl ? null, fuse ? null -, libedit ? null, libatomic_ops ? null +, curl ? null +, expat ? null +, fuse ? null +, libatomic_ops ? null +, libedit ? null , libs3 ? null +, yasm ? null # Mallocs -, jemalloc ? null, gperftools ? null +, gperftools ? null +, jemalloc ? null # Crypto Dependencies , cryptopp ? null -, nss ? null, nspr ? null +, nspr ? null +, nss ? null # Linux Only Dependencies -, linuxHeaders, util-linux, libuuid, udev, keyutils, rdma-core, rabbitmq-c -, libaio ? null, libxfs ? null, zfs ? null, liburing ? null +, linuxHeaders +, util-linux +, libuuid +, udev +, keyutils +, rdma-core +, rabbitmq-c +, libaio ? null +, libxfs ? null +, liburing ? null +, zfs ? null , ... }: @@ -49,7 +87,6 @@ let shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null; optYasm = shouldUsePkg yasm; - optFcgi = shouldUsePkg fcgi; optExpat = shouldUsePkg expat; optCurl = shouldUsePkg curl; optFuse = shouldUsePkg fuse; @@ -68,8 +105,18 @@ let optLibxfs = shouldUsePkg libxfs; optZfs = shouldUsePkg zfs; - hasRadosgw = optFcgi != null && optExpat != null && optCurl != null && optLibedit != null; + # Downgrade rocksdb, 7.10 breaks ceph + rocksdb' = rocksdb.overrideAttrs (oldAttrs: { + version = "7.9.2"; + src = fetchFromGitHub { + owner = "facebook"; + repo = "rocksdb"; + rev = "refs/tags/v7.9.2"; + hash = "sha256-5P7IqJ14EZzDkbjaBvbix04ceGGdlWBuVFH/5dpD5VM="; + }; + }); + hasRadosgw = optExpat != null && optCurl != null && optLibedit != null; # Malloc implementation (can be jemalloc, tcmalloc or null) malloc = if optJemalloc != null then optJemalloc else optGperftools; @@ -92,20 +139,30 @@ let platforms = [ "x86_64-linux" "aarch64-linux" ]; }; - ceph-common = python.pkgs.buildPythonPackage rec{ + ceph-common = with python.pkgs; buildPythonPackage { pname = "ceph-common"; inherit src version; sourceRoot = "ceph-${version}/src/python-common"; - nativeCheckInputs = [ python.pkgs.pytest ]; - propagatedBuildInputs = with python.pkgs; [ pyyaml six ]; + propagatedBuildInputs = [ + pyyaml + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # requires network access + "test_valid_addr" + ]; meta = getMeta "Ceph common module for code shared by manager modules"; }; - # Boost 1.75 is not compatible with Python 3.10 - python = python39.override { + # Watch out for python <> boost compatibility + python = python310.override { packageOverrides = self: super: { sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec { version = "1.4.46"; @@ -125,91 +182,128 @@ let }; }; - boost = boost175.override { + boost = boost179.override { enablePython = true; inherit python; }; - ceph-python-env = python.withPackages (ps: [ - # Check .requires files below https://github.com/ceph/ceph/tree/main/debian for dependencies - ps.sphinx - ps.flask - ps.routes - ps.cython - ps.setuptools - ps.virtualenv - # Libraries needed by the python tools - ps.mako + # TODO: split this off in build and runtime environment + ceph-python-env = python.withPackages (ps: with ps; [ ceph-common - ps.cherrypy - ps.cmd2 - ps.colorama - ps.python-dateutil - ps.jsonpatch - ps.pecan - ps.prettytable - ps.pyopenssl - ps.pyjwt - ps.webob - ps.bcrypt - ps.scipy - ps.six - ps.pyyaml + + # build time + cython + + # debian/control + bcrypt + cherrypy + influxdb + jinja2 + kubernetes + natsort + numpy + pecan + prettytable + pyjwt + pyopenssl + python-dateutil + pyyaml + requests + routes + scikit-learn + scipy + setuptools + sphinx + virtualenv + werkzeug + + # src/pybind/mgr/requirements-required.txt + cryptography + jsonpatch + + # src/tools/cephfs/shell/setup.py + cmd2 + colorama ]); sitePackages = ceph-python-env.python.sitePackages; - version = "16.2.10"; + version = "17.2.5"; src = fetchurl { url = "http://download.ceph.com/tarballs/ceph-${version}.tar.gz"; - sha256 = "sha256-342+nUV3mCX7QJfZSnKEfnQFCJwJmVQeYnefJwW/AtU="; + hash = "sha256-NiJpwUeROvh0siSaRoRrDm+C0s61CvRiIrbd7JmRspo="; }; in rec { ceph = stdenv.mkDerivation { pname = "ceph"; inherit src version; - patches = [ - ./0000-fix-SPDK-build-env.patch - # pacific: include/buffer: include - # fixes build with gcc 12 - # https://github.com/ceph/ceph/pull/47295 - (fetchpatch { - url = "https://github.com/ceph/ceph/pull/47295/commits/df88789a38c053513d3b2a9b7d12a952fc0c9042.patch"; - hash = "sha256-je65kBfa5hR0ZKo6ZI10XmD5ZUbKj5rxlGxxI9ZJVfo="; - }) - (fetchpatch { - url = "https://github.com/ceph/ceph/pull/47295/commits/2abcbe4e47705e6e0fcc7d9d9b75625f563199af.patch"; - hash = "sha256-8sWQKoZNHuGuhzX/F+3fY4+kjsrwsfoMdVpfVSj2x5w="; - }) - (fetchpatch { - url = "https://github.com/ceph/ceph/pull/47295/commits/13dc077cf6c65a3b8c4f13d896847b9964b3fcbb.patch"; - hash = "sha256-byfiZh9OJrux/y5m3QCPg0LET6q33ZDXmp/CN+yOSQQ="; - }) - ]; - nativeBuildInputs = [ cmake - pkg-config which git python.pkgs.wrapPython makeWrapper - python.pkgs.python # for the toPythonPath function - (ensureNewerSourcesHook { year = "1980"; }) - python fmt + git + makeWrapper + pkg-config + python + python.pkgs.python # for the toPythonPath function + python.pkgs.wrapPython + which + (ensureNewerSourcesHook { year = "1980"; }) # for building docs/man-pages presumably doxygen graphviz ]; + enableParallelBuilding = true; + buildInputs = cryptoLibsMap.${cryptoStr} ++ [ - boost xz ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3 - malloc zlib openldap lttng-ust babeltrace gperf gtest cunit - snappy lz4 oath-toolkit leveldb libnl libcap_ng rdkafka - cryptsetup sqlite lua icu bzip2 + arrow-cpp + babeltrace + boost + bzip2 + ceph-python-env + cimg + cryptsetup + cunit + gperf + gtest + jsoncpp + icu + libcap_ng + libnl + libxml2 + lttng-ust + lua + lz4 + malloc + oath-toolkit + openldap + optLibatomic_ops + optLibs3 + optYasm + rdkafka + rocksdb' + snappy + sqlite + utf8proc + zlib + zstd ] ++ lib.optionals stdenv.isLinux [ - linuxHeaders util-linux libuuid udev keyutils liburing optLibaio optLibxfs optZfs - # ceph 14 - rdma-core rabbitmq-c + keyutils + liburing + libuuid + linuxHeaders + optLibaio + optLibxfs + optZfs + rabbitmq-c + rdma-core + udev + util-linux ] ++ lib.optionals hasRadosgw [ - optFcgi optExpat optCurl optFuse optLibedit + optCurl + optExpat + optFuse + optLibedit ]; pythonPath = [ ceph-python-env "${placeholder "out"}/${ceph-python-env.sitePackages}" ]; @@ -226,17 +320,27 @@ in rec { ''; cmakeFlags = [ - "-DWITH_SYSTEM_ROCKSDB=OFF" # breaks Bluestore "-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib" - "-DWITH_SYSTEM_BOOST=ON" - "-DWITH_SYSTEM_GTEST=ON" "-DMGR_PYTHON_VERSION=${ceph-python-env.python.pythonVersion}" - "-DWITH_SYSTEMD=OFF" - "-DWITH_TESTS=OFF" - "-DWITH_CEPHFS_SHELL=ON" + "-DWITH_CEPHFS_SHELL:BOOL=ON" + "-DWITH_SYSTEMD:BOOL=OFF" + "-DWITH_TESTS:BOOL=OFF" + + # Use our own libraries, where possible + "-DWITH_SYSTEM_ARROW:BOOL=ON" + "-DWITH_SYSTEM_BOOST:BOOL=ON" + "-DWITH_SYSTEM_CIMG:BOOL=ON" + "-DWITH_SYSTEM_JSONCPP:BOOL=ON" + "-DWITH_SYSTEM_GTEST:BOOL=ON" + "-DWITH_SYSTEM_ROCKSDB:BOOL=ON" + "-DWITH_SYSTEM_UTF8PROC:BOOL=ON" + "-DWITH_SYSTEM_ZSTD:BOOL=ON" + # TODO breaks with sandbox, tries to download stuff with npm - "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" + "-DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF" + # no matching function for call to 'parquet::PageReader::Open(std::shared_ptr&, int64_t, arrow::Compression::type, parquet::MemoryPool*, parquet::CryptoContext*)' + "-DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF" # WITH_XFS has been set default ON from Ceph 16, keeping it optional in nixpkgs for now ''-DWITH_XFS=${if optLibxfs != null then "ON" else "OFF"}'' ] ++ lib.optional stdenv.isLinux "-DWITH_SYSTEM_LIBURING=ON"; @@ -259,8 +363,15 @@ in rec { meta = getMeta "Distributed storage system"; - passthru.version = version; - passthru.tests = { inherit (nixosTests) ceph-single-node ceph-multi-node ceph-single-node-bluestore; }; + passthru = { + inherit version; + tests = { + inherit (nixosTests) + ceph-multi-node + ceph-single-node + ceph-single-node-bluestore; + }; + }; }; ceph-client = runCommand "ceph-client-${version}" { diff --git a/pkgs/tools/filesystems/fuse-7z-ng/default.nix b/pkgs/tools/filesystems/fuse-7z-ng/default.nix index d400891a2054..f5d9b4191e3f 100644 --- a/pkgs/tools/filesystems/fuse-7z-ng/default.nix +++ b/pkgs/tools/filesystems/fuse-7z-ng/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation rec { # Drop unused pthread library. pthread_yield() # fails the configure. ./no-pthread.patch + # Zero-initialize unset fields of `struct fuse_operations` so that + # garbage values don't cause segfault. + # + ./zero-init-fuse-operations.patch ]; nativeBuildInputs = [ pkg-config makeWrapper autoconf automake ]; diff --git a/pkgs/tools/filesystems/fuse-7z-ng/zero-init-fuse-operations.patch b/pkgs/tools/filesystems/fuse-7z-ng/zero-init-fuse-operations.patch new file mode 100644 index 000000000000..35acdaa04542 --- /dev/null +++ b/pkgs/tools/filesystems/fuse-7z-ng/zero-init-fuse-operations.patch @@ -0,0 +1,13 @@ +Zero-initialize unset fields of `struct fuse_operations`. + +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -195,7 +195,7 @@ main (int argc, char **argv) + mkdir(param.mountpoint, 0750); + } + +- struct fuse_operations fuse7z_oper; ++ struct fuse_operations fuse7z_oper = {0}; + fuse7z_oper.init = fuse7z_init; + fuse7z_oper.destroy = fuse7z_destroy; + fuse7z_oper.readdir = fuse7z_readdir; diff --git a/pkgs/tools/misc/starship/default.nix b/pkgs/tools/misc/starship/default.nix index e9257bd35963..1835f9102597 100644 --- a/pkgs/tools/misc/starship/default.nix +++ b/pkgs/tools/misc/starship/default.nix @@ -14,13 +14,13 @@ rustPlatform.buildRustPackage rec { pname = "starship"; - version = "1.13.1"; + version = "1.14.1"; src = fetchFromGitHub { owner = "starship"; repo = pname; rev = "v${version}"; - hash = "sha256-MgCYlcJoNJ3eChH7WLKgvgblmz9Wy6JplULjeGGiEXY="; + hash = "sha256-KhuAgC58oEdUiCWZjUShfDpNe0m0ENfn2QJVOlzpIyo="; }; nativeBuildInputs = [ installShellFiles cmake ]; @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec { --zsh <($out/bin/starship completions zsh) ''; - cargoHash = "sha256-sdETcvmz9mWTXEt9h7vP+FKolhnamkwtbkYiJE/HVX0="; + cargoHash = "sha256-gdJzH2/gJDg3sNR28Daq4B+KEn565jXhkxZFsrVx/uI="; nativeCheckInputs = [ git ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3bec8181f210..0d934575c6e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19445,13 +19445,7 @@ with pkgs; c-blosc = callPackage ../development/libraries/c-blosc { }; # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990 - cachix = (haskell.lib.compose.justStaticExecutables haskell.packages.ghc94.cachix).overrideAttrs(o: { - passthru = o.passthru or {} // { - tests = o.passthru.tests or {} // { - inherit hci; - }; - }; - }); + cachix = haskell.lib.justStaticExecutables haskellPackages.cachix; calcium = callPackage ../development/libraries/calcium { }; @@ -25031,9 +25025,7 @@ with pkgs; buildGoModule = buildGo119Module; # nixosTests.grafana-agent go 1.20 failure }; - grafana-loki = callPackage ../servers/monitoring/loki { - buildGoModule = buildGo119Module; # nixosTests.loki go 1.20 failure - }; + grafana-loki = callPackage ../servers/monitoring/loki { }; promtail = callPackage ../servers/monitoring/loki/promtail.nix { }; mimir = callPackage ../servers/monitoring/mimir { }; @@ -36206,6 +36198,8 @@ with pkgs; newtonwars = callPackage ../games/newtonwars { }; + nsnake = callPackage ../games/nsnake { }; + nudoku = callPackage ../games/nudoku { }; nxengine-evo = callPackage ../games/nxengine-evo { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb19d5b1df76..025085d90be3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3261,6 +3261,8 @@ self: super: with self; { expecttest = callPackage ../development/python-modules/expecttest { }; + expiring-dict = callPackage ../development/python-modules/expiring-dict { }; + expiringdict = callPackage ../development/python-modules/expiringdict { }; explorerscript = callPackage ../development/python-modules/explorerscript { }; @@ -10830,6 +10832,10 @@ self: super: with self; { simplehound = callPackage ../development/python-modules/simplehound { }; + simpleitk = callPackage ../development/python-modules/simpleitk { + inherit (pkgs) simpleitk; + }; + simplejson = callPackage ../development/python-modules/simplejson { }; simplekml = callPackage ../development/python-modules/simplekml { };