diff --git a/doc/contributing.xml b/doc/contributing.xml index ee93be4447a..a83059aa36e 100644 --- a/doc/contributing.xml +++ b/doc/contributing.xml @@ -2,7 +2,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="chap-contributing"> -Contributing +Contributing to this documentation The DocBook sources of the Nixpkgs manual are in the doc diff --git a/doc/default.nix b/doc/default.nix index 1e8974d6026..b68194b97a7 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -36,6 +36,9 @@ stdenv.mkDerivation { cp ${./style.css} $dst/style.css + mkdir -p $dst/images/callouts + cp ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/images/callouts/ + mkdir -p $out/nix-support echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products ''; diff --git a/doc/functions.xml b/doc/functions.xml index 16f4f262a25..2aae3cfb2ae 100644 --- a/doc/functions.xml +++ b/doc/functions.xml @@ -54,4 +54,67 @@ in ... +
+ <pkg>.override + + + The function override is usually available for all the + derivations in the nixpkgs expression (pkgs). + + + It is used to override the arguments passed to a function. + + + Example usages: + + pkgs.foo.override { arg1 = val1; arg2 = val2; ... } + pkgs.overridePackages (self: super: { + foo = super.foo.override { barSupport = true ; }; +}) + mypkg = pkgs.callPackage ./mypkg.nix { + mydep = pkgs.mydep.override { ... }; +}) + + + + In the first example, pkgs.foo is the result of a function call + with some default arguments, usually a derivation. + Using pkgs.foo.override will call the same function with + the given new arguments. + + +
+ +
+ lib.makeOverridable + + + The function lib.makeOverridable is used make the result + of a function easily customizable. This utility only makes sense for functions + that accept an argument set and return an attribute set. + + + + Example usage: + + f = { a, b }: { result = a+b; } +c = lib.makeOverridable f { a = 1; b = 2; } + + + + + The variable c is the value of the f function + applied with some default arguments. Hence the value of c.result + is 3, in this example. + + + + The variable c however also has some additional functions, like + c.override which can be used to + override the default arguments. In this example the value of + (c.override { a = 4; }).result is 6. + + +
+ diff --git a/doc/manual.xml b/doc/manual.xml index 11f37184e6d..1321f4b7ad2 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -18,7 +18,7 @@ - + diff --git a/doc/meta.xml b/doc/meta.xml index 14a01ccb3c0..b36f3915ec1 100644 --- a/doc/meta.xml +++ b/doc/meta.xml @@ -138,12 +138,39 @@ meta-attributes license - The license for the package. One from the - attribute set defined in - nixpkgs/lib/licenses.nix. Example: - stdenv.lib.licenses.gpl3. For details, see - . + + + The license, or licenses, for the package. One from the attribute set + defined in + nixpkgs/lib/licenses.nix. At this moment + using both a list of licenses and a single license is valid. If the + license field is in the form of a list representation, then it means + that parts of the package are licensed differently. Each license + should preferably be referenced by their attribute. The non-list + attribute value can also be a space delimited string representation of + the contained attribute shortNames or spdxIds. The following are all valid + examples: + + Single license referenced by attribute (preferred) + stdenv.lib.licenses.gpl3. + + Single license referenced by its attribute shortName (frowned upon) + "gpl3". + + Single license referenced by its attribute spdxId (frowned upon) + "GPL-3.0". + + Multiple licenses referenced by attribute (preferred) + with stdenv.lib.licenses; [ asl20 free ofl ]. + + Multiple licenses referenced as a space delimited string of attribute shortNames (frowned upon) + "asl20 free ofl". + + + For details, see . + + diff --git a/lib/maintainers.nix b/lib/maintainers.nix index e5a199e2181..2aeedbfa9c2 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -56,6 +56,7 @@ cdepillabout = "Dennis Gosnell "; cfouche = "Chaddaï Fouché "; chaoflow = "Florian Friesdorf "; + chattered = "Phil Scott "; christopherpoole = "Christopher Mark Poole "; coconnor = "Corey O'Connor "; codyopel = "Cody Opel "; diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index c546b8df474..0128fa9f33d 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -40,7 +40,7 @@ let DEFAULT boot LABEL boot - MENU LABEL NixOS ${config.system.nixosVersion} Installer + MENU LABEL NixOS ${config.system.nixosVersion}${config.isoImage.appendToMenuLabel} LINUX /boot/bzImage APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} INITRD /boot/initrd @@ -192,6 +192,18 @@ in ''; }; + isoImage.appendToMenuLabel = mkOption { + default = " Installer"; + example = " Live System"; + description = '' + The string to append after the menu label for the NixOS system. + This will be directly appended (without whitespace) to the NixOS version + string, like for example if it is set to XXX: + + NixOS 99.99-pre666XXX + ''; + }; + }; config = { diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index e6357d138ca..8a2cde50e1e 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -223,6 +223,7 @@ nix-serve = 199; tvheadend = 200; uwsgi = 201; + gitit = 202; # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! @@ -424,6 +425,7 @@ #nix-serve = 199; #unused #tvheadend = 200; #unused uwsgi = 201; + gitit = 202; # When adding a gid, make sure it doesn't match an existing # uid. Users and groups with the same name should have equal diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 12a6a9374ff..042824bc829 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -194,6 +194,7 @@ ./services/misc/etcd.nix ./services/misc/felix.nix ./services/misc/folding-at-home.nix + ./services/misc/gitit.nix ./services/misc/gitlab.nix ./services/misc/gitolite.nix ./services/misc/gpsd.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index fc83e7ed590..dd80d006591 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -148,5 +148,6 @@ in zipModules ([] ++ obsolete' [ "services" "samba" "defaultShare" ] ++ obsolete' [ "services" "syslog-ng" "serviceName" ] ++ obsolete' [ "services" "syslog-ng" "listenToJournal" ] +++ obsolete' [ "ec2" "metadata" ] ) diff --git a/nixos/modules/services/desktops/gnome3/gnome-keyring.nix b/nixos/modules/services/desktops/gnome3/gnome-keyring.nix index 566c8a50e26..a8f1bcc28fb 100644 --- a/nixos/modules/services/desktops/gnome3/gnome-keyring.nix +++ b/nixos/modules/services/desktops/gnome3/gnome-keyring.nix @@ -21,7 +21,7 @@ in description = '' Whether to enable GNOME Keyring daemon, a service designed to take care of the user's security credentials, - such as user names and passwordsa search engine. + such as user names and passwords. ''; }; diff --git a/nixos/modules/services/misc/gitit.nix b/nixos/modules/services/misc/gitit.nix new file mode 100644 index 00000000000..56e735d7356 --- /dev/null +++ b/nixos/modules/services/misc/gitit.nix @@ -0,0 +1,659 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.gitit; + + homeDir = "/var/lib/gitit"; + + gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.system + "-" + ghc.name + "/" + 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" '' + #!${stdenv.shell} + cd $HOME + export PATH="${makeSearchPath "bin" ( + [ git curl ] ++ (if cfg.pdfExport == "yes" then [texLiveFull] else []) + )}:$PATH"; + 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 = let + + yesNo = types.enum [ "yes" "no" ]; + + in { + + enable = mkOption { + type = types.bool; + default = false; + description = "Enable the gitit service."; + }; + + haskellPackages = mkOption { + default = pkgs.haskellPackages; + defaultText = "pkgs.haskellPackages"; + example = literalExample "pkgs.haskell.packages.ghc784"; + description = "haskellPackages used to build gitit and plugins."; + }; + + extraPackages = mkOption { + default = self: []; + example = literalExample '' + haskellPackages: [ + haskellPackages.wreq + ] + ''; + description = '' + Extra packages available to ghc when running gitit. The + value must be a function which receives the attrset defined + in haskellPackages as the sole argument. + ''; + }; + + address = mkOption { + type = types.str; + default = "0.0.0.0"; + description = "IP address on which the web server will listen."; + }; + + port = mkOption { + type = types.int; + default = 5001; + description = "Port on which the web server will run."; + }; + + wikiTitle = mkOption { + type = types.str; + default = "Gitit!"; + description = "The wiki title."; + }; + + repositoryType = mkOption { + type = types.enum ["git" "darcs" "mercurial"]; + default = "git"; + description = "Specifies the type of repository used for wiki content."; + }; + + repositoryPath = mkOption { + type = types.path; + default = homeDir + "/wiki"; + description = '' + 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 = '' + 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"]; + default = "form"; + description = '' + '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 = '' + 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 = '' + Number of minutes of inactivity before a session expires. + ''; + }; + + staticDir = mkOption { + type = types.path; + default = gititShared + "/data/static"; + description = '' + 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 = '' + 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 = '' + 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 = '' + 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 = yesNo; + default = "no"; + description = '' + 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 = '' + 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 = '' + 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 = '' + 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 = '' + 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 = '' + 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 = '' + 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 = '' + 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 = yesNo; + default = "yes"; + description = '' + Specifies whether to print a tables of contents (with links to + sections) on each wiki page. + ''; + }; + + plugins = mkOption { + type = types.path; + default = gititShared + "/plugins/Dot.hs"; + description = '' + 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. + Examples: + plugins: plugins/DotPlugin.hs, CapitalizeEmphasisPlugin.hs + plugins: plugins/DotPlugin + plugins: Gitit.Plugin.InterwikiLinks + ''; + }; + + useCache = mkOption { + type = yesNo; + default = "no"; + description = '' + 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 = "Path where rendered pages will be cached."; + }; + + maxUploadSize = mkOption { + type = types.str; + default = "1000K"; + description = '' + 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 = "Specifies an upper limit on the size (in bytes) of pages."; + }; + + debugMode = mkOption { + type = yesNo; + default = "no"; + description = "Causes debug information to be logged while gitit is running."; + }; + + compressResponses = mkOption { + type = yesNo; + default = "yes"; + description = "Specifies whether HTTP responses should be compressed."; + }; + + mimeTypesFile = mkOption { + type = types.path; + default = "/etc/mime/types.info"; + description = '' + 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 = yesNo; + default = "no"; + description = '' + If "yes", 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 = '' + 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 = '' + 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 = '' + 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 = '' + 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 = '' + 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 = "RPX account access key."; + }; + + mailCommand = mkOption { + type = types.str; + default = "sendmail %s"; + description = '' + 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 = '' + 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 = yesNo; + default = "no"; + description = '' + 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 = '' + The base URL of the wiki, to be used in constructing feed IDs and RPX + token_urls. Set this if use-feed is 'yes' or authentication-method + is 'rpx'. + ''; + }; + + absoluteUrls = mkOption { + type = yesNo; + default = "no"; + description = '' + 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 absolute-urls is 'yes', and a relative link to + 'Cactus' (referring to '/wiki/Sub/Cactus') if absolute-urls is 'no'. + ''; + }; + + feedDays = mkOption { + type = types.int; + default = 14; + description = "Number of days to be included in feeds."; + }; + + feedRefreshTime = mkOption { + type = types.int; + default = 60; + description = "Number of minutes to cache feeds before refreshing."; + }; + + pdfExport = mkOption { + type = yesNo; + default = "no"; + description = '' + If yes, 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 = '' + 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 = yesNo; + default = "yes"; + description = '' + If yes, all HTML (including that produced by pandoc) is filtered + through xss-sanitize. Set to no only if you trust all of your users. + ''; + }; + }; + + 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: ${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: ${cfg.tableOfContents} + plugins: ${cfg.plugins} + use-cache: ${cfg.useCache} + cache-dir: ${cfg.cacheDir} + max-upload-size: ${cfg.maxUploadSize} + max-page-size: ${cfg.maxPageSize} + debug-mode: ${cfg.debugMode} + compress-responses: ${cfg.compressResponses} + mime-types-file: ${cfg.mimeTypesFile} + use-recaptcha: ${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: ${cfg.useFeed} + base-url: ${toString cfg.baseUrl} + absolute-urls: ${cfg.absoluteUrls} + feed-days: ${toString cfg.feedDays} + feed-refresh-time: ${toString cfg.feedRefreshTime} + pdf-export: ${cfg.pdfExport} + pandoc-user-data: ${toString cfg.pandocUserData} + xss-sanitize: ${cfg.xssSanitize} + ''; + +in + +{ + + options.services.gitit = gititOptions; + + config = mkIf cfg.enable { + + users.extraUsers.gitit = { + group = config.users.extraGroups.gitit.name; + description = "Gitit user"; + home = homeDir; + createHome = true; + uid = config.ids.uids.gitit; + }; + + users.extraGroups.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" ]; + + preStart = 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 [ ! -d .git ] + then + ${pkgs.git}/bin/git init + ${pkgs.git}/bin/git config user.email "gitit@${config.networking.hostName}" + ${pkgs.git}/bin/git config user.name "gitit" + chown ${uid}:${gid} -R {repositoryPath} + fi + cd - + ''; + + serviceConfig = { + User = config.users.extraUsers.gitit.name; + Group = config.users.extraGroups.gitit.name; + ExecStart = with cfg; gititSh haskellPackages extraPackages; + }; + }; + }; +} + diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index e5948e223d5..b79a69e2ba8 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -329,13 +329,13 @@ in text = concatMapStrings (machine: "${if machine ? sshUser then "${machine.sshUser}@" else ""}${machine.hostName} " - + (if machine ? system then machine.system else concatStringsSep "," machine.systems) - + " ${machine.sshKey} ${toString machine.maxJobs} " - + (if machine ? speedFactor then toString machine.speedFactor else "1" ) + + machine.system or (concatStringsSep "," machine.systems) + + " ${machine.sshKey or "-"} ${toString machine.maxJobs or 1} " + + toString (machine.speedFactor or 1) + " " - + (if machine ? supportedFeatures then concatStringsSep "," machine.supportedFeatures else "" ) + + concatStringsSep "," (machine.mandatoryFeatures or [] ++ machine.supportedFeatures or []) + " " - + (if machine ? mandatoryFeatures then concatStringsSep "," machine.mandatoryFeatures else "" ) + + concatStringsSep "," machine.mandatoryFeatures or [] + "\n" ) cfg.buildMachines; }; diff --git a/nixos/modules/virtualisation/amazon-init.nix b/nixos/modules/virtualisation/amazon-init.nix index 6058a7019e8..21cbbfda0b6 100644 --- a/nixos/modules/virtualisation/amazon-init.nix +++ b/nixos/modules/virtualisation/amazon-init.nix @@ -45,7 +45,6 @@ let ''; in { imports = [ "${modulesPath}/virtualisation/amazon-image.nix" ]; - ec2.metadata = true; boot.postBootCommands = '' ${bootScript} & ''; diff --git a/nixos/modules/virtualisation/ec2-data.nix b/nixos/modules/virtualisation/ec2-data.nix index 0b2479c1046..44a582ba766 100644 --- a/nixos/modules/virtualisation/ec2-data.nix +++ b/nixos/modules/virtualisation/ec2-data.nix @@ -7,16 +7,6 @@ with lib; { - options = { - ec2.metadata = mkOption { - type = types.bool; - default = false; - description = '' - Whether to allow access to EC2 metadata. - ''; - }; - }; - config = { systemd.services."fetch-ec2-data" = @@ -31,8 +21,6 @@ with lib; script = '' - ip route del blackhole 169.254.169.254/32 || true - wget="wget -q --retry-connrefused -O -" ${optionalString (config.networking.hostName == "") '' @@ -67,14 +55,6 @@ with lib; (umask 077; echo "$key" > /etc/ssh/ssh_host_dsa_key) echo "$key_pub" > /etc/ssh/ssh_host_dsa_key.pub fi - - ${optionalString (! config.ec2.metadata) '' - # Since the user data is sensitive, prevent it from - # being accessed from now on. FIXME: remove at some - # point, since current NixOps no longer relies on - # metadata secrecy. - ip route add blackhole 169.254.169.254/32 - ''} ''; serviceConfig.Type = "oneshot"; diff --git a/pkgs/applications/audio/abcde/default.nix b/pkgs/applications/audio/abcde/default.nix index b8c8c183753..eec1bdcf31c 100644 --- a/pkgs/applications/audio/abcde/default.nix +++ b/pkgs/applications/audio/abcde/default.nix @@ -1,18 +1,18 @@ -{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools, id3v2, lame, flac, eject, mkcue +{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools, id3v2, eyeD3 +, lame, flac, eject, mkcue , perl, DigestSHA, MusicBrainz, MusicBrainzDiscID , makeWrapper }: -let version = "2.6"; +let version = "2.7"; in stdenv.mkDerivation { name = "abcde-${version}"; src = fetchurl { - url = "mirror://debian/pool/main/a/abcde/abcde_${version}.orig.tar.gz"; - sha256 = "0y2cg233n2hixs0ji76dggpzgf52v4c4mnpwiai889ql2piafgk8"; + url = "http://abcde.einval.com/download/abcde-${version}.tar.gz"; + sha256 = "0ikpffzvacadh6vj9qlary8126j1zrd2knp9gvivmp7y1656jj01"; }; - # FIXME: This package does not support MP3 encoding (only Ogg), - # nor `distmp3', `eject', etc. + # FIXME: This package does not support `distmp3', `eject', etc. patches = [ ./abcde.patch ]; @@ -50,7 +50,7 @@ in --replace '#!/usr/bin/perl' '#!${perl}/bin/perl' wrapProgram "$out/bin/abcde" --prefix PATH ":" \ - "$out/bin:${libcdio}/bin:${cddiscid}/bin:${wget}/bin:${vorbisTools}/bin:${id3v2}/bin:${lame}/bin" + "$out/bin:${libcdio}/bin:${cddiscid}/bin:${wget}/bin:${vorbisTools}/bin:${id3v2}/bin:${eyeD3}/bin:${lame}/bin" wrapProgram "$out/bin/cddb-tool" --prefix PATH ":" \ "${wget}/bin" @@ -60,7 +60,7 @@ in ''; meta = { - homepage = "http://lly.org/~rcw/abcde/page/"; + homepage = http://abcde.einval.com/wiki/; license = stdenv.lib.licenses.gpl2Plus; description = "Command-line audio CD ripper"; diff --git a/pkgs/applications/graphics/pencil/default.nix b/pkgs/applications/graphics/pencil/default.nix index e6e72cfd6e6..19c6334d1d6 100644 --- a/pkgs/applications/graphics/pencil/default.nix +++ b/pkgs/applications/graphics/pencil/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, xulrunner }: +{ stdenv, fetchurl, makeWrapper, xulrunner }: stdenv.mkDerivation rec { version = "2.0.11"; @@ -12,15 +12,19 @@ stdenv.mkDerivation rec { buildPhase = ""; + buildInputs = [ makeWrapper ]; + installPhase = '' mkdir -p "$out" cp -r usr/* "$out" - sed -e "s|/usr/bin/xulrunner|${xulrunner}/bin/xulrunner|" \ - -e "s|/usr/share/evolus-pencil|$out/share/evolus-pencil|" \ + sed -e "s|/usr/share/evolus-pencil|$out/share/evolus-pencil|" \ -i "$out/bin/pencil" sed -e "s|/usr/bin/pencil|$out/bin/pencil|" \ -e "s|Icon=.*|Icon=$out/share/evolus-pencil/skin/classic/icon.svg|" \ -i "$out/share/applications/pencil.desktop" + + wrapProgram $out/bin/pencil \ + --prefix PATH ":" ${xulrunner}/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/misc/llpp/default.nix b/pkgs/applications/misc/llpp/default.nix index 601ffe25200..bd0727ccab1 100644 --- a/pkgs/applications/misc/llpp/default.nix +++ b/pkgs/applications/misc/llpp/default.nix @@ -4,12 +4,12 @@ let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version; in stdenv.mkDerivation rec { name = "llpp-${version}"; - version = "21-git-2015-06-06"; + version = "21-git-2015-06-27"; src = fetchgit { url = "git://repo.or.cz/llpp.git"; - rev = "492d761c0c7c8c4ccdd4f0d3fa7c51434ce8acf2"; - sha256 = "14dp5sw7cd6bja9d3zpxmswbk0k0b7x2fzb1fflhnnnhjc39irk9"; + rev = "843c42ef41bb78a3b1ee995fc2bab91f8796e8ad"; + sha256 = "0h8wa7f5bj5sm3sr8namcyy81s4s80hyasimyfw935lqyw2q2k60"; }; buildInputs = [ pkgconfig ninja makeWrapper ocaml findlib mupdf lablgl diff --git a/pkgs/applications/misc/mdp/default.nix b/pkgs/applications/misc/mdp/default.nix index 2e94414235d..aa2045cc8e8 100644 --- a/pkgs/applications/misc/mdp/default.nix +++ b/pkgs/applications/misc/mdp/default.nix @@ -1,21 +1,22 @@ -{ stdenv, fetchFromGitHub, ncurses }: +{ stdenv, fetchurl, ncurses }: -stdenv.mkDerivation { - name = "mdp-0.93"; +stdenv.mkDerivation rec { + version = "1.0.0"; + name = "mdp-${version}"; - src = fetchFromGitHub { - owner = "visit1985"; - repo = "mdp"; - rev = "09d6bd1a8a33fac75a999f0822ec10cb77fbc072"; - sha256 = "0ksa0zqzv1yb8nspxp2vww7bp9y99pcma1vx3cixd3qb5y5ljn1n"; + src = fetchurl { + url = "https://github.com/visit1985/mdp/archive/${version}.tar.gz"; + sha256 = "1xkmzcwa5ml1xfv92brwirnm00a44jkj7wpfimxbny98zgmad8vn"; }; makeFlags = "PREFIX=$(out)"; buildInputs = [ ncurses ]; - meta = { + meta = with stdenv.lib; { homepage = https://github.com/visit1985/mdp; description = "A command-line based markdown presentation tool"; + maintainers = with maintainers; [ matthiasbeyer ]; + license = licenses.gpl3; }; } diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix index d97f36f1151..04df4da450c 100644 --- a/pkgs/applications/networking/browsers/qutebrowser/default.nix +++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix @@ -1,25 +1,28 @@ -{ stdenv, fetchurl, python, buildPythonPackage, qt5, pyqt5, jinja2, pygments, pyyaml, pypeg2}: +{ stdenv, fetchgit, python, buildPythonPackage, qt5, pyqt5, jinja2, pygments, pyyaml, pypeg2 }: -let version = "0.2.1"; in +let version = "0.3"; in buildPythonPackage { name = "qutebrowser-${version}"; namePrefix = ""; - - src = fetchurl { - url = "https://github.com/The-Compiler/qutebrowser/releases/download/v${version}/qutebrowser-${version}.tar.gz"; - sha256 = "b741a1a0336b8d36133603a3318d1c4c63c9abf50212919200cd2ae665b07111"; - }; - # Needs tox - doCheck = false; - propagatedBuildInputs = [ - python pyyaml pyqt5 jinja2 pygments pypeg2 - ]; - - meta = { - homepage = https://github.com/The-Compiler/qutebrowser; - description = "Keyboard-focused browser with a minimal GUI"; - license = stdenv.lib.licenses.gpl3Plus; + src = fetchgit { + url = "https://github.com/The-Compiler/qutebrowser.git"; + rev = "b3cd31a808789932a0a4cb7aa8d9280b6d3a12e7"; + sha256 = "fea7fd9de8a930da7af0111739ae88851cb965b30751858d1aba5bbd15277652"; + }; + + # Needs tox + doCheck = false; + + propagatedBuildInputs = [ + python pyyaml pyqt5 jinja2 pygments pypeg2 + ]; + + meta = { + homepage = https://github.com/The-Compiler/qutebrowser; + description = "Keyboard-focused browser with a minimal GUI"; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = [ stdenv.lib.maintainers.jagajaga ]; }; } diff --git a/pkgs/applications/networking/ids/bro/default.nix b/pkgs/applications/networking/ids/bro/default.nix index c3641903a75..8d6515f2dd2 100644 --- a/pkgs/applications/networking/ids/bro/default.nix +++ b/pkgs/applications/networking/ids/bro/default.nix @@ -1,14 +1,16 @@ -{stdenv, fetchurl, cmake, flex, bison, openssl, libpcap, perl, zlib, file, curl, geoip, gperftools }: +{stdenv, fetchurl, cmake, flex, bison, openssl, libpcap, perl, zlib, file, curl +, geoip, gperftools }: stdenv.mkDerivation rec { - name = "bro-2.3.2"; + name = "bro-2.4"; src = fetchurl { url = "http://www.bro.org/downloads/release/${name}.tar.gz"; - sha256 = "16y6924brh7sw6l0nry6y4q8sif2lkcpymkd26aabdc61bdgpr9g"; + sha256 = "1ch8w8iakr2ajbigaad70b6mfv01s2sbdqgmrqm9q9zc1c5hs33l"; }; - buildInputs = [ cmake flex bison openssl libpcap perl zlib file curl geoip gperftools ]; + buildInputs = [ cmake flex bison openssl libpcap perl zlib file curl geoip + gperftools ]; enableParallelBuilding = true; diff --git a/pkgs/applications/video/popcorntime/default.nix b/pkgs/applications/video/popcorntime/default.nix new file mode 100644 index 00000000000..0db56cc6fcd --- /dev/null +++ b/pkgs/applications/video/popcorntime/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, runCommand, makeWrapper, node_webkit_0_9 +}: + +let + version = "0.3.7.2"; + + srcs = { + x86_64-linux = fetchurl { + url = "https://get.popcorntime.io/build/Popcorn-Time-${version}-Linux64.tar.xz"; + sha256 = "0lm9k4fr73a9p00i3xj2ywa4wvjf9csadm0pcz8d6imwwq44sa8b"; + }; + i686-linux = fetchurl { + url = "https://get.popcorntime.io/build/Popcorn-Time-${version}-Linux32.tar.xz"; + sha256 = "1dz1cp31qbwamm9pf8ydmzzhnb6d9z73bigdv3y74dgicz3dpr91"; + }; + }; + + popcorntimePackage = stdenv.mkDerivation rec { + name = "popcorntime-package-${version}"; + src = srcs."${stdenv.system}"; + sourceRoot = "."; + installPhase = '' + mkdir -p $out + cp -r *.so *.pak $out/ + cat ${node_webkit_0_9}/bin/nw package.nw > $out/Popcorn-Time + chmod 555 $out/Popcorn-Time + ''; + }; +in + runCommand "popcorntime-${version}" { + buildInputs = [ makeWrapper ]; + meta = with stdenv.lib; { + homepage = http://popcorntime.io/; + description = "An application that streams movies and TV shows from torrents"; + license = stdenv.lib.licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ bobvanderlinden ]; + }; + } + '' + mkdir -p $out/bin + makeWrapper ${popcorntimePackage}/Popcorn-Time $out/bin/popcorntime + '' diff --git a/pkgs/applications/window-managers/taffybar/default.nix b/pkgs/applications/window-managers/taffybar/default.nix new file mode 100644 index 00000000000..66e880197bb --- /dev/null +++ b/pkgs/applications/window-managers/taffybar/default.nix @@ -0,0 +1,15 @@ +{ stdenv, ghcWithPackages, xmessage, makeWrapper, packages ? (x: []) }: + +let +taffybarEnv = ghcWithPackages (self: [ self.taffybar ] ++ packages self); +in stdenv.mkDerivation { + name = "taffybar-with-packages"; + + nativeBuildInputs = [ makeWrapper ]; + + buildCommand = '' + mkdir -p $out/bin + makeWrapper ${taffybarEnv}/bin/taffybar $out/bin/taffybar \ + --set NIX_GHC "${taffybarEnv}/bin/ghc" + ''; +} diff --git a/pkgs/build-support/build-maven.nix b/pkgs/build-support/build-maven.nix index bde95080e74..284be201ff0 100644 --- a/pkgs/build-support/build-maven.nix +++ b/pkgs/build-support/build-maven.nix @@ -13,7 +13,7 @@ infoFile: let info = builtins.fromJSON (builtins.readFile infoFile); - repo = runCommand "maven-repository" {} '' + script = writeText "build-maven-repository.sh" '' ${lib.concatStrings (map (dep: let inherit (dep) url sha1 groupId artifactId version; @@ -25,6 +25,10 @@ infoFile: let '') info.dependencies)} ''; + repo = runCommand "maven-repository" {} '' + bash ${script} + ''; + settings = writeText "settings.xml" '' -+ * Written-by: Gérald Kerma -+ * -+ * (C) Copyright 2003 -+ * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -+ * MA 02110-1301 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#ifdef CONFIG_KIRKWOOD -+#include -+#endif -+#include "mv_sdio.h" -+ -+#ifdef CONFIG_MMC -+ -+#define DRIVER_NAME "mv-sdio" -+ -+#ifdef DEBUG -+#define pr_debug(fmt, args...) printf(fmt, ##args) -+#else -+#define pr_debug(...) do { } while(0) -+#endif -+ -+//static mv_sdio_t *mvsd = (mv_sdio_t *)mmc->priv; -+static mv_sdio_t *mvsd = (mv_sdio_t *)MV_SDIO_BASE; -+ -+static int is_sdhc; -+extern int fat_register_device(block_dev_desc_t *dev_desc, int part_no); -+static block_dev_desc_t mmc_dev; -+block_dev_desc_t * mmc_get_dev(int dev) -+{ -+ return ((block_dev_desc_t *)&mmc_dev); -+} -+ -+/* -+ * FIXME needs to read cid and csd info to determine block size -+ * and other parameters -+ */ -+static uchar mmc_buf[MMC_BLOCK_SIZE]; -+static mv_mmc_csd_t mv_mmc_csd; -+static int mmc_ready = 0; -+ -+/* MMC_DEFAULT_RCA should probably be just 1, but this may break other code -+ that expects it to be shifted. */ -+static u_int16_t rca = 0; -+ -+/* used for debug */ -+static u_int32_t mv_mmc_size(const struct mv_mmc_csd *csd) -+{ -+ u_int32_t block_len, mult, blocknr; -+ -+ block_len = csd->read_bl_len << 12; -+ mult = csd->c_size_mult1 << 8; -+ blocknr = (csd->c_size+1) * mult; -+ -+ return blocknr * block_len; -+} -+ -+static int isprint (unsigned char ch) -+{ -+ if (ch >= 32 && ch < 127) -+ return (1); -+ -+ return (0); -+} -+ -+static int toprint(char *dst, char c) -+{ -+ if (isprint(c)) { -+ *dst = c; -+ return 1; -+ } -+ -+ return sprintf(dst,"\\x%02x", c); -+ -+} -+ -+static void print_mmc_cid(mv_mmc_cid_t *cid) -+{ -+ printf("MMC found. Card desciption is:\n"); -+ printf("Manufacturer ID = %02x%02x%02x\n", -+ cid->id[0], cid->id[1], cid->id[2]); -+ printf("HW/FW Revision = %x %x\n",cid->hwrev, cid->fwrev); -+ cid->hwrev = cid->fwrev = 0; /* null terminate string */ -+ printf("Product Name = %s\n",cid->name); -+ printf("Serial Number = %02x%02x%02x\n", -+ cid->sn[0], cid->sn[1], cid->sn[2]); -+ printf("Month = %d\n",cid->month); -+ printf("Year = %d\n",1997 + cid->year); -+} -+ -+static void print_sd_cid(mv_sd_cid_t *cid) -+{ -+ int len; -+ char tbuf[64]; -+ -+ printf("SD%s found. Card desciption is:\n", is_sdhc?"HC":""); -+ -+ len = 0; -+ len += toprint(&tbuf[len], cid->oid_0); -+ len += toprint(&tbuf[len], cid->oid_1); -+ tbuf[len] = 0; -+ -+ printf("Manufacturer: 0x%02x, OEM \"%s\"\n", -+ cid->mid, tbuf); -+ -+ len = 0; -+ len += toprint(&tbuf[len], cid->pnm_0); -+ len += toprint(&tbuf[len], cid->pnm_1); -+ len += toprint(&tbuf[len], cid->pnm_2); -+ len += toprint(&tbuf[len], cid->pnm_3); -+ len += toprint(&tbuf[len], cid->pnm_4); -+ tbuf[len] = 0; -+ -+ printf("Product name: \"%s\", revision %d.%d\n", -+ tbuf, -+ cid->prv >> 4, cid->prv & 15); -+ -+ printf("Serial number: %u\n", -+ cid->psn_0 << 24 | cid->psn_1 << 16 | cid->psn_2 << 8 | -+ cid->psn_3); -+ printf("Manufacturing date: %d/%d\n", -+ cid->mdt_1 & 15, -+ 2000+((cid->mdt_0 & 15) << 4)+((cid->mdt_1 & 0xf0) >> 4)); -+ -+ printf("CRC: 0x%02x, b0 = %d\n", -+ cid->crc >> 1, cid->crc & 1); -+} -+ -+static void mvsdio_set_clock(unsigned int clock) -+{ -+ unsigned int m; -+ -+ m = MVSDMMC_BASE_FAST_CLOCK/(2*clock) - 1; -+ -+ pr_debug("mvsdio_set_clock: dividor = 0x%x clock=%d\n", -+ m, clock); -+ -+ -+ writew(m & 0x7ff, &mvsd->CLK_DIV); -+ -+ if (isprint(1)) -+ udelay(10*1000); -+} -+ -+/****************************************************/ -+static ulong * mv_mmc_cmd(ulong cmd, ulong arg, ushort xfermode, ushort resptype, ushort waittype) -+/****************************************************/ -+{ -+ static ulong resp[4]; -+ ushort done ; -+ int err = 0 ; -+ ulong curr, start, diff, hz; -+ ushort response[8]; -+ -+ pr_debug("mv_mmc_cmd %x, arg: %x,xfer: %x,resp: %x, wait : %x\n" -+ , (unsigned int)cmd, (unsigned int)arg, xfermode, resptype, waittype); -+ -+ -+ /* clear status */ -+ writew(0xffff, &mvsd->NOR_INTR_STATUS); -+ writew(0xffff, &mvsd->ERR_INTR_STATUS); -+ -+ start = get_timer(0); -+ hz = CONFIG_SYS_HZ; -+ -+ while((readw(&mvsd->PRESENT_STATE0) & CARD_BUSY)) { -+ curr = get_timer(0); -+ diff = (long) curr - (long) start; -+ if (diff > (3*hz)) -+ { -+ /* 3 seconds timeout, card busy, can't sent cmd */ -+ printf("card too busy \n"); -+ return 0; -+ } -+ } -+ -+ writew((ushort)(arg&0xffff), &mvsd->ARG_LOW); -+ writew((ushort)(arg>>16), &mvsd->ARG_HI); -+ writew(xfermode, &mvsd->XFER_MODE); -+ if( (cmd == MMC_CMD_READ_BLOCK) || (cmd == 25) ) -+ { -+ writew(((cmd << 8) | resptype | 0x3c ) , &mvsd->CMD); -+ pr_debug("cmd reg : %x\n", readw(&mvsd->CMD)) ; -+ -+ } -+ else -+ { -+ writew(((cmd << 8) | resptype ), &mvsd->CMD); -+ } -+ -+ done = readw(&mvsd->NOR_INTR_STATUS) & waittype; -+ start = get_timer(0); -+ -+ while( done!=waittype) -+ { -+ done = readw(&mvsd->NOR_INTR_STATUS) & waittype; -+ -+ if( readw(&mvsd->NOR_INTR_STATUS) & 0x8000 ) -+ { -+ pr_debug("Error! cmd : %d, err : %04x\n", (unsigned int)cmd, readw(&mvsd->ERR_INTR_STATUS)) ; -+ -+ return 0 ; /* error happen */ -+ } -+ -+ curr = get_timer(0); -+ diff = (long) curr - (long) start; -+ if (diff > (3*hz)) -+ { -+ pr_debug("cmd timeout, status : %04x\n", readw(&mvsd->NOR_INTR_STATUS)); -+ pr_debug("xfer mode : %04x\n", readw(&mvsd->XFER_MODE)); -+ -+ err = 1 ; -+ break; -+ } -+ } -+ -+ response[0] = readw(&mvsd->RSP0); -+ response[1] = readw(&mvsd->RSP1); -+ response[2] = readw(&mvsd->RSP2); -+ response[3] = readw(&mvsd->RSP3); -+ response[4] = readw(&mvsd->RSP4); -+ response[5] = readw(&mvsd->RSP5); -+ response[6] = readw(&mvsd->RSP6); -+ response[7] = readw(&mvsd->RSP7); -+ -+ memset(resp, 0, sizeof(resp)); -+ -+ switch (resptype & 0x3) { -+ case SDIO_CMD_RSP_48: -+ case SDIO_CMD_RSP_48BUSY: -+ resp[0] = ((response[2] & 0x3f) << (8 - 8)) | -+ ((response[1] & 0xffff) << (14 - 8)) | -+ ((response[0] & 0x3ff) << (30 - 8)); -+ resp[1] = ((response[0] & 0xfc00) >> 10); -+ break; -+ -+ case SDIO_CMD_RSP_136: -+ resp[3] = ((response[7] & 0x3fff) << 8) | -+ ((response[6] & 0x3ff) << 22); -+ resp[2] = ((response[6] & 0xfc00) >> 10) | -+ ((response[5] & 0xffff) << 6) | -+ ((response[4] & 0x3ff) << 22); -+ resp[1] = ((response[4] & 0xfc00) >> 10) | -+ ((response[3] & 0xffff) << 6) | -+ ((response[2] & 0x3ff) << 22); -+ resp[0] = ((response[2] & 0xfc00) >> 10) | -+ ((response[1] & 0xffff) << 6) | -+ ((response[0] & 0x3ff) << 22); -+ break; -+ default: -+ return 0; -+ } -+ int i; -+ pr_debug("MMC resp :"); -+ for (i=0; i<4; ++i ) { -+ pr_debug(" %08x", (unsigned int)resp[i]); -+ } -+ pr_debug("\n"); -+ if( err ) -+ return NULL ; -+ else -+ return resp; -+} -+ -+/****************************************************/ -+static int mv_mmc_block_read(uchar *dst, ulong src, ulong len) -+/****************************************************/ -+{ -+ ulong *resp; -+ -+ if (len == 0) { -+ return 0; -+ } -+ -+ if (is_sdhc) { -+ /* SDHC: use block address */ -+ src >>= 9; -+ } -+ -+ pr_debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong)dst, src, (int)len); -+ -+ /* prepare for dma transfer */ -+ writew(((ulong)(dst))&0xffff,&mvsd->SYS_ADDR_LOW); -+ writew(((ulong)(dst)>>16)&0xffff,&mvsd->SYS_ADDR_HI); -+ writew(len,&mvsd->BLK_SIZE); -+ writew(1,&mvsd->BLK_COUNT); -+ -+ /* send read command */ -+ resp = mv_mmc_cmd(MMC_CMD_READ_BLOCK, src, 0x10 , -+ SDIO_CMD_RSP_48, SDIO_NOR_XFER_DONE); -+ if (!resp) { -+ pr_debug("mv_mmc_block_read: mmc read block cmd fails\n"); -+ return -EIO; -+ } -+ -+ return 0; -+} -+ -+/****************************************************/ -+int mv_mmc_read(ulong src, uchar *dst, int size) -+/****************************************************/ -+{ -+ ulong end, part_start, part_end, part_len, aligned_start, aligned_end; -+ ulong mmc_block_size, mmc_block_address; -+ -+ if (size == 0) { -+ return 0; -+ } -+ -+ if (!mmc_ready) { -+ printf("Please initial the MMC first\n"); -+ return -1; -+ } -+ -+ mmc_block_size = MMC_BLOCK_SIZE; -+ mmc_block_address = ~(mmc_block_size - 1); -+ -+ end = src + size; -+ part_start = ~mmc_block_address & src; -+ part_end = ~mmc_block_address & end; -+ aligned_start = mmc_block_address & src; -+ aligned_end = mmc_block_address & end; -+ -+ /* all block aligned accesses */ -+ pr_debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ (long unsigned int)src,(ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ -+ if (part_start) { -+ part_len = mmc_block_size - part_start; -+ pr_debug("ps src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ (long unsigned int)src,(ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ -+ if ((mv_mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) < 0) { -+ return -1; -+ } -+ memcpy(dst, mmc_buf+part_start, part_len); -+ dst += part_len; -+ src += part_len; -+ } -+ pr_debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ (long unsigned int)src,(ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ -+ for (; src < aligned_end; aligned_start +=mmc_block_size, src += mmc_block_size, dst += mmc_block_size) { -+ pr_debug("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ (long unsigned int)src,(ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ -+ if ((mv_mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) < 0) { -+ printf("mmc block read error\n"); -+ return -1; -+ } -+ memcpy(dst, mmc_buf, mmc_block_size); -+ } -+ pr_debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ (long unsigned int)src,(ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ -+ if (part_end && src < end) { -+ pr_debug("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ (long unsigned int)src,(ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ -+ if ((mv_mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) { -+ return -1; -+ } -+ memcpy(dst, mmc_buf, part_end); -+ } -+ return 0; -+} -+ -+/****************************************************/ -+static ulong mv_mmc_bread(int dev_num, ulong blknr, ulong blkcnt, ulong *dst) -+/****************************************************/ -+{ -+ int mmc_block_size = MMC_BLOCK_SIZE; -+ ulong src = blknr * mmc_block_size; -+ -+ mv_mmc_read(src, (uchar *)dst, blkcnt*mmc_block_size); -+ return blkcnt; -+} -+ -+/****************************************************/ -+int mmc_legacy_init(int verbose) -+/****************************************************/ -+{ -+ int retries, rc = -ENODEV; -+ ulong *resp; -+ int sd_ver20; -+ int is_sd; -+ ushort reg; -+ uchar cidbuf[64]; -+ -+ sd_ver20 = 0; -+ is_sdhc = 0; -+ is_sd = 0; -+ -+ /* Initial Host Ctrl : Timeout : max , Normal Speed mode, 4-bit data mode */ -+ /* Big Endian, SD memory Card, Push_pull CMD Line */ -+ writew( SDIO_HOST_CTRL_TMOUT(0xf) | -+ SDIO_HOST_CTRL_DATA_WIDTH_4_BITS | -+ SDIO_HOST_CTRL_BIG_ENDIAN | -+ SDIO_HOST_CTRL_PUSH_PULL_EN | -+ SDIO_HOST_CTRL_CARD_TYPE_MEM_ONLY , -+ &mvsd->HOST_CTRL); -+ -+ writew( 0, &mvsd->CLK_CTRL); -+ -+ /* enable status */ -+ writew( 0xffff, &mvsd->NOR_STATUS_EN); -+ writew( 0xffff, &mvsd->ERR_STATUS_EN); -+ -+ /* disable interrupts */ -+ writew( 0, &mvsd->NOR_INTR_EN); -+ writew( 0, &mvsd->ERR_INTR_EN); -+ -+ writew( 0x100, &mvsd->SW_RESET); -+ udelay(10000); -+ -+ mv_mmc_csd.c_size = 0; -+ -+ /* reset */ -+ retries = 10; -+ resp = mv_mmc_cmd(0, 0, 0, SDIO_CMD_RSP_NONE, SDIO_NOR_CMD_DONE ); -+ pr_debug("cmd 0 resp : %08x %08x %08x %08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3] ); -+ -+ -+ pr_debug ("trying to detect SD card version\n"); -+ -+ resp = mv_mmc_cmd(8, 0x000001aa, 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ pr_debug("cmd 8 resp : %08x %08x %08x %08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3] ); -+ -+ if (resp && (resp[0] & 0x1ff)==0x1aa) { -+ pr_debug ("SD version 2.0 card detected\n"); -+ -+ sd_ver20 = 1; -+ } -+ -+ if (sd_ver20) -+ retries = 50; -+ else -+ retries = 10; -+ -+ while (retries--) { -+ resp = mv_mmc_cmd(55, 0, 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ pr_debug("cmd 55 resp : %08x %08x %08x %08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3] ); -+ -+ -+ if (sd_ver20) -+ resp = mv_mmc_cmd(41, 0x40300000, 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ else -+ resp = mv_mmc_cmd(41, 0x00300000, 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ -+ pr_debug("cmd 41 resp : %08x %08x %08x %08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3] ); -+ -+ -+ if (resp && (resp[0] & 0x80000000)) { -+ pr_debug ("detected SD card\n"); -+ -+ is_sd = 1; -+ break; -+ } -+ -+ udelay(100*1000); -+ } -+ -+ if (retries <= 0 && !is_sd) { -+ pr_debug ("failed to detect SD card, trying MMC\n"); -+ -+ retries = 10; -+ while (retries--) { -+ resp = mv_mmc_cmd(1, 0, 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ pr_debug("cmd 01 resp : %08x %08x %08x %08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3] ); -+ -+ -+ if (resp && (resp[0] & 0x80000000)) { -+ printf ("detected MMC card\n"); -+ reg = readw(&mvsd->HOST_CTRL); -+ reg &= ~(0x3<<1); -+ reg |= SDIO_HOST_CTRL_CARD_TYPE_IO_MMC; -+ writew( reg, &mvsd->HOST_CTRL); -+ break; -+ } -+ -+ udelay(100*1000); -+ } -+ } -+ -+ if (retries <= 0) { -+ pr_debug ("detect fails\n"); -+ -+ return -ENODEV; -+ } -+ -+ /* try to get card id */ -+ resp = mv_mmc_cmd(2, 0, 0, SDIO_CMD_RSP_136, SDIO_NOR_CMD_DONE ); -+ pr_debug("cmd 2 resp : %08x %08x %08x %08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3] ); -+ -+ -+ if (resp == NULL) { -+ pr_debug ("read cid fails\n"); -+ -+ return -ENODEV; -+ } -+ -+ if (is_sd) { -+ mv_sd_cid_t *cid = (mv_sd_cid_t *) resp; -+ -+ memcpy(cidbuf, resp, sizeof(mv_sd_cid_t)); -+ -+ sprintf((char *) mmc_dev.vendor, -+ "Man %02x OEM %c%c \"%c%c%c%c%c\"", -+ cid->mid, cid->oid_0, cid->oid_1, -+ cid->pnm_0, cid->pnm_1, cid->pnm_2, cid->pnm_3, cid->pnm_4); -+ -+ sprintf((char *) mmc_dev.product, "%d", -+ (cid->psn_0 << 24) | (cid->psn_1 <<16) | (cid->psn_2 << 8) | (cid->psn_3 << 8)); -+ -+ sprintf((char *) mmc_dev.revision, "%d.%d", cid->prv>>4, cid->prv & 0xff); -+ -+ } else { -+ /* TODO configure mmc driver depending on card attributes */ -+ mv_mmc_cid_t *cid = (mv_mmc_cid_t *) resp; -+ -+ memcpy(cidbuf, resp, sizeof(mv_sd_cid_t)); -+ -+ -+ sprintf((char *) mmc_dev.vendor, -+ "Man %02x%02x%02x Snr %02x%02x%02x", -+ cid->id[0], cid->id[1], cid->id[2], -+ cid->sn[0], cid->sn[1], cid->sn[2]); -+ sprintf((char *) mmc_dev.product, "%s", cid->name); -+ sprintf((char *) mmc_dev.revision, "%x %x", cid->hwrev, cid->fwrev); -+ } -+ -+ /* fill in device description */ -+ mmc_dev.if_type = IF_TYPE_MMC; -+ mmc_dev.part_type = PART_TYPE_DOS; -+ mmc_dev.dev = 0; -+ mmc_dev.lun = 0; -+ mmc_dev.type = 0; -+ -+ /* FIXME fill in the correct size (is set to 128MByte) */ -+ mmc_dev.blksz = MMC_BLOCK_SIZE; -+ mmc_dev.lba = 0x10000; -+ -+ mmc_dev.removable = 0; -+ mmc_dev.block_read = (unsigned long) mv_mmc_bread; -+ -+ /* MMC exists, get CSD too */ -+ resp = mv_mmc_cmd(MMC_CMD_SET_RCA, 0, 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ if (resp == NULL) { -+ pr_debug ("set rca fails\n"); -+ -+ return -ENODEV; -+ } -+ pr_debug("cmd3 resp : 0x%08x 0x%08x 0x%08x 0x%08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3]); -+ -+ -+ if (is_sd) -+ rca = resp[0] >> 16; -+ else -+ rca = 0; -+ -+ resp = mv_mmc_cmd(MMC_CMD_SEND_CSD, rca<<16, 0, SDIO_CMD_RSP_136,SDIO_NOR_CMD_DONE ); -+ pr_debug("cmd 9 resp : %08x %08x %08x %08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3] ); -+ -+ if (resp == NULL) { -+ pr_debug ("read csd fails\n"); -+ -+ return -ENODEV; -+ } -+ -+ memcpy(&mv_mmc_csd, (mv_mmc_csd_t *) resp, sizeof(mv_mmc_csd_t)); -+ rc = 0; -+ mmc_ready = 1; -+ -+ /* FIXME add verbose printout for csd */ -+ pr_debug ("size = %u\n", mv_mmc_size(&mv_mmc_csd)); -+ -+ -+ resp = mv_mmc_cmd(7, rca<<16, 0, SDIO_CMD_RSP_48BUSY, SDIO_NOR_CMD_DONE); -+ if (resp == NULL) { -+ pr_debug ("select card fails\n"); -+ -+ return -ENODEV; -+ } -+ pr_debug("cmd 7 resp : %08x %08x %08x %08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3] ); -+ -+ -+ if (is_sd) { -+ resp = mv_mmc_cmd(55, rca<<16, 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ if (resp == NULL) { -+ pr_debug ("cmd55 fails\n"); -+ -+ return -ENODEV; -+ } -+ pr_debug("cmd55 resp : 0x%08x 0x%08x 0x%08x 0x%08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3]); -+ -+ -+ resp = mv_mmc_cmd(6, (rca<<16) | 0x2 , 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ if (resp == NULL) { -+ pr_debug ("cmd55 fails\n"); -+ -+ return -ENODEV; -+ } -+ pr_debug("cmd6 resp : 0x%08x 0x%08x 0x%08x 0x%08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3]); -+ -+ } -+ -+ resp = (ulong *) &mv_mmc_csd; -+ pr_debug("csd: 0x%08x 0x%08x 0x%08x 0x%08x\n", -+ (unsigned int)resp[0], (unsigned int)resp[1], (unsigned int)resp[2], (unsigned int)resp[3]); -+ -+ -+ /* check SDHC */ -+ if ((resp[0]&0xf0000000)==0x40000000) -+ is_sdhc = 1; -+ -+ /* set block len */ -+ resp = mv_mmc_cmd(MMC_CMD_SET_BLOCKLEN, MMC_BLOCK_SIZE, 0, SDIO_CMD_RSP_48, SDIO_NOR_CMD_DONE ); -+ if (!resp) { -+ pr_debug("mv_mmc_block_read: set blk len fails\n"); -+ return -ENODEV; -+ } -+ -+ if (verbose) { -+ if (is_sd) -+ print_sd_cid((mv_sd_cid_t *) cidbuf); -+ else -+ print_mmc_cid((mv_mmc_cid_t *) cidbuf); -+ } -+ -+ mvsdio_set_clock(CONFIG_SYS_MMC_CLK_PP); -+ -+ fat_register_device(&mmc_dev,1); /* partitions start counting with 1 */ -+ -+ return 0; -+} -+ -+#endif /* CONFIG_MMC */ -diff --git a/drivers/mmc/mv_sdio.h b/drivers/mmc/mv_sdio.h -new file mode 100644 -index 0000000..9707000 ---- /dev/null -+++ b/drivers/mmc/mv_sdio.h -@@ -0,0 +1,310 @@ -+/* -+ * (C) Copyright 2009 -+ * Marvell Semiconductor -+ * Written-by: Gérald Kerma -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -+ * MA 02110-1301 USA -+ */ -+ -+#ifndef _MVSDIO_INCLUDE -+#define _MVSDIO_INCLUDE -+ -+//#define SDIO_REG(x) (MV_SDIO_BASE + (x)) -+ -+#define MVSDMMC_DMA_SIZE 65536 -+#define MVSDMMC_CMD_TIMEOUT 2 /* 100 usec*/ -+ -+/* -+ * Clock rates -+ */ -+ -+#define MVSD_CLOCKRATE_MAX 50000000 -+#define MVSD_BASE_DIV_MAX 0x7ff -+ -+#define CONFIG_SYS_MMC_CLK_PP 25000000 -+ -+/* -+ * The base MMC clock rate -+ */ -+ -+#define MVSDMMC_CLOCKRATE_MIN 100000 -+#define MVSDMMC_CLOCKRATE_MAX MVSD_CLOCKRATE_MAX -+#define MVSDMMC_BASE_FAST_CLOCK CONFIG_SYS_TCLK -+ -+ -+/* -+ * SDIO register -+ */ -+#ifndef __ASSEMBLY__ -+ -+/* -+ * Structure for struct SoC access. -+ * Names starting with '_' are fillers. -+ */ -+typedef struct mv_sdio { -+ /* reg Offset */ -+ u32 SYS_ADDR_LOW; /* 0x00 */ -+ u32 SYS_ADDR_HI; /* 0x04 */ -+ u32 BLK_SIZE; /* 0x08 */ -+ u32 BLK_COUNT; /* 0x0c */ -+ u32 ARG_LOW; /* 0x10 */ -+ u32 ARG_HI; /* 0x14 */ -+ u32 XFER_MODE; /* 0x18 */ -+ u32 CMD; /* 0x1c */ -+ u32 RSP0; /* 0x20 */ -+ u32 RSP1; /* 0x24 */ -+ u32 RSP2; /* 0x28 */ -+ u32 RSP3; /* 0x2c */ -+ u32 RSP4; /* 0x30 */ -+ u32 RSP5; /* 0x34 */ -+ u32 RSP6; /* 0x38 */ -+ u32 RSP7; /* 0x3c */ -+ u32 BUF_DATA_PORT; /* 0x40 */ -+ u32 RSVED; /* 0x44 */ -+ u32 PRESENT_STATE0; /* 0x48 */ -+ u32 PRESENT_STATE1; /* 0x4c */ -+ u32 HOST_CTRL; /* 0x50 */ -+ u32 BLK_GAP_CTRL; /* 0x54 */ -+ u32 CLK_CTRL; /* 0x58 */ -+ u32 SW_RESET; /* 0x5c */ -+ u32 NOR_INTR_STATUS; /* 0x60 */ -+ u32 ERR_INTR_STATUS; /* 0x64 */ -+ u32 NOR_STATUS_EN; /* 0x68 */ -+ u32 ERR_STATUS_EN; /* 0x6c */ -+ u32 NOR_INTR_EN; /* 0x70 */ -+ u32 ERR_INTR_EN; /* 0x74 */ -+ u32 AUTOCMD12_ERR_STATUS; /* 0x78 */ -+ u32 CURR_BYTE_LEFT; /* 0x7c */ -+ u32 CURR_BLK_LEFT; /* 0x80 */ -+ u32 AUTOCMD12_ARG_LOW; /* 0x84 */ -+ u32 AUTOCMD12_ARG_HI; /* 0x88 */ -+ u32 AUTOCMD12_INDEX; /* 0x8c */ -+ u32 AUTO_RSP0; /* 0x90 */ -+ u32 AUTO_RSP1; /* 0x94 */ -+ u32 AUTO_RSP2; /* 0x98 */ -+ u32 _9c; /* 0x9c */ -+ u32 _a0[0x78]; /* 0xa0 */ -+ u32 CLK_DIV; /* 0x128 */ -+ -+} mv_sdio_t; -+ -+#endif /* __ASSEMBLY__ */ -+ -+/* -+ * SDIO_PRESENT_STATE -+ */ -+ -+#define CARD_BUSY (1 << 1) -+#define CMD_INHIBIT (1 << 0) -+#define CMD_TXACTIVE (1 << 8) -+#define CMD_RXACTIVE (1 << 9) -+#define CMD_AUTOCMD12ACTIVE (1 << 14) -+ -+#define CMD_BUS_BUSY (CMD_AUTOCMD12ACTIVE| \ -+ CMD_RXACTIVE| \ -+ CMD_TXACTIVE| \ -+ CMD_INHIBIT| \ -+ CARD_BUSY) -+ -+/* -+ * SDIO_CMD -+ */ -+ -+#define SDIO_CMD_RSP_NONE (0 << 0) -+#define SDIO_CMD_RSP_136 (1 << 0) -+#define SDIO_CMD_RSP_48 (2 << 0) -+#define SDIO_CMD_RSP_48BUSY (3 << 0) -+ -+#define SDIO_CMD_CHECK_DATACRC16 (1 << 2) -+#define SDIO_CMD_CHECK_CMDCRC (1 << 3) -+#define SDIO_CMD_INDX_CHECK (1 << 4) -+#define SDIO_CMD_DATA_PRESENT (1 << 5) -+#define SDIO_UNEXPECTED_RESP (1 << 7) -+ -+ -+/* -+ * SDIO_XFER_MODE -+ */ -+ -+#define SDIO_XFER_MODE_STOP_CLK (1 << 5) -+#define SDIO_XFER_MODE_HW_WR_DATA_EN (1 << 1) -+#define SDIO_XFER_MODE_AUTO_CMD12 (1 << 2) -+#define SDIO_XFER_MODE_INT_CHK_EN (1 << 3) -+#define SDIO_XFER_MODE_TO_HOST (1 << 4) -+ -+ -+/* -+ * SDIO_HOST_CTRL -+ */ -+ -+#define SDIO_HOST_CTRL_PUSH_PULL_EN (1 << 0) -+ -+#define SDIO_HOST_CTRL_CARD_TYPE_MEM_ONLY (0 << 1) -+#define SDIO_HOST_CTRL_CARD_TYPE_IO_ONLY (1 << 1) -+#define SDIO_HOST_CTRL_CARD_TYPE_IO_MEM_COMBO (2 << 1) -+#define SDIO_HOST_CTRL_CARD_TYPE_IO_MMC (3 << 1) -+#define SDIO_HOST_CTRL_CARD_TYPE_MASK (3 << 1) -+ -+#define SDIO_HOST_CTRL_BIG_ENDIAN (1 << 3) -+#define SDIO_HOST_CTRL_LSB_FIRST (1 << 4) -+#define SDIO_HOST_CTRL_ID_MODE_LOW_FREQ (1 << 5) -+#define SDIO_HOST_CTRL_HALF_SPEED (1 << 6) -+#define SDIO_HOST_CTRL_DATA_WIDTH_4_BITS (1 << 9) -+#define SDIO_HOST_CTRL_HI_SPEED_EN (1 << 10) -+ -+ -+#define SDIO_HOST_CTRL_TMOUT_MASK (0xf << 11) -+#define SDIO_HOST_CTRL_TMOUT_MAX (0xf << 11) -+#define SDIO_HOST_CTRL_TMOUT(x) ((x) << 11) -+#define SDIO_HOST_CTRL_TMOUT_EN (1 << 15) -+ -+#define SDIO_HOST_CTRL_DFAULT_OPEN_DRAIN \ -+ (SDIO_HOST_CTRL_TMOUT(x)(0xf)) -+#define SDIO_HOST_CTRL_DFAULT_PUSH_PULL \ -+ (SDIO_HOST_CTRL_TMOUT(x)(0xf) | SDIO_HOST_CTRL_PUSH_PULL_EN) -+ -+ -+/* -+ * NOR status bits -+ */ -+ -+#define SDIO_NOR_ERROR (1 << 15) -+#define SDIO_NOR_UNEXP_RSP (1 << 14) -+#define SDIO_NOR_AUTOCMD12_DONE (1 << 13) -+#define SDIO_NOR_SUSPEND_ON (1 << 12) -+#define SDIO_NOR_LMB_FF_8W_AVAIL (1 << 11) -+#define SDIO_NOR_LMB_FF_8W_FILLED (1 << 10) -+#define SDIO_NOR_READ_WAIT_ON (1 << 9) -+#define SDIO_NOR_CARD_INT (1 << 8) -+#define SDIO_NOR_READ_READY (1 << 5) -+#define SDIO_NOR_WRITE_READY (1 << 4) -+#define SDIO_NOR_DMA_INI (1 << 3) -+#define SDIO_NOR_BLK_GAP_EVT (1 << 2) -+#define SDIO_NOR_XFER_DONE (1 << 1) -+#define SDIO_NOR_CMD_DONE (1 << 0) -+ -+ -+/* -+ * ERR status bits -+ */ -+ -+#define SDIO_ERR_CRC_STATUS (1 << 14) -+#define SDIO_ERR_CRC_STARTBIT (1 << 13) -+#define SDIO_ERR_CRC_ENDBIT (1 << 12) -+#define SDIO_ERR_RESP_TBIT (1 << 11) -+#define SDIO_ERR_SIZE (1 << 10) -+#define SDIO_ERR_CMD_STARTBIT (1 << 9) -+#define SDIO_ERR_AUTOCMD12 (1 << 8) -+#define SDIO_ERR_DATA_ENDBIT (1 << 6) -+#define SDIO_ERR_DATA_CRC (1 << 5) -+#define SDIO_ERR_DATA_TIMEOUT (1 << 4) -+#define SDIO_ERR_CMD_INDEX (1 << 3) -+#define SDIO_ERR_CMD_ENDBIT (1 << 2) -+#define SDIO_ERR_CMD_CRC (1 << 1) -+#define SDIO_ERR_CMD_TIMEOUT (1 << 0) -+ -+#define SDIO_ERR_INTR_MASK 0xFFFF -+ -+ -+#define MMC_BLOCK_SIZE 512 -+#define MMC_CMD_RESET 0 -+#define MMC_CMD_SEND_OP_COND 1 -+#define MMC_CMD_ALL_SEND_CID 2 -+#define MMC_CMD_SET_RCA 3 -+#define MMC_CMD_SELECT_CARD 7 -+#define MMC_CMD_SEND_CSD 9 -+#define MMC_CMD_SEND_CID 10 -+#define MMC_CMD_SEND_STATUS 13 -+#define MMC_CMD_SET_BLOCKLEN 16 -+#define MMC_CMD_READ_BLOCK 17 -+#define MMC_CMD_RD_BLK_MULTI 18 -+#define MMC_CMD_WRITE_BLOCK 24 -+#define MMC_MAX_BLOCK_SIZE 512 -+ -+typedef struct mv_mmc_cid -+{ -+ /* FIXME: BYTE_ORDER */ -+ uchar year:4, -+ month:4; -+ uchar sn[3]; -+ uchar fwrev:4, -+ hwrev:4; -+ uchar name[6]; -+ uchar id[3]; -+} mv_mmc_cid_t; -+ -+typedef struct mv_mmc_csd -+{ -+ uchar ecc:2, -+ file_format:2, -+ tmp_write_protect:1, -+ perm_write_protect:1, -+ copy:1, -+ file_format_grp:1; -+ uint64_t content_prot_app:1, -+ rsvd3:4, -+ write_bl_partial:1, -+ write_bl_len:4, -+ r2w_factor:3, -+ default_ecc:2, -+ wp_grp_enable:1, -+ wp_grp_size:5, -+ erase_grp_mult:5, -+ erase_grp_size:5, -+ c_size_mult1:3, -+ vdd_w_curr_max:3, -+ vdd_w_curr_min:3, -+ vdd_r_curr_max:3, -+ vdd_r_curr_min:3, -+ c_size:12, -+ rsvd2:2, -+ dsr_imp:1, -+ read_blk_misalign:1, -+ write_blk_misalign:1, -+ read_bl_partial:1; -+ ushort read_bl_len:4, -+ ccc:12; -+ uchar tran_speed; -+ uchar nsac; -+ uchar taac; -+ uchar rsvd1:2, -+ spec_vers:4, -+ csd_structure:2; -+} mv_mmc_csd_t; -+ -+typedef struct { -+ char pnm_0; /* product name */ -+ char oid_1; /* OEM/application ID */ -+ char oid_0; -+ uint8_t mid; /* manufacturer ID */ -+ char pnm_4; -+ char pnm_3; -+ char pnm_2; -+ char pnm_1; -+ uint8_t psn_2; /* product serial number */ -+ uint8_t psn_1; -+ uint8_t psn_0; /* MSB */ -+ uint8_t prv; /* product revision */ -+ uint8_t crc; /* CRC7 checksum, b0 is unused and set to 1 */ -+ uint8_t mdt_1; /* manufacturing date, LSB, RRRRyyyy yyyymmmm */ -+ uint8_t mdt_0; /* MSB */ -+ uint8_t psn_3; /* LSB */ -+} mv_sd_cid_t; -+ -+#endif /* _MVSDIO_INCLUDE */ -diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h -index 83dd8ff..7c8497c 100644 ---- a/include/configs/sheevaplug.h -+++ b/include/configs/sheevaplug.h -@@ -1,3 +1,4 @@ -+ - /* - * (C) Copyright 2009 - * Marvell Semiconductor -@@ -47,7 +48,9 @@ - #define CONFIG_CMD_DHCP - #define CONFIG_CMD_ENV - #define CONFIG_CMD_MII -+#define CONFIG_CMD_MMC - #define CONFIG_CMD_NAND -+#define CONFIG_JFFS2_NAND - #define CONFIG_CMD_PING - #define CONFIG_CMD_USB - /* -@@ -70,8 +73,8 @@ - * it has to be rounded to sector size - */ - #define CONFIG_ENV_SIZE 0x20000 /* 128k */ --#define CONFIG_ENV_ADDR 0x60000 --#define CONFIG_ENV_OFFSET 0x60000 /* env starts here */ -+#define CONFIG_ENV_ADDR 0xa0000 -+#define CONFIG_ENV_OFFSET 0xa0000 /* env starts here */ - - /* - * Default environment variables -@@ -81,10 +84,11 @@ - "${x_bootcmd_usb}; bootm 0x6400000;" - - #define CONFIG_MTDPARTS "orion_nand:512k(uboot)," \ -- "3m@1m(kernel),1m@4m(psm),13m@5m(rootfs) rw\0" -+ "0x1ff00000@512k(rootfs) rw\0" - - #define CONFIG_EXTRA_ENV_SETTINGS "x_bootargs=console" \ - "=ttyS0,115200 mtdparts="CONFIG_MTDPARTS \ -+ "mtdids=nand0=orion_nand\0" \ - "x_bootcmd_kernel=nand read 0x6400000 0x100000 0x300000\0" \ - "x_bootcmd_usb=usb start\0" \ - "x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2\0" diff --git a/pkgs/misc/uboot/vexpress-Use-config_distro_bootcmd.patch b/pkgs/misc/uboot/vexpress-Use-config_distro_bootcmd.patch new file mode 100644 index 00000000000..9c61847f02e --- /dev/null +++ b/pkgs/misc/uboot/vexpress-Use-config_distro_bootcmd.patch @@ -0,0 +1,141 @@ +From 53a8612ff19f360363edaaf70137968f7fd6a1cd Mon Sep 17 00:00:00 2001 +From: Tuomas Tynkkynen +Date: Mon, 8 Jun 2015 22:29:23 +0300 +Subject: [PATCH] vexpress: Use config_distro_bootcmd + +Also had to hack cli_readline.c, as one codepath in +cli_readline_into_buffer doesn't respect the timeout. +--- + common/cli_readline.c | 12 +++++++++++- + include/configs/vexpress_ca9x4.h | 1 - + include/configs/vexpress_common.h | 35 +++++++++++++++++++++++------------ + 3 files changed, 34 insertions(+), 14 deletions(-) + +diff --git a/common/cli_readline.c b/common/cli_readline.c +index 9a9fb35..ca997a9 100644 +--- a/common/cli_readline.c ++++ b/common/cli_readline.c +@@ -517,6 +517,7 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer, + int plen = 0; /* prompt length */ + int col; /* output column cnt */ + char c; ++ int first = 1; + + /* print prompt */ + if (prompt) { +@@ -528,7 +529,16 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer, + for (;;) { + if (bootretry_tstc_timeout()) + return -2; /* timed out */ +- WATCHDOG_RESET(); /* Trigger watchdog, if needed */ ++ if (first && timeout) { ++ uint64_t etime = endtick(timeout); ++ ++ while (!tstc()) { /* while no incoming data */ ++ if (get_ticks() >= etime) ++ return -2; /* timed out */ ++ WATCHDOG_RESET(); ++ } ++ first = 0; ++ } + + #ifdef CONFIG_SHOW_ACTIVITY + while (!tstc()) { +diff --git a/include/configs/vexpress_ca9x4.h b/include/configs/vexpress_ca9x4.h +index 38ac4ed..993398c 100644 +--- a/include/configs/vexpress_ca9x4.h ++++ b/include/configs/vexpress_ca9x4.h +@@ -13,6 +13,5 @@ + + #define CONFIG_VEXPRESS_ORIGINAL_MEMORY_MAP + #include "vexpress_common.h" +-#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7.vexpress_ca9x4" + + #endif /* VEXPRESS_CA9X4_H */ +diff --git a/include/configs/vexpress_common.h b/include/configs/vexpress_common.h +index db78c85..1dd069b 100644 +--- a/include/configs/vexpress_common.h ++++ b/include/configs/vexpress_common.h +@@ -123,7 +123,6 @@ + #define CONFIG_SYS_L2CACHE_OFF 1 + #define CONFIG_INITRD_TAG 1 + #define CONFIG_SYS_GENERIC_BOARD +-#define CONFIG_OF_LIBFDT 1 + + /* Size of malloc() pool */ + #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128 * 1024) +@@ -152,6 +151,8 @@ + #define CONFIG_SYS_SERIAL0 V2M_UART0 + #define CONFIG_SYS_SERIAL1 V2M_UART1 + ++#include ++#include + /* Command line configuration */ + #define CONFIG_CMD_BDI + #define CONFIG_CMD_DHCP +@@ -169,7 +170,6 @@ + #define CONFIG_SUPPORT_RAW_INITRD + + #define CONFIG_CMD_FAT +-#define CONFIG_DOS_PARTITION 1 + #define CONFIG_MMC 1 + #define CONFIG_CMD_MMC + #define CONFIG_GENERIC_MMC +@@ -207,17 +207,28 @@ + GENERATED_GBL_DATA_SIZE) + #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET + ++#define BOOT_TARGET_DEVICES(func) \ ++ func(MMC, mmc, 0) ++#include ++ + /* Basic environment settings */ +-#define CONFIG_BOOTCOMMAND "run bootflash;" + #ifdef CONFIG_VEXPRESS_ORIGINAL_MEMORY_MAP ++/* ++ * RAM starts at 0x6000_0000 ++ * - U-Boot loaded @ 8M ++ * - Kernel loaded @ 32M ++ * - Initrd loaded @ 128M ++ * - DTB loaded @ 240M ++ */ + #define CONFIG_PLATFORM_ENV_SETTINGS \ +- "loadaddr=0x80008000\0" \ +- "ramdisk_addr_r=0x61000000\0" \ +- "kernel_addr=0x44100000\0" \ +- "ramdisk_addr=0x44800000\0" \ +- "maxramdisk=0x1800000\0" \ +- "pxefile_addr_r=0x88000000\0" \ +- "kernel_addr_r=0x80008000\0" ++ "fdtfile=vexpress-v2p-ca9.dtb\0" \ ++ "kernel_addr_r=0x62000000\0" \ ++ "ramdisk_addr_r=0x68000000\0" \ ++ "maxramdisk=0x06000000\0" \ ++ "fdt_addr_r=0x6f000000\0" \ ++ "loadaddr=0x70000000\0" \ ++ "pxefile_addr_r=0x71000000\0" \ ++ "scriptaddr=0x72000000\0" + #elif defined(CONFIG_VEXPRESS_EXTENDED_MEMORY_MAP) + #define CONFIG_PLATFORM_ENV_SETTINGS \ + "loadaddr=0xa0008000\0" \ +@@ -240,7 +251,8 @@ + "devtmpfs.mount=0 vmalloc=256M\0" \ + "bootflash=run flashargs; " \ + "cp ${ramdisk_addr} ${ramdisk_addr_r} ${maxramdisk}; " \ +- "bootm ${kernel_addr} ${ramdisk_addr_r}\0" ++ "bootm ${kernel_addr} ${ramdisk_addr_r}\0" \ ++ BOOTENV + + /* FLASH and environment organization */ + #define PHYS_FLASH_SIZE 0x04000000 /* 64MB */ +@@ -294,7 +306,6 @@ + #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot args buffer */ + #define CONFIG_CMD_SOURCE + #define CONFIG_SYS_LONGHELP +-#define CONFIG_CMDLINE_EDITING 1 + #define CONFIG_SYS_MAXARGS 16 /* max command args */ + + #endif /* VEXPRESS_COMMON_H */ +-- +2.4.4 + diff --git a/pkgs/os-specific/linux/edac-utils/default.nix b/pkgs/os-specific/linux/edac-utils/default.nix index 0a2f38ffd8a..b24099f9599 100644 --- a/pkgs/os-specific/linux/edac-utils/default.nix +++ b/pkgs/os-specific/linux/edac-utils/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation { meta = with stdenv.lib; { homepage = http://github.com/grondo/edac-utils; - description = "handles the reporting of hardware-related memory errors."; + description = "Handles the reporting of hardware-related memory errors"; license = licenses.gpl2; platforms = platforms.linux; maintainers = with maintainers; [ wkennington ]; diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix index 01e5e941118..42b90a48097 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, ... } @ args: import ./generic.nix (args // rec { - version = "3.10.81"; + version = "3.10.82"; extraMeta.branch = "3.10"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "0hza9wsy9x2113crlwygl06lspwlahq09nifnmdacfkqcxp4r3ng"; + sha256 = "177rzyd9mxvbacy242abk7annhlm48rbdspr78y5qqsqsgihh88y"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-3.14.nix b/pkgs/os-specific/linux/kernel/linux-3.14.nix index e6e7f4130a7..103fbcbcfb9 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.14.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, ... } @ args: import ./generic.nix (args // rec { - version = "3.14.45"; + version = "3.14.46"; # Remember to update grsecurity! extraMeta.branch = "3.14"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "0jfbwl0daba41cwkn67rk7an9g6cbljxq8wlwnr321mfnd3mnx4c"; + sha256 = "1ran8fi1ldc89x3gpxwkkfl64mln4sl0rq5bbl8imlca5nljmzkb"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-3.18.nix b/pkgs/os-specific/linux/kernel/linux-3.18.nix index 168bfe5e94c..843172581cc 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.18.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.18.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, ... } @ args: import ./generic.nix (args // rec { - version = "3.18.16"; + version = "3.18.17"; extraMeta.branch = "3.18"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "0c2530amgsk29ina9mfvlncki64w0zs16d2k8bghq3fv9k2qv3nr"; + sha256 = "08512kqvy91jh26jld2h3d9xq3wsfbyylzawjgn75x4r5li6y5ha"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-4.0.nix b/pkgs/os-specific/linux/kernel/linux-4.0.nix index 89cd34182cf..3ea4257a1e9 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.0.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.0.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, ... } @ args: import ./generic.nix (args // rec { - version = "4.0.6"; + version = "4.0.7"; # Remember to update grsecurity! extraMeta.branch = "4.0"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0n0w2k52m3cn286f413jmzwffyk3g28y4n7d41wc93zvgm720lr9"; + sha256 = "01c68w6lygzjzllv7xgnd1hm3339rs0fvd8q26n6bdfa95aj554m"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-4.1.nix b/pkgs/os-specific/linux/kernel/linux-4.1.nix index baee61940cd..5d9a026f614 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.1.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.1.nix @@ -1,13 +1,12 @@ { stdenv, fetchurl, ... } @ args: import ./generic.nix (args // rec { - version = "4.1"; - modDirVersion = "4.1.0"; + version = "4.1.1"; extraMeta.branch = "4.1"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "17rdly75zh49m6r32yy03xappl7ajcqbznq09pm1q7mcb841zxfa"; + sha256 = "12bfih081cbqlgmgq1fqdvvpxga5saj4kkvhawsl4fpg4mybrml8"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index af63b0a5f55..ed202d77b38 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -65,17 +65,17 @@ rec { }; grsecurity_stable = grsecPatch - { kversion = "3.14.45"; - revision = "201506232103"; + { kversion = "3.14.46"; + revision = "201506300711"; branch = "stable"; - sha256 = "1f4fm7r6pbspdw9l1d1mrjj1jpyh0l2vlq1lnqs54v3xzwr933py"; + sha256 = "0xjqh7yc4vzgbnql16aylla9b0cjh442sywp8bvkh0ny5m3rj64l"; }; grsecurity_unstable = grsecPatch - { kversion = "4.0.6"; - revision = "201506232104"; + { kversion = "4.0.7"; + revision = "201506300712"; branch = "test"; - sha256 = "0him41fm0hw857ibvfmvpsrk2a8x492d4cy4hlbqyfk35rcmpfdf"; + sha256 = "0rw0wx5nc244m2q7f9y832mmkv8gb8yv1rn1w2pyq8brckiswni7"; }; grsec_fix_path = diff --git a/pkgs/servers/monitoring/prometheus/prom2json/default.nix b/pkgs/servers/monitoring/prometheus/prom2json/default.nix index 95457758cd2..368ea3ae214 100644 --- a/pkgs/servers/monitoring/prometheus/prom2json/default.nix +++ b/pkgs/servers/monitoring/prometheus/prom2json/default.nix @@ -19,7 +19,7 @@ goPackages.buildGoPackage rec { ]; meta = with lib; { - description = "A tool to scrape a Prometheus client and dump the result as JSON."; + description = "A tool to scrape a Prometheus client and dump the result as JSON"; homepage = https://github.com/prometheus/prom2json; license = licenses.asl20; maintainers = with maintainers; [ benley ]; diff --git a/pkgs/servers/nosql/eventstore/default.nix b/pkgs/servers/nosql/eventstore/default.nix index fd83ba889b9..9cb5dd41c1c 100644 --- a/pkgs/servers/nosql/eventstore/default.nix +++ b/pkgs/servers/nosql/eventstore/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { meta = { homepage = https://geteventstore.com/; - description = "Event sourcing database with processing logic in JavaScript."; + description = "Event sourcing database with processing logic in JavaScript"; license = stdenv.lib.licenses.bsd3; maintainers = with stdenv.lib.maintainers; [ puffnfresh ]; platforms = with stdenv.lib.platforms; linux; diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index 50918dfc4ab..a31846c54aa 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -61,11 +61,13 @@ stdenv.mkDerivation rec { "--enable-fhs" "--sysconfdir=/etc" "--localstatedir=/var" - "--bundled-libraries=${if enableKerberos && kerberos.implementation == "heimdal" then "NONE" else "com_err"}" + "--bundled-libraries=${if enableKerberos && kerberos != null && + kerberos.implementation == "heimdal" then "NONE" else "com_err"}" "--private-libraries=NONE" "--builtin-libraries=replace" ] - ++ optional (enableKerberos && kerberos.implementation == "krb5") "--with-system-mitkrb5" + ++ optional (enableKerberos && kerberos != null && + kerberos.implementation == "krb5") "--with-system-mitkrb5" ++ optional (!enableDomainController) "--without-ad-dc" ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ]; diff --git a/pkgs/servers/shellinabox/default.nix b/pkgs/servers/shellinabox/default.nix index 2d827c737d8..5d870c7e6bd 100644 --- a/pkgs/servers/shellinabox/default.nix +++ b/pkgs/servers/shellinabox/default.nix @@ -1,29 +1,38 @@ -{ stdenv, fetchurl, pam, openssl, openssh, shadow }: +{ stdenv, fetchurl, pam, openssl, openssh, shadow, makeWrapper }: -stdenv.mkDerivation { - name = "shellinabox-2.14"; +stdenv.mkDerivation rec { + version = "2.14"; + name = "shellinabox-${version}"; src = fetchurl { - url = "https://shellinabox.googlecode.com/files/shellinabox-2.14.tar.gz"; + url = "https://shellinabox.googlecode.com/files/shellinabox-${version}.tar.gz"; sha1 = "9e01f58c68cb53211b83d0f02e676e0d50deb781"; }; - buildInputs = [pam openssl openssh]; + buildInputs = [ pam openssl openssh makeWrapper ]; patches = [ ./shellinabox-minus.patch ]; - # Disable GSSAPIAuthentication errors as well as correct hardcoded path. Take /usr/games's place. + # Disable GSSAPIAuthentication errors. Also, paths in certain source files are + # hardcoded. Replace the hardcoded paths with correct paths. preConfigure = '' substituteInPlace ./shellinabox/service.c --replace "-oGSSAPIAuthentication=no" "" substituteInPlace ./shellinabox/launcher.c --replace "/usr/games" "${openssh}/bin" substituteInPlace ./shellinabox/service.c --replace "/bin/login" "${shadow}/bin/login" substituteInPlace ./shellinabox/launcher.c --replace "/bin/login" "${shadow}/bin/login" - ''; - meta = { + substituteInPlace ./libhttp/ssl.c --replace "/usr/bin" "${openssl}/bin" + ''; + + postInstall = '' + wrapProgram $out/bin/shellinaboxd \ + --prefix LD_LIBRARY_PATH : ${openssl}/lib + ''; + + meta = with stdenv.lib; { homepage = https://code.google.com/p/shellinabox; description = "Web based AJAX terminal emulator"; - license = stdenv.lib.licenses.gpl2; - maintainers = [stdenv.lib.maintainers.tomberek]; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2; + maintainers = with maintainers; [ tomberek lihop ]; + platforms = platforms.linux; }; } diff --git a/pkgs/servers/sql/postgresql/9.4.x.nix b/pkgs/servers/sql/postgresql/9.4.x.nix index 5c795329b2d..cdb689fc110 100644 --- a/pkgs/servers/sql/postgresql/9.4.x.nix +++ b/pkgs/servers/sql/postgresql/9.4.x.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { makeFlags = [ "world" ]; configureFlags = [ "--with-openssl" ] + ++ optional (stdenv.isDarwin) "--with-uuid=e2fs" ++ optional (!stdenv.isDarwin) "--with-ossp-uuid"; patches = [ ./disable-resolve_symlinks-94.patch ./less-is-more.patch ]; diff --git a/pkgs/servers/tvheadend/default.nix b/pkgs/servers/tvheadend/default.nix index 7eb2c527406..c7b4e515317 100644 --- a/pkgs/servers/tvheadend/default.nix +++ b/pkgs/servers/tvheadend/default.nix @@ -1,4 +1,5 @@ -{avahi, dbus, fetchurl, git, gzip, libav, libiconv, openssl, pkgconfig, python, stdenv, which, zlib}: +{avahi, dbus, fetchurl, git, gzip, libav, libiconv, openssl, pkgconfig, python +, stdenv, which, zlib}: let version = "4.0.4"; pkgName = "tvheadend"; in @@ -13,7 +14,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - buildInputs = [ avahi dbus git gzip libav libiconv openssl pkgconfig python which zlib]; + configureFlags = [ "--disable-dvbscan" ]; + + buildInputs = [ avahi dbus git gzip libav libiconv openssl pkgconfig python + which zlib ]; preConfigure = "patchShebangs ./configure"; diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix index f90de89adbd..4e42cc0e5e6 100644 --- a/pkgs/tools/X11/xdg-utils/default.nix +++ b/pkgs/tools/X11/xdg-utils/default.nix @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { for item in $out/bin/*; do substituteInPlace $item --replace "cut " "${coreutils}/bin/cut " substituteInPlace $item --replace "sed " "${gnused}/bin/sed " - substituteInPlace $item --replace "grep " "${gnugrep}/bin/grep " substituteInPlace $item --replace "egrep " "${gnugrep}/bin/egrep " + sed -i $item -e "s#[^e]grep #${gnugrep}/bin/grep #g" # Don't replace 'egrep' substituteInPlace $item --replace "which " "${which}/bin/which " substituteInPlace $item --replace "/usr/bin/file" "${file}/bin/file" done diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix index be0053c2165..57f0327fa1e 100644 --- a/pkgs/tools/compression/lz4/default.nix +++ b/pkgs/tools/compression/lz4/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchFromGitHub, valgrind }: -let version = "130"; in +let version = "131"; in stdenv.mkDerivation rec { name = "lz4-${version}"; src = fetchFromGitHub { - sha256 = "1050hwnbqyz2m26vayv942dh92689qp73chrbnqlg8awhlb5kyi5"; + sha256 = "1bhvcq8fxxsqnpg5qa6k3nsyhq0nl0iarh08sqzclww27hlpyay2"; rev = "r${version}"; repo = "lz4"; owner = "Cyan4973"; diff --git a/pkgs/tools/filesystems/btrfsprogs/default.nix b/pkgs/tools/filesystems/btrfsprogs/default.nix index c50367726db..7b29e0a783b 100644 --- a/pkgs/tools/filesystems/btrfsprogs/default.nix +++ b/pkgs/tools/filesystems/btrfsprogs/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo , asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt }: -let version = "4.0.1"; in +let version = "4.1"; in stdenv.mkDerivation (rec { name = "btrfs-progs-${version}"; src = fetchurl { url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz"; - sha256 = "1jwk0bnb4nvhw6b7i9mw5wkvqc6igx99qqg8zwpaj5nxkvki0bic"; + sha256 = "1s5pzvi30mivxgbkx7nbqn38pfiw20rdnd6xiqsyfj7rpffzzimb"; }; buildInputs = [ diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix index 57b36875a51..bfb739fa84a 100644 --- a/pkgs/tools/filesystems/glusterfs/default.nix +++ b/pkgs/tools/filesystems/glusterfs/default.nix @@ -17,11 +17,15 @@ let autoconf automake libtool pkgconfig zlib libaio libxml2 acl sqlite liburcu attr ]; + # Some of the headers reference acl + propagatedBuildInputs = [ + acl + ]; in stdenv.mkDerivation rec { inherit (s) name version; - inherit buildInputs; + inherit buildInputs propagatedBuildInputs; preConfigure = '' ./autogen.sh diff --git a/pkgs/tools/filesystems/reiserfsprogs/default.nix b/pkgs/tools/filesystems/reiserfsprogs/default.nix index 899f9463951..e41318a982c 100644 --- a/pkgs/tools/filesystems/reiserfsprogs/default.nix +++ b/pkgs/tools/filesystems/reiserfsprogs/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { buildInputs = [ libuuid ]; + NIX_CFLAGS_COMPILE = "-std=gnu90"; + meta = { inherit version; homepage = http://www.namesys.com/; diff --git a/pkgs/tools/misc/bmon/default.nix b/pkgs/tools/misc/bmon/default.nix index 4416c3e1625..308232ac2fe 100644 --- a/pkgs/tools/misc/bmon/default.nix +++ b/pkgs/tools/misc/bmon/default.nix @@ -3,18 +3,15 @@ stdenv.mkDerivation rec { name = "bmon-${version}"; - version = "3.6"; + version = "3.7"; src = fetchFromGitHub { owner = "tgraf"; repo = "bmon"; rev = "v${version}"; - sha256 = "16qwazays2j448kmfckv6wvh4rhmhc9q4vp1s75hm9z02cmhvk8q"; + sha256 = "0rh0r8gabcsqq3d659yqk8nz6y4smsi7p1vwa2v584m2l2d0rqd6"; }; - # https://github.com/tgraf/bmon/pull/24#issuecomment-98068887 - postPatch = "sed '1i#include ' -i src/in_netlink.c"; - buildInputs = [ autoconf automake pkgconfig ncurses confuse libnl ]; preConfigure = "sh ./autogen.sh"; diff --git a/pkgs/tools/misc/memtest86+/default.nix b/pkgs/tools/misc/memtest86+/default.nix index dbd5a46e10a..7e382426336 100644 --- a/pkgs/tools/misc/memtest86+/default.nix +++ b/pkgs/tools/misc/memtest86+/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { fi ''; - NIX_CFLAGS_COMPILE = "-I."; + NIX_CFLAGS_COMPILE = "-I. -std=gnu90"; buildFlags = "memtest.bin"; diff --git a/pkgs/tools/misc/screen/default.nix b/pkgs/tools/misc/screen/default.nix index d329106b979..1fe71ae9616 100644 --- a/pkgs/tools/misc/screen/default.nix +++ b/pkgs/tools/misc/screen/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, ncurses, pam ? null }: stdenv.mkDerivation rec { - name = "screen-4.3.0"; + name = "screen-4.3.1"; src = fetchurl { url = "mirror://gnu/screen/${name}.tar.gz"; - sha256 = "0ilccnwszaxr9wbrx0swh4fisha2rj2jiq76fwqikmv0rjdyhr2i"; + sha256 = "0qwxd4axkgvxjigz9xs0kcv6qpfkrzr2gm43w9idx0z2mvw4jh7s"; }; preConfigure = '' diff --git a/pkgs/tools/networking/keepalived/default.nix b/pkgs/tools/networking/keepalived/default.nix new file mode 100644 index 00000000000..bde3a74f8b7 --- /dev/null +++ b/pkgs/tools/networking/keepalived/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, openssl, net_snmp, libnl }: + +stdenv.mkDerivation rec { + name = "keepalived-1.2.18"; + + src = fetchurl { + url = "http://keepalived.org/software/${name}.tar.gz"; + sha256 = "07l1ywg44zj2s3wn9mh6y7qbcc0cgp6q1q39hnm0c5iv5izakkg5"; + }; + + buildInputs = [ openssl net_snmp libnl ]; + + postPatch = '' + sed -i 's,$(DESTDIR)/usr/share,$out/share,g' Makefile.in + ''; + + # It doesn't know about the include/libnl directory + NIX_CFLAGS_COMPILE="-I${libnl}/include/libnl3"; + NIX_LDFLAGS="-lnl-3 -lnl-genl-3"; + + configureFlags = [ + "--sysconfdir=/etc" + "--localstatedir=/var" + "--enable-snmp" + "--enable-sha1" + ]; + + installFlags = [ + "sysconfdir=\${out}/etc" + ]; + + meta = with stdenv.lib; { + homepage = http://keepalived.org; + description = "routing software written in C"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ wkennington ]; + }; +} diff --git a/pkgs/tools/networking/netsniff-ng/default.nix b/pkgs/tools/networking/netsniff-ng/default.nix index cc9b3554515..feeb505b4c5 100644 --- a/pkgs/tools/networking/netsniff-ng/default.nix +++ b/pkgs/tools/networking/netsniff-ng/default.nix @@ -2,7 +2,7 @@ , libnetfilter_conntrack, libnl, libpcap, libsodium, liburcu, ncurses, perl , pkgconfig, zlib }: -let version = "0.5.9-18-g9977ec6"; in +let version = "0.5.9-21-g8c75168"; in stdenv.mkDerivation { name = "netsniff-ng-${version}"; @@ -10,8 +10,8 @@ stdenv.mkDerivation { src = fetchFromGitHub rec { repo = "netsniff-ng"; owner = repo; - rev = "9977ec6012452bfc5053dbc90aed53f55064c86b"; - sha256 = "1ww0pm3v9wphjzfanswx2przps33v26q38alxljigj5cigh8ffms"; + rev = "8c75168ed5005f70955dd4ade93dec6abf481852"; + sha256 = "10awwwmpm555wl1z07pz20cq1lsy37r36m0aamck9ri5vyq6fdzw"; }; buildInputs = [ bison flex geoip geolite-legacy libcli libnet libnl diff --git a/pkgs/tools/networking/tinc/pre.nix b/pkgs/tools/networking/tinc/pre.nix index 2eb003bacb0..f05ffdd6a46 100644 --- a/pkgs/tools/networking/tinc/pre.nix +++ b/pkgs/tools/networking/tinc/pre.nix @@ -1,12 +1,12 @@ { stdenv, fetchgit, autoreconfHook, texinfo, ncurses, readline, zlib, lzo, openssl }: stdenv.mkDerivation rec { - name = "tinc-1.1pre-2015-05-15"; + name = "tinc-1.1pre-2015-06-20"; src = fetchgit { url = "git://tinc-vpn.org/tinc"; - rev = "613c121cdceec0199dc4d056857be021ed1d21de"; - sha256 = "1l99bvqmb35hwb63fcy9gbjxasxnrgqw3i9f14f26dq3sz2j035l"; + rev = "ebffa40aa7832459f63801e3a91cc741e6b339a8"; + sha256 = "0yp40n5cgfadd7lmi28qv7cf5s14qqw5ga76y5xd0fjpacv6akcp"; }; buildInputs = [ autoreconfHook texinfo ncurses readline zlib lzo openssl ]; diff --git a/pkgs/tools/security/signing-party/default.nix b/pkgs/tools/security/signing-party/default.nix index dd05030e712..21e0bb4c4a9 100644 --- a/pkgs/tools/security/signing-party/default.nix +++ b/pkgs/tools/security/signing-party/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { doCheck = false; # no check rule meta = { - description = "PGP Tools is a collection for all kinds of pgp related things, including signing scripts, party preparation scripts etc."; + description = "A collection for all kinds of pgp related things, including signing scripts, party preparation scripts etc"; homepage = http://pgp-tools.alioth.debian.org; platforms = gnupg.meta.platforms; license = stdenv.lib.licenses.gpl2; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index afcda331b49..b213d567aa5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1316,6 +1316,8 @@ let dtach = callPackage ../tools/misc/dtach { }; + dtc = callPackage ../development/compilers/dtc { }; + dub = callPackage ../development/tools/build-managers/dub { }; duff = callPackage ../tools/filesystems/duff { }; @@ -1927,6 +1929,8 @@ let kdbplus = callPackage_i686 ../applications/misc/kdbplus { }; + keepalived = callPackage ../tools/networking/keepalived { }; + kexectools = callPackage ../os-specific/linux/kexectools { }; keybase = callPackage ../applications/misc/keybase { }; @@ -2631,6 +2635,8 @@ let polkit_gnome = callPackage ../tools/security/polkit-gnome { }; + popcorntime = callPackage ../applications/video/popcorntime { }; + ponysay = callPackage ../tools/misc/ponysay { }; povray = callPackage ../tools/graphics/povray { @@ -10038,14 +10044,42 @@ let tunctl = callPackage ../os-specific/linux/tunctl { }; - ubootChooser = name : if name == "upstream" then ubootUpstream - else if name == "sheevaplug" then ubootSheevaplug - else if name == "guruplug" then ubootGuruplug - else if name == "nanonote" then ubootNanonote - else throw "Unknown uboot"; + # TODO(dezgeg): either refactor & use ubootTools directly, or remove completely + ubootChooser = name: ubootTools; - ubootUpstream = callPackage ../misc/uboot { }; + # Upstream U-Boots: + ubootTools = callPackage ../misc/uboot { + toolsOnly = true; + targetPlatforms = lib.platforms.linux; + filesToInstall = ["tools/dumpimage" "tools/mkenvimage" "tools/mkimage"]; + }; + ubootJetsonTK1 = callPackage ../misc/uboot { + defconfig = "jetson-tk1_defconfig"; + targetPlatforms = ["armv7l-linux"]; + filesToInstall = ["u-boot-dtb-tegra.bin"]; + }; + + ubootPcduino3Nano = callPackage ../misc/uboot { + defconfig = "Linksprite_pcDuino3_Nano_defconfig"; + targetPlatforms = ["armv7l-linux"]; + filesToInstall = ["u-boot-sunxi-with-spl.bin"]; + }; + + ubootRaspberryPi = callPackage ../misc/uboot { + defconfig = "rpi_defconfig"; + targetPlatforms = ["armv6l-linux"]; + filesToInstall = ["u-boot.bin"]; + }; + + # Intended only for QEMU's vexpress-a9 emulation target! + ubootVersatileExpressCA9 = callPackage ../misc/uboot { + defconfig = "vexpress_ca9x4_defconfig"; + targetPlatforms = ["armv7l-linux"]; + filesToInstall = ["u-boot"]; + }; + + # Non-upstream U-Boots: ubootSheevaplug = callPackage ../misc/uboot/sheevaplug.nix { }; ubootNanonote = callPackage ../misc/uboot/nanonote.nix { }; @@ -10466,6 +10500,7 @@ let abcde = callPackage ../applications/audio/abcde { inherit (perlPackages) DigestSHA MusicBrainz MusicBrainzDiscID; + inherit (pythonPackages) eyeD3; libcdio = libcdio082; }; @@ -12572,6 +12607,10 @@ let enableXft = true; }; + taffybar = callPackage ../applications/window-managers/taffybar { + inherit (haskellPackages) ghcWithPackages; + }; + tagainijisho = callPackage ../applications/office/tagainijisho {}; tahoelafs = callPackage ../tools/networking/p2p/tahoe-lafs { diff --git a/pkgs/top-level/dotnet-packages.nix b/pkgs/top-level/dotnet-packages.nix index 21b42d1273b..bef3f9c0a01 100644 --- a/pkgs/top-level/dotnet-packages.nix +++ b/pkgs/top-level/dotnet-packages.nix @@ -280,8 +280,13 @@ let self = dotnetPackages // overrides; dotnetPackages = with self; { outputFiles = [ "FSharp.AutoComplete/bin/Release/*" ]; meta = { - description = "This project provides a command-line interface to the FSharp.Compiler.Service project. It is intended to be used as a backend service for rich editing or 'intellisense' features for editors."; - homepage = "https://github.com/fsharp/FSharp.AutoComplete"; + description = "An interface to the FSharp.Compiler.Service project"; + longDescription = '' + This project provides a command-line interface to the + FSharp.Compiler.Service project. It is intended to be used as a backend + service for rich editing or 'intellisense' features for editors. + ''; + homepage = https://github.com/fsharp/FSharp.AutoComplete; license = stdenv.lib.licenses.asl20; maintainers = with stdenv.lib.maintainers; [ obadz ]; platforms = with stdenv.lib.platforms; linux; @@ -498,8 +503,8 @@ let self = dotnetPackages // overrides; dotnetPackages = with self; { dontStrip = true; meta = { - description = "NDesk.Options is a callback-based program option parser for C#."; - homepage = "http://www.ndesk.org/Options"; + description = "A callback-based program option parser for C#"; + homepage = http://www.ndesk.org/Options; license = stdenv.lib.licenses.mit; maintainers = with stdenv.lib.maintainers; [ obadz ]; platforms = with stdenv.lib.platforms; linux; @@ -677,8 +682,8 @@ let self = dotnetPackages // overrides; dotnetPackages = with self; { outputFiles = [ "bin/net40/*" ]; meta = { - description = "A declarative CLI argument/XML configuration parser for F# applications."; - homepage = "http://nessos.github.io/UnionArgParser/"; + description = "A declarative CLI argument/XML configuration parser for F# applications"; + homepage = http://nessos.github.io/UnionArgParser/; license = stdenv.lib.licenses.mit; maintainers = with stdenv.lib.maintainers; [ obadz ]; platforms = with stdenv.lib.platforms; linux; diff --git a/pkgs/top-level/platforms.nix b/pkgs/top-level/platforms.nix index 4a6dc5aacf6..c331278046c 100644 --- a/pkgs/top-level/platforms.nix +++ b/pkgs/top-level/platforms.nix @@ -303,80 +303,6 @@ rec { #kernelHeadersBaseConfig = "guruplug_defconfig"; }; - versatileARM = { - name = "versatileARM"; - kernelMajor = "2.6"; - kernelHeadersBaseConfig = "versatile_defconfig"; - kernelBaseConfig = "versatile_defconfig"; - kernelArch = "arm"; - kernelAutoModules = false; - kernelTarget = "zImage"; - kernelExtraConfig = - '' - MMC_ARMMMCI y - #MMC_SDHCI y - SERIO_AMBAKMI y - - AEABI y - RTC_CLASS y - RTC_DRV_PL031 y - PCI y - SCSI y - SCSI_DMA y - SCSI_ATA y - BLK_DEV_SD y - BLK_DEV_SR y - SCSI_SYM53C8XX_2 y - - TMPFS y - IPV6 m - REISERFS_FS m - EXT4_FS m - - IP_PNP y - IP_PNP_DHCP y - IP_PNP_BOOTP y - ROOT_NFS y - ''; - uboot = null; - }; - - integratorCP = { - name = "integratorCP"; - kernelMajor = "2.6"; - kernelHeadersBaseConfig = "integrator_defconfig"; - kernelBaseConfig = "integrator_defconfig"; - kernelArch = "arm"; - kernelAutoModules = false; - kernelTarget = "zImage"; - kernelExtraConfig = - '' - # needed for qemu integrator/cp - SERIAL_AMBA_PL011 y - SERIAL_AMBA_PL011_CONSOLE y - SERIAL_AMBA_PL010 n - SERIAL_AMBA_PL010_CONSOLE n - - MMC_ARMMMCI y - MMC_SDHCI y - SERIO_AMBAKMI y - - CPU_ARM926T y - ARCH_INTEGRATOR_CP y - VGA_CONSOLE n - AEABI y - ''; - uboot = null; - ubootConfig = "integratorcp_config"; - }; - - integratorCPuboot = integratorCP // { - name = "integratorCPuboot"; - kernelTarget = "uImage"; - uboot = "upstream"; - ubootConfig = "integratorcp_config"; - }; - fuloong2f_n32 = { name = "fuloong2f_n32"; kernelMajor = "2.6"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fcef7a8aa9d..95ac67eca82 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -171,7 +171,7 @@ let pyqt5 = callPackage ../development/python-modules/pyqt/5.x.nix { sip = self.sip_4_16; pythonDBus = self.dbus; - qt5 = pkgs.qt53; + qt5 = pkgs.qt5; }; sip = callPackage ../development/python-modules/sip { }; @@ -3057,20 +3057,21 @@ let eyeD3 = buildPythonPackage rec { - version = "0.7.4"; + version = "0.7.8"; name = "eyeD3-${version}"; disabled = isPyPy; src = pkgs.fetchurl { - url = "http://eyed3.nicfit.net/releases/${name}.tgz"; - sha256 = "001hzgqqnf2ig432mq78jsxidpky2rl2ilm28xwjp32vzphycf51"; + url = "http://eyed3.nicfit.net/releases/${name}.tar.gz"; + sha256 = "1nv7nhfn1d0qm7rgkzksbccgqisng8klf97np0nwaqwd5dbmdf86"; }; buildInputs = with self; [ paver ]; postInstall = '' for prog in "$out/bin/"*; do - wrapProgram "$prog" --prefix PYTHONPATH : "$PYTHONPATH" + wrapProgram "$prog" --prefix PYTHONPATH : "$PYTHONPATH" \ + --prefix PATH : ${python}/bin done ''; @@ -3386,6 +3387,29 @@ let }; }; + humanize = buildPythonPackage rec { + version = "0.5.1"; + name = "humanize-${version}"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/h/humanize/${name}.tar.gz"; + md5 = "e8473d9dc1b220911cac2edd53b1d973"; + }; + + buildInputs = with self; [ mock ]; + + doCheck = false; + + meta = { + description = "python humanize utilities"; + homepage = https://github.com/jmoiron/humanize; + license = licenses.mit; + maintainers = with maintainers; [ matthiasbeyer ]; + platforms = platforms.linux; # can only test on linux + }; + + }; + hovercraft = buildPythonPackage rec { disabled = ! isPy3k; name = "hovercraft-${version}"; @@ -3410,6 +3434,25 @@ let }; }; + httpauth = buildPythonPackage rec { + version = "0.2"; + name = "httpauth-${version}"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/h/httpauth/${name}.tar.gz"; + md5 = "78d1835a80955e68e98a3ca5ab7f7dbd"; + }; + + doCheck = false; + + meta = { + description = "WSGI HTTP Digest Authentication middleware"; + homepage = https://github.com/jonashaag/httpauth; + license = licenses.bsd2; + maintainers = with maintainers; [ matthiasbeyer ]; + }; + }; + itsdangerous = buildPythonPackage rec { name = "itsdangerous-0.24"; @@ -5195,8 +5238,8 @@ let }; meta = { - description = "simple wrapper around fribidi."; - homepage = "https://github.com/pediapress/pyfribidi"; + description = "A simple wrapper around fribidi"; + homepage = https://github.com/pediapress/pyfribidi; license = stdenv.lib.licenses.gpl2; }; }; @@ -6616,6 +6659,27 @@ let }; }; + klaus = buildPythonPackage rec { + version = "0.4.9"; + name = "klaus-${version}"; + + src = pkgs.fetchurl { + url = "https://github.com/jonashaag/klaus/archive/${version}.tar.gz"; + sha256 = "0qcbv3shz530mn53pdc68fx38ylz72033xsrz77ffi0cks32az2w"; + }; + + propagatedBuildInputs = with self; + [ humanize httpauth dulwich pygments flask ]; + + meta = { + description = "The first Git web viewer that Just Works"; + homepage = "https://github.com/jonashaag/klaus"; + #license = licenses.mit; # I'm not sure about the license + maintainers = with maintainers; [ matthiasbeyer ]; + platforms = platforms.linux; # Can only test linux + }; + }; + kombu = buildPythonPackage rec { name = "kombu-${version}"; version = "3.0.24"; @@ -9301,7 +9365,8 @@ let }; meta = { - description = ''PicoSAT is a popular SAT solver written by Armin + description = "Python bindings for PicoSAT"; + longDescription = ''PicoSAT is a popular SAT solver written by Armin Biere in pure C. This package provides efficient Python bindings to picosat on the C level, i.e. when importing pycosat, the picosat solver becomes part of the Python process itself. For @@ -11013,12 +11078,12 @@ let }; repocheck = buildPythonPackage rec { - name = "repocheck-2015-05-04"; + name = "repocheck-2015-06-27"; disabled = isPy26 || isPy27; src = pkgs.fetchFromGitHub { - sha256 = "0zk8n4sm7i488wgqljkfjd2j0hm0qimxr9dhdz6d7xal7apwh71x"; - rev = "db8c336f071ead3375805b7a78ca3d7c862536db"; + sha256 = "0psihwph10sx07xc2gfch739laz7x1kwl5c991cci8cfn5jzy8bp"; + rev = "231e05b4fa55955ef8492581a15f508ffa0037d4"; repo = "repocheck"; owner = "kynikos"; };