diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 199e678bc2910d..bbcf82f7ed699a 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -833,6 +833,7 @@ used in `buildPythonPackage`. - `pythonRemoveBinBytecode` to remove bytecode from the `/bin` folder. - `setuptoolsBuildHook` to build a wheel using `setuptools`. - `setuptoolsCheckHook` to run tests with `python setup.py test`. +- `venvShellHook` to source a Python 3 `venv` at the `venvDir` location. A `venv` is created if it does not yet exist. - `wheelUnpackHook` to move a wheel to the correct folder so it can be installed with the `pipInstallHook`. ### Development mode diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index 709a0d504cf73b..0edf03ad26a98b 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -32,17 +32,17 @@ Rust applications are packaged by using the `buildRustPackage` helper from `rust ``` rustPlatform.buildRustPackage rec { - name = "ripgrep-${version}"; - version = "0.4.0"; + pname = "ripgrep"; + version = "11.0.2"; src = fetchFromGitHub { owner = "BurntSushi"; - repo = "ripgrep"; - rev = "${version}"; - sha256 = "0y5d1n6hkw85jb3rblcxqas2fp82h3nghssa4xqrhqnz25l799pj"; + repo = pname; + rev = version; + sha256 = "1iga3320mgi7m853la55xip514a3chqsdi1a1rwv25lr9b1p7vd3"; }; - cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx"; + cargoSha256 = "17ldqr3asrdcsh4l29m3b5r37r5d0b3npq1lrgjmxb6vlx6a36qh"; verifyCargoDeps = true; meta = with stdenv.lib; { @@ -66,7 +66,11 @@ added in `cargoPatches` will also be prepended to the patches in `patches` at build-time. When `verifyCargoDeps` is set to `true`, the build will also verify that the -`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future. +`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the +`cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` +since it also copies the `Cargo.lock` in it. To avoid breaking +backward-compatibility this option is not enabled by default but hopefully will +be in the future. ### Building a crate for a different target diff --git a/doc/overrides.css b/doc/overrides.css index 4c7d4a31be2d09..73901a3f543bf9 100644 --- a/doc/overrides.css +++ b/doc/overrides.css @@ -1,9 +1,22 @@ .docbook .xref img[src^=images\/callouts\/], .screen img, -.programlisting img { +.programlisting img, +.literallayout img, +.synopsis img { width: 1em; } .calloutlist img { width: 1.5em; } + +.prompt, +.screen img, +.programlisting img, +.literallayout img, +.synopsis img { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} diff --git a/lib/cli.nix b/lib/cli.nix new file mode 100644 index 00000000000000..f47625d2f53705 --- /dev/null +++ b/lib/cli.nix @@ -0,0 +1,56 @@ +{ lib }: + +rec { + /* Automatically convert an attribute set to command-line options. + + This helps protect against malformed command lines and also to reduce + boilerplate related to command-line construction for simple use cases. + + Example: + encodeGNUCommandLine + { } + { data = builtins.toJSON { id = 0; }; + + X = "PUT"; + + retry = 3; + + retry-delay = null; + + url = [ "https://example.com/foo" "https://example.com/bar" ]; + + silent = false; + + verbose = true; + }; + => "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'" + */ + encodeGNUCommandLine = + options: attrs: lib.escapeShellArgs (toGNUCommandLine options attrs); + + toGNUCommandLine = + { renderKey ? + key: if builtins.stringLength key == 1 then "-${key}" else "--${key}" + + , renderOption ? + key: value: + if value == null + then [] + else [ (renderKey key) (builtins.toString value) ] + + , renderBool ? key: value: lib.optional value (renderKey key) + + , renderList ? key: value: lib.concatMap (renderOption key) value + }: + options: + let + render = key: value: + if builtins.isBool value + then renderBool key value + else if builtins.isList value + then renderList key value + else renderOption key value; + + in + builtins.concatLists (lib.mapAttrsToList render options); +} diff --git a/lib/default.nix b/lib/default.nix index 9f7a088d792ded..5abafe1b2acf4e 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -39,6 +39,7 @@ let # misc asserts = callLibs ./asserts.nix; + cli = callLibs ./cli.nix; debug = callLibs ./debug.nix; generators = callLibs ./generators.nix; misc = callLibs ./deprecated.nix; @@ -100,7 +101,7 @@ let inherit (sources) pathType pathIsDirectory cleanSourceFilter cleanSource sourceByRegex sourceFilesBySuffices commitIdFromGitRepo cleanSourceWith pathHasContext - canCleanSource; + canCleanSource pathIsRegularFile; inherit (modules) evalModules unifyModuleSyntax applyIfFunction mergeModules mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions @@ -120,6 +121,7 @@ let isOptionType mkOptionType; inherit (asserts) assertMsg assertOneOf; + inherit (cli) encodeGNUCommandLine toGNUCommandLine; inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal diff --git a/lib/sources.nix b/lib/sources.nix index 51bcf5559e3216..0fd172c42b7739 100644 --- a/lib/sources.nix +++ b/lib/sources.nix @@ -9,6 +9,9 @@ rec { # Returns true if the path exists and is a directory, false otherwise pathIsDirectory = p: if builtins.pathExists p then (pathType p) == "directory" else false; + # Returns true if the path exists and is a regular file, false otherwise + pathIsRegularFile = p: if builtins.pathExists p then (pathType p) == "regular" else false; + # Bring in a path as a source, filtering out all Subversion and CVS # directories, as well as backup files (*~). cleanSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! ( @@ -110,24 +113,43 @@ rec { with builtins; let fileName = toString path + "/" + file; packedRefsName = toString path + "/packed-refs"; - in if lib.pathExists fileName + in if pathIsRegularFile path + # Resolve git worktrees. See gitrepository-layout(5) + then + let m = match "^gitdir: (.*)$" (lib.fileContents path); + in if m == null + then throw ("File contains no gitdir reference: " + path) + else + let gitDir = lib.head m; + commonDir' = if pathIsRegularFile "${gitDir}/commondir" + then lib.fileContents "${gitDir}/commondir" + else gitDir; + commonDir = if lib.hasPrefix "/" commonDir' + then commonDir' + else toString (/. + "${gitDir}/${commonDir'}"); + refFile = lib.removePrefix "${commonDir}/" "${gitDir}/${file}"; + in readCommitFromFile refFile commonDir + + else if pathIsRegularFile fileName + # Sometimes git stores the commitId directly in the file but + # sometimes it stores something like: «ref: refs/heads/branch-name» then let fileContent = lib.fileContents fileName; - # Sometimes git stores the commitId directly in the file but - # sometimes it stores something like: «ref: refs/heads/branch-name» matchRef = match "^ref: (.*)$" fileContent; - in if matchRef == null + in if matchRef == null then fileContent else readCommitFromFile (lib.head matchRef) path + + else if pathIsRegularFile packedRefsName # Sometimes, the file isn't there at all and has been packed away in the # packed-refs file, so we have to grep through it: - else if lib.pathExists packedRefsName then let fileContent = readFile packedRefsName; matchRef = match (".*\n([^\n ]*) " + file + "\n.*") fileContent; - in if matchRef == null + in if matchRef == null then throw ("Could not find " + file + " in " + packedRefsName) else lib.head matchRef + else throw ("Not a .git directory: " + path); in readCommitFromFile "HEAD"; diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index b064faa1e1ba63..e47b48b5017d18 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -441,4 +441,25 @@ runTests { expected = "«foo»"; }; + testRenderOptions = { + expr = + encodeGNUCommandLine + { } + { data = builtins.toJSON { id = 0; }; + + X = "PUT"; + + retry = 3; + + retry-delay = null; + + url = [ "https://example.com/foo" "https://example.com/bar" ]; + + silent = false; + + verbose = true; + }; + + expected = "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'"; + }; } diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index c8340ff7f15777..8cd632a439cda9 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -174,8 +174,7 @@ checkConfigOutput "true" config.submodule.inner ./declare-submoduleWith-modules. checkConfigOutput "true" config.submodule.outer ./declare-submoduleWith-modules.nix ## Paths should be allowed as values and work as expected -# Temporarily disabled until https://github.com/NixOS/nixpkgs/pull/76861 -#checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix +checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix # Check that disabledModules works recursively and correctly checkConfigOutput "true" config.enable ./disable-recursive/main.nix diff --git a/lib/trivial.nix b/lib/trivial.nix index 3a25e31fb052b5..940ec1a3d59e40 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -191,7 +191,7 @@ rec { let revisionFile = "${toString ./..}/.git-revision"; gitRepo = "${toString ./..}/.git"; - in if lib.pathIsDirectory gitRepo + in if builtins.pathExists gitRepo then lib.commitIdFromGitRepo gitRepo else if lib.pathExists revisionFile then lib.fileContents revisionFile else default; diff --git a/lib/types.nix b/lib/types.nix index e86f6d36476114..d8a5db0c89f0f7 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -340,18 +340,68 @@ rec { let padWidth = stringLength (toString (length def.value)); unnamed = i: unnamedPrefix + fixedWidthNumber padWidth i; + anyString = placeholder "name"; + nameAttrs = [ + { path = [ "environment" "etc" ]; + name = "target"; + } + { path = [ "containers" anyString "bindMounts" ]; + name = "mountPoint"; + } + { path = [ "programs" "ssh" "knownHosts" ]; + # hostNames is actually a list so we would need to handle it only when singleton + name = "hostNames"; + } + { path = [ "fileSystems" ]; + name = "mountPoint"; + } + { path = [ "boot" "specialFileSystems" ]; + name = "mountPoint"; + } + { path = [ "services" "znapzend" "zetup" ]; + name = "dataset"; + } + { path = [ "services" "znapzend" "zetup" anyString "destinations" ]; + name = "label"; + } + { path = [ "services" "geoclue2" "appConfig" ]; + name = "desktopID"; + } + ]; + matched = let + equals = a: b: b == anyString || a == b; + fallback = { name = "name"; }; + in findFirst ({ path, ... }: all (v: v == true) (zipListsWith equals loc path)) fallback nameAttrs; + nameAttr = matched.name; + nameValueOld = value: + if isList value then + if length value > 0 then + "[ " + concatMapStringsSep " " escapeNixString value + " ]" + else + "[ ]" + else + escapeNixString value; + nameValueNew = value: unnamed: + if isList value then + if length value > 0 then + head value + else + unnamed + else + value; res = { inherit (def) file; value = listToAttrs ( imap1 (elemIdx: elem: - { name = elem.name or (unnamed elemIdx); + { name = nameValueNew (elem.${nameAttr} or (unnamed elemIdx)) (unnamed elemIdx); value = elem; }) def.value); }; option = concatStringsSep "." loc; sample = take 3 def.value; - list = concatMapStrings (x: ''{ name = "${x.name or "unnamed"}"; ...} '') sample; - set = concatMapStrings (x: ''${x.name or "unnamed"} = {...}; '') sample; + more = lib.optionalString (length def.value > 3) "... "; + list = concatMapStrings (x: ''{ ${nameAttr} = ${nameValueOld (x.${nameAttr} or "unnamed")}; ...} '') sample; + set = concatMapStrings (x: ''${nameValueNew (x.${nameAttr} or "unnamed") "unnamed"} = {...}; '') sample; msg = '' In file ${def.file} a list is being assigned to the option config.${option}. @@ -359,10 +409,10 @@ rec { See https://git.io/fj2zm for more information. Do ${option} = - { ${set}...} + { ${set}${more}} instead of ${option} = - [ ${list}...] + [ ${list}${more}] ''; in lib.warn msg res @@ -430,14 +480,16 @@ rec { else unify (if shorthandOnlyDefinesConfig then { config = value; } else value); allModules = defs: modules ++ imap1 (n: { value, file }: - # Annotate the value with the location of its definition for better error messages - coerce (lib.modules.unifyModuleSyntax file "${toString file}-${toString n}") value + if isAttrs value || isFunction value then + # Annotate the value with the location of its definition for better error messages + coerce (lib.modules.unifyModuleSyntax file "${toString file}-${toString n}") value + else value ) defs; in mkOptionType rec { name = "submodule"; - check = x: isAttrs x || isFunction x; + check = x: isAttrs x || isFunction x || path.check x; merge = loc: defs: (evalModules { modules = allModules defs; @@ -538,7 +590,7 @@ rec { tail' = tail ts; in foldl' either head' tail'; - # Either value of type `finalType` or `coercedType`, the latter is + # Either value of type `coercedType` or `finalType`, the former is # converted to `finalType` using `coerceFunc`. coercedTo = coercedType: coerceFunc: finalType: assert lib.assertMsg (coercedType.getSubModules == null) @@ -547,12 +599,12 @@ rec { mkOptionType rec { name = "coercedTo"; description = "${finalType.description} or ${coercedType.description} convertible to it"; - check = x: finalType.check x || (coercedType.check x && finalType.check (coerceFunc x)); + check = x: (coercedType.check x && finalType.check (coerceFunc x)) || finalType.check x; merge = loc: defs: let coerceVal = val: - if finalType.check val then val - else coerceFunc val; + if coercedType.check val then coerceFunc val + else val; in finalType.merge loc (map (def: def // { value = coerceVal def.value; }) defs); emptyValue = finalType.emptyValue; getSubOptions = finalType.getSubOptions; diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fc9991b42433cf..bdeed800890f3f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -505,6 +505,12 @@ githubId = 750786; name = "Justin Wood"; }; + anmonteiro = { + email = "anmonteiro@gmail.com"; + github = "anmonteiro"; + githubId = 661909; + name = "Antonio Nuno Monteiro"; + }; anpryl = { email = "anpryl@gmail.com"; github = "anpryl"; @@ -2433,6 +2439,12 @@ githubId = 844574; name = "Daniel Austin"; }; + flyfloh = { + email = "nix@halbmastwurf.de"; + github = "flyfloh"; + githubId = 74379; + name = "Florian Pester"; + }; fmthoma = { email = "f.m.thoma@googlemail.com"; github = "fmthoma"; @@ -4430,6 +4442,12 @@ githubId = 158568; name = "Matthias C. M. Troffaes"; }; + McSinyx = { + email = "vn.mcsinyx@gmail.com"; + github = "McSinyx"; + githubId = 13689192; + name = "Nguyễn Gia Phong"; + }; mdaiter = { email = "mdaiter8121@gmail.com"; github = "mdaiter"; @@ -5070,6 +5088,12 @@ githubId = 7588406; name = "Andrew R. M."; }; + nloomans = { + email = "noah@nixos.noahloomans.com"; + github = "nloomans"; + githubId = 7829481; + name = "Noah Loomans"; + }; nmattia = { email = "nicolas@nmattia.com"; github = "nmattia"; @@ -7014,6 +7038,11 @@ github = "timbertson"; name = "Tim Cuthbertson"; }; + timma = { + email = "kunduru.it.iitb@gmail.com"; + github = "ktrsoft"; + name = "Timma"; + }; timokau = { email = "timokau@zoho.com"; github = "timokau"; diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml index 55d9c123e3f119..957349ad1811a0 100644 --- a/nixos/doc/manual/development/option-types.xml +++ b/nixos/doc/manual/development/option-types.xml @@ -257,9 +257,9 @@ A set of sub options o. - o can be an attribute set or a function - returning an attribute set. Submodules are used in composed types to - create modular options. This is equivalent to + o can be an attribute set, a function + returning an attribute set, or a path to a file containing such a value. Submodules are used in + composed types to create modular options. This is equivalent to types.submoduleWith { modules = toList o; shorthandOnlyDefinesConfig = true; }. Submodules are detailed in EelcoDolstra Author - 2007-2019Eelco Dolstra + 2007-2020Eelco Dolstra diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index ca319dfea41181..51f91268eff069 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -391,6 +391,16 @@ users.users.me = PR #63103. + + + For NixOS modules, the types types.submodule and types.submoduleWith now support + paths as allowed values, similar to how imports supports paths. + Because of this, if you have a module that defines an option of type + either (submodule ...) path, it will break since a path + is now treated as the first type instead of the second. To fix this, change + the type to either path (submodule ...). + + diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 7e575189209ae9..c2cbedc5e3e206 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -704,7 +704,8 @@ def create_socket(path: str) -> socket.socket: def process_serial_output() -> None: for _line in self.process.stdout: - line = _line.decode("unicode_escape").replace("\r", "").rstrip() + # Ignore undecodable bytes that may occur in boot menus + line = _line.decode(errors="ignore").replace("\r", "").rstrip() eprint("{} # {}".format(self.name, line)) self.logger.enqueue({"msg": line, "machine": self.name}) diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 3d09be3b6cd50e..a7f6d79265147e 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -155,7 +155,7 @@ in rec { --add-flags "''${vms[*]}" \ ${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin:${imagemagick_tiff}/bin'"} \ - --run "export testScript=\"\$(cat $out/test-script)\"" \ + --run "export testScript=\"\$(${coreutils}/bin/cat $out/test-script)\"" \ --set VLANS '${toString vlans}' ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms wrapProgram $out/bin/nixos-run-vms \ diff --git a/nixos/modules/hardware/usb-wwan.nix b/nixos/modules/hardware/usb-wwan.nix index 2d20421586a792..679a6c6497cb63 100644 --- a/nixos/modules/hardware/usb-wwan.nix +++ b/nixos/modules/hardware/usb-wwan.nix @@ -21,6 +21,19 @@ with lib; ###### implementation config = mkIf config.hardware.usbWwan.enable { + # Attaches device specific handlers. services.udev.packages = with pkgs; [ usb-modeswitch-data ]; + + # Triggered by udev, usb-modeswitch creates systemd services via a + # template unit in the usb-modeswitch package. + systemd.packages = with pkgs; [ usb-modeswitch ]; + + # The systemd service requires the usb-modeswitch-data. The + # usb-modeswitch package intends to discover this via the + # filesystem at /usr/share/usb_modeswitch, and merge it with user + # configuration in /etc/usb_modeswitch.d. Configuring the correct + # path in the package is difficult, as it would cause a cyclic + # dependency. + environment.etc."usb_modeswitch.d".source = "${pkgs.usb-modeswitch-data}/share/usb_modeswitch"; }; } diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index b85614771ee401..ddbd3963cc57ae 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -91,8 +91,8 @@ in # These defaults are set here rather than up there so that # changing them would not rebuild the manual version = mkDefault (cfg.release + cfg.versionSuffix); - revision = mkIf (pathIsDirectory gitRepo) (mkDefault gitCommitId); - versionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId)); + revision = mkIf (pathExists gitRepo) (mkDefault gitCommitId); + versionSuffix = mkIf (pathExists gitRepo) (mkDefault (".git." + gitCommitId)); }; # Generate /etc/os-release. See diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index a6c1d7c5d66cf0..a48434641b0c65 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -735,6 +735,7 @@ ./services/networking/wicd.nix ./services/networking/wireguard.nix ./services/networking/wpa_supplicant.nix + ./services/networking/xandikos.nix ./services/networking/xinetd.nix ./services/networking/xl2tpd.nix ./services/networking/xrdp.nix diff --git a/nixos/modules/services/continuous-integration/buildbot/master.nix b/nixos/modules/services/continuous-integration/buildbot/master.nix index 326d2cbd82cc9e..e3da3092d4593d 100644 --- a/nixos/modules/services/continuous-integration/buildbot/master.nix +++ b/nixos/modules/services/continuous-integration/buildbot/master.nix @@ -222,7 +222,7 @@ in { }; config = mkIf cfg.enable { - users.groups = optional (cfg.group == "buildbot") { + users.groups = optionalAttrs (cfg.group == "buildbot") { buildbot = { }; }; diff --git a/nixos/modules/services/continuous-integration/buildbot/worker.nix b/nixos/modules/services/continuous-integration/buildbot/worker.nix index 7613692f0a343e..52f24b8cee3c36 100644 --- a/nixos/modules/services/continuous-integration/buildbot/worker.nix +++ b/nixos/modules/services/continuous-integration/buildbot/worker.nix @@ -136,7 +136,7 @@ in { config = mkIf cfg.enable { services.buildbot-worker.workerPassFile = mkDefault (pkgs.writeText "buildbot-worker-password" cfg.workerPass); - users.groups = optional (cfg.group == "bbworker") { + users.groups = optionalAttrs (cfg.group == "bbworker") { bbworker = { }; }; diff --git a/nixos/modules/services/continuous-integration/jenkins/slave.nix b/nixos/modules/services/continuous-integration/jenkins/slave.nix index 26368cb94e47e1..3c0e6f78e74ca4 100644 --- a/nixos/modules/services/continuous-integration/jenkins/slave.nix +++ b/nixos/modules/services/continuous-integration/jenkins/slave.nix @@ -50,7 +50,7 @@ in { }; config = mkIf (cfg.enable && !masterCfg.enable) { - users.groups = optional (cfg.group == "jenkins") { + users.groups = optionalAttrs (cfg.group == "jenkins") { jenkins.gid = config.ids.gids.jenkins; }; diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix index 5bf57a1bf9cbad..809f61cfa8186c 100644 --- a/nixos/modules/services/databases/openldap.nix +++ b/nixos/modules/services/databases/openldap.nix @@ -259,6 +259,8 @@ in ${openldap.out}/bin/slapadd ${configOpts} -l ${dataFile} ''} chown -R "${cfg.user}:${cfg.group}" "${cfg.dataDir}" + + ${openldap}/bin/slaptest ${configOpts} ''; serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -d '${cfg.logLevel}' " + diff --git a/nixos/modules/services/hardware/usbmuxd.nix b/nixos/modules/services/hardware/usbmuxd.nix index 50b931dcb487eb..11a4b0a858f9ca 100644 --- a/nixos/modules/services/hardware/usbmuxd.nix +++ b/nixos/modules/services/hardware/usbmuxd.nix @@ -51,7 +51,7 @@ in }; }; - users.groups = optional (cfg.group == defaultUserGroup) { + users.groups = optionalAttrs (cfg.group == defaultUserGroup) { ${cfg.group} = { }; }; diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index d7378821440d38..19e11b31d9ca67 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -612,10 +612,7 @@ in { environment = { - etc = singleton - { source = "/var/lib/postfix/conf"; - target = "postfix"; - }; + etc.postfix.source = "/var/lib/postfix/conf"; # This makes it comfortable to run 'postqueue/postdrop' for example. systemPackages = [ pkgs.postfix ]; diff --git a/nixos/modules/services/mail/spamassassin.nix b/nixos/modules/services/mail/spamassassin.nix index 07b3bf0420aac1..75442c7cdb5e1f 100644 --- a/nixos/modules/services/mail/spamassassin.nix +++ b/nixos/modules/services/mail/spamassassin.nix @@ -124,7 +124,7 @@ in # Allow users to run 'spamc'. environment = { - etc = singleton { source = spamdEnv; target = "spamassassin"; }; + etc.spamassassin.source = spamdEnv; systemPackages = [ pkgs.spamassassin ]; }; diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index 258476dd9feb39..38910a5a005d4b 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -364,7 +364,7 @@ in ''} sed -e "s,#secretkey#,$KEY,g" \ -e "s,#dbpass#,$DBPASS,g" \ - -e "s,#jwtsecet#,$JWTSECET,g" \ + -e "s,#jwtsecret#,$JWTSECRET,g" \ -e "s,#mailerpass#,$MAILERPASSWORD,g" \ -i ${runConfig} chmod 640 ${runConfig} ${secretKey} ${jwtSecret} diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 3985dc0b303c20..bfaf760fb8363a 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -123,9 +123,9 @@ in config = mkIf cfg.enable { systemd.tmpfiles.rules = [ - "d '${cfg.dataDir}' - ${cfg.user} ${cfg.user} - -" + "d '${cfg.dataDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -" ] ++ (optional cfg.consumptionDirIsPublic - "d '${cfg.consumptionDir}' 777 ${cfg.user} ${cfg.user} - -" + "d '${cfg.consumptionDir}' 777 - - - -" # If the consumption dir is not created here, it's automatically created by # 'manage' with the default permissions. ); @@ -169,17 +169,15 @@ in }; users = optionalAttrs (cfg.user == defaultUser) { - users = [{ - name = defaultUser; + users.${defaultUser} = { group = defaultUser; uid = config.ids.uids.paperless; home = cfg.dataDir; - }]; + }; - groups = [{ - name = defaultUser; + groups.${defaultUser} = { gid = config.ids.gids.paperless; - }]; + }; }; }; } diff --git a/nixos/modules/services/networking/ndppd.nix b/nixos/modules/services/networking/ndppd.nix index 92088623517f8b..e015f76f622b47 100644 --- a/nixos/modules/services/networking/ndppd.nix +++ b/nixos/modules/services/networking/ndppd.nix @@ -161,7 +161,25 @@ in { documentation = [ "man:ndppd(1)" "man:ndppd.conf(5)" ]; after = [ "network-pre.target" ]; wantedBy = [ "multi-user.target" ]; - serviceConfig.ExecStart = "${pkgs.ndppd}/bin/ndppd -c ${ndppdConf}"; + serviceConfig = { + ExecStart = "${pkgs.ndppd}/bin/ndppd -c ${ndppdConf}"; + + # Sandboxing + CapabilityBoundingSet = "CAP_NET_RAW CAP_NET_ADMIN"; + ProtectSystem = "strict"; + ProtectHome = true; + PrivateTmp = true; + PrivateDevices = true; + ProtectKernelTunables = true; + ProtectKernelModules = true; + ProtectControlGroups = true; + RestrictAddressFamilies = "AF_INET6 AF_PACKET AF_NETLINK"; + RestrictNamespaces = true; + LockPersonality = true; + MemoryDenyWriteExecute = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + }; }; }; } diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 8f05c3949fba71..de0f11595a949b 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -233,6 +233,7 @@ in { path = [ pkgs.wpa_supplicant ]; script = '' + iface_args="-s -u -D${cfg.driver} -c ${configFile}" ${if ifaces == [] then '' for i in $(cd /sys/class/net && echo *); do DEVTYPE= @@ -240,14 +241,14 @@ in { if [ -e "$UEVENT_PATH" ]; then source "$UEVENT_PATH" if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then - ifaces="$ifaces''${ifaces:+ -N} -i$i" + args+="''${args:+ -N} -i$i $iface_args" fi fi done '' else '' - ifaces="${concatStringsSep " -N " (map (i: "-i${i}") ifaces)}" + args="${concatMapStringsSep " -N " (i: "-i${i} $iface_args") ifaces}" ''} - exec wpa_supplicant -s -u -D${cfg.driver} -c ${configFile} $ifaces + exec wpa_supplicant $args ''; }; diff --git a/nixos/modules/services/networking/xandikos.nix b/nixos/modules/services/networking/xandikos.nix new file mode 100644 index 00000000000000..87c029156b9e7e --- /dev/null +++ b/nixos/modules/services/networking/xandikos.nix @@ -0,0 +1,148 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.xandikos; +in +{ + + options = { + services.xandikos = { + enable = mkEnableOption "Xandikos CalDAV and CardDAV server"; + + package = mkOption { + type = types.package; + default = pkgs.xandikos; + defaultText = "pkgs.xandikos"; + description = "The Xandikos package to use."; + }; + + address = mkOption { + type = types.str; + default = "localhost"; + description = '' + The IP address on which Xandikos will listen. + By default listens on localhost. + ''; + }; + + port = mkOption { + type = types.port; + default = 8080; + description = "The port of the Xandikos web application"; + }; + + routePrefix = mkOption { + type = types.str; + default = "/"; + description = '' + Path to Xandikos. + Useful when Xandikos is behind a reverse proxy. + ''; + }; + + extraOptions = mkOption { + default = []; + type = types.listOf types.str; + example = literalExample '' + [ "--autocreate" + "--defaults" + "--current-user-principal user" + "--dump-dav-xml" + ] + ''; + description = '' + Extra command line arguments to pass to xandikos. + ''; + }; + + nginx = mkOption { + default = {}; + description = '' + Configuration for nginx reverse proxy. + ''; + + type = types.submodule { + options = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Configure the nginx reverse proxy settings. + ''; + }; + + hostName = mkOption { + type = types.str; + description = '' + The hostname use to setup the virtualhost configuration + ''; + }; + }; + }; + }; + + }; + + }; + + config = mkIf cfg.enable ( + mkMerge [ + { + meta.maintainers = [ lib.maintainers."0x4A6F" ]; + + systemd.services.xandikos = { + description = "A Simple Calendar and Contact Server"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + User = "xandikos"; + Group = "xandikos"; + DynamicUser = "yes"; + RuntimeDirectory = "xandikos"; + StateDirectory = "xandikos"; + StateDirectoryMode = "0700"; + PrivateDevices = true; + # Sandboxing + CapabilityBoundingSet = "CAP_NET_RAW CAP_NET_ADMIN"; + ProtectSystem = "strict"; + ProtectHome = true; + PrivateTmp = true; + ProtectKernelTunables = true; + ProtectKernelModules = true; + ProtectControlGroups = true; + RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_PACKET AF_NETLINK"; + RestrictNamespaces = true; + LockPersonality = true; + MemoryDenyWriteExecute = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + ExecStart = '' + ${cfg.package}/bin/xandikos \ + --directory /var/lib/xandikos \ + --listen_address ${cfg.address} \ + --port ${toString cfg.port} \ + --route-prefix ${cfg.routePrefix} \ + ${lib.concatStringsSep " " cfg.extraOptions} + ''; + }; + }; + } + + ( + mkIf cfg.nginx.enable { + services.nginx = { + enable = true; + virtualHosts."${cfg.nginx.hostName}" = { + locations."/" = { + proxyPass = "http://${cfg.address}:${toString cfg.port}/"; + }; + }; + }; + } + ) + ] + ); +} diff --git a/nixos/modules/services/security/certmgr.nix b/nixos/modules/services/security/certmgr.nix index e89078883ebedc..94c0ba141179ee 100644 --- a/nixos/modules/services/security/certmgr.nix +++ b/nixos/modules/services/security/certmgr.nix @@ -113,7 +113,7 @@ in otherCert = "/var/certmgr/specs/other-cert.json"; } ''; - type = with types; attrsOf (either (submodule { + type = with types; attrsOf (either path (submodule { options = { service = mkOption { type = nullOr str; @@ -148,7 +148,7 @@ in description = "certmgr spec request object."; }; }; - }) path); + })); description = '' Certificate specs as described by: diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index aa1acdf7d20b98..5ba72e8d7730d6 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -129,19 +129,23 @@ in # It's useful to have transmission in path, e.g. for remote control environment.systemPackages = [ pkgs.transmission ]; - users.users = optionalAttrs (cfg.user == "transmission") (singleton - { name = "transmission"; + users.users = optionalAttrs (cfg.user == "transmission") ({ + transmission = { + name = "transmission"; group = cfg.group; uid = config.ids.uids.transmission; description = "Transmission BitTorrent user"; home = homeDir; createHome = true; - }); + }; + }); - users.groups = optionalAttrs (cfg.group == "transmission") (singleton - { name = "transmission"; + users.groups = optionalAttrs (cfg.group == "transmission") ({ + transmission = { + name = "transmission"; gid = config.ids.gids.transmission; - }); + }; + }); # AppArmor profile security.apparmor.profiles = mkIf apparmor [ diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index fe9c4df1416fec..67dfd931d4bf7a 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -295,6 +295,7 @@ in wireguard-generated = handleTest ./wireguard/generated.nix {}; wireguard-namespaces = handleTest ./wireguard/namespaces.nix {}; wordpress = handleTest ./wordpress.nix {}; + xandikos = handleTest ./xandikos.nix {}; xautolock = handleTest ./xautolock.nix {}; xfce = handleTest ./xfce.nix {}; xmonad = handleTest ./xmonad.nix {}; diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix index e5be652c711248..0a97d5556a2692 100644 --- a/nixos/tests/bittorrent.nix +++ b/nixos/tests/bittorrent.nix @@ -18,6 +18,17 @@ let externalRouterAddress = "80.100.100.1"; externalClient2Address = "80.100.100.2"; externalTrackerAddress = "80.100.100.3"; + + transmissionConfig = { ... }: { + environment.systemPackages = [ pkgs.transmission ]; + services.transmission = { + enable = true; + settings = { + dht-enabled = false; + message-level = 3; + }; + }; + }; in { @@ -26,88 +37,79 @@ in maintainers = [ domenkozar eelco rob bobvanderlinden ]; }; - nodes = - { tracker = - { pkgs, ... }: - { environment.systemPackages = [ pkgs.transmission ]; - - virtualisation.vlans = [ 1 ]; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalTrackerAddress; prefixLength = 24; } - ]; - - # We need Apache on the tracker to serve the torrents. - services.httpd.enable = true; - services.httpd.adminAddr = "foo@example.org"; - services.httpd.documentRoot = "/tmp"; - - networking.firewall.enable = false; - - services.opentracker.enable = true; - - services.transmission.enable = true; - services.transmission.settings.dht-enabled = false; - services.transmission.settings.port-forwaring-enabled = false; - }; - - router = - { pkgs, nodes, ... }: - { virtualisation.vlans = [ 1 2 ]; - networking.nat.enable = true; - networking.nat.internalInterfaces = [ "eth2" ]; - networking.nat.externalInterface = "eth1"; - networking.firewall.enable = true; - networking.firewall.trustedInterfaces = [ "eth2" ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalRouterAddress; prefixLength = 24; } - ]; - networking.interfaces.eth2.ipv4.addresses = [ - { address = internalRouterAddress; prefixLength = 24; } - ]; - services.miniupnpd = { - enable = true; - externalInterface = "eth1"; - internalIPs = [ "eth2" ]; - appendConfig = '' - ext_ip=${externalRouterAddress} - ''; + nodes = { + tracker = { pkgs, ... }: { + imports = [ transmissionConfig ]; + + virtualisation.vlans = [ 1 ]; + networking.firewall.enable = false; + networking.interfaces.eth1.ipv4.addresses = [ + { address = externalTrackerAddress; prefixLength = 24; } + ]; + + # We need Apache on the tracker to serve the torrents. + services.httpd = { + enable = true; + virtualHosts = { + "torrentserver.org" = { + adminAddr = "foo@example.org"; + documentRoot = "/tmp"; }; }; + }; + services.opentracker.enable = true; + }; - client1 = - { pkgs, nodes, ... }: - { environment.systemPackages = [ pkgs.transmission pkgs.miniupnpc ]; - virtualisation.vlans = [ 2 ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = internalClient1Address; prefixLength = 24; } - ]; - networking.defaultGateway = internalRouterAddress; - networking.firewall.enable = false; - services.transmission.enable = true; - services.transmission.settings.dht-enabled = false; - services.transmission.settings.message-level = 3; - }; + router = { pkgs, nodes, ... }: { + virtualisation.vlans = [ 1 2 ]; + networking.nat.enable = true; + networking.nat.internalInterfaces = [ "eth2" ]; + networking.nat.externalInterface = "eth1"; + networking.firewall.enable = true; + networking.firewall.trustedInterfaces = [ "eth2" ]; + networking.interfaces.eth0.ipv4.addresses = []; + networking.interfaces.eth1.ipv4.addresses = [ + { address = externalRouterAddress; prefixLength = 24; } + ]; + networking.interfaces.eth2.ipv4.addresses = [ + { address = internalRouterAddress; prefixLength = 24; } + ]; + services.miniupnpd = { + enable = true; + externalInterface = "eth1"; + internalIPs = [ "eth2" ]; + appendConfig = '' + ext_ip=${externalRouterAddress} + ''; + }; + }; - client2 = - { pkgs, ... }: - { environment.systemPackages = [ pkgs.transmission ]; - virtualisation.vlans = [ 1 ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalClient2Address; prefixLength = 24; } - ]; - networking.firewall.enable = false; - services.transmission.enable = true; - services.transmission.settings.dht-enabled = false; - services.transmission.settings.port-forwaring-enabled = false; - }; + client1 = { pkgs, nodes, ... }: { + imports = [ transmissionConfig ]; + environment.systemPackages = [ pkgs.miniupnpc ]; + + virtualisation.vlans = [ 2 ]; + networking.interfaces.eth0.ipv4.addresses = []; + networking.interfaces.eth1.ipv4.addresses = [ + { address = internalClient1Address; prefixLength = 24; } + ]; + networking.defaultGateway = internalRouterAddress; + networking.firewall.enable = false; }; - testScript = - { nodes, ... }: - '' + client2 = { pkgs, ... }: { + imports = [ transmissionConfig ]; + + virtualisation.vlans = [ 1 ]; + networking.interfaces.eth0.ipv4.addresses = []; + networking.interfaces.eth1.ipv4.addresses = [ + { address = externalClient2Address; prefixLength = 24; } + ]; + networking.firewall.enable = false; + }; + }; + + testScript = { nodes, ... }: '' start_all() # Wait for network and miniupnpd. @@ -159,5 +161,4 @@ in "cmp /tmp/test.tar.bz2 ${file}" ) ''; - }) diff --git a/nixos/tests/xandikos.nix b/nixos/tests/xandikos.nix new file mode 100644 index 00000000000000..0fded20ff1a9cd --- /dev/null +++ b/nixos/tests/xandikos.nix @@ -0,0 +1,70 @@ +import ./make-test-python.nix ( + { pkgs, lib, ... }: + + { + name = "xandikos"; + + meta.maintainers = [ lib.maintainers."0x4A6F" ]; + + nodes = { + xandikos_client = {}; + xandikos_default = { + networking.firewall.allowedTCPPorts = [ 8080 ]; + services.xandikos.enable = true; + }; + xandikos_proxy = { + networking.firewall.allowedTCPPorts = [ 80 8080 ]; + services.xandikos.enable = true; + services.xandikos.address = "localhost"; + services.xandikos.port = 8080; + services.xandikos.routePrefix = "/xandikos/"; + services.xandikos.extraOptions = [ + "--defaults" + ]; + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts."xandikos" = { + serverName = "xandikos.local"; + basicAuth.xandikos = "snakeOilPassword"; + locations."/xandikos/" = { + proxyPass = "http://localhost:8080/"; + }; + }; + }; + }; + }; + + testScript = '' + start_all() + + with subtest("Xandikos default"): + xandikos_default.wait_for_unit("multi-user.target") + xandikos_default.wait_for_unit("xandikos.service") + xandikos_default.wait_for_open_port(8080) + xandikos_default.succeed("curl --fail http://localhost:8080/") + xandikos_default.succeed( + "curl -s --fail --location http://localhost:8080/ | grep -qi Xandikos" + ) + xandikos_client.wait_for_unit("network.target") + xandikos_client.fail("curl --fail http://xandikos_default:8080/") + + with subtest("Xandikos proxy"): + xandikos_proxy.wait_for_unit("multi-user.target") + xandikos_proxy.wait_for_unit("xandikos.service") + xandikos_proxy.wait_for_open_port(8080) + xandikos_proxy.succeed("curl --fail http://localhost:8080/") + xandikos_proxy.succeed( + "curl -s --fail --location http://localhost:8080/ | grep -qi Xandikos" + ) + xandikos_client.wait_for_unit("network.target") + xandikos_client.fail("curl --fail http://xandikos_proxy:8080/") + xandikos_client.succeed( + "curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos_proxy/xandikos/ | grep -qi Xandikos" + ) + xandikos_client.succeed( + "curl -s --fail -u xandikos:snakeOilPassword -H 'Host: xandikos.local' http://xandikos_proxy/xandikos/user/ | grep -qi Xandikos" + ) + ''; + } +) diff --git a/pkgs/applications/audio/pavucontrol/default.nix b/pkgs/applications/audio/pavucontrol/default.nix index fee86cb5bcaee7..d07cf8a476b5b3 100644 --- a/pkgs/applications/audio/pavucontrol/default.nix +++ b/pkgs/applications/audio/pavucontrol/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, intltool, libpulseaudio, gtkmm3 -, libcanberra-gtk3, makeWrapper, gnome3 }: +, libcanberra-gtk3, gnome3, wrapGAppsHook }: stdenv.mkDerivation rec { pname = "pavucontrol"; @@ -10,16 +10,10 @@ stdenv.mkDerivation rec { sha256 = "1qhlkl3g8d7h72xjskii3g1l7la2cavwp69909pzmbi2jyn5pi4g"; }; - preFixup = '' - wrapProgram "$out/bin/pavucontrol" \ - --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS" - ''; - - buildInputs = [ libpulseaudio gtkmm3 libcanberra-gtk3 makeWrapper + buildInputs = [ libpulseaudio gtkmm3 libcanberra-gtk3 gnome3.adwaita-icon-theme ]; - nativeBuildInputs = [ pkgconfig intltool ]; + nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ]; configureFlags = [ "--disable-lynx" ]; diff --git a/pkgs/applications/audio/spotifyd/default.nix b/pkgs/applications/audio/spotifyd/default.nix index 36ab017c5cbb01..b80638110306dc 100644 --- a/pkgs/applications/audio/spotifyd/default.nix +++ b/pkgs/applications/audio/spotifyd/default.nix @@ -6,16 +6,16 @@ rustPlatform.buildRustPackage rec { pname = "spotifyd"; - version = "0.2.20"; + version = "0.2.23"; src = fetchFromGitHub { owner = "Spotifyd"; repo = "spotifyd"; rev = "v${version}"; - sha256 = "1hf4wpk7r0s4jpjhxaz67y1hd8jx9ns5imd85r3cdg4lxf3j5gph"; + sha256 = "0xxr21avgr4pvlr5vgb68jmad5xy5kqvaxfzh0qn1jpiax7y3avm"; }; - cargoSha256 = "1h3fis47hmxvppiv1icjhgp48nd46gayfcmzfjs34q6jask90n0w"; + cargoSha256 = "1ykmn7zzwn9my96bbxwkparab5lck1zzdkpafil2mmrjyvyi40da"; cargoBuildFlags = [ "--no-default-features" diff --git a/pkgs/applications/editors/emacs-modes/elpa-generated.nix b/pkgs/applications/editors/emacs-modes/elpa-generated.nix index bfbddb6fc37c72..9d4fb66f7322cc 100644 --- a/pkgs/applications/editors/emacs-modes/elpa-generated.nix +++ b/pkgs/applications/editors/emacs-modes/elpa-generated.nix @@ -3236,10 +3236,10 @@ elpaBuild { pname = "undo-tree"; ename = "undo-tree"; - version = "0.7"; + version = "0.7.2"; src = fetchurl { - url = "https://elpa.gnu.org/packages/undo-tree-0.7.el"; - sha256 = "0mc5spiqx20z8vh8b24dp9hqj27h5bm5wqk0ga7c6s6mp69r72h4"; + url = "https://elpa.gnu.org/packages/undo-tree-0.7.2.el"; + sha256 = "0gdqh5rkgwlancbjx5whgl5gqkdipdkspkl2bqmrq70sgg5ahrcc"; }; packageRequires = []; meta = { @@ -3734,4 +3734,4 @@ license = lib.licenses.free; }; }) {}; - } \ No newline at end of file + } diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix index e15da80b3b1bc7..5c9456b76a6370 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix @@ -111,6 +111,11 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac flycheck-rtags = fix-rtags super.flycheck-rtags; + gnuplot = super.gnuplot.overrideAttrs (old: { + nativeBuildInputs = + (old.nativeBuildInputs or []) ++ [ pkgs.autoreconfHook ]; + }); + pdf-tools = super.pdf-tools.overrideAttrs(old: { nativeBuildInputs = [ external.pkgconfig ]; buildInputs = with external; old.buildInputs ++ [ autoconf automake libpng zlib poppler ]; diff --git a/pkgs/applications/editors/neovim/qt.nix b/pkgs/applications/editors/neovim/qt.nix index 3a46f68e77550e..8fe93d37c7e877 100644 --- a/pkgs/applications/editors/neovim/qt.nix +++ b/pkgs/applications/editors/neovim/qt.nix @@ -4,13 +4,13 @@ let unwrapped = mkDerivation rec { pname = "neovim-qt-unwrapped"; - version = "0.2.12"; + version = "0.2.15"; src = fetchFromGitHub { owner = "equalsraf"; repo = "neovim-qt"; rev = "v${version}"; - sha256 = "09s3044j0y8nmyi8ykslfii6fx7k9mckmdvb0jn2xmdabpb60i20"; + sha256 = "097nykglqp4jyvla4yp32sc1f1hph4cqqhp6rm9ww7br8c0j54xl"; }; cmakeFlags = [ diff --git a/pkgs/applications/graphics/openimageio/default.nix b/pkgs/applications/graphics/openimageio/default.nix index c743f8bd65323a..23cad7e859df1f 100644 --- a/pkgs/applications/graphics/openimageio/default.nix +++ b/pkgs/applications/graphics/openimageio/default.nix @@ -39,6 +39,5 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = [ maintainers.goibhniu ]; platforms = platforms.unix; - badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/applications/graphics/pencil/default.nix b/pkgs/applications/graphics/pencil/default.nix index 37857fc459ea9c..edd923822ea392 100644 --- a/pkgs/applications/graphics/pencil/default.nix +++ b/pkgs/applications/graphics/pencil/default.nix @@ -1,32 +1,72 @@ -{ stdenv, fetchurl, lib, makeWrapper, +{ stdenv, fetchurl, lib, makeWrapper, wrapGAppsHook, # build dependencies - alsaLib, atk, cairo, cups, dbus, expat, fontconfig, - freetype, gdk-pixbuf, glib, gnome2, nspr, nss, xorg, - glibc, systemd + alsaLib, atk, at-spi2-atk, at-spi2-core, cairo, cups, dbus, expat, fontconfig, + freetype, gdk-pixbuf, glib, glibc, gtk3, libuuid, nspr, nss, pango, + xorg, systemd }: +let -stdenv.mkDerivation rec { - version = "3.0.4"; + deps = [ + alsaLib + atk + at-spi2-atk + at-spi2-core + cairo + cups + dbus + expat + fontconfig + freetype + gdk-pixbuf + glib + glibc + gtk3 + libuuid + nspr + nss + pango + xorg.libX11 + xorg.libxcb + xorg.libXScrnSaver + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXi + xorg.libXrandr + xorg.libXrender + xorg.libXtst + stdenv.cc.cc.lib + stdenv.cc.cc + ]; + +in stdenv.mkDerivation rec { + version = "3.1.0"; pname = "pencil"; src = fetchurl { - url = "http://pencil.evolus.vn/dl/V${version}/Pencil_${version}_amd64.deb"; - sha256 = "58e2b794c615ea8715d8374f177e19c87f7071e359826ec34a59836d537a62fd"; + url = "http://pencil.evolus.vn/dl/V${version}.ga/pencil_${version}.ga_amd64.deb"; + sha256 = "01ae54b1a1351b909eb2366c6ec00816e1deba370e58f35601cf7368f10aaba3"; }; sourceRoot = "."; unpackCmd = '' - ar p "$src" data.tar.xz | tar xJ + ar p "$src" data.tar.gz | tar xz ''; dontBuild = true; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper wrapGAppsHook ]; + + buildInputs = deps; installPhase = '' - mkdir -p $out/bin - cp -R usr/share opt $out/ + mkdir -p $out/bin $out/opt $out/share/applications + cp -R usr/share $out/ + cp -R opt/pencil*/ $out/opt/pencil + cp $out/opt/pencil/pencil.desktop $out/share/applications/ # fix the path in the desktop file substituteInPlace \ @@ -34,42 +74,12 @@ stdenv.mkDerivation rec { --replace /opt/ $out/opt/ # symlink the binary to bin/ - ln -s $out/opt/Pencil/pencil $out/bin/pencil + ln -s $out/opt/pencil/pencil $out/bin/pencil ''; preFixup = let - packages = [ - alsaLib - atk - cairo - cups - dbus - expat - fontconfig - freetype - gdk-pixbuf - glib - gnome2.GConf - gnome2.gtk - gnome2.pango - nspr - nss - xorg.libX11 - xorg.libXScrnSaver - xorg.libXcomposite - xorg.libXcursor - xorg.libXdamage - xorg.libXext - xorg.libXfixes - xorg.libXi - xorg.libXrandr - xorg.libXrender - xorg.libXtst - stdenv.cc.cc.lib - stdenv.cc.cc - glibc - ]; + packages = deps; libPathNative = lib.makeLibraryPath packages; libPath64 = lib.makeSearchPathOutput "lib" "lib64" packages; libPath = "${libPathNative}:${libPath64}"; @@ -77,21 +87,13 @@ stdenv.mkDerivation rec { # patch executable patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${libPath}:$out/opt/Pencil" \ - $out/opt/Pencil/pencil - - # patch libnode - patchelf \ - --set-rpath "${libPath}" \ - $out/opt/Pencil/libnode.so - - # libffmpeg is for some reason not executable - chmod a+x $out/opt/Pencil/libffmpeg.so + --set-rpath "${libPath}:$out/opt/pencil" \ + $out/opt/pencil/pencil # fix missing libudev - ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/Pencil/libudev.so.1 - wrapProgram $out/opt/Pencil/pencil \ - --prefix LD_LIBRARY_PATH : $out/opt/Pencil + ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/pencil/libudev.so.1 + wrapProgram $out/opt/pencil/pencil \ + --prefix LD_LIBRARY_PATH : $out/opt/pencil ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/graphics/rx/default.nix b/pkgs/applications/graphics/rx/default.nix index f2b56b578b6e19..3093fa107d6b75 100644 --- a/pkgs/applications/graphics/rx/default.nix +++ b/pkgs/applications/graphics/rx/default.nix @@ -7,13 +7,13 @@ with stdenv.lib; rustPlatform.buildRustPackage rec { pname = "rx"; - version = "0.3.1"; + version = "0.3.2"; src = fetchFromGitHub { owner = "cloudhead"; repo = pname; rev = "v${version}"; - sha256 = "1byaxbhd3q49473kcdd52rvn3xq7bmy8bdx3pz0jiw96bclzhcgq"; + sha256 = "1n5s7v2z13550gkqz7w6dw62jdy60wdi8w1lfa23609b4yhg4w94"; }; cargoSha256 = "173jfjvdag97f6jvfg366hjk9v3cz301cbzpcahy51rbf1cip1w1"; diff --git a/pkgs/applications/misc/blender/darwin.patch b/pkgs/applications/misc/blender/darwin.patch new file mode 100644 index 00000000000000..43b96466df28ad --- /dev/null +++ b/pkgs/applications/misc/blender/darwin.patch @@ -0,0 +1,105 @@ +diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake +--- a/build_files/cmake/platform/platform_apple.cmake ++++ b/build_files/cmake/platform/platform_apple.cmake +@@ -35,7 +35,6 @@ else() + message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}") + endif() + if(NOT EXISTS "${LIBDIR}/") +- message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'") + endif() + + if(WITH_OPENAL) +@@ -79,7 +78,7 @@ endif() + if(WITH_CODEC_SNDFILE) + set(LIBSNDFILE ${LIBDIR}/sndfile) + set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include) +- set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc) ++ set(LIBSNDFILE_LIBRARIES sndfile) + set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate + endif() + +@@ -90,7 +89,7 @@ if(WITH_PYTHON) + # normally cached but not since we include them with blender + set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m") + set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m") +- set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a) ++ set(PYTHON_LIBRARY "${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.dylib") + set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}") + # set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled + else() +@@ -155,10 +154,7 @@ if(WITH_CODEC_FFMPEG) + set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include) + set(FFMPEG_LIBRARIES + avcodec avdevice avformat avutil +- mp3lame swscale x264 xvidcore +- theora theoradec theoraenc +- vorbis vorbisenc vorbisfile ogg opus +- vpx swresample) ++ swscale swresample) + set(FFMPEG_LIBPATH ${FFMPEG}/lib) + endif() + +@@ -199,14 +195,14 @@ if(WITH_OPENCOLLADA) + set(OPENCOLLADA ${LIBDIR}/opencollada) + + set(OPENCOLLADA_INCLUDE_DIRS +- ${LIBDIR}/opencollada/include/COLLADAStreamWriter +- ${LIBDIR}/opencollada/include/COLLADABaseUtils +- ${LIBDIR}/opencollada/include/COLLADAFramework +- ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader +- ${LIBDIR}/opencollada/include/GeneratedSaxParser ++ ${LIBDIR}/opencollada/include/opencollada/COLLADAStreamWriter ++ ${LIBDIR}/opencollada/include/opencollada/COLLADABaseUtils ++ ${LIBDIR}/opencollada/include/opencollada/COLLADAFramework ++ ${LIBDIR}/opencollada/include/opencollada/COLLADASaxFrameworkLoader ++ ${LIBDIR}/opencollada/include/opencollada/GeneratedSaxParser + ) + +- set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) ++ set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada) + set(OPENCOLLADA_LIBRARIES + OpenCOLLADASaxFrameworkLoader + -lOpenCOLLADAFramework +@@ -215,7 +211,7 @@ if(WITH_OPENCOLLADA) + -lMathMLSolver + -lGeneratedSaxParser + -lbuffer -lftoa -lUTF +- ${OPENCOLLADA_LIBPATH}/libxml2.a ++ xml2 + ) + # PCRE is bundled with openCollada + # set(PCRE ${LIBDIR}/pcre) +@@ -276,14 +272,13 @@ if(WITH_BOOST) + endif() + + if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG) +- set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale and ffmpeg needs it ! + endif() + + if(WITH_OPENIMAGEIO) + set(OPENIMAGEIO ${LIBDIR}/openimageio) + set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include) + set(OPENIMAGEIO_LIBRARIES +- ${OPENIMAGEIO}/lib/libOpenImageIO.a ++ ${OPENIMAGEIO}/lib/libOpenImageIO.dylib + ${PNG_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARY} +@@ -306,7 +301,7 @@ endif() + if(WITH_OPENCOLORIO) + set(OPENCOLORIO ${LIBDIR}/opencolorio) + set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include) +- set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp) ++ set(OPENCOLORIO_LIBRARIES OpenColorIO) + set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib) + endif() + +@@ -443,7 +438,7 @@ else() + set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing") + endif() + +-if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5) ++if(FALSE) + # Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024") + endif() diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 0af78852204d6a..83f2bf63642d11 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -1,13 +1,14 @@ { config, stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew , ilmbase, libXi, libX11, libXext, libXrender , libjpeg, libpng, libsamplerate, libsndfile -, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimageio, openjpeg_1, python3Packages +, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimageio2, openjpeg, python3Packages , openvdb, libXxf86vm, tbb , zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath , jackaudioSupport ? false, libjack2 , cudaSupport ? config.cudaSupport or false, cudatoolkit , colladaSupport ? true, opencollada , enableNumpy ? false, makeWrapper +, pugixml, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL }: with lib; @@ -23,22 +24,53 @@ stdenv.mkDerivation rec { sha256 = "1zl0ar95qkxsrbqw9miz2hrjijlqjl06vg3clfk9rm7krr2l3b2j"; }; + patches = lib.optional stdenv.isDarwin ./darwin.patch; + nativeBuildInputs = [ cmake ] ++ optional cudaSupport addOpenGLRunpath; buildInputs = [ boost ffmpeg gettext glew ilmbase - libXi libX11 libXext libXrender - freetype libjpeg libpng libsamplerate libsndfile libtiff libGLU libGL openal - opencolorio openexr openimageio openjpeg_1 python zlib fftw jemalloc + freetype libjpeg libpng libsamplerate libsndfile libtiff + opencolorio openexr openimageio2 openjpeg python zlib fftw jemalloc (opensubdiv.override { inherit cudaSupport; }) - openvdb libXxf86vm tbb + tbb makeWrapper ] + ++ (if (!stdenv.isDarwin) then [ + libXi libX11 libXext libXrender + libGLU libGL openal + libXxf86vm + # OpenVDB currently doesn't build on darwin + openvdb + ] + else [ + pugixml SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL + ]) ++ optional jackaudioSupport libjack2 ++ optional cudaSupport cudatoolkit ++ optional colladaSupport opencollada; postPatch = - '' + if stdenv.isDarwin then '' + : > build_files/cmake/platform/platform_apple_xcode.cmake + substituteInPlace source/creator/CMakeLists.txt \ + --replace '${"$"}{LIBDIR}/python' \ + '${python}' + substituteInPlace build_files/cmake/platform/platform_apple.cmake \ + --replace '${"$"}{LIBDIR}/python' \ + '${python}' \ + --replace '${"$"}{LIBDIR}/opencollada' \ + '${opencollada}' \ + --replace '${"$"}{PYTHON_LIBPATH}/site-packages/numpy' \ + '${python3Packages.numpy}/${python.sitePackages}/numpy' \ + --replace 'set(OPENJPEG_INCLUDE_DIRS ' \ + 'set(OPENJPEG_INCLUDE_DIRS "'$(echo ${openjpeg.dev}/include/openjpeg-*)'") #' \ + --replace 'set(OPENJPEG_LIBRARIES ' \ + 'set(OPENJPEG_LIBRARIES "${openjpeg}/lib/libopenjp2.dylib") #' \ + --replace 'set(OPENIMAGEIO ' \ + 'set(OPENIMAGEIO "${openimageio2.out}") #' \ + --replace 'set(OPENEXR_INCLUDE_DIRS ' \ + 'set(OPENEXR_INCLUDE_DIRS "${openexr.dev}/include/OpenEXR") #' + '' else '' substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"' ''; @@ -48,7 +80,7 @@ stdenv.mkDerivation rec { "-DWITH_CODEC_SNDFILE=ON" "-DWITH_INSTALL_PORTABLE=OFF" "-DWITH_FFTW3=ON" - #"-DWITH_SDL=ON" + "-DWITH_SDL=OFF" "-DWITH_OPENCOLORIO=ON" "-DWITH_OPENSUBDIV=ON" "-DPYTHON_LIBRARY=${python.libPrefix}m" @@ -61,10 +93,18 @@ stdenv.mkDerivation rec { "-DWITH_OPENVDB=ON" "-DWITH_TBB=ON" "-DWITH_IMAGE_OPENJPEG=ON" + "-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}" + ] + ++ optionals stdenv.isDarwin [ + "-DWITH_CYCLES_OSL=OFF" # requires LLVM + "-DWITH_OPENVDB=OFF" # OpenVDB currently doesn't build on darwin + + "-DLIBDIR=/does-not-exist" ] + # Clang doesn't support "-export-dynamic" + ++ optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" ++ optional jackaudioSupport "-DWITH_JACK=ON" - ++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON" - ++ optional colladaSupport "-DWITH_OPENCOLLADA=ON"; + ++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON"; NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}"; @@ -95,7 +135,7 @@ stdenv.mkDerivation rec { # They comment two licenses: GPLv2 and Blender License, but they # say: "We've decided to cancel the BL offering for an indefinite period." license = licenses.gpl2Plus; - platforms = [ "x86_64-linux" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; maintainers = [ maintainers.goibhniu ]; }; } diff --git a/pkgs/applications/misc/font-manager/default.nix b/pkgs/applications/misc/font-manager/default.nix index edb47e11dd7f72..afa0a06d33fc5f 100644 --- a/pkgs/applications/misc/font-manager/default.nix +++ b/pkgs/applications/misc/font-manager/default.nix @@ -1,17 +1,17 @@ -{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3, fetchpatch, +{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3, pkgconfig, libxml2, json-glib , sqlite, itstool, librsvg, yelp-tools, vala, gtk3, gnome3, desktop-file-utils, wrapGAppsHook, gobject-introspection }: stdenv.mkDerivation rec { pname = "font-manager"; - version = "0.7.5"; + version = "0.7.7"; src = fetchFromGitHub { owner = "FontManager"; repo = "master"; rev = version; - sha256 = "16hma8rrkam6ngn5vbdaryn31vdixvii6920g9z928gylz9xkd3g"; + sha256 = "1bzqvspplp1zj0n0869jqbc60wgbjhf0vdrn5bj8dfawxynh8s5f"; }; nativeBuildInputs = [ @@ -38,19 +38,6 @@ stdenv.mkDerivation rec { gnome3.adwaita-icon-theme ]; - mesonFlags = [ - "-Ddisable_pycompile=true" - ]; - - patches = [ - # fix build with Vala 0.46 - (fetchpatch { - url = "https://github.com/FontManager/font-manager/commit/c73b40de11f376f4515a0edfe97fb3721a264b35.patch"; - sha256 = "0lacwsifgvda2r3z6j2a0svdqr6mgav7zkvih35xa8155y8wfpnw"; - excludes = [ "fedora/font-manager.spec" ]; - }) - ]; - postPatch = '' chmod +x meson_post_install.py patchShebangs meson_post_install.py diff --git a/pkgs/applications/misc/mako/default.nix b/pkgs/applications/misc/mako/default.nix index ffb938f30a5767..f86effe989fa26 100644 --- a/pkgs/applications/misc/mako/default.nix +++ b/pkgs/applications/misc/mako/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "mako"; - version = "1.4"; + version = "1.4.1"; src = fetchFromGitHub { owner = "emersion"; repo = pname; rev = "v${version}"; - sha256 = "11ymiq6cr2ma0iva1mqybn3j6k73bsc6lv6pcbdq7hkhd4f9b7j9"; + sha256 = "0hwvibpnrximb628w9dsfjpi30b5jy7nfkm4d94z5vhp78p43vxh"; }; nativeBuildInputs = [ meson ninja pkgconfig scdoc wayland-protocols ]; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { description = "A lightweight Wayland notification daemon"; homepage = https://wayland.emersion.fr/mako/; license = licenses.mit; - maintainers = with maintainers; [ dywedir ]; + maintainers = with maintainers; [ dywedir synthetica ]; platforms = platforms.linux; }; } diff --git a/pkgs/applications/misc/osmctools/default.nix b/pkgs/applications/misc/osmctools/default.nix index 2dfbb7a23705d3..c03e57920da9d6 100644 --- a/pkgs/applications/misc/osmctools/default.nix +++ b/pkgs/applications/misc/osmctools/default.nix @@ -1,46 +1,27 @@ -{ stdenv, fetchurl, zlib } : +{ stdenv, fetchFromGitLab, autoreconfHook, zlib }: -let - - convert_src = fetchurl { - url = http://m.m.i24.cc/osmconvert.c; - sha256 = "1mvmb171c1jqxrm80jc7qicwk4kgg7yq694n7ci65g6i284r984x"; - # version = 0.8.5 - }; +stdenv.mkDerivation rec { + pname = "osmctools"; + version = "0.9"; - filter_src = fetchurl { - url = http://m.m.i24.cc/osmfilter.c; - sha256 = "0vm3bls9jb2cb5b11dn82sxnc22qzkf4ghmnkivycigrwa74i6xl"; - # version = 1.4.0 + src = fetchFromGitLab { + owner = "osm-c-tools"; + repo = pname; + rev = version; + sha256 = "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"; }; -in - -stdenv.mkDerivation { - pname = "osmctools"; - version = "0.8.5plus1.4.0"; - + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ zlib ]; - phases = [ "buildPhase" "installPhase" ]; - - buildPhase = '' - cc ${convert_src} -lz -O3 -o osmconvert - cc ${filter_src} -O3 -o osmfilter - ''; - - installPhase = '' - mkdir -p $out/bin - mv osmconvert $out/bin - mv osmfilter $out/bin - ''; - meta = with stdenv.lib; { description = "Command line tools for transforming Open Street Map files"; homepage = [ - https://wiki.openstreetmap.org/wiki/Osmconvert - https://wiki.openstreetmap.org/wiki/Osmfilter + https://wiki.openstreetmap.org/wiki/osmconvert + https://wiki.openstreetmap.org/wiki/osmfilter + https://wiki.openstreetmap.org/wiki/osmupdate ]; + maintainers = with maintainers; [ sikmir ]; platforms = platforms.unix; license = licenses.agpl3; }; diff --git a/pkgs/applications/misc/waybar/default.nix b/pkgs/applications/misc/waybar/default.nix index 84735feef21c01..212013fb655d7e 100644 --- a/pkgs/applications/misc/waybar/default.nix +++ b/pkgs/applications/misc/waybar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja +{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja, wrapGAppsHook , wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt, scdoc, spdlog, gtk-layer-shell , traySupport ? true, libdbusmenu-gtk3 , pulseSupport ? false, libpulseaudio @@ -19,7 +19,7 @@ }; nativeBuildInputs = [ - meson ninja pkgconfig scdoc + meson ninja pkgconfig scdoc wrapGAppsHook ]; buildInputs = with stdenv.lib; diff --git a/pkgs/applications/networking/Sylk/default.nix b/pkgs/applications/networking/Sylk/default.nix index 36f6279c209243..d99a87954decd8 100644 --- a/pkgs/applications/networking/Sylk/default.nix +++ b/pkgs/applications/networking/Sylk/default.nix @@ -2,7 +2,7 @@ let pname = "Sylk"; - version = "2.1.0"; + version = "2.5.0"; in appimageTools.wrapType2 rec { @@ -10,7 +10,7 @@ appimageTools.wrapType2 rec { src = fetchurl { url = "http://download.ag-projects.com/Sylk/Sylk-${version}-x86_64.AppImage"; - sha256 = "1ifi8qr6f84dcssxhv5ar1s48nsqxiv2j1blc82248hmq5is24mf"; + sha256 = "1jhs25zzdac3r2wz886vlpb0bz77p52mdlrbsbv28h6is79pbd69"; }; profile = '' diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index ef0b5ac0eb67bb..c4a09c8063dbfe 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -45,11 +45,11 @@ let flash = stdenv.mkDerivation rec { pname = "flashplayer-ppapi"; - version = "32.0.0.303"; + version = "32.0.0.314"; src = fetchzip { url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz"; - sha256 = "0b2cw8y9rif2p0lyy2ir1v5lchxlsh543b9c743a2p85c9p7q62b"; + sha256 = "05xcscpzglpfpiiqc3ngs5snxli99irjk18g5vdhw91jk9808gnl"; stripRoot = false; }; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix index 7e3705a3b0bd96..5ecb6bfb0766b1 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix @@ -74,7 +74,7 @@ let in stdenv.mkDerivation rec { pname = "flashplayer"; - version = "32.0.0.303"; + version = "32.0.0.314"; src = fetchurl { url = @@ -85,14 +85,14 @@ stdenv.mkDerivation rec { sha256 = if debug then if arch == "x86_64" then - "05hfc5ywmcvp6zf8aqmzjp3qy3byp0zdl0ssrv9gvzcskdqkhsj2" + "076l93wjcy15sic88cyq6msp87gdhcvbk4ym2vbvvjz2bav2z456" else - "12hl8lvxz648ha70gi3v85mwf0nnayjiaslr669vjan3ww94jymv" + "0kxr8d6fh00akqgk3lwv0z6rk7xswislicsbh9b9p33f19mj7c8a" else if arch == "x86_64" then - "0x0mabgswly2v8z13832pkbjsv404aq61pback6sgmp2lyycdg6w" + "0a3hvp0qmqlann8k875ajf0i70cv0an1a3mr8kbgji46dxqvwjxz" else - "16kbpf1i3aqlrfbfh5ncg1n46ncl9hp6qdp36s5j3ivbc68pj81z"; + "0jyywas2z7ssgzng82qgnp01gy6nccqavkbx9529m07xrclvqbxn"; }; nativeBuildInputs = [ unzip ]; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix index 28b4c8a36c9323..353aff7e707e1c 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation { pname = "flashplayer-standalone"; - version = "32.0.0.303"; + version = "32.0.0.314"; src = fetchurl { url = @@ -60,9 +60,9 @@ stdenv.mkDerivation { "https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz"; sha256 = if debug then - "0xkzlv90lpyy54j6pllknrp1l9vjyh6dsl63l4c8cgh4i830gi14" + "0zlin94rip13rn58m7v5l6m20ylnw59l77rbg5j5qyxkr53zawdz" else - "0mi3ggv6zhzmdd1h68cgl87n6izhp0pbkhnidd2gl2cp95f23c2d"; + "0pfrm02iwa01pqx3adqj0sw27p1ddlz9knjky6x248ak8zywsqr2"; }; nativeBuildInputs = [ unzip ]; diff --git a/pkgs/applications/networking/cawbird/default.nix b/pkgs/applications/networking/cawbird/default.nix index 6462dd49949331..af8b7241659e05 100644 --- a/pkgs/applications/networking/cawbird/default.nix +++ b/pkgs/applications/networking/cawbird/default.nix @@ -20,14 +20,14 @@ }: stdenv.mkDerivation rec { - version = "1.0.3.1"; + version = "1.0.4"; pname = "cawbird"; src = fetchFromGitHub { owner = "IBBoard"; repo = "cawbird"; rev = "v${version}"; - sha256 = "sha256:1v1y4bx0mm518b9vlpsry12fw1qz2j28jfhjqq73blvzd89lgb0y"; + sha256 = "sha256:1gqi7bn08b9cjpb0mgs6bk1a2npdfhn56ckps95nck0jyqzfbnir"; }; nativeBuildInputs = [ diff --git a/pkgs/applications/networking/cluster/cni/plugins.nix b/pkgs/applications/networking/cluster/cni/plugins.nix index d0186fb9b4c033..39c3b9f65072f2 100644 --- a/pkgs/applications/networking/cluster/cni/plugins.nix +++ b/pkgs/applications/networking/cluster/cni/plugins.nix @@ -1,13 +1,13 @@ { stdenv, lib, fetchFromGitHub, go, removeReferencesTo, buildGoPackage }: buildGoPackage rec { pname = "cni-plugins"; - version = "0.8.3"; + version = "0.8.4"; src = fetchFromGitHub { owner = "containernetworking"; repo = "plugins"; rev = "v${version}"; - sha256 = "0dc4fs08x4x518yhgvq3drjvansnc0cb8rm4h5wiw7k3whjii3cd"; + sha256 = "02kz6y3klhbriybsskn4hmldwli28cycnp2klsm2x0y9c73iczdp"; }; goDeps = ./plugins-deps.nix; diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix deleted file mode 100644 index 99cb7b98f5cc88..00000000000000 --- a/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix +++ /dev/null @@ -1,21 +0,0 @@ -# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 -[ - { - goPackagePath = "github.com/docker/machine"; - fetch = { - type = "git"; - url = "https://github.com/docker/machine"; - rev = "5b274558ea6ca822c06dd407a4e774a0105c3f60"; - sha256 = "1wdq9h4bx7awgclh969gvmcnl9jvgv7ldfklnclh5iv47mi7q22d"; - }; - } - { - goPackagePath = "github.com/zchee/libhyperkit"; - fetch = { - type = "git"; - url = "https://github.com/zchee/libhyperkit"; - rev = "1a19a7693fac32b46ec6cdd22da6fbec974447fc"; - sha256 = "119f5gcl24znwnmi837jk667asd3lirx32jldpd4mbyb3sm9nz24"; - }; - } -] diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix index 1c2caff50d5368..1f1e59a56a4e8d 100644 --- a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix +++ b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix @@ -1,24 +1,36 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, Hypervisor, vmnet }: +{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch, pkgconfig, cctools, Hypervisor, vmnet }: buildGoPackage rec { pname = "docker-machine-xhyve"; - version = "0.3.3"; + version = "0.4.0"; goPackagePath = "github.com/zchee/docker-machine-driver-xhyve"; - goDeps = ./xhyve-deps.nix; + + # https://github.com/machine-drivers/docker-machine-driver-xhyve/pull/225 + patches = fetchpatch { + url = "https://github.com/machine-drivers/docker-machine-driver-xhyve/commit/546256494bf2ccc33e4125bf45f504b0e3027d5a.patch"; + sha256 = "1i8wxqccqkxvqrbsyd0g9s0kdskd8xi2jv0c1bji9aj4rq0a8cgz"; + }; + + preBuild = '' + make -C go/src/${goPackagePath} CC=${stdenv.cc}/bin/cc LIBTOOL=${cctools}/bin/libtool GIT_CMD=: lib9p + export CGO_CFLAGS=-I$(pwd)/go/src/${goPackagePath}/vendor/github.com/jceel/lib9p + export CGO_LDFLAGS=$(pwd)/go/src/${goPackagePath}/vendor/build/lib9p/lib9p.a + ''; + buildFlags = "--tags lib9p"; src = fetchFromGitHub { rev = "v${version}"; - owner = "zchee"; + owner = "machine-drivers"; repo = "docker-machine-driver-xhyve"; - sha256 = "0rj6pyqp4yv4j28bglqjs95rip5i77vv8mrkmqv1rxrsl3i8aqqy"; + sha256 = "0000v97fr8xc5b39v44hsa87wrbk4bcwyaaivxv4hxlf4vlgg863"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ Hypervisor vmnet ]; meta = with stdenv.lib; { - homepage = https://github.com/zchee/docker-machine-driver-xhyve; + homepage = https://github.com/machine-drivers/docker-machine-driver-xhyve; description = "Xhyve driver for docker-machine."; license = licenses.bsd3; maintainers = with maintainers; [ periklis ]; diff --git a/pkgs/applications/networking/mailreaders/mutt/default.nix b/pkgs/applications/networking/mailreaders/mutt/default.nix index f0b8fdcf8e2a19..b7bf5eb329ca3d 100644 --- a/pkgs/applications/networking/mailreaders/mutt/default.nix +++ b/pkgs/applications/networking/mailreaders/mutt/default.nix @@ -27,11 +27,11 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "mutt"; - version = "1.13.2"; + version = "1.13.3"; src = fetchurl { url = "http://ftp.mutt.org/pub/mutt/${pname}-${version}.tar.gz"; - sha256 = "0x4yfvk8415p80h9an242n6q3b43mw6mnnczh95zd3j0zwdr6wrg"; + sha256 = "0y3ks10mc7m8c7pd4c4j8pj7n5rqcvzrjs8mzldv7z7jnlb30hkq"; }; patches = optional smimeSupport (fetchpatch { diff --git a/pkgs/applications/radio/soapysdr/default.nix b/pkgs/applications/radio/soapysdr/default.nix index c4879f01e60659..e072ec97b9745d 100644 --- a/pkgs/applications/radio/soapysdr/default.nix +++ b/pkgs/applications/radio/soapysdr/default.nix @@ -8,7 +8,7 @@ let - version = "0.7.1"; + version = "0.7.2"; modulesVersion = with lib; versions.major version + "." + versions.minor version; modulesPath = "lib/SoapySDR/modules" + modulesVersion; extraPackagesSearchPath = lib.makeSearchPath modulesPath extraPackages; @@ -21,7 +21,7 @@ in stdenv.mkDerivation { owner = "pothosware"; repo = "SoapySDR"; rev = "soapy-sdr-${version}"; - sha256 = "1rbnd3w12kzsh94fiywyn4vch7h0kf75m88fi6nq992b3vnmiwvl"; + sha256 = "102wnpjxrwba20pzdh1vvx0yg1h8vqd8z914idxflg9p14r6v5am"; }; nativeBuildInputs = [ cmake makeWrapper pkgconfig ]; diff --git a/pkgs/applications/science/math/nota/default.nix b/pkgs/applications/science/math/nota/default.nix new file mode 100644 index 00000000000000..897785ef6e8b4d --- /dev/null +++ b/pkgs/applications/science/math/nota/default.nix @@ -0,0 +1,40 @@ +{ mkDerivation, haskellPackages, fetchurl, lib }: + +mkDerivation rec { + pname = "nota"; + version = "1.0"; + + # Can't use fetchFromGitLab since codes.kary.us doesn't support https + src = fetchurl { + url = "http://codes.kary.us/nota/nota/-/archive/V${version}/nota-V${version}.tar.bz2"; + sha256 = "0bbs6bm9p852hvqadmqs428ir7m65h2prwyma238iirv42pk04v8"; + }; + + postUnpack = '' + export sourceRoot=$sourceRoot/source + ''; + + isLibrary = false; + isExecutable = true; + + libraryHaskellDepends = with haskellPackages; [ + base + bytestring + array + split + scientific + parsec + ansi-terminal + regex-compat + containers + terminal-size + numbers + text + time + ]; + + description = "The most beautiful command line calculator"; + homepage = "https://kary.us/nota"; + license = lib.licenses.mpl20; + maintainers = with lib.maintainers; [ dtzWill ]; +} diff --git a/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix b/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix index 94753275b61326..9b77690868be13 100644 --- a/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix +++ b/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ]; patchPhase = '' - sed -i "s|local daemon=.*|local daemon=$out/bin/gitstatusd|" gitstatus.plugin.zsh + sed -i "1i GITSTATUS_DAEMON=$out/bin/gitstatusd" gitstatus.plugin.zsh ''; installPhase = '' install -Dm755 gitstatusd $out/bin/gitstatusd diff --git a/pkgs/applications/version-management/gitlab/data.json b/pkgs/applications/version-management/gitlab/data.json index be7f0afdc77df3..3f1aef360ba717 100644 --- a/pkgs/applications/version-management/gitlab/data.json +++ b/pkgs/applications/version-management/gitlab/data.json @@ -1,11 +1,11 @@ { - "version": "12.6.2", - "repo_hash": "0bchamvr3f0ph49f7xa76gsp2mjj1ajy4q0wy1hjvr9bayxx94av", + "version": "12.6.4", + "repo_hash": "0jsww785bxvjdrp1wsz6zkvx9zr69j24bway6nfyjkz8a7vbl9ls", "owner": "gitlab-org", "repo": "gitlab", - "rev": "v12.6.2-ee", + "rev": "v12.6.4-ee", "passthru": { - "GITALY_SERVER_VERSION": "a4b6c71d4b7c1588587345e2dfe0c6bd7cc63a83", + "GITALY_SERVER_VERSION": "1.77.1", "GITLAB_PAGES_VERSION": "1.12.0", "GITLAB_SHELL_VERSION": "10.3.0", "GITLAB_WORKHORSE_VERSION": "8.18.0" diff --git a/pkgs/applications/version-management/gitlab/gitaly/default.nix b/pkgs/applications/version-management/gitlab/gitaly/default.nix index 97d7404de8b176..a4b4540e87aa9b 100644 --- a/pkgs/applications/version-management/gitlab/gitaly/default.nix +++ b/pkgs/applications/version-management/gitlab/gitaly/default.nix @@ -17,14 +17,14 @@ let }; }; in buildGoPackage rec { - version = "a4b6c71d4b7c1588587345e2dfe0c6bd7cc63a83"; + version = "1.77.1"; pname = "gitaly"; src = fetchFromGitLab { owner = "gitlab-org"; repo = "gitaly"; - rev = version; - sha256 = "1pxmhq1nrc8q2kk83bz5afx14hshqgzqm6j4vgmyjvbmdvgl80wv"; + rev = "v${version}"; + sha256 = "08xc9lxlvga36yq1wdvb1h4zk70c36qspyd7azhkw84kzwfrif1c"; }; # Fix a check which assumes that hook files are writeable by their diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile index b6f57297c077e8..2c4a5f2e816c09 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile @@ -327,7 +327,7 @@ group :metrics do gem 'influxdb', '~> 0.2', require: false # Prometheus - gem 'prometheus-client-mmap', '~> 0.9.10' + gem 'prometheus-client-mmap', '~> 0.10.0' gem 'raindrops', '~> 0.18' end diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock index 0e3227058620ac..57e428ca955ec8 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock @@ -531,8 +531,8 @@ GEM regexp_parser (~> 1.1) regexp_property_values (~> 0.3) json (1.8.6) - json-jwt (1.9.4) - activesupport + json-jwt (1.11.0) + activesupport (>= 4.2) aes_key_wrap bindata json-schema (2.8.0) @@ -746,7 +746,7 @@ GEM parser unparser procto (0.0.3) - prometheus-client-mmap (0.9.10) + prometheus-client-mmap (0.10.0) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) @@ -1283,7 +1283,7 @@ DEPENDENCIES peek (~> 1.1) pg (~> 1.1) premailer-rails (~> 1.10.3) - prometheus-client-mmap (~> 0.9.10) + prometheus-client-mmap (~> 0.10.0) pry-byebug (~> 3.5.1) pry-rails (~> 0.3.4) rack (~> 2.0.7) diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix index 55cdfaa16b91cd..854178ffbe37e8 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix +++ b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix @@ -2326,10 +2326,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "065k7vffdki73f4nz89lxi6wxmcw5dlf593831pgvlbralll6x3r"; + sha256 = "18rf9v20i0dk5dblr7m22di959xpch2h7gsx0cl585cryr7apwp3"; type = "gem"; }; - version = "1.9.4"; + version = "1.11.0"; }; json-schema = { dependencies = ["addressable"]; @@ -3365,10 +3365,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0immyg4as0isyj2dcjf44n0avg1jv5kx1qk0asrgb5ayzwmjqg1k"; + sha256 = "00d2c79xhz5k3fcclarjr1ffxbrvc6236f4rrvriad9kwqr7c1mp"; type = "gem"; }; - version = "0.9.10"; + version = "0.10.0"; }; pry = { dependencies = ["coderay" "method_source"]; diff --git a/pkgs/applications/window-managers/sway/lock-fancy.nix b/pkgs/applications/window-managers/sway/lock-fancy.nix index 6dd8db0f45be84..aa2db698f747c5 100644 --- a/pkgs/applications/window-managers/sway/lock-fancy.nix +++ b/pkgs/applications/window-managers/sway/lock-fancy.nix @@ -18,7 +18,7 @@ in stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "Big-B"; - repo = pname; + repo = "swaylock-fancy"; rev = "35618ceec70338047355b6b057825e68f16971b5"; sha256 = "06fjqwblmj0d9pq6y11rr73mizirna4ixy6xkvblf1c7sn5n8lpc"; }; diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index f9cf8f1f0c1f65..4089436c0e0b86 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -100,9 +100,9 @@ stdenv.mkDerivation (args // { '' + stdenv.lib.optionalString verifyCargoDeps '' if ! diff source/Cargo.lock $cargoDeps/Cargo.lock ; then echo - echo "ERROR: cargoSha256 is out of date." + echo "ERROR: cargoSha256 is out of date" echo - echo "Cargo.lock is not the same in $cargoDeps." + echo "Cargo.lock is not the same in $cargoDeps" echo echo "To fix the issue:" echo '1. Use "1111111111111111111111111111111111111111111111111111" as the cargoSha256 value' diff --git a/pkgs/data/fonts/victor-mono/default.nix b/pkgs/data/fonts/victor-mono/default.nix index ea562f7fa6ea6a..89b13585eb0ba9 100644 --- a/pkgs/data/fonts/victor-mono/default.nix +++ b/pkgs/data/fonts/victor-mono/default.nix @@ -2,7 +2,7 @@ let pname = "victor-mono"; - version = "1.3.0"; + version = "1.3.1"; in fetchFromGitHub rec { name = "${pname}-${version}"; @@ -26,7 +26,7 @@ in fetchFromGitHub rec { unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname} ''; - sha256 = "1lv2x7kfspabnhvm8z79n165fw3awvzj1r8f0g5zn26wgdalgw69"; + sha256 = "1yj91rhs9pd705406r4lqabdfzjclbz837nzm6z1rziy6mbpd61s"; meta = with lib; { description = "Free programming font with cursive italics and ligatures"; diff --git a/pkgs/desktops/gnome-3/apps/seahorse/default.nix b/pkgs/desktops/gnome-3/apps/seahorse/default.nix index c6d5b22f934810..315968fde651b0 100644 --- a/pkgs/desktops/gnome-3/apps/seahorse/default.nix +++ b/pkgs/desktops/gnome-3/apps/seahorse/default.nix @@ -26,11 +26,11 @@ stdenv.mkDerivation rec { pname = "seahorse"; - version = "3.34"; + version = "3.34.1"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "16sfnqrdlr5xx6kixx2ln1mva7nngjlw1k3f5n454vyaigffjh2v"; + sha256 = "19c2zylwgycb5q9hal8rmflc2sywc5c2grpsfsq3rf37i9lfwynw"; }; doCheck = true; diff --git a/pkgs/development/compilers/bs-platform/bs-platform-62.nix b/pkgs/development/compilers/bs-platform/build-bs-platform.nix similarity index 54% rename from pkgs/development/compilers/bs-platform/bs-platform-62.nix rename to pkgs/development/compilers/bs-platform/build-bs-platform.nix index d2913caaee6465..03e01a7a0da5e6 100644 --- a/pkgs/development/compilers/bs-platform/bs-platform-62.nix +++ b/pkgs/development/compilers/bs-platform/build-bs-platform.nix @@ -1,35 +1,33 @@ -{ stdenv, fetchFromGitHub, ninja, nodejs, python3 }: -let - version = "6.2.1"; - ocaml-version = "4.06.1"; - src = fetchFromGitHub { - owner = "BuckleScript"; - repo = "bucklescript"; - rev = "${version}"; - sha256 = "0zx9nq7cik0c60n3rndqfqy3vdbj5lcrx6zcqcz2d60jjxi1z32y"; - fetchSubmodules = true; - }; - ocaml = import ./ocaml.nix { - bs-version = version; +# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix +# to make potential future updates simpler + +{ stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3, + ocaml-version, version, src, + ocaml ? (import ./ocaml.nix { version = ocaml-version; inherit stdenv; src = "${src}/ocaml"; - }; -in + }), + custom-ninja ? (ninja.overrideAttrs (attrs: { + src = runCommand "ninja-patched-source" {} '' + mkdir -p $out + tar zxvf ${src}/vendor/ninja.tar.gz -C $out + ''; + patches = []; + })) +}: stdenv.mkDerivation { inherit src version; pname = "bs-platform"; BS_RELEASE_BUILD = "true"; - buildInputs = [ nodejs python3 ]; + buildInputs = [ nodejs python3 custom-ninja ]; patchPhase = '' sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js - mkdir -p ./native/${ocaml-version}/bin - ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin - + ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin rm -f vendor/ninja/snapshot/ninja.linux - cp ${ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux + cp ${custom-ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux ''; configurePhase = '' @@ -42,12 +40,9 @@ stdenv.mkDerivation { installPhase = '' node scripts/install.js - mkdir -p $out/bin - cp -rf jscomp lib vendor odoc_gen native $out cp bsconfig.json package.json $out - ln -s $out/lib/bsb $out/bin/bsb ln -s $out/lib/bsc $out/bin/bsc ln -s $out/lib/bsrefmt $out/bin/bsrefmt diff --git a/pkgs/development/compilers/bs-platform/default.nix b/pkgs/development/compilers/bs-platform/default.nix index 5eb11671ca904b..7abf7b306a554c 100644 --- a/pkgs/development/compilers/bs-platform/default.nix +++ b/pkgs/development/compilers/bs-platform/default.nix @@ -1,15 +1,28 @@ -{ stdenv, fetchFromGitHub, ninja, nodejs, python3, ... }: +{ stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }: let + build-bs-platform = import ./build-bs-platform.nix; +in +(build-bs-platform { + inherit stdenv runCommand fetchFromGitHub ninja nodejs python3; + version = "7.0.1"; + ocaml-version = "4.06.1"; + + src = fetchFromGitHub { + owner = "BuckleScript"; + repo = "bucklescript"; + rev = "52770839e293ade2bcf187f2639000ca0a9a1d46"; + sha256 = "0s7g2zfhshsilv9zyp0246bypg34d294z27alpwz03ws9608yr7k"; + fetchSubmodules = true; + }; +}).overrideAttrs (attrs: { meta = with stdenv.lib; { description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code."; homepage = https://bucklescript.github.io; license = licenses.lgpl3; - maintainers = with maintainers; [ turbomack gamb ]; + maintainers = with maintainers; [ turbomack gamb anmonteiro ]; platforms = platforms.all; + # Currently there is an issue with aarch build in hydra + # https://github.com/BuckleScript/bucklescript/issues/4091 + badPlatforms = platforms.aarch64; }; -in -{ - bs-platform-621 = import ./bs-platform-62.nix { - inherit stdenv fetchFromGitHub ninja nodejs python3; - } // { inherit meta; }; -} +}) diff --git a/pkgs/development/compilers/bs-platform/ocaml.nix b/pkgs/development/compilers/bs-platform/ocaml.nix index 1f2fdd571f3d33..9aa34d02b362cb 100644 --- a/pkgs/development/compilers/bs-platform/ocaml.nix +++ b/pkgs/development/compilers/bs-platform/ocaml.nix @@ -1,7 +1,7 @@ -{ stdenv, src, version, bs-version }: +{ stdenv, src, version }: stdenv.mkDerivation rec { inherit src version; - name = "ocaml-${version}+bs-${bs-version}"; + name = "ocaml-${version}+bs"; configurePhase = '' ./configure -prefix $out ''; diff --git a/pkgs/development/compilers/ghc/8.10.1.nix b/pkgs/development/compilers/ghc/8.10.1.nix index 25226d4d0e6b93..b68e48025512d8 100644 --- a/pkgs/development/compilers/ghc/8.10.1.nix +++ b/pkgs/development/compilers/ghc/8.10.1.nix @@ -86,12 +86,12 @@ let in stdenv.mkDerivation (rec { - version = "8.10.0.20191210"; + version = "8.10.0.20200108"; name = "${targetPrefix}ghc-${version}"; src = fetchurl { - url = "https://downloads.haskell.org/ghc/8.10.1-alpha2/ghc-${version}-src.tar.xz"; - sha256 = "1mmv8s9cs41kp7wh1qqnzin5wv32cvs3lmzgda7njz0ssqb0mmvj"; + url = "https://downloads.haskell.org/ghc/8.10.1-rc1/ghc-${version}-src.tar.xz"; + sha256 = "1xm6cb3s2x3rycnyvkh12mp65xi3zbwrk5ima8sg7c245f3dl0ay"; }; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index 3231c17e8d9b80..751b9667a1f14a 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -96,8 +96,7 @@ let "-Dprefix=${placeholder "out"}" "-Dman1dir=${placeholder "out"}/share/man/man1" "-Dman3dir=${placeholder "out"}/share/man/man3" - ] - ++ optional (stdenv.isAarch32 || stdenv.isMips) "-Dldflags=\"-lm -lrt\""; + ]; configureScript = optionalString (!crossCompiling) "${stdenv.shell} ./Configure"; diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix index f05b3b1eec63ed..159637ae9d5f84 100644 --- a/pkgs/development/interpreters/python/hooks/default.nix +++ b/pkgs/development/interpreters/python/hooks/default.nix @@ -2,6 +2,9 @@ { python , callPackage , makeSetupHook +, disabledIf +, isPy3k +, ensureNewerSourcesForZipFilesHook }: let @@ -109,6 +112,15 @@ in rec { }; } ./setuptools-check-hook.sh) {}; + venvShellHook = disabledIf (!isPy3k) (callPackage ({ }: + makeSetupHook { + name = "venv-shell-hook"; + deps = [ ensureNewerSourcesForZipFilesHook ]; + substitutions = { + inherit pythonInterpreter; + }; + } ./venv-shell-hook.sh) {}); + wheelUnpackHook = callPackage ({ wheel }: makeSetupHook { name = "wheel-unpack-hook.sh"; diff --git a/pkgs/development/interpreters/python/hooks/venv-shell-hook.sh b/pkgs/development/interpreters/python/hooks/venv-shell-hook.sh new file mode 100644 index 00000000000000..3185b1f9fae939 --- /dev/null +++ b/pkgs/development/interpreters/python/hooks/venv-shell-hook.sh @@ -0,0 +1,26 @@ +venvShellHook() { + echo "Executing venvHook" + runHook preShellHook + + if [ -d "${venvDir}" ]; then + echo "Skipping venv creation, '${venvDir}' already exists" + else + echo "Creating new venv environment in path: '${venvDir}'" + @pythonInterpreter@ -m venv "${venvDir}" + fi + + source "${venvDir}/bin/activate" + + runHook postShellHook + echo "Finished executing venvShellHook" +} + +if [ -z "${dontUseVenvShellHook:-}" ] && [ -z "${shellHook-}" ]; then + echo "Using venvShellHook" + if [ -z "${venvDir-}" ]; then + echo "Error: \`venvDir\` should be set when using \`venvShellHook\`." + exit 1 + else + shellHook=venvShellHook + fi +fi diff --git a/pkgs/development/libraries/alure2/default.nix b/pkgs/development/libraries/alure2/default.nix new file mode 100644 index 00000000000000..91919873fa631d --- /dev/null +++ b/pkgs/development/libraries/alure2/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, cmake, openal, libvorbis, opusfile, libsndfile }: + +stdenv.mkDerivation rec { + pname = "alure2"; + version = "unstable-2020-01-09"; + + src = fetchFromGitHub { + owner = "kcat"; + repo = "alure"; + rev = "4b7b58d3f0de444d6f26aa705704deb59145f586"; + sha256 = "0ds18hhy2wpvx498z5hcpzfqz9i60ixsi0cjihyvk20rf4qy12vg"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ openal libvorbis opusfile libsndfile ]; + + meta = with stdenv.lib; { + description = "A utility library for OpenAL, providing a C++ API and managing common tasks that include file loading, caching, and streaming"; + homepage = "https://github.com/kcat/alure"; + license = licenses.zlib; + platforms = platforms.linux; + maintainers = with maintainers; [ McSinyx ]; + }; +} diff --git a/pkgs/development/libraries/cln/default.nix b/pkgs/development/libraries/cln/default.nix index dc36414fc28d76..6627f46c18e76d 100644 --- a/pkgs/development/libraries/cln/default.nix +++ b/pkgs/development/libraries/cln/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "cln"; - version = "1.3.5"; + version = "1.3.6"; src = fetchurl { url = "${meta.homepage}${pname}-${version}.tar.bz2"; - sha256 = "0bc43v4fyxwik9gjkvm8jan74bkx9bjssv61lfh9jhhblmj010bq"; + sha256 = "0jlq9l4hphk7qqlgqj9ihjp4m3rwjbhk6q4v00lsbgbri07574pl"; }; buildInputs = [ gmp ]; diff --git a/pkgs/development/libraries/cpp-netlib/default.nix b/pkgs/development/libraries/cpp-netlib/default.nix index a4729cdeaed8b2..31c4c70dd9d000 100644 --- a/pkgs/development/libraries/cpp-netlib/default.nix +++ b/pkgs/development/libraries/cpp-netlib/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, boost, openssl, asio }: +{ stdenv, fetchFromGitHub, cmake, boost, openssl }: stdenv.mkDerivation rec { pname = "cpp-netlib"; @@ -14,18 +14,22 @@ stdenv.mkDerivation rec { buildInputs = [ cmake boost openssl ]; - # This can be removed when updating to 0.13, see https://github.com/cpp-netlib/cpp-netlib/issues/629 - propagatedBuildInputs = [ asio ]; - cmakeFlags = [ "-DCPP-NETLIB_BUILD_SHARED_LIBS=ON" ]; enableParallelBuilding = true; + # The test driver binary lacks an RPath to the library's libs + preCheck = '' + export LD_LIBRARY_PATH=$PWD/libs/network/src + ''; + + # Most tests make network GET requests to various websites + doCheck = false; + meta = with stdenv.lib; { - description = - "Collection of open-source libraries for high level network programming"; + description = "Collection of open-source libraries for high level network programming"; homepage = https://cpp-netlib.org; license = licenses.boost; platforms = platforms.all; diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix index cf988d32399463..16368ae21276b3 100644 --- a/pkgs/development/libraries/glfw/3.x.nix +++ b/pkgs/development/libraries/glfw/3.x.nix @@ -4,14 +4,14 @@ }: stdenv.mkDerivation rec { - version = "3.3"; + version = "3.3.1"; pname = "glfw"; src = fetchFromGitHub { owner = "glfw"; repo = "GLFW"; rev = version; - sha256 = "1f1hqpqffzg46z33ybs2c3akmkly7b3qmgp5byk50nvad6g2pm4p"; + sha256 = "0c7nlrhq84gdq10diyv6nshjbv8410bmn0vging815pfvis208xc"; }; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/glog/default.nix b/pkgs/development/libraries/glog/default.nix index 04846c3ab427a2..aa846e41d550e3 100644 --- a/pkgs/development/libraries/glog/default.nix +++ b/pkgs/development/libraries/glog/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, perl }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, gflags, perl }: stdenv.mkDerivation rec { pname = "glog"; @@ -20,8 +20,16 @@ stdenv.mkDerivation rec { }) ]; + postPatch = lib.optionalString stdenv.isDarwin '' + # A path clash on case-insensitive file systems blocks creation of the build directory. + # The file in question is specific to bazel and does not influence the build result. + rm BUILD + ''; + nativeBuildInputs = [ cmake ]; + propagatedBuildInputs = [ gflags ]; + cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; checkInputs = [ perl ]; diff --git a/pkgs/development/libraries/leptonica/default.nix b/pkgs/development/libraries/leptonica/default.nix index e26f4f6022aad1..6d73b00a6d17b2 100644 --- a/pkgs/development/libraries/leptonica/default.nix +++ b/pkgs/development/libraries/leptonica/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "leptonica"; - version = "1.78.0"; + version = "1.79.0"; src = fetchurl { url = "http://www.leptonica.org/source/${pname}-${version}.tar.gz"; - sha256 = "122s9b8hi93va4lgwnwrbma50x5fp740npy0s92xybd2wy0jxvg2"; + sha256 = "1n004gv1dj3pq1fcnfdclvvx5nang80336aa67nvs3nnqp4ncn84"; }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; diff --git a/pkgs/development/libraries/libdeflate/default.nix b/pkgs/development/libraries/libdeflate/default.nix index b06a0a9450ab60..cc06815bbffc3e 100644 --- a/pkgs/development/libraries/libdeflate/default.nix +++ b/pkgs/development/libraries/libdeflate/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "libdeflate"; - version = "1.3"; + version = "1.5"; src = fetchFromGitHub { owner = "ebiggers"; repo = "libdeflate"; rev = "v${version}"; - sha256 = "019xsz5dnbpxiz29j3zqsxyi4ksjkkygi6a2zyc8fxbm8lvaa9ar"; + sha256 = "1v0y7998p8a8wpblnpdyk5zzvpj8pbrpzxwxmv0b0axrhaarxrf3"; }; postPatch = '' @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { description = "Fast DEFLATE/zlib/gzip compressor and decompressor"; license = licenses.mit; homepage = https://github.com/ebiggers/libdeflate; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ orivej ]; }; } diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 0556e311736a3d..44cdd9edf523aa 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -102,6 +102,7 @@ in stdenv.mkDerivation rec { ] ++ optionals stdenv.isLinux [ "QEMU_BRIDGE_HELPER=/run/wrappers/bin/qemu-bridge-helper" "QEMU_PR_HELPER=/run/libvirt/nix-helpers/qemu-pr-helper" + "EBTABLES_PATH=${ebtables}/bin/ebtables-legacy" "--with-attr" "--with-apparmor" "--with-secdriver-apparmor" diff --git a/pkgs/development/libraries/libvterm-neovim/default.nix b/pkgs/development/libraries/libvterm-neovim/default.nix index 50ee7e4d387307..0cd1b64c1b9e6c 100644 --- a/pkgs/development/libraries/libvterm-neovim/default.nix +++ b/pkgs/development/libraries/libvterm-neovim/default.nix @@ -6,13 +6,14 @@ stdenv.mkDerivation { pname = "libvterm-neovim"; - version = "2019-10-08"; + # Releases are not tagged, look at commit history to find latest release + version = "0.1.3"; src = fetchFromGitHub { owner = "neovim"; repo = "libvterm"; - rev = "7c72294d84ce20da4c27362dbd7fa4b08cfc91da"; - sha256 = "111qyxq33x74dwdnqcnzlv9j0n8hxyribd6ppwcsxmyrniyw9qrk"; + rev = "65dbda3ed214f036ee799d18b2e693a833a0e591"; + sha256 = "0r6yimzbkgrsi9aaxwvxahai2lzgjd1ysblr6m6by5w459853q3n"; }; buildInputs = [ perl ]; diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix index 33bc4c6e82c2d1..90da6c1921201f 100644 --- a/pkgs/development/libraries/onnxruntime/default.nix +++ b/pkgs/development/libraries/onnxruntime/default.nix @@ -1,16 +1,16 @@ { stdenv, fetchFromGitHub, glibcLocales -, cmake, python3 +, cmake, python3, libpng, zlib }: stdenv.mkDerivation rec { pname = "onnxruntime"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitHub { owner = "microsoft"; repo = "onnxruntime"; rev = "v${version}"; - sha256 = "1d28lzrjnq69yl8j9ncxlsxl0bniacn3hnsr9van10zgp527436v"; + sha256 = "1ryf5v2h07c7b42q2p9id88i270ajyz5rlsradp00dy8in6dn2yr"; # TODO: use nix-versions of grpc, onnx, eigen, googletest, etc. # submodules increase src size and compile times significantly # not currently feasible due to how integrated cmake build is with git @@ -25,12 +25,19 @@ stdenv.mkDerivation rec { python3 # for shared-lib or server ]; + buildInputs = [ + # technically optional, but highly recommended + libpng + zlib + ]; + cmakeDir = "../cmake"; cmakeFlags = [ "-Donnxruntime_USE_OPENMP=ON" "-Donnxruntime_BUILD_SHARED_LIB=ON" - "-Donnxruntime_ENABLE_LTO=ON" + # flip back to ON next release + "-Donnxruntime_ENABLE_LTO=OFF" # https://github.com/microsoft/onnxruntime/issues/2828 ]; # ContribOpTest.StringNormalizerTest sets locale to en_US.UTF-8" diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 118aa984c17405..3016f025e9dc1a 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -36,7 +36,7 @@ let outputs = [ "bin" "dev" "out" "man" ] ++ optional withDocs "doc"; setOutputFlags = false; - separateDebugInfo = stdenv.hostPlatform.isLinux; + separateDebugInfo = stdenv.cc.isGNU; nativeBuildInputs = [ perl ]; buildInputs = stdenv.lib.optional withCryptodev cryptodev; diff --git a/pkgs/development/libraries/physics/rivet/default.nix b/pkgs/development/libraries/physics/rivet/default.nix index 95e44f2364cb4d..7f7260d52c0ce7 100644 --- a/pkgs/development/libraries/physics/rivet/default.nix +++ b/pkgs/development/libraries/physics/rivet/default.nix @@ -12,8 +12,8 @@ stdenv.mkDerivation rec { patches = [ ./darwin.patch # configure relies on impure sw_vers to -Dunix (fetchpatch { - url = "https://phab-files.hepforge.org/file/data/j3ja4jirrdyrovrmnbuh/PHID-FILE-6vnor4aoz3s2ejruisrg/file"; - sha256 = "0flxv08wcd0m5di75s2zvm015k2k70nqgpcgcbq7m604z26pd6ab"; + url = "https://gitlab.com/hepcedar/rivet/commit/37bd34f52cce66946ebb311a8fe61bfc5f69cc00.diff"; + sha256 = "0wj3ilpfq2gpc33bj3800l9vyvc9lrrlj1x9ss5qki0yiqd8i2aa"; }) ]; diff --git a/pkgs/development/libraries/science/biology/htslib/default.nix b/pkgs/development/libraries/science/biology/htslib/default.nix index 7d771414fb010c..cdd56731fa0eff 100644 --- a/pkgs/development/libraries/science/biology/htslib/default.nix +++ b/pkgs/development/libraries/science/biology/htslib/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "htslib"; - version = "1.9"; + version = "1.10.2"; src = fetchurl { url = "https://github.com/samtools/htslib/releases/download/${version}/${pname}-${version}.tar.bz2"; - sha256 = "16ljv43sc3fxmv63w7b2ff8m1s7h89xhazwmbm1bicz8axq8fjz0"; + sha256 = "0f8rglbvf4aaw41i2sxlpq7pvhly93sjqiz0l4q3hwki5zg47dg3"; }; # perl is only used during the check phase. diff --git a/pkgs/development/ocaml-modules/lens/default.nix b/pkgs/development/ocaml-modules/lens/default.nix new file mode 100644 index 00000000000000..27a753ae81a53d --- /dev/null +++ b/pkgs/development/ocaml-modules/lens/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchzip, ppx_deriving, ppxfind, buildDunePackage }: + +buildDunePackage rec { + pname = "lens"; + version = "1.2.3"; + + src = fetchzip { + url = "https://github.com/pdonadeo/ocaml-lens/archive/v${version}.tar.gz"; + sha256 = "09k2vhzysx91syjhgv6w1shc9mgzi0l4bhwpx1g5pi4r4ghjp07y"; + }; + + minimumOCamlVersion = "4.04.1"; + buildInputs = [ ppx_deriving ppxfind ]; + + meta = with lib; { + homepage = https://github.com/pdonadeo/ocaml-lens; + description = "Functional lenses"; + license = licenses.bsd3; + maintainers = with maintainers; [ + kazcw + ]; + }; +} diff --git a/pkgs/development/ocaml-modules/sqlite3/default.nix b/pkgs/development/ocaml-modules/sqlite3/default.nix index 53b11f285a677a..f47d7d37631fd5 100644 --- a/pkgs/development/ocaml-modules/sqlite3/default.nix +++ b/pkgs/development/ocaml-modules/sqlite3/default.nix @@ -1,24 +1,22 @@ -{ stdenv, fetchurl, sqlite, ocaml, findlib, ocamlbuild, pkgconfig }: +{ lib, fetchurl, sqlite, pkgconfig, buildDunePackage }: -stdenv.mkDerivation rec { - pname = "ocaml-sqlite3"; - version = "2.0.9"; +buildDunePackage rec { + pname = "sqlite3"; + version = "5.0.1"; + minimumOCamlVersion = "4.05"; src = fetchurl { - url = "https://github.com/mmottl/sqlite3-ocaml/releases/download/v${version}/sqlite3-ocaml-${version}.tar.gz"; - sha256 = "0rwsx1nfa3xqmbygim2qx45jqm1gwf08m70wmcwkx50f1qk3l551"; + url = "https://github.com/mmottl/sqlite3-ocaml/releases/download/${version}/sqlite3-${version}.tbz"; + sha256 = "0iymkszrs6qwak0vadfzc8yd8jfwn06zl08ggb4jr2mgk2c8mmsn"; }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ ocaml findlib ocamlbuild sqlite ]; + buildInputs = [ sqlite ]; - createFindlibDestdir = true; - - meta = with stdenv.lib; { + meta = with lib; { homepage = http://mmottl.github.io/sqlite3-ocaml/; description = "OCaml bindings to the SQLite 3 database access library"; license = licenses.mit; - platforms = ocaml.meta.platforms or []; maintainers = with maintainers; [ maggesi vbgl ]; diff --git a/pkgs/development/ocaml-modules/uchar/default.nix b/pkgs/development/ocaml-modules/uchar/default.nix index 2140871021dab0..b5b2170e56abb0 100644 --- a/pkgs/development/ocaml-modules/uchar/default.nix +++ b/pkgs/development/ocaml-modules/uchar/default.nix @@ -8,10 +8,10 @@ stdenv.mkDerivation { sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"; }; - nativeBuildInputs = [ ocaml ocamlbuild findlib opaline ]; - buildInputs = [ findlib ocaml ocamlbuild opaline ]; + nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + buildInputs = [ findlib ocaml ocamlbuild ]; buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}"; - installPhase = "opaline -libdir $OCAMLFIND_DESTDIR"; + installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR"; configurePlatforms = []; meta = { diff --git a/pkgs/development/python-modules/avro-python3/default.nix b/pkgs/development/python-modules/avro-python3/default.nix new file mode 100644 index 00000000000000..c9db39a325fad4 --- /dev/null +++ b/pkgs/development/python-modules/avro-python3/default.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k }: + +buildPythonPackage rec { + pname = "avro-python3"; + version = "1.8.2"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "f82cf0d66189600b1e6b442f650ad5aca6c189576723dcbf6f9ce096eab81bd6"; + }; + + doCheck = false; # No such file or directory: './run_tests.py + + meta = with lib; { + description = "A serialization and RPC framework"; + homepage = https://pypi.python.org/pypi/avro-python3/; + license = licenses.asl20; + + maintainers = [ maintainers.shlevy maintainers.timma ]; + }; +} diff --git a/pkgs/development/python-modules/django-extensions/default.nix b/pkgs/development/python-modules/django-extensions/default.nix index 7f755010b730e1..d62542536768e8 100644 --- a/pkgs/development/python-modules/django-extensions/default.nix +++ b/pkgs/development/python-modules/django-extensions/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder +{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, pythonOlder , six, typing, pygments , django, shortuuid, python-dateutil, pytest , pytest-django, pytestcov, mock, vobject @@ -16,6 +16,15 @@ buildPythonPackage rec { sha256 = "0053yqq4vq3mwy7zkfs5vfm3g8j9sfy3vrc6xby83qlj9wz43ipi"; }; + # This patch fixes a single failing test and can be removed when updating this pkg + # to the next version + patches = [ + (fetchpatch { + url = "https://github.com/django-extensions/django-extensions/commit/1d21786da2e6868d98ae34c82079e1e03ad1aa97.patch"; + sha256 = "0d81zpj0f8a7ijrfb12j0b67fgj89k3axaskz1nwqsr4wc6n4bw2"; + }) + ]; + postPatch = '' substituteInPlace setup.py --replace "'tox'," "" diff --git a/pkgs/development/python-modules/gpxpy/default.nix b/pkgs/development/python-modules/gpxpy/default.nix new file mode 100644 index 00000000000000..028ca365423621 --- /dev/null +++ b/pkgs/development/python-modules/gpxpy/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, buildPythonPackage, python, lxml }: + +buildPythonPackage rec { + pname = "gpxpy"; + version = "1.3.5"; + + src = fetchFromGitHub { + owner = "tkrajina"; + repo = pname; + rev = "v${version}"; + sha256 = "18r7pfda7g3l0hv8j9565n52cvvgjxiiqqzagfdfaba1djgl6p8b"; + }; + + propagatedBuildInputs = [ lxml ]; + + checkPhase = '' + ${python.interpreter} -m unittest test + ''; + + meta = with lib; { + description = "Python GPX (GPS eXchange format) parser"; + homepage = "https://github.com/tkrajina/gpxpy"; + license = licenses.asl20; + platforms = platforms.unix; + maintainers = with maintainers; [ sikmir ]; + }; +} diff --git a/pkgs/development/python-modules/onnx/default.nix b/pkgs/development/python-modules/onnx/default.nix new file mode 100644 index 00000000000000..3f3cf38f333207 --- /dev/null +++ b/pkgs/development/python-modules/onnx/default.nix @@ -0,0 +1,78 @@ +{ lib +, fetchpatch +, buildPythonPackage +, fetchPypi +, pythonOlder +, isPy27 +, cmake +, protobuf +, numpy +, six +, typing-extensions +, typing +, pytestrunner +, pytest +, nbval +, tabulate +}: + +buildPythonPackage rec { + pname = "onnx"; + version = "1.6.0"; + + # Due to Protobuf packaging issues this build of Onnx with Python 2 gives + # errors on import + disabled = isPy27; + + src = fetchPypi { + inherit pname version; + sha256 = "0ig33jl3591041lyylxp52yi20rfrcqx3i030hd6al8iabzc721v"; + }; + + # Remove the unqualified requirement for the typing package for running the + # tests. typing is already required for the installation, where it is + # correctly qualified so as to only be required for sufficiently old Python + # versions. + # This patch should be in the next release (>1.6). + patches = [ + (fetchpatch { + url = "https://github.com/onnx/onnx/commit/c963586d0f8dd5740777b2fd06f04ec60816de9f.patch"; + sha256 = "1hl26cw5zckc91gmh0bdah87jyprccxiw0f4i5h1gwkq28hm6wbj"; + }) + ]; + + nativeBuildInputs = [ cmake ]; + + propagatedBuildInputs = [ + protobuf + numpy + six + typing-extensions + ] ++ lib.optional (pythonOlder "3.5") [ typing ]; + + checkInputs = [ + pytestrunner + pytest + nbval + tabulate + ]; + + postPatch = '' + patchShebangs tools/protoc-gen-mypy.py + ''; + + # The executables are just utility scripts that aren't too important + postInstall = '' + rm -r $out/bin + ''; + + # The setup.py does all the configuration (running CMake) + dontConfigure = true; + + meta = { + homepage = http://onnx.ai; + description = "Open Neural Network Exchange"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.acairncross ]; + }; +} diff --git a/pkgs/development/python-modules/publicsuffix/default.nix b/pkgs/development/python-modules/publicsuffix/default.nix index 027b017c23ec92..061ad6858614db 100644 --- a/pkgs/development/python-modules/publicsuffix/default.nix +++ b/pkgs/development/python-modules/publicsuffix/default.nix @@ -10,11 +10,8 @@ buildPythonPackage rec { }; - # fix the ASCII-mode LICENSE file read # disable test_fetch and the doctests (which also invoke fetch) - patchPhase = stdenv.lib.optionalString isPy3k '' - sed -i "s/)\.read(/,encoding='utf-8'\0/" setup.py - '' + '' + postPatch = '' sed -i -e "/def test_fetch/i\\ \\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py ''; diff --git a/pkgs/development/python-modules/pylint-celery/default.nix b/pkgs/development/python-modules/pylint-celery/default.nix new file mode 100644 index 00000000000000..6bc7a93049e93c --- /dev/null +++ b/pkgs/development/python-modules/pylint-celery/default.nix @@ -0,0 +1,37 @@ +{ buildPythonPackage +, fetchFromGitHub +, isPy3k +, lib + +# pythonPackages +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-celery"; + version = "0.3"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = version; + sha256 = "05fhwraq12c2724pn4py1bjzy5rmsrb1x68zck73nlp5icba6yap"; + }; + + propagatedBuildInputs = [ + pylint-plugin-utils + ]; + + # Testing requires a very old version of pylint, incompatible with other dependencies + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Celery applications"; + homepage = "https://github.com/PyCQA/pylint-celery"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/development/python-modules/pylint-django/default.nix b/pkgs/development/python-modules/pylint-django/default.nix new file mode 100644 index 00000000000000..04010098807c88 --- /dev/null +++ b/pkgs/development/python-modules/pylint-django/default.nix @@ -0,0 +1,39 @@ +{ buildPythonPackage +, fetchFromGitHub +, isPy3k +, lib + +# pythonPackages +, django +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-django"; + version = "2.0.12"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = "v${version}"; + sha256 = "0ha06wpqqn5fp5dapgjhsdx3ahh3y62l7k2f3czlrdjmmivgdp9y"; + }; + + propagatedBuildInputs = [ + django + pylint-plugin-utils + ]; + + # Testing requires checkout from other repositories + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Django applications"; + homepage = "https://github.com/PyCQA/pylint-django"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/development/python-modules/pylint-flask/default.nix b/pkgs/development/python-modules/pylint-flask/default.nix new file mode 100644 index 00000000000000..5077d07a936b23 --- /dev/null +++ b/pkgs/development/python-modules/pylint-flask/default.nix @@ -0,0 +1,36 @@ +{ buildPythonPackage +, fetchPypi +, isPy3k +, lib + +# pythonPackages +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-flask"; + version = "0.6"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "05qmwgkpvaa5k05abqjxfbrfk3wpdqb8ph690z7bzxvb47i7vngl"; + }; + + propagatedBuildInputs = [ + pylint-plugin-utils + ]; + + # Tests require a very old version of pylint + # also tests are only available at GitHub, with an old release tag + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Flask applications"; + homepage = "https://github.com/jschaf/pylint-flask"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/development/python-modules/pynrrd/default.nix b/pkgs/development/python-modules/pynrrd/default.nix new file mode 100644 index 00000000000000..02361fe84debfa --- /dev/null +++ b/pkgs/development/python-modules/pynrrd/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pytest +}: + +buildPythonPackage rec { + pname = "pynrrd"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "mhe"; + repo = pname; + rev = "v${version}"; + sha256 = "1wn3ara3i19fi1y9a5j4imyczpa6dkkzd5djggxg4kkl1ff9awrj"; + }; + + propagatedBuildInputs = [ numpy ]; + + meta = with lib; { + homepage = https://github.com/mhe/pynrrd; + description = "Simple pure-Python reader for NRRD files"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/development/python-modules/python-miio/default.nix b/pkgs/development/python-modules/python-miio/default.nix new file mode 100644 index 00000000000000..eb7c915319650a --- /dev/null +++ b/pkgs/development/python-modules/python-miio/default.nix @@ -0,0 +1,39 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, appdirs +, click +, construct +, cryptography +, pytest +, zeroconf +, attrs +, pytz +, tqdm +, netifaces +}: + +buildPythonPackage rec { + pname = "python-miio"; + version = "0.4.8"; + + src = fetchPypi { + inherit pname version; + sha256 = "19423b3386b23d2e0fc94a8f6a358bcfbb44eed05376e33fd434d26d168bd18c"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ appdirs click construct cryptography zeroconf attrs pytz tqdm netifaces ]; + + checkPhase = '' + pytest + ''; + + meta = with stdenv.lib; { + description = "Python library for interfacing with Xiaomi smart appliances"; + homepage = https://github.com/rytilahti/python-miio; + license = licenses.gpl3; + maintainers = with maintainers; [ flyfloh ]; + }; +} + diff --git a/pkgs/development/python-modules/python-olm/default.nix b/pkgs/development/python-modules/python-olm/default.nix index 4fc0ad66f95b4d..b1e01f7f4abfad 100644 --- a/pkgs/development/python-modules/python-olm/default.nix +++ b/pkgs/development/python-modules/python-olm/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, olm, - cffi, future, typing }: + cffi, future, isPy3k, typing }: buildPythonPackage { pname = "python-olm"; @@ -15,8 +15,7 @@ buildPythonPackage { propagatedBuildInputs = [ cffi future - typing - ]; + ] ++ lib.optionals (!isPy3k) [ typing ]; doCheck = false; diff --git a/pkgs/development/python-modules/requirements-detector/default.nix b/pkgs/development/python-modules/requirements-detector/default.nix index a0f312389f1a85..0d91cbc7509fdc 100644 --- a/pkgs/development/python-modules/requirements-detector/default.nix +++ b/pkgs/development/python-modules/requirements-detector/default.nix @@ -4,6 +4,7 @@ , lib # pythonPackages +, astroid , pytest }: @@ -13,12 +14,16 @@ buildPythonPackage rec { disabled = isPy27; src = fetchFromGitHub { - owner = "yuvadm"; + owner = "landscapeio"; repo = pname; rev = version; - sha256 = "15s0n1lhkz0zwi33waqkkjipal3f7s45rxsj1bw89xpr4dj87qx5"; + sha256 = "1sfmm7daz0kpdx6pynsvi6qlfhrzxx783l1wb69c8dfzya4xssym"; }; + propagatedBuildInputs = [ + astroid + ]; + checkInputs = [ pytest ]; diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix index 67584789995e84..d556dcb74cf2b5 100644 --- a/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/pkgs/development/python-modules/sentry-sdk/default.nix @@ -13,6 +13,7 @@ , pyramid , rq , sanic +, sqlalchemy , stdenv , tornado , urllib3 @@ -27,7 +28,7 @@ buildPythonPackage rec { sha256 = "c6b919623e488134a728f16326c6f0bcdab7e3f59e7f4c472a90eea4d6d8fe82"; }; - checkInputs = [ django flask tornado bottle rq falcon ] + checkInputs = [ django flask tornado bottle rq falcon sqlalchemy ] ++ stdenv.lib.optionals isPy3k [ celery pyramid sanic aiohttp ]; propagatedBuildInputs = [ urllib3 certifi ]; diff --git a/pkgs/development/python-modules/solo-python/default.nix b/pkgs/development/python-modules/solo-python/default.nix index 52d7d7539f9221..216e5a2a84f63e 100644 --- a/pkgs/development/python-modules/solo-python/default.nix +++ b/pkgs/development/python-modules/solo-python/default.nix @@ -3,7 +3,7 @@ buildPythonPackage rec { pname = "solo-python"; - version = "0.0.18"; + version = "0.0.21"; format = "flit"; disabled = pythonOlder "3.6"; # only python>=3.6 is supported @@ -11,7 +11,7 @@ owner = "solokeys"; repo = pname; rev = version; - sha256 = "01mgppjvxlr93vrgz7bzisghpg1vqyaj4cg5wngk0h499iyx4d9q"; + sha256 = "07r451dp3ma1mh735b2kjv86a4jkjhmag70cjqf73z7b61dmzl1q"; }; # replaced pinned fido, with unrestricted fido version @@ -48,6 +48,5 @@ homepage = "https://github.com/solokeys/solo-python"; maintainers = with maintainers; [ wucke13 ]; license = with licenses; [ asl20 mit ]; - broken = true; # no longer compatible with fido2 }; } diff --git a/pkgs/development/python-modules/srsly/default.nix b/pkgs/development/python-modules/srsly/default.nix index 2b87c38b0854aa..42d3da93c90e6e 100644 --- a/pkgs/development/python-modules/srsly/default.nix +++ b/pkgs/development/python-modules/srsly/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "srsly"; - version = "0.2.0"; + version = "1.0.1"; src = fetchPypi { inherit pname version; - sha256 = "0gha1xfh64mapvgn0sghnjsvmjdrh5rywhs3j3bhkvwk42kf40ma"; + sha256 = "0d49a90gsfyxwp8g14mvvw1kjm77qgx86zg4812kcmlz9ycb80hi"; }; propagatedBuildInputs = lib.optional (pythonOlder "3.4") pathlib; diff --git a/pkgs/development/python-modules/stups-pierone/default.nix b/pkgs/development/python-modules/stups-pierone/default.nix new file mode 100644 index 00000000000000..aaa049916411b8 --- /dev/null +++ b/pkgs/development/python-modules/stups-pierone/default.nix @@ -0,0 +1,47 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, requests +, stups-cli-support +, stups-zign +, pytest +, pytestcov +, hypothesis +, isPy3k +}: + +buildPythonPackage rec { + pname = "stups-pierone"; + version = "1.1.45"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "zalando-stups"; + repo = "pierone-cli"; + rev = version; + sha256 = "1ggfizw27wpcagbbk15xpfrhq6b250cx4278b5d7y8s438g128cs"; + }; + + propagatedBuildInputs = [ + requests + stups-cli-support + stups-zign + ]; + + preCheck = " + export HOME=$TEMPDIR + "; + + checkInputs = [ + pytest + pytestcov + hypothesis + ]; + + meta = with lib; { + description = "Convenient command line client for STUPS' Pier One Docker registry"; + homepage = "https://github.com/zalando-stups/pierone-cli"; + license = licenses.asl20; + maintainers = [ maintainers.mschuwalow ]; + }; +} diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 2019ee45f3cdc5..5fa0cd15962dc7 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -311,7 +311,6 @@ let rgdal = [ pkgs.proj.dev pkgs.gdal ]; rgeos = [ pkgs.geos ]; rggobi = [ pkgs.ggobi pkgs.gtk2.dev pkgs.libxml2.dev ]; - rgl = [ pkgs.libGLU pkgs.libGL pkgs.xlibsWrapper ]; Rglpk = [ pkgs.glpk ]; RGtk2 = [ pkgs.gtk2.dev ]; rhdf5 = [ pkgs.zlib ]; @@ -404,6 +403,7 @@ let RCurl = [ pkgs.curl.dev ]; R2SWF = [ pkgs.pkgconfig ]; rggobi = [ pkgs.pkgconfig ]; + rgl = [ pkgs.libGLU pkgs.libGLU.dev pkgs.libGL pkgs.xlibsWrapper ]; RGtk2 = [ pkgs.pkgconfig ]; RProtoBuf = [ pkgs.pkgconfig ]; Rpoppler = [ pkgs.pkgconfig ]; diff --git a/pkgs/development/tools/boomerang/default.nix b/pkgs/development/tools/boomerang/default.nix index 9e567ef59b0d10..821e51ac60582c 100644 --- a/pkgs/development/tools/boomerang/default.nix +++ b/pkgs/development/tools/boomerang/default.nix @@ -2,13 +2,13 @@ mkDerivation rec { pname = "boomerang"; - version = "0.5.1"; + version = "0.5.2"; src = fetchFromGitHub { owner = "BoomerangDecompiler"; repo = pname; rev = "v${version}"; - sha256 = "046ba4km8c31kbnllx05nbqhjmk7bpi56d3n8md8bsr98nj21a2j"; + sha256 = "0xncdp0z8ry4lkzmvbj5d7hlzikivghpwicgywlv47spgh8ny0ix"; }; nativeBuildInputs = [ cmake bison flex ]; diff --git a/pkgs/development/tools/misc/usb-modeswitch/configurable-usb-modeswitch.patch b/pkgs/development/tools/misc/usb-modeswitch/configurable-usb-modeswitch.patch new file mode 100644 index 00000000000000..3f96cfa7575789 --- /dev/null +++ b/pkgs/development/tools/misc/usb-modeswitch/configurable-usb-modeswitch.patch @@ -0,0 +1,294 @@ +diff --git a/Makefile b/Makefile +index 463a11f..f20072c 100644 +--- a/Makefile ++++ b/Makefile +@@ -5,11 +5,11 @@ CFLAGS += -Wall + LIBS = `pkg-config --libs --cflags libusb-1.0` + RM = /bin/rm -f + OBJS = usb_modeswitch.c +-PREFIX = $(DESTDIR)/usr +-ETCDIR = $(DESTDIR)/etc ++PREFIX = /usr/local ++ETCDIR = $(PREFIX)/etc + SYSDIR = $(ETCDIR)/systemd/system + UPSDIR = $(ETCDIR)/init +-UDEVDIR = $(DESTDIR)/lib/udev ++UDEVDIR = $(PREFIX)/lib/udev + SBINDIR = $(PREFIX)/sbin + MANDIR = $(PREFIX)/share/man/man1 + VPATH = jimtcl +@@ -22,10 +22,17 @@ endif + JIM_CONFIGURE_OPTS = --disable-lineedit \ + --with-out-jim-ext="stdlib posix load signal syslog" --prefix=/usr + ++USE_UPSTART=$(shell if command -v initctl > /dev/null; then echo "true"; fi) ++USE_SYSTEMD=$(shell if command -v systemctl > /dev/null; then echo "true"; fi) ++ + .PHONY: clean install install-common uninstall \ + script shared static \ + dispatcher-script dispatcher-shared dispatcher-static \ +- install-script install-shared install-static ++ install-script install-shared install-static \ ++ install-upstart install-systemd \ ++ configure-dispatcher configure-script \ ++ configure-upstart configure-systemd \ ++ configure + + all: script + +@@ -46,7 +53,25 @@ jim/libjim.a: + cd jim && CFLAGS="$(CFLAGS)" CC="$(CC)" ./configure $(JIM_CONFIGURE_OPTS) + $(MAKE) -C jim lib + +-dispatcher-script: usb_modeswitch.tcl ++configure-dispatcher: ++ sed -i \ ++ -e 's,^\(set setup(sbindir) \).*$$,\1$(SBINDIR),' \ ++ -e 's,^\(set setup(etcdir) \).*$$,\1$(ETCDIR),' \ ++ usb_modeswitch.tcl ++ ++configure-script: ++ sed -i -e 's,^\(SBINDIR=\).*$$,\1$(SBINDIR),' usb_modeswitch.sh ++ ++configure-systemd: ++ sed -i -e 's,@sbindir@,$(SBINDIR),' usb_modeswitch@.service ++ ++configure-upstart: ++ sed -i -e 's,@sbindir@,$(SBINDIR),' usb-modeswitch-upstart.conf ++ ++configure: configure-dispatcher configure-script \ ++ configure-systemd configure-upstart ++ ++dispatcher-script: configure-dispatcher usb_modeswitch.tcl + sed 's_!/usr/bin/tclsh_!'"$(TCL)"'_' < usb_modeswitch.tcl > usb_modeswitch_dispatcher + + dispatcher-shared: jim/libjim.so dispatcher.c usb_modeswitch.string +@@ -55,7 +80,7 @@ dispatcher-shared: jim/libjim.so dispatcher.c usb_modeswitch.string + dispatcher-static: jim/libjim.a dispatcher.c usb_modeswitch.string + $(CC) dispatcher.c $(LDFLAGS) jim/libjim.a -Ijim -o usb_modeswitch_dispatcher $(CFLAGS) + +-usb_modeswitch.string: usb_modeswitch.tcl ++usb_modeswitch.string: configure-dispatcher usb_modeswitch.tcl + $(HOST_TCL) make_string.tcl usb_modeswitch.tcl > $@ + + clean: +@@ -76,16 +101,28 @@ ums-clean: + # If the systemd folder is present, install the service for starting the dispatcher + # If not, use the dispatcher directly from the udev rule as in previous versions + +-install-common: $(PROG) usb_modeswitch_dispatcher +- install -D --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch +- install -D --mode=755 usb_modeswitch.sh $(UDEVDIR)/usb_modeswitch +- install -D --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf +- install -D --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1 +- install -D --mode=644 usb_modeswitch_dispatcher.1 $(MANDIR)/usb_modeswitch_dispatcher.1 +- install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher ++install-common: $(PROG) configure usb_modeswitch_dispatcher ++ install -D --mode=755 usb_modeswitch $(DESTDIR)$(SBINDIR)/usb_modeswitch ++ install -D --mode=755 usb_modeswitch.sh $(DESTDIR)$(UDEVDIR)/usb_modeswitch ++ install -D --mode=644 usb_modeswitch.conf $(DESTDIR)$(ETCDIR)/usb_modeswitch.conf ++ install -D --mode=644 usb_modeswitch.1 $(DESTDIR)$(MANDIR)/usb_modeswitch.1 ++ install -D --mode=644 usb_modeswitch_dispatcher.1 $(DESTDIR)$(MANDIR)/usb_modeswitch_dispatcher.1 ++ install -D --mode=755 usb_modeswitch_dispatcher $(DESTDIR)$(SBINDIR)/usb_modeswitch_dispatcher + install -d $(DESTDIR)/var/lib/usb_modeswitch +- test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1 +- test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 usb_modeswitch@.service $(SYSDIR) || test 1 ++ ++install-upstart: ++ install -D --mode=644 usb-modeswitch-upstart.conf $(DESTDIR)$(UPSDIR)/usb-modeswitch-upstart.conf ++ ++install-systemd: ++ install -D --mode=644 usb_modeswitch@.service $(DESTDIR)$(SYSDIR)/usb_modeswitch@.service ++ ++ifeq ($(USE_UPSTART),true) ++install-common: install-upstart ++endif ++ ++ifeq ($(USE_SYSTEMD),true) ++install-common: install-systemd ++endif + + install: install-script + +@@ -96,10 +133,10 @@ install-shared: dispatcher-shared install-common + install-static: dispatcher-static install-common + + uninstall: +- $(RM) $(SBINDIR)/usb_modeswitch +- $(RM) $(SBINDIR)/usb_modeswitch_dispatcher +- $(RM) $(UDEVDIR)/usb_modeswitch +- $(RM) $(ETCDIR)/usb_modeswitch.conf +- $(RM) $(MANDIR)/usb_modeswitch.1 ++ $(RM) $(DESTDIR)$(SBINDIR)/usb_modeswitch ++ $(RM) $(DESTDIR)$(SBINDIR)/usb_modeswitch_dispatcher ++ $(RM) $(DESTDIR)$(UDEVDIR)/usb_modeswitch ++ $(RM) $(DESTDIR)$(ETCDIR)/usb_modeswitch.conf ++ $(RM) $(DESTDIR)$(MANDIR)/usb_modeswitch.1 + $(RM) -R $(DESTDIR)/var/lib/usb_modeswitch +- $(RM) $(SYSDIR)/usb_modeswitch@.service ++ $(RM) $(DESTDIR)$(SYSDIR)/usb_modeswitch@.service +diff --git a/usb-modeswitch-upstart.conf b/usb-modeswitch-upstart.conf +index 0d82b69..1c177b4 100644 +--- a/usb-modeswitch-upstart.conf ++++ b/usb-modeswitch-upstart.conf +@@ -1,5 +1,5 @@ + start on usb-modeswitch-upstart + task + script +- exec /usr/sbin/usb_modeswitch_dispatcher --switch-mode $UMS_PARAM ++ exec @sbindir@/usb_modeswitch_dispatcher --switch-mode $UMS_PARAM + end script +diff --git a/usb_modeswitch.sh b/usb_modeswitch.sh +index eb3fa3e..0e93166 100755 +--- a/usb_modeswitch.sh ++++ b/usb_modeswitch.sh +@@ -1,5 +1,9 @@ + #!/bin/sh + # part of usb_modeswitch 2.5.2 ++ ++# Compile time configuration, injected by the Makefile ++SBINDIR=/usr/sbin ++ + device_in() + { + if [ ! -e /var/lib/usb_modeswitch/$1 ]; then +@@ -37,7 +41,7 @@ if [ $(expr "$1" : "--.*") ]; then + v_id=$3 + fi + fi +-PATH=/sbin:/usr/sbin:$PATH ++ + case "$1" in + --driver-bind) + # driver binding code removed +@@ -46,9 +50,7 @@ case "$1" in + --symlink-name) + device_in "link_list" $v_id $p_id + if [ "$?" = "1" ]; then +- if [ -e "/usr/sbin/usb_modeswitch_dispatcher" ]; then +- exec usb_modeswitch_dispatcher $1 $2 2>>/dev/null +- fi ++ exec $SBINDIR/usb_modeswitch_dispatcher $1 $2 2>>/dev/null + fi + exit 0 + ;; +@@ -61,15 +63,13 @@ if [ "$p2" = "" -a "$p1" != "" ]; then + p2=$p1 + fi + +-PATH=/bin:/sbin:/usr/bin:/usr/sbin +-init_path=`readlink -f /sbin/init` +-if [ `basename $init_path` = "systemd" ]; then ++if command -v systemctl > /dev/null; then + systemctl --no-block start usb_modeswitch@$p2.service +-elif [ -e "/etc/init/usb-modeswitch-upstart.conf" ]; then ++elif command -v initctl > /dev/null; then + initctl emit --no-wait usb-modeswitch-upstart UMS_PARAM=$p2 + else + # only old distros, new udev will kill all subprocesses + exec 1<&- 2<&- 5<&- 7<&- +- exec usb_modeswitch_dispatcher --switch-mode $p2 & ++ exec $SBINDIR/usb_modeswitch_dispatcher --switch-mode $p2 & + fi + exit 0 +diff --git a/usb_modeswitch.tcl b/usb_modeswitch.tcl +index d2ee50c..8a48751 100755 +--- a/usb_modeswitch.tcl ++++ b/usb_modeswitch.tcl +@@ -12,6 +12,16 @@ + # Part of usb-modeswitch-2.5.2 package + # (C) Josua Dietze 2009-2017 + ++# Compile-time configuration, injected by the Makefile. ++set setup(sbindir) /usr/sbin ++set setup(etcdir) /etc ++ ++# External dependency default location ++set setup(dbdir) /usr/share/usb_modeswitch ++ ++# Derived configuration ++set setup(dbdir_etc) $setup(etcdir)/usb_modeswitch.d ++ + set arg0 [lindex $argv 0] + if [regexp {\.tcl$} $arg0] { + if [file exists $arg0] { +@@ -91,10 +101,8 @@ if {![regexp {(.*?):.*$} $arg1 d device]} { + } + set flags(logwrite) 1 + +-set setup(dbdir) /usr/share/usb_modeswitch +-set setup(dbdir_etc) /etc/usb_modeswitch.d + if {![file exists $setup(dbdir)] && ![file exists $setup(dbdir_etc)]} { +- Log "\nError: no config database found in /usr/share or /etc. Exit" ++ Log "\nError: no config database found in $setup(dbdir) or $setup(dbdir_etc). Exit" + SafeExit + } + +@@ -261,7 +269,7 @@ if {$config(NoMBIMCheck)==0 && $usb(bNumConfigurations) > 1} { + if [CheckMBIM] { + Log " driver for MBIM devices is available" + Log "Find MBIM configuration number ..." +- if [catch {set cfgno [exec /usr/sbin/usb_modeswitch -j -Q $busParam $devParam -v $usb(idVendor) -p $usb(idProduct)]} err] { ++ if [catch {set cfgno [exec $setup(sbindir)/usb_modeswitch -j -Q $busParam $devParam -v $usb(idVendor) -p $usb(idProduct)]} err] { + Log "Error when trying to find MBIM configuration, switch to legacy modem mode" + } else { + set cfgno [string trim $cfgno] +@@ -297,7 +305,7 @@ if {$report == ""} { + # Now we are actually switching + if $flags(logging) { + Log "Command line:\nusb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f \$flags(config)" +- catch {set report [exec /usr/sbin/usb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report ++ catch {set report [exec $setup(sbindir)/usb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report + Log "\nVerbose debug output of usb_modeswitch and libusb follows" + Log "(Note that some USB errors are to be expected in the process)" + Log "--------------------------------" +@@ -305,7 +313,7 @@ if {$report == ""} { + Log "--------------------------------" + Log "(end of usb_modeswitch output)\n" + } else { +- catch {set report [exec /usr/sbin/usb_modeswitch -Q -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report ++ catch {set report [exec $setup(sbindir)/usb_modeswitch -Q -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report + } + } + +@@ -498,9 +506,9 @@ return 1 + + proc {ParseGlobalConfig} {} { + +-global flags ++global flags setup + set configFile "" +-set places [list /etc/usb_modeswitch.conf /etc/sysconfig/usb_modeswitch /etc/default/usb_modeswitch] ++set places [list $setup(etcdir)/usb_modeswitch.conf $setup(etcdir)/sysconfig/usb_modeswitch $setup(etcdir)/default/usb_modeswitch] + foreach cfg $places { + if [file exists $cfg] { + set configFile $cfg +@@ -897,10 +905,12 @@ proc {SysLog} {msg} { + + global flags + if {![info exists flags(logger)]} { +- set flags(logger) "" +- foreach fn {/bin/logger /usr/bin/logger} { +- if [file exists $fn] { +- set flags(logger) $fn ++ set flags(logger) [exec sh -c "command -v logger || true"] ++ if {$flags(logger) == ""} { ++ foreach fn {/bin/logger /usr/bin/logger} { ++ if [file exists $fn] { ++ set flags(logger) $fn ++ } + } + } + Log "Logger is $flags(logger)" +diff --git a/usb_modeswitch@.service b/usb_modeswitch@.service +index f74a8bf..90cb96a 100644 +--- a/usb_modeswitch@.service ++++ b/usb_modeswitch@.service +@@ -3,6 +3,6 @@ Description=USB_ModeSwitch_%i + + [Service] + Type=oneshot +-ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-mode %i ++ExecStart=@sbindir@/usb_modeswitch_dispatcher --switch-mode %i + #ExecStart=/bin/echo %i + diff --git a/pkgs/development/tools/misc/usb-modeswitch/data.nix b/pkgs/development/tools/misc/usb-modeswitch/data.nix index d2b80011dea0c6..6280b103ab6025 100644 --- a/pkgs/development/tools/misc/usb-modeswitch/data.nix +++ b/pkgs/development/tools/misc/usb-modeswitch/data.nix @@ -9,10 +9,13 @@ stdenv.mkDerivation rec { sha256 = "1ygahl3r26r38ai8yyblq9nhf3v5i6n6r6672p5wf88wg5h9n0rz"; }; - inherit (usb-modeswitch) makeFlags; + makeFlags = [ + "PREFIX=$(out)" + "DESTDIR=$(out)" + ]; prePatch = '' - sed -i 's@usb_modeswitch@${usb-modeswitch}/bin/usb_modeswitch@g' 40-usb_modeswitch.rules + sed -i 's@usb_modeswitch@${usb-modeswitch}/lib/udev/usb_modeswitch@g' 40-usb_modeswitch.rules ''; # we add tcl here so we can patch in support for new devices by dropping config into diff --git a/pkgs/development/tools/misc/usb-modeswitch/default.nix b/pkgs/development/tools/misc/usb-modeswitch/default.nix index a0e1b8eb8cebf9..731ac836412a70 100644 --- a/pkgs/development/tools/misc/usb-modeswitch/default.nix +++ b/pkgs/development/tools/misc/usb-modeswitch/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, libusb1 }: +{ stdenv, lib, fetchurl, pkgconfig, makeWrapper +, libusb1, tcl, utillinux, coreutils, bash }: stdenv.mkDerivation rec { pname = "usb-modeswitch"; @@ -9,19 +10,32 @@ stdenv.mkDerivation rec { sha256 = "18wbbxc5cfsmikba0msdvd5qlaga27b32nhrzicyd9mdddp265f2"; }; + patches = [ ./configurable-usb-modeswitch.patch ]; + + # Remove attempts to write to /etc and /var/lib. + postPatch = '' + sed -i \ + -e '/^\tinstall .* usb_modeswitch.conf/s,$(ETCDIR),$(out)/etc,' \ + -e '\,^\tinstall -d .*/var/lib/usb_modeswitch,d' \ + Makefile + ''; + makeFlags = [ - "DESTDIR=$(out)" "PREFIX=$(out)" + "ETCDIR=/etc" + "USE_UPSTART=false" + "USE_SYSTEMD=true" + "SYSDIR=$(out)/lib/systemd/system" + "UDEVDIR=$(out)/lib/udev" ]; - # make clean: we always build from source. It should be necessary on x86_64 only - preConfigure = '' - find -type f | xargs sed 's@/bin/rm@rm@g' -i - make clean + postFixup = '' + wrapProgram $out/bin/usb_modeswitch_dispatcher \ + --set PATH ${lib.makeBinPath [ utillinux coreutils bash ]} ''; - buildInputs = [ libusb1 ]; - nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libusb1 tcl ]; + nativeBuildInputs = [ pkgconfig makeWrapper ]; meta = with stdenv.lib; { description = "A mode switching tool for controlling 'multi-mode' USB devices"; diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/default.nix index 8e0e861fab3f6c..b6d533875523de 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/default.nix @@ -20,16 +20,10 @@ let getFunctorFn = fn: if builtins.typeOf fn == "set" then fn.__functor else fn; - getAttrDefault = attribute: set: default: ( - if builtins.hasAttr attribute set - then builtins.getAttr attribute set - else default - ); - # Map SPDX identifiers to license names spdxLicenses = lib.listToAttrs (lib.filter (pair: pair.name != null) (builtins.map (v: { name = if lib.hasAttr "spdxId" v then v.spdxId else null; value = v; }) (lib.attrValues lib.licenses))); # Get license by id falling back to input string - getLicenseBySpdxId = spdxId: getAttrDefault spdxId spdxLicenses spdxId; + getLicenseBySpdxId = spdxId: spdxLicenses.${spdxId} or spdxId; # # Returns an attrset { python, poetryPackages } for the given lockfile @@ -65,7 +59,7 @@ let # closure as python can only ever have one version of a dependency baseOverlay = self: super: let - getDep = depName: if builtins.hasAttr depName self then self."${depName}" else throw "foo"; + getDep = depName: self.${depName}; lockPkgs = builtins.listToAttrs ( builtins.map ( @@ -74,7 +68,7 @@ let value = self.mkPoetryDep ( pkgMeta // { inherit pwd; - source = getAttrDefault "source" pkgMeta null; + source = pkgMeta.source or null; files = lockFiles.${name}; pythonPackages = self; } @@ -159,12 +153,12 @@ let passedAttrs = builtins.removeAttrs attrs specialAttrs; getDeps = depAttr: let - deps = getAttrDefault depAttr pyProject.tool.poetry {}; + deps = pyProject.tool.poetry.${depAttr} or {}; depAttrs = builtins.map (d: lib.toLower d) (builtins.attrNames deps); in builtins.map (dep: py.pkgs."${dep}") depAttrs; - getInputs = attr: getAttrDefault attr attrs []; + getInputs = attr: attrs.${attr} or []; mkInput = attr: extraInputs: getInputs attr ++ extraInputs; buildSystemPkgs = poetryLib.getBuildSystemPkgs { @@ -189,7 +183,7 @@ let python = py; }; - postPatch = (getAttrDefault "postPatch" passedAttrs "") + '' + postPatch = (passedAttrs.postPatch or "") + '' # Tell poetry not to resolve the path dependencies. Any version is # fine ! yj -tj < pyproject.toml | python ${./pyproject-without-path.py} > pyproject.json @@ -199,7 +193,7 @@ let meta = meta // { inherit (pyProject.tool.poetry) description homepage; - license = getLicenseBySpdxId (getAttrDefault "license" pyProject.tool.poetry "unknown"); + license = getLicenseBySpdxId (pyProject.tool.poetry.license or "unknown"); }; } diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix b/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix index 559c3051a73ae5..68d854f264888a 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix @@ -30,22 +30,24 @@ let in (builtins.foldl' combine initial tokens).state; - fromTOML = toml: if builtins.hasAttr "fromTOML" builtins then builtins.fromTOML toml else - builtins.fromJSON ( - builtins.readFile ( - pkgs.runCommand "from-toml" - { - inherit toml; - allowSubstitutes = false; - preferLocalBuild = true; - } - '' - ${pkgs.remarshal}/bin/remarshal \ - -if toml \ - -i <(echo "$toml") \ - -of json \ - -o $out - '' + fromTOML = builtins.fromTOML or + ( + toml: builtins.fromJSON ( + builtins.readFile ( + pkgs.runCommand "from-toml" + { + inherit toml; + allowSubstitutes = false; + preferLocalBuild = true; + } + '' + ${pkgs.remarshal}/bin/remarshal \ + -if toml \ + -i <(echo "$toml") \ + -of json \ + -o $out + '' + ) ) ); readTOML = path: fromTOML (builtins.readFile path); diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix b/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix index 256e2d90daaf5e..95543ca7359097 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix @@ -16,102 +16,112 @@ , pwd , supportedExtensions ? lib.importJSON ./extensions.json , ... -}: let - - inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromPypi; +}: - inherit (import ./pep425.nix { - inherit lib python; - inherit (pkgs) stdenv; - }) selectWheel - ; +pythonPackages.callPackage ( + { preferWheel ? false + }: - fileCandidates = let - supportedRegex = ("^.*?(" + builtins.concatStringsSep "|" supportedExtensions + ")"); - matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." ] [ "\\." ] version + ".*$") fname != null; - hasSupportedExtension = fname: builtins.match supportedRegex fname != null; - isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname; - in - builtins.filter (f: matchesVersion f.file && hasSupportedExtension f.file && isCompatibleEgg f.file) files; + let - toPath = s: pwd + "/${s}"; + inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromPypi; - isSource = source != null; - isGit = isSource && source.type == "git"; - isLocal = isSource && source.type == "directory"; + inherit (import ./pep425.nix { + inherit lib python; + inherit (pkgs) stdenv; + }) selectWheel + ; - localDepPath = toPath source.url; - pyProject = poetryLib.readTOML (localDepPath + "/pyproject.toml"); + fileCandidates = let + supportedRegex = ("^.*?(" + builtins.concatStringsSep "|" supportedExtensions + ")"); + matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." ] [ "\\." ] version + ".*$") fname != null; + hasSupportedExtension = fname: builtins.match supportedRegex fname != null; + isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname; + in + builtins.filter (f: matchesVersion f.file && hasSupportedExtension f.file && isCompatibleEgg f.file) files; - buildSystemPkgs = poetryLib.getBuildSystemPkgs { - inherit pythonPackages pyProject; - }; + toPath = s: pwd + "/${s}"; - fileInfo = let - isBdist = f: lib.strings.hasSuffix "whl" f.file; - isSdist = f: ! isBdist f && ! isEgg f; - isEgg = f: lib.strings.hasSuffix ".egg" f.file; + isSource = source != null; + isGit = isSource && source.type == "git"; + isLocal = isSource && source.type == "directory"; - binaryDist = selectWheel fileCandidates; - sourceDist = builtins.filter isSdist fileCandidates; - eggs = builtins.filter isEgg fileCandidates; + localDepPath = toPath source.url; + pyProject = poetryLib.readTOML (localDepPath + "/pyproject.toml"); - lockFileEntry = builtins.head (sourceDist ++ binaryDist ++ eggs); + buildSystemPkgs = poetryLib.getBuildSystemPkgs { + inherit pythonPackages pyProject; + }; - _isEgg = isEgg lockFileEntry; + fileInfo = let + isBdist = f: lib.strings.hasSuffix "whl" f.file; + isSdist = f: ! isBdist f && ! isEgg f; + isEgg = f: lib.strings.hasSuffix ".egg" f.file; - in - rec { - inherit (lockFileEntry) file hash; - name = file; - format = - if _isEgg then "egg" - else if lib.strings.hasSuffix ".whl" name then "wheel" - else "setuptools"; - kind = - if _isEgg then python.pythonVersion - else if format == "setuptools" then "source" - else (builtins.elemAt (lib.strings.splitString "-" name) 2); - }; + binaryDist = selectWheel fileCandidates; + sourceDist = builtins.filter isSdist fileCandidates; + eggs = builtins.filter isEgg fileCandidates; - baseBuildInputs = lib.optional (name != "setuptools_scm" && name != "setuptools-scm") pythonPackages.setuptools_scm; + entries = (if preferWheel then binaryDist ++ sourceDist else sourceDist ++ binaryDist) ++ eggs; -in + lockFileEntry = builtins.head entries; -buildPythonPackage { - pname = name; - version = version; + _isEgg = isEgg lockFileEntry; - doCheck = false; # We never get development deps - dontStrip = true; - format = if isLocal then "pyproject" else if isGit then "setuptools" else fileInfo.format; + in + rec { + inherit (lockFileEntry) file hash; + name = file; + format = + if _isEgg then "egg" + else if lib.strings.hasSuffix ".whl" name then "wheel" + else "setuptools"; + kind = + if _isEgg then python.pythonVersion + else if format == "setuptools" then "source" + else (builtins.elemAt (lib.strings.splitString "-" name) 2); + }; - nativeBuildInputs = if (!isSource && (getManyLinuxDeps fileInfo.name).str != null) then [ autoPatchelfHook ] else []; - buildInputs = baseBuildInputs ++ (if !isSource then (getManyLinuxDeps fileInfo.name).pkg else []); + baseBuildInputs = lib.optional (name != "setuptools_scm" && name != "setuptools-scm") pythonPackages.setuptools_scm; - propagatedBuildInputs = - let - # Some dependencies like django gets the attribute name django - # but dependencies try to access Django - deps = builtins.map (d: lib.toLower d) (builtins.attrNames dependencies); in - (builtins.map (n: pythonPackages.${n}) deps) ++ (if isLocal then buildSystemPkgs else []); - - meta = { - broken = ! isCompatible python.version python-versions; - license = []; - }; - - # We need to retrieve kind from the interpreter and the filename of the package - # Interpreters should declare what wheel types they're compatible with (python type + ABI) - # Here we can then choose a file based on that info. - src = if isGit then ( - builtins.fetchGit { - inherit (source) url; - rev = source.reference; - } - ) else if isLocal then (localDepPath) else fetchFromPypi { - pname = name; - inherit (fileInfo) file hash kind; - }; -} + + buildPythonPackage { + pname = name; + version = version; + + doCheck = false; # We never get development deps + dontStrip = true; + format = if isLocal then "pyproject" else if isGit then "setuptools" else fileInfo.format; + + nativeBuildInputs = if (!isSource && (getManyLinuxDeps fileInfo.name).str != null) then [ autoPatchelfHook ] else []; + buildInputs = baseBuildInputs ++ (if !isSource then (getManyLinuxDeps fileInfo.name).pkg else []); + + propagatedBuildInputs = + let + # Some dependencies like django gets the attribute name django + # but dependencies try to access Django + deps = builtins.map (d: lib.toLower d) (builtins.attrNames dependencies); + in + (builtins.map (n: pythonPackages.${n}) deps) ++ (if isLocal then buildSystemPkgs else []); + + meta = { + broken = ! isCompatible python.version python-versions; + license = []; + }; + + # We need to retrieve kind from the interpreter and the filename of the package + # Interpreters should declare what wheel types they're compatible with (python type + ABI) + # Here we can then choose a file based on that info. + src = if isGit then ( + builtins.fetchGit { + inherit (source) url; + rev = source.reference; + } + ) else if isLocal then (localDepPath) else fetchFromPypi { + pname = name; + inherit (fileInfo) file hash kind; + }; + } + +) {} diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix index 207841fd005f97..48b8ff9859be47 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix @@ -5,14 +5,6 @@ self: super: -let - - getAttrDefault = attribute: set: default: - if builtins.hasAttr attribute set - then builtins.getAttr attribute set - else default; - -in { av = super.av.overrideAttrs ( old: { @@ -52,7 +44,7 @@ in django = ( super.django.overrideAttrs ( old: { - propagatedNativeBuildInputs = (getAttrDefault "propagatedNativeBuildInputs" old []) + propagatedNativeBuildInputs = (old.propagatedNativeBuildInputs or []) ++ [ pkgs.gettext ]; } ) @@ -64,7 +56,7 @@ in if ! test -e LICENSE; then touch LICENSE fi - '' + (getAttrDefault "configurePhase" old ""); + '' + (old.configurePhase or ""); } ); @@ -85,6 +77,13 @@ in } ); + # importlib-metadata has an incomplete dependency specification + importlib-metadata = super.importlib-metadata.overrideAttrs ( + old: { + propagatedBuildInputs = old.propagatedBuildInputs ++ lib.optional self.python.isPy2 self.pathlib2; + } + ); + lap = super.lap.overrideAttrs ( old: { propagatedBuildInputs = old.propagatedBuildInputs ++ [ @@ -154,6 +153,11 @@ in } ); + # Calls Cargo at build time for source builds and is really tricky to package + maturin = super.maturin.override { + preferWheel = true; + }; + mccabe = super.mccabe.overrideAttrs ( old: { postPatch = '' @@ -293,6 +297,93 @@ in } ); + pyqt5 = super.pyqt5.overridePythonAttrs ( + old: { + format = "other"; + + nativeBuildInputs = old.nativeBuildInputs ++ [ + pkgs.pkgconfig + pkgs.qt5.qmake + pkgs.xorg.lndir + pkgs.qt5.qtbase + pkgs.qt5.qtsvg + pkgs.qt5.qtdeclarative + pkgs.qt5.qtwebchannel + # self.pyqt5-sip + self.sip + ]; + + buildInputs = old.buildInputs ++ [ + pkgs.dbus + pkgs.qt5.qtbase + pkgs.qt5.qtsvg + pkgs.qt5.qtdeclarative + self.sip + ]; + + # Fix dbus mainloop + inherit (pkgs.python3.pkgs.pyqt5) patches; + + configurePhase = '' + runHook preConfigure + + export PYTHONPATH=$PYTHONPATH:$out/${self.python.sitePackages} + + mkdir -p $out/${self.python.sitePackages}/dbus/mainloop + ${self.python.executable} configure.py -w \ + --confirm-license \ + --no-qml-plugin \ + --bindir=$out/bin \ + --destdir=$out/${self.python.sitePackages} \ + --stubsdir=$out/${self.python.sitePackages}/PyQt5 \ + --sipdir=$out/share/sip/PyQt5 \ + --designer-plugindir=$out/plugins/designer + + runHook postConfigure + ''; + + postInstall = '' + ln -s ${self.pyqt5-sip}/${self.python.sitePackages}/PyQt5/sip.* $out/${self.python.sitePackages}/PyQt5/ + for i in $out/bin/*; do + wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH" + done + + # # Let's make it a namespace package + # cat << EOF > $out/${self.python.sitePackages}/PyQt5/__init__.py + # from pkgutil import extend_path + # __path__ = extend_path(__path__, __name__) + # EOF + ''; + + installCheckPhase = let + modules = [ + "PyQt5" + "PyQt5.QtCore" + "PyQt5.QtQml" + "PyQt5.QtWidgets" + "PyQt5.QtGui" + ]; + imports = lib.concatMapStrings (module: "import ${module};") modules; + in + '' + echo "Checking whether modules can be imported..." + ${self.python.interpreter} -c "${imports}" + ''; + + doCheck = true; + + enableParallelBuilding = true; + } + ); + + pytest-datadir = super.pytest-datadir.overrideAttrs ( + old: { + postInstall = '' + rm -f $out/LICENSE + ''; + } + ); + python-prctl = super.python-prctl.overrideAttrs ( old: { buildInputs = old.buildInputs ++ [ @@ -340,6 +431,14 @@ in } ); + vose-alias-method = super.pytest-datadir.overrideAttrs ( + old: { + postInstall = '' + rm -f $out/LICENSE + ''; + } + ); + # Stop infinite recursion by using bootstrapped pkg from nixpkgs wheel = ( pkgs.python3.pkgs.override { diff --git a/pkgs/development/tools/prospector/default.nix b/pkgs/development/tools/prospector/default.nix new file mode 100644 index 00000000000000..38472ce86f0188 --- /dev/null +++ b/pkgs/development/tools/prospector/default.nix @@ -0,0 +1,74 @@ +{ lib +, pkgs +, python +}: + +let + py = python.override { + packageOverrides = self: super: { + pep8-naming = super.pep8-naming.overridePythonAttrs(oldAttrs: rec { + version = "0.4.1"; + src = oldAttrs.src.override { + inherit version; + sha256 = "0nhf8p37y008shd4f21bkj5pizv8q0l8cpagyyb8gr059d6gvvaf"; + }; + }); + }; + }; + setoptconf = py.pkgs.callPackage ./setoptconf.nix { }; +in + +with py.pkgs; + +buildPythonApplication rec { + pname = "prospector"; + version = "1.2.0"; + disabled = isPy27; + + src = pkgs.fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = version; + sha256 = "07kb37zrrsriqzcmli0ghx7qb1iwkzh83qsiikl9jy50faby2sjg"; + }; + + checkInputs = [ + pytest + ]; + + checkPhase = '' + pytest + ''; + + patchPhase = '' + substituteInPlace setup.py \ + --replace 'pycodestyle<=2.4.0' 'pycodestyle<=2.5.0' + ''; + + propagatedBuildInputs = [ + astroid + django + dodgy + mccabe + pep8-naming + pycodestyle + pydocstyle + pyflakes + pylint + pylint-celery + pylint-django + pylint-flask + pyyaml + requirements-detector + setoptconf + ]; + + meta = with lib; { + description = "Tool to analyse Python code and output information about errors, potential problems, convention violations and complexity"; + homepage = "https://github.com/PyCQA/prospector"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/development/tools/prospector/setoptconf.nix b/pkgs/development/tools/prospector/setoptconf.nix new file mode 100644 index 00000000000000..62b4e95357dca7 --- /dev/null +++ b/pkgs/development/tools/prospector/setoptconf.nix @@ -0,0 +1,26 @@ +{ buildPythonPackage +, fetchPypi +, lib +}: + +buildPythonPackage rec { + pname = "setoptconf"; + version = "0.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "177l7j68j751i781bgk6pfhxjj7hwqxzdm2ja5fkywbp0275s2sv"; + }; + + # Base tests provided via PyPi are broken + doCheck = false; + + meta = with lib; { + homepage = "https://pypi.org/project/setoptconf"; + description = "A module for retrieving program settings from various sources in a consistant method"; + license = licenses.mit; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/development/tools/rnix-lsp/default.nix b/pkgs/development/tools/rnix-lsp/default.nix new file mode 100644 index 00000000000000..37a1955ce8b2bc --- /dev/null +++ b/pkgs/development/tools/rnix-lsp/default.nix @@ -0,0 +1,22 @@ +{ callPackage, lib, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "rnix-lsp"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "nix-community"; + repo = "rnix-lsp"; + rev = "v${version}"; + + sha256 = "0fy620c34kxl27sd62x9mj0555bcdmnmbsxavmyiwb497z1m9wnn"; + }; + + cargoSha256 = "1wm5m7b6zr6wg1k59rmqis1zp9i2990p7y0ml852hxv34an7pp5d"; + + meta = with lib; { + description = "A work-in-progress language server for Nix, with syntax checking and basic completion"; + license = licenses.mit; + maintainers = with maintainers; [ jD91mZM2 ]; + }; +} diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix index 4ef723c9a1fa80..ea3382f3e706a2 100644 --- a/pkgs/development/tools/vagrant/default.nix +++ b/pkgs/development/tools/vagrant/default.nix @@ -33,6 +33,8 @@ let for gem in "$out"/lib/ruby/gems/*/gems/*; do cp -a "$gem/" "$gem.new" rm "$gem" + # needed on macOS, otherwise the mv yields permission denied + chmod +w "$gem.new" mv "$gem.new" "$gem" done ''; diff --git a/pkgs/games/mindustry/default.nix b/pkgs/games/mindustry/default.nix new file mode 100644 index 00000000000000..0b3824f2ec82b1 --- /dev/null +++ b/pkgs/games/mindustry/default.nix @@ -0,0 +1,106 @@ +{ stdenv +, makeWrapper +, makeDesktopItem +, fetchFromGitHub +, gradle_5 +, perl +, jre +, libpulseaudio + +# Make the build version easily overridable. +# Server and client build versions must match, and an empty build version means +# any build is allowed, so this parameter acts as a simple whitelist. +# Takes the package version and returns the build version. +, makeBuildVersion ? (v: v) +}: + +let + pname = "mindustry"; + # Note: when raising the version, ensure that all SNAPSHOT versions in + # build.gradle are replaced by a fixed version + # (the current one at the time of release) (see postPatch). + version = "102"; + buildVersion = makeBuildVersion version; + + src = fetchFromGitHub { + owner = "Anuken"; + repo = "Mindustry"; + rev = "v${version}"; + sha256 = "0g4zy2zlynv6f427pq1ngnl0zpr6nnih10wd2l8vl9bxwzjygwdr"; + }; + + desktopItem = makeDesktopItem { + type = "Application"; + name = "Mindustry"; + desktopName = "Mindustry"; + exec = "mindustry"; + icon = "mindustry"; + }; + + postPatch = '' + # Remove unbuildable iOS stuff + sed -i '/^project(":ios"){/,/^}/d' build.gradle + sed -i '/robo(vm|VM)/d' build.gradle + rm ios/build.gradle + + # Pin 'SNAPSHOT' versions + sed -i 's/com.github.anuken:packr:-SNAPSHOT/com.github.anuken:packr:034efe51781d2d8faa90370492133241bfb0283c/' build.gradle + ''; + + # fake build to pre-download deps into fixed-output derivation + deps = stdenv.mkDerivation { + pname = "${pname}-deps"; + inherit version src postPatch; + nativeBuildInputs = [ gradle_5 perl ]; + buildPhase = '' + export GRADLE_USER_HOME=$(mktemp -d) + gradle --no-daemon desktop:dist -Pbuildversion=${buildVersion} + gradle --no-daemon server:dist -Pbuildversion=${buildVersion} + ''; + # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) + installPhase = '' + find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \ + | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ + | sh + ''; + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = "1sscxrr32f2agwz34pm491xqkz7m4bwdc1p3g64kcnl3p6rg7r7k"; + }; + +in stdenv.mkDerivation rec { + inherit pname version src postPatch; + + nativeBuildInputs = [ gradle_5 makeWrapper ]; + + buildPhase = '' + export GRADLE_USER_HOME=$(mktemp -d) + # point to offline repo + sed -ie "s#mavenLocal()#mavenLocal(); maven { url '${deps}' }#g" build.gradle + gradle --offline --no-daemon desktop:dist -Pbuildversion=${buildVersion} + gradle --offline --no-daemon server:dist -Pbuildversion=${buildVersion} + ''; + + installPhase = '' + install -Dm644 desktop/build/libs/Mindustry.jar $out/share/mindustry.jar + install -Dm644 server/build/libs/server-release.jar $out/share/mindustry-server.jar + mkdir $out/bin + makeWrapper ${jre}/bin/java $out/bin/mindustry \ + --prefix LD_LIBRARY_PATH : ${libpulseaudio}/lib \ + --add-flags "-jar $out/share/mindustry.jar" + makeWrapper ${jre}/bin/java $out/bin/mindustry-server \ + --add-flags "-jar $out/share/mindustry-server.jar" + install -Dm644 core/assets/icons/icon_64.png $out/share/icons/hicolor/64x64/apps/mindustry.png + install -Dm644 ${desktopItem}/share/applications/Mindustry.desktop $out/share/applications/Mindustry.desktop + ''; + + meta = with stdenv.lib; { + homepage = "https://mindustrygame.github.io/"; + downloadPage = "https://github.com/Anuken/Mindustry/releases"; + description = "A sandbox tower defense game"; + license = licenses.gpl3; + maintainers = with maintainers; [ fgaz ]; + platforms = platforms.all; + }; +} + diff --git a/pkgs/games/ultrastardx/default.nix b/pkgs/games/ultrastardx/default.nix index 1c40d8f5800f3f..feaf6cabf32abd 100644 --- a/pkgs/games/ultrastardx/default.nix +++ b/pkgs/games/ultrastardx/default.nix @@ -12,21 +12,19 @@ let in stdenv.mkDerivation rec { pname = "ultrastardx"; - version = "2017.8.0"; + version = "unstable-2019-01-07"; src = fetchFromGitHub { owner = "UltraStar-Deluxe"; repo = "USDX"; - rev = "v${version}"; - sha256 = "1zp0xfwzci3cjmwx3cprcxvm60cik5cvhvrz9n4d6yb8dv38nqzm"; + rev = "3df142590f29db1505cc58746af9f8cf7cb4a6a5"; + sha256 = "EpwGKK9B8seF7gRwo3kCeSzFQQW1p8rP4HXeu8/LoyA="; }; nativeBuildInputs = [ pkgconfig autoreconfHook ]; buildInputs = [ fpc libpng ] ++ sharedLibs; - # https://github.com/UltraStar-Deluxe/USDX/issues/462 postPatch = '' substituteInPlace src/config.inc.in \ - --subst-var-by lua_LIB_NAME liblua.so \ --subst-var-by libpcre_LIBNAME libpcre.so.1 ''; diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index 45ed31168f0066..2176d53628fad8 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -786,10 +786,11 @@ in with stdenv.lib.licenses; snes9x = (mkLibRetroCore rec { core = "snes9x"; - src = fetchRetro { + src = fetchFromGitHub { + owner = "snes9xgit"; repo = core; - rev = "29b78df8c9f0f48ed4605d08a187a134b3b316d6"; - sha256 = "004h1pkxvbn4zlh8bqs6z17k04jw5wzbwklpgvmb7hbxshsi4qid"; + rev = "04692e1ee45cc647423774ee17c63208c2713638"; + sha256 = "09p9m85fxwrrrapjb08rcxknpgq5d6a87arrm1jn94r56glxlcfa"; }; description = "Port of SNES9x git to libretro"; license = "Non-commercial"; diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 425ac9a0994520..134162717037b4 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -50,12 +50,12 @@ let alchemist-vim = buildVimPluginFrom2Nix { pname = "alchemist-vim"; - version = "2019-11-27"; + version = "2020-01-10"; src = fetchFromGitHub { owner = "slashmili"; repo = "alchemist.vim"; - rev = "911eda990ef259d1f035061c5dfb2f44adb2697e"; - sha256 = "04lm3k6svq4y2a7kqq5phzyny93ynnjdmsv2s98pw6c4z5fq5y1m"; + rev = "a5158d2e731afe3bca25a6a76eb706ff34e155b0"; + sha256 = "0r1xiw0f46if7whxan2asi1klyijlyaf61p0xg5v81nnh64w6lhs"; }; }; @@ -193,12 +193,12 @@ let bufexplorer = buildVimPluginFrom2Nix { pname = "bufexplorer"; - version = "2019-02-13"; + version = "2020-01-10"; src = fetchFromGitHub { owner = "jlanzarotta"; repo = "bufexplorer"; - rev = "162f6031ada3b2d1ad171e02e93f417ee1689176"; - sha256 = "0ws8yw1s77pb0gm5wvj5w5symx8fqqzcdizds8cg47cfmw97zz1h"; + rev = "8014787603fff635dfae6afd4dbe9297673a0b39"; + sha256 = "0drj8q6wg9h08nf517l0dks1fbcnc558zg7dqavxc43maymq5mxm"; }; }; @@ -424,23 +424,23 @@ let coc-metals = buildVimPluginFrom2Nix { pname = "coc-metals"; - version = "2020-01-03"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "ckipp01"; repo = "coc-metals"; - rev = "a2c71dc75b35251549d1ba2cdb5f9ee286ab9f90"; - sha256 = "0hzd7m1rli2vgwvykrv9ld5q9na867l5d56fl02d7d3q9ykfn6j7"; + rev = "b2b3c6e43f8dc0a9353046faacb2cfafe0220228"; + sha256 = "160y5rz1nhpdlb9j3ximn6ylj0rabkbvl0h7jil95rin60sq91d1"; }; }; coc-neco = buildVimPluginFrom2Nix { pname = "coc-neco"; - version = "2019-09-23"; + version = "2020-01-11"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-neco"; - rev = "e6eb1ccc2ab98966fe678107c6da0d4ddfa34f10"; - sha256 = "14lph4dg7q0s5yjdr8snz9yl7bn6gs42ikizb6mxq43qqfdnxzdx"; + rev = "e203327ff80c56fc51d85f73df9049455edf1a56"; + sha256 = "1snfb92pahdfkch0cwhd0pcmia35al518351np2hq8dhbs7fc02n"; }; }; @@ -523,12 +523,12 @@ let coc-solargraph = buildVimPluginFrom2Nix { pname = "coc-solargraph"; - version = "2019-08-11"; + version = "2020-01-11"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-solargraph"; - rev = "6a146623192e661e18830c58abe1055fddcf57d7"; - sha256 = "1mc8jqpgwy5q4jzb5p09j5mal9paq50dl1hsxhg0y5q6rqrr7qhz"; + rev = "c767dd19c8d07920e10f126b4b71f187c7bdcb6a"; + sha256 = "014k1sqjfzcr052vnqnr5ccxpw2yr0dfgd0657nwjgbhnpf8qn3s"; }; }; @@ -545,12 +545,12 @@ let coc-tabnine = buildVimPluginFrom2Nix { pname = "coc-tabnine"; - version = "2019-12-10"; + version = "2020-01-06"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-tabnine"; - rev = "f72b4f47109918cc6ad43b42ed566bec61feff8e"; - sha256 = "1jaj6qsascdpdyz0g8yvi7bcxf4jwcrb0766x4dsmfk9r7prxifl"; + rev = "442c829185ecab2268d1b9fd076c5286bbd39562"; + sha256 = "0as4b33nnp7anqbxkkja8lp37y4a74b3507zyk3gmmna0my1ca3r"; }; }; @@ -700,12 +700,12 @@ let context_filetype-vim = buildVimPluginFrom2Nix { pname = "context_filetype-vim"; - version = "2019-08-17"; + version = "2020-01-08"; src = fetchFromGitHub { owner = "Shougo"; repo = "context_filetype.vim"; - rev = "9d495ce4ddfdae8f0b268fcec3a7a5e0062456e8"; - sha256 = "0g5ixgg8p2vrpjhyy52xln7a5f8rcbglgyir620ynzhz1phdilg4"; + rev = "cbe3c0069e6a13bd9bfcd9739c0770f7fd4b4ef4"; + sha256 = "07mnch8vi7snx8jfz32hkg4v4ml2ywb8yn0jycshn317j253fbmj"; }; }; @@ -808,17 +808,6 @@ let }; }; - defx-icons = buildVimPluginFrom2Nix { - pname = "defx-icons"; - version = "2019-11-03"; - src = fetchFromGitHub { - owner = "kristijanhusak"; - repo = "defx-icons"; - rev = "1412fd083eb54ffedb4f3ae32ddc7ce28613a144"; - sha256 = "1x0xpixbmxm15g5nmsslccdngm14sg86ymy6mywg9xfbnrh1vn0p"; - }; - }; - defx-git = buildVimPluginFrom2Nix { pname = "defx-git"; version = "2019-12-25"; @@ -830,14 +819,25 @@ let }; }; + defx-icons = buildVimPluginFrom2Nix { + pname = "defx-icons"; + version = "2019-11-03"; + src = fetchFromGitHub { + owner = "kristijanhusak"; + repo = "defx-icons"; + rev = "1412fd083eb54ffedb4f3ae32ddc7ce28613a144"; + sha256 = "1x0xpixbmxm15g5nmsslccdngm14sg86ymy6mywg9xfbnrh1vn0p"; + }; + }; + defx-nvim = buildVimPluginFrom2Nix { pname = "defx-nvim"; - version = "2020-01-02"; + version = "2020-01-08"; src = fetchFromGitHub { owner = "Shougo"; repo = "defx.nvim"; - rev = "aa1b5c762bbabaeeb5f3eca976e65bbb2f82a883"; - sha256 = "0pfsky4i4h769fjmrvy89d9ickkfifvmq0m54c6qhs24bycx0s7j"; + rev = "2823cfbf37ae86bf20b56a4dacff123c54dc85fa"; + sha256 = "0hbmdkwfhihjn1sxlznhv6fls8zgfvm7srigw8anxh7zr7rx2qz3"; }; }; @@ -876,12 +876,12 @@ let denite-nvim = buildVimPluginFrom2Nix { pname = "denite-nvim"; - version = "2020-01-05"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "Shougo"; repo = "denite.nvim"; - rev = "908cd3a3fe5b03783da7186441b2fe0c146f31b3"; - sha256 = "0qrz0mrrx79525rzab0l1qx3q49531306b05hgqrlkzx9zcppk8l"; + rev = "22dd7524bef3468af674fb1ecfb3e55ee679ebc0"; + sha256 = "03cf90kvq337mj151y5m0w5px6h3y6hanfj2bcxwnpwifmjdinij"; }; }; @@ -978,12 +978,12 @@ let deoplete-lsp = buildVimPluginFrom2Nix { pname = "deoplete-lsp"; - version = "2019-12-24"; + version = "2020-01-10"; src = fetchFromGitHub { owner = "Shougo"; repo = "deoplete-lsp"; - rev = "0985ba9f5a5f35521087b9ca0858c96ab3785158"; - sha256 = "09bfsd217qi1ndfrfrjla1vlhnp8r9q9qirkwjjajbqhk4ws90pm"; + rev = "7a8c44f423bc4339c092a759abaad40131d2c98a"; + sha256 = "1gg9j26xq668s4gbww0p2x8pkh3ssbzgyp2hxppk2ws7x8c2cihi"; }; }; @@ -1022,12 +1022,12 @@ let deoplete-nvim = buildVimPluginFrom2Nix { pname = "deoplete-nvim"; - version = "2019-12-27"; + version = "2020-01-10"; src = fetchFromGitHub { owner = "Shougo"; repo = "deoplete.nvim"; - rev = "840c46aed8033efe19c7a5a809713c809b4a6bb5"; - sha256 = "09bivhh6iig9vskia9fz1cz2c6dbn3xf4cgm77z9ppaii00n9wh3"; + rev = "1e1af97ed05f12ad16104365d40e1f26a3e98a1d"; + sha256 = "01zgvadp7h47ni9bvvgbg68vxb0hijw670xyps557ii4aadkk28f"; }; }; @@ -1245,12 +1245,12 @@ let fzf-vim = buildVimPluginFrom2Nix { pname = "fzf-vim"; - version = "2019-12-22"; + version = "2020-01-10"; src = fetchFromGitHub { owner = "junegunn"; repo = "fzf.vim"; - rev = "76669c3c1d675833f9d89f6496f16a7accc0f40e"; - sha256 = "0p5z9bljjfnp4kkpf9pb5zwv5l9xdk3aikpfxjj8scafl99k4m5r"; + rev = "8a6894d6a560497bd35947f55ece381bf4f2d9ed"; + sha256 = "17f64c3z03g45iw68ir9wszq3bjlk661ccy87g0wxvl2pkcmnk53"; }; }; @@ -1278,12 +1278,12 @@ let ghcid = buildVimPluginFrom2Nix { pname = "ghcid"; - version = "2019-12-14"; + version = "2020-01-09"; src = fetchFromGitHub { owner = "ndmitchell"; repo = "ghcid"; - rev = "723054642faf15082bbad6a0d6db921918e5db61"; - sha256 = "0ln5y7jfd4m59ci39zffjmzi9bda0bck7mkxk0i5fyp4whp8jqdr"; + rev = "40a6ed21bc811e7795c525ce9a4fc689c6b99f60"; + sha256 = "020g3032gggxllnapqf7nbg5wqjg3c2z190f2jx3cl6z0fswgiwz"; }; }; @@ -1300,12 +1300,12 @@ let gist-vim = buildVimPluginFrom2Nix { pname = "gist-vim"; - version = "2019-07-08"; + version = "2020-01-09"; src = fetchFromGitHub { owner = "mattn"; repo = "gist-vim"; - rev = "e485c6c24a62b378a2a4c8687e36e7f54ceca18c"; - sha256 = "1fkm7aada088l9f5rf6fk1valfanwzfrsfip9w4q9w2mqvd7n1kn"; + rev = "c1f9b5aef7fa68f5151e62ceadbc9a9c48d58962"; + sha256 = "0q83dqhp3n0hj0mdkvj2kilywpqy512r1vpay0f9z57vkx29grzr"; }; }; @@ -1531,12 +1531,12 @@ let jedi-vim = buildVimPluginFrom2Nix { pname = "jedi-vim"; - version = "2020-01-01"; + version = "2020-01-10"; src = fetchFromGitHub { owner = "davidhalter"; repo = "jedi-vim"; - rev = "2572136fcb4c9941553dd05504007806613c8946"; - sha256 = "08fdaxaldbmg76bkj0xni4cpgqiss4cdxnv3jxskwvs6v9dxmbcs"; + rev = "c0ded0baf2971cec3698d7c799c04ad971a1484d"; + sha256 = "0bbivgm62a9v28r968dsx174km72an9xxz98r1r4z5krllccilab"; fetchSubmodules = true; }; }; @@ -1675,12 +1675,12 @@ let lh-vim-lib = buildVimPluginFrom2Nix { pname = "lh-vim-lib"; - version = "2019-12-29"; + version = "2020-01-12"; src = fetchFromGitHub { owner = "LucHermitte"; repo = "lh-vim-lib"; - rev = "6e60e3a6575449e08feb27fb3528b55e71fd56e3"; - sha256 = "054wxj8f23ddqs3mp8rvw2lsplqfyn352zcq6biywbybjm2xphf7"; + rev = "13a59968c0d76884f2ef1feb27493ba90d62deb0"; + sha256 = "0g9dfg7y7znj3iiz67323jbflg6d34hq8hc8v4gcjnrinagyydnv"; }; }; @@ -1928,12 +1928,12 @@ let neomake = buildVimPluginFrom2Nix { pname = "neomake"; - version = "2019-12-20"; + version = "2020-01-07"; src = fetchFromGitHub { owner = "neomake"; repo = "neomake"; - rev = "212c0d8b05ee65b9be77675db147d05abd323a46"; - sha256 = "0fjmrnmnqjb1r4cxbrlxwpwbm7jgs47wx6pql565946adv5bckh2"; + rev = "2669c679fa2d39457eba3f84f50404d7994e22cf"; + sha256 = "1ag11acrg32qgwn0c3lsv7ai0f8hs3hklpnqjx84jb0kb1fqp8s2"; }; }; @@ -1961,12 +1961,12 @@ let neosnippet-vim = buildVimPluginFrom2Nix { pname = "neosnippet-vim"; - version = "2019-12-28"; + version = "2020-01-08"; src = fetchFromGitHub { owner = "Shougo"; repo = "neosnippet.vim"; - rev = "6cccbd41851f3d8f47c5e225d552a217cede4f3f"; - sha256 = "0jrdya11fzis746x1s802g2w20v47dhaxlmczb2fv4x3fxfwql5p"; + rev = "5673f584c06431978a17609865f2adcf5e934be3"; + sha256 = "05g4dixqn584h6z2w7va676q74fl1839f86wsjfm09kfdlql4n1m"; }; }; @@ -2038,12 +2038,12 @@ let nerdtree = buildVimPluginFrom2Nix { pname = "nerdtree"; - version = "2020-01-02"; + version = "2020-01-06"; src = fetchFromGitHub { owner = "scrooloose"; repo = "nerdtree"; - rev = "8a14891241e3468f9c13deaa6cf88aebe53b519f"; - sha256 = "033qnzna0awys5w5wf9sj2gydm433l1919zz9cm984l0nmgmkp29"; + rev = "ee79ecfb67e4403e54ea59c175ca4d39544395e8"; + sha256 = "0zny0ycxfkcfj65y8m70spj96lv81fv52s07r8ncfa4bqm9kk9sd"; }; }; @@ -2102,6 +2102,17 @@ let }; }; + nvim-gdb = buildVimPluginFrom2Nix { + pname = "nvim-gdb"; + version = "2019-10-28"; + src = fetchFromGitHub { + owner = "sakhnik"; + repo = "nvim-gdb"; + rev = "aa343ab3089cb520289a614a7b7c71f43134b34a"; + sha256 = "0qn0mq59x8jdkjvv47g2fjxnagvpa7pb01vl4jjrdwq34639i1bg"; + }; + }; + nvim-hs-vim = buildVimPluginFrom2Nix { pname = "nvim-hs-vim"; version = "2019-04-14"; @@ -2487,6 +2498,17 @@ let }; }; + salt-vim = buildVimPluginFrom2Nix { + pname = "salt-vim"; + version = "2017-07-01"; + src = fetchFromGitHub { + owner = "saltstack"; + repo = "salt-vim"; + rev = "6ca9e3500cc39dd417b411435d58a1b720b331cc"; + sha256 = "0r79bpl98xcsmkw6dg83cf1ghn89rzsr011zirk3v1wfxclri2c4"; + }; + }; + self = buildVimPluginFrom2Nix { pname = "self"; version = "2014-05-28"; @@ -2687,12 +2709,12 @@ let syntastic = buildVimPluginFrom2Nix { pname = "syntastic"; - version = "2019-11-20"; + version = "2020-01-12"; src = fetchFromGitHub { owner = "scrooloose"; repo = "syntastic"; - rev = "39b35b23b952d620b8ec7cabb13110f586663837"; - sha256 = "1nc3019c969ms6m0hrj5k1kggcvsywn6j7kz0scdwzvfd6bcla6h"; + rev = "3b756bc1066a6df6b54415f2aa7eceaa67ee1ee4"; + sha256 = "1c9nsg36an3jyma0bhz6c9ymmcrayim6cxn82g37skl040gksvn4"; }; }; @@ -2731,12 +2753,12 @@ let tagbar = buildVimPluginFrom2Nix { pname = "tagbar"; - version = "2020-01-04"; + version = "2020-01-08"; src = fetchFromGitHub { owner = "majutsushi"; repo = "tagbar"; - rev = "3753b235a1163cfbc3b7c417825d1910b2f66100"; - sha256 = "16nw145n17d9fnwhcp42k85sf2mx2nyp7wy4gllhw48xnwgh6qpb"; + rev = "3bd3ba403dfaf5868656264f979fc0dc63526afb"; + sha256 = "1s9y6qxvys393gsql4x5v0y2wfdb8b2a7mv8a39as98msq67a4sx"; }; }; @@ -2875,12 +2897,12 @@ let tsuquyomi = buildVimPluginFrom2Nix { pname = "tsuquyomi"; - version = "2019-07-17"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "Quramy"; repo = "tsuquyomi"; - rev = "61e16ab1d1cb621385bc9c6a0c5e7744494ec9f5"; - sha256 = "1w6m69695f4gx7d5fg3bnabhjx1680fvrz44f65jhdh2y2njm68h"; + rev = "1fc47734abcb272df4321a50e2587c4c9e0a0a1a"; + sha256 = "0dwc22zhzslgk60slr60rn26ww3ppl52nf6pcbnagxwfzadn5l6z"; }; }; @@ -2919,12 +2941,12 @@ let unicode-vim = buildVimPluginFrom2Nix { pname = "unicode-vim"; - version = "2019-11-06"; + version = "2020-01-06"; src = fetchFromGitHub { owner = "chrisbra"; repo = "unicode.vim"; - rev = "49f79785e7fba0f40519a6b9074dcceb8626f7d5"; - sha256 = "1k2b4wh0244dx7zinag88wfcwl2x2042z0zsyv9b77w81h8qfdd1"; + rev = "d450defdb29842e66b779715941a98cbf73736ea"; + sha256 = "196fi75rvhj0lrzpzkpzvlnrncnjysxj8iww0drc1aawjfkmn1ni"; }; }; @@ -3216,23 +3238,23 @@ let vim-airline = buildVimPluginFrom2Nix { pname = "vim-airline"; - version = "2020-01-03"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline"; - rev = "66f77d4a77e54946fedaac7d54d02271751eab40"; - sha256 = "008k8v0nx219lbn0vsc1cwr537lg0gdb9s4d7hjpdq2rhh79zsg3"; + rev = "8d694cba9c22efe8320a8fbc919a50bd938e7929"; + sha256 = "17kjbc13rsjaxkpfj0f90v3khzid02rrkcdjss3sqa35f37wn2bz"; }; }; vim-airline-themes = buildVimPluginFrom2Nix { pname = "vim-airline-themes"; - version = "2020-01-03"; + version = "2020-01-07"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline-themes"; - rev = "14c3a60ab0f42aa1001d8f32ffaab2c28935a1e7"; - sha256 = "0k25x599sfaw931p5b83cpqhz5dzjxp01v3qlsi78rhjyw1y83jf"; + rev = "9cfa14a6b7e2bd923b3f14252091ed35eda188fd"; + sha256 = "09ap3w0ixbk5yxsyw165kh7lxmrbjlnz16a1z5qpd9d7afbl3k69"; }; }; @@ -3260,12 +3282,12 @@ let vim-asterisk = buildVimPluginFrom2Nix { pname = "vim-asterisk"; - version = "2019-09-23"; + version = "2020-01-07"; src = fetchFromGitHub { owner = "haya14busa"; repo = "vim-asterisk"; - rev = "7cf0d8f379babbdbf538aefe3af444ac4ba21dce"; - sha256 = "0y21ziz36sqa84dy9pv2jnr0ppalxn54bsk82zfc6064h3bqn77r"; + rev = "66a64172d21fab44312d0d49b22f63eeeaf89b23"; + sha256 = "1lksnr4mix9y2al2yfysrxqcska3cd82ck89fkjg5zqzb5wz20vs"; }; }; @@ -3282,12 +3304,12 @@ let vim-autoformat = buildVimPluginFrom2Nix { pname = "vim-autoformat"; - version = "2019-12-04"; + version = "2020-01-09"; src = fetchFromGitHub { owner = "Chiel92"; repo = "vim-autoformat"; - rev = "354abcd3d533ba07eebc510102870d85d4e2c466"; - sha256 = "1hngbjj12q5v73smyhsay4irp3q71cxyc60n97ybfik5mmm455nj"; + rev = "4159c742ed0b547026b9e398ef78b31527b5e167"; + sha256 = "0yq4jl252bndr45yhqwmv9mzgjsscywm0wn0lqz70xbz9ik69gvk"; }; }; @@ -3403,12 +3425,12 @@ let vim-codefmt = buildVimPluginFrom2Nix { pname = "vim-codefmt"; - version = "2020-01-01"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "google"; repo = "vim-codefmt"; - rev = "7556c68b1d68b9a2b1b4a9df838cdc4bcf87ba0a"; - sha256 = "0bi6nbma0bwzvn7l6w88qgr4fbpfbipv936z346sh59dk17j4nv6"; + rev = "af796cf4084a3d32b85313ccc82675d626d40b59"; + sha256 = "0pbwirsh8nx0dgf82w1sy6az6mpwdnxzy0ycqrx6qxs6bbf1kf74"; }; }; @@ -3656,12 +3678,12 @@ let vim-easymotion = buildVimPluginFrom2Nix { pname = "vim-easymotion"; - version = "2020-01-06"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "easymotion"; repo = "vim-easymotion"; - rev = "83a09a19e7a9c51c6ca2e0f90f1dd27ef4c159c6"; - sha256 = "1xaliyiv80vcsl5gqj40avgdf4384d5xhnvhh0jaklk1hmrdzxgf"; + rev = "d534ba0d0c211d8228408c88fa3ebde13fecec37"; + sha256 = "0yc28synqrqjnzgzpmn7ji3nnidb55mm8n27d0kkd2l80bygg8n4"; }; }; @@ -3700,12 +3722,12 @@ let vim-elm-syntax = buildVimPluginFrom2Nix { pname = "vim-elm-syntax"; - version = "2019-11-28"; + version = "2020-01-06"; src = fetchFromGitHub { owner = "andys8"; repo = "vim-elm-syntax"; - rev = "7ed55d9bc2c0cfd023d7cc6541634bcbf36430b5"; - sha256 = "1kq7qcw9l41q646a2ilwy94lj1qz9as14aqfmzkbi938yij18zpx"; + rev = "904025e5db117fe292fdb7ae490feff1540696ea"; + sha256 = "0nm1pzq5qg9mcg0vhvqjbnq20f98njf2yn0sfzlyjgna2ivvjasg"; }; }; @@ -3865,12 +3887,12 @@ let vim-fugitive = buildVimPluginFrom2Nix { pname = "vim-fugitive"; - version = "2020-01-06"; + version = "2020-01-11"; src = fetchFromGitHub { owner = "tpope"; repo = "vim-fugitive"; - rev = "ddd64fc4c5c5365d56478f100f19898375244890"; - sha256 = "1b6mw8bb8dc46vjz5qb2v0n5kfvwz4hk7q0frflrsyc6z3pw7hab"; + rev = "6bc345f6f16aee0dcc361f2f3bf80e4964f461af"; + sha256 = "0fbbi9gsmrjbff75y0r9zdjcbyc7lf5j9pyski3y5wma4z3l4idr"; }; }; @@ -3909,12 +3931,12 @@ let vim-gitgutter = buildVimPluginFrom2Nix { pname = "vim-gitgutter"; - version = "2019-12-03"; + version = "2020-01-06"; src = fetchFromGitHub { owner = "airblade"; repo = "vim-gitgutter"; - rev = "1c53af9a0d3b622af5a62d69ddfc141c841a28c1"; - sha256 = "0269cjkcx4arq7phyqv80ziafg5p1in5ci7207svixbfdg5hlmfs"; + rev = "0946c53cfc6edfb8dbf4b25a27d013c0b6ec6619"; + sha256 = "06n4w9c8w2dyh8nwmlmz4d8hqy4yk9i6w01qa9plbvkhb1lrv21l"; }; }; @@ -3942,12 +3964,12 @@ let vim-go = buildVimPluginFrom2Nix { pname = "vim-go"; - version = "2020-01-03"; + version = "2020-01-08"; src = fetchFromGitHub { owner = "fatih"; repo = "vim-go"; - rev = "ee2071d8e63f9aab98d750a91fcc3358e9987bc9"; - sha256 = "0a2ac5y8x3lhry5dzq2jbzvryfbvrdvn7bkd2wwm5bf2y9zpkbwk"; + rev = "810e4b9faf1583443fe2d027d11993fb698b080f"; + sha256 = "0841030jxifv0x8y4vqz0dvwkxirbynra5iibfgyv485ynhw2l8i"; }; }; @@ -4427,12 +4449,12 @@ let vim-lsc = buildVimPluginFrom2Nix { pname = "vim-lsc"; - version = "2019-12-30"; + version = "2020-01-07"; src = fetchFromGitHub { owner = "natebosch"; repo = "vim-lsc"; - rev = "6cb8410e10f1b6a23adf238c1f93ce19a3eef83a"; - sha256 = "1zqv58s35qvp53an15mvs7ywvarsqxc0has6yji99jwmjiq68pag"; + rev = "2384903e1dd6314934f58e3c88b10924dd1bf4f7"; + sha256 = "0xs64i4g27w8bdmznjilqg5rlrpaw12qiclg1p4l3ryyid27wki7"; }; }; @@ -5120,12 +5142,12 @@ let vim-snippets = buildVimPluginFrom2Nix { pname = "vim-snippets"; - version = "2020-01-03"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "honza"; repo = "vim-snippets"; - rev = "f324a43a5f6a941a55ee992bb852f3c2c504a509"; - sha256 = "0dgxsn96vw4zgci58lzr4d4d4kwjbk9d52h51ibh3mhsikmpr7xk"; + rev = "5279654b3e9fc280742d02c9509d4313d9da18e9"; + sha256 = "0xnml4ayjwf7mzpz64alwygpgccvj4znask76ldw3hxp112fwcah"; }; }; @@ -5285,23 +5307,23 @@ let vim-terraform = buildVimPluginFrom2Nix { pname = "vim-terraform"; - version = "2020-01-02"; + version = "2020-01-06"; src = fetchFromGitHub { owner = "hashivim"; repo = "vim-terraform"; - rev = "1df8ac3e1bc33e1c70bd3a1713d8c9cd2eb491e1"; - sha256 = "0ivkm9vzzfn1iwzkkgk54kn846qnhvsaf8f4nzz3mllirjsl14am"; + rev = "5ae986685ba479718b3f59263c519976cf9b4c80"; + sha256 = "1dhgzpjykx9slv6lfbjnyci5ndixisdgym3y8zanhhhjp4nff41b"; }; }; vim-test = buildVimPluginFrom2Nix { pname = "vim-test"; - version = "2019-12-07"; + version = "2020-01-09"; src = fetchFromGitHub { owner = "janko-m"; repo = "vim-test"; - rev = "e9e824cf3f22fa1cddabb7ef739f2481436c3924"; - sha256 = "0nl1b3zzw3w413lmdl4fhm8ia079hr1rz1kpx7sf0i86lx1c0dcv"; + rev = "2f4efe7028e493a3d9eb06ccb7e27780b81687b7"; + sha256 = "1yfpishvgj1zdnhsixzjqnbmvfw8qg908zqnis3gk8s9fmnrw6fz"; }; }; @@ -5505,12 +5527,12 @@ let vim-visual-multi = buildVimPluginFrom2Nix { pname = "vim-visual-multi"; - version = "2019-12-18"; + version = "2020-01-11"; src = fetchFromGitHub { owner = "mg979"; repo = "vim-visual-multi"; - rev = "d332d08365bc735f60904a4207d650f191598378"; - sha256 = "0g5lawg641ma216v53ivhbkzpmdqhcmgybb5kh1rz6s991j51ziy"; + rev = "1b4d7269600a926a394b146f7d39044cd4dafa19"; + sha256 = "0wknx72x7mbkw9007b6ylp1cpl6jap4kv3y85f9sz2lwlsbbkk4b"; }; }; @@ -5626,12 +5648,12 @@ let vimagit = buildVimPluginFrom2Nix { pname = "vimagit"; - version = "2019-07-24"; + version = "2020-01-12"; src = fetchFromGitHub { owner = "jreybert"; repo = "vimagit"; - rev = "94762b1356ebdcb8ec486a86f45e69ef77a69465"; - sha256 = "1p8izqdkx8g1aqmq9a2qm506bs4mvc4xdbzkh2k5xprm5vc14z0s"; + rev = "bf7b16e99e075b019e56f2fbfb96c493ca3635e2"; + sha256 = "1f7gvlhrvvkf69y5vfrkvidhx8aa03n1aqmdhk9qjd6sglfg5w0i"; }; }; @@ -5692,12 +5714,12 @@ let vimproc-vim = buildVimPluginFrom2Nix { pname = "vimproc-vim"; - version = "2019-11-28"; + version = "2020-01-06"; src = fetchFromGitHub { owner = "Shougo"; repo = "vimproc.vim"; - rev = "89065f62883edb10a99aa1b1640d6d411907316b"; - sha256 = "0699kf269rsyabl49m4n7vsi5bbxk129wq6ml3ykhy9g9m2b8a3k"; + rev = "7425059fe2d9689f8560f1a47590677740669fdd"; + sha256 = "1rp5jq4jv8zga98pw62635mby0sgw0inzknlwcdy0f2lfbdvaq8g"; }; }; @@ -5714,12 +5736,12 @@ let vimtex = buildVimPluginFrom2Nix { pname = "vimtex"; - version = "2019-12-31"; + version = "2020-01-12"; src = fetchFromGitHub { owner = "lervag"; repo = "vimtex"; - rev = "020206fbe1f6981855a3fe2f96ef893db782d4b8"; - sha256 = "113d1zdmx3vhjig4xrp1kqlzapdhygis2ky2paww42j22vakqywc"; + rev = "aabfcf9e0c95bc08125aefaeb9fdfc9be04913c5"; + sha256 = "0d7sv6f8iafwm891vl4wlsv93jfqjckmsrg2k9rfynk737vsmvp5"; }; }; @@ -5736,12 +5758,12 @@ let vimwiki = buildVimPluginFrom2Nix { pname = "vimwiki"; - version = "2020-01-04"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "vimwiki"; repo = "vimwiki"; - rev = "b90e6f2e3343277faca65156d733f725f76f1e53"; - sha256 = "1z3mj73iqh4h3wx5cq4k7gp2nkbaj85v665v0phqw42c213064nb"; + rev = "64c9f3d36d632b1657616c06ea8f08f14cf6438d"; + sha256 = "0wwfl0bafwh9p8lzic75d0nl6v5dnpfid7fbiffr0i72agp0gcq7"; }; }; @@ -5758,12 +5780,12 @@ let vista-vim = buildVimPluginFrom2Nix { pname = "vista-vim"; - version = "2020-01-06"; + version = "2020-01-12"; src = fetchFromGitHub { owner = "liuchengxu"; repo = "vista.vim"; - rev = "dcf134c83a6a3f9618a97cafab5b7fb1f1df3f84"; - sha256 = "0w9q69a2k8a39b8zrd3sildisrdskbk6cgvbkmb3fqsr0zdzjxzv"; + rev = "221893d85d2e8ed5ec51da12bf23d2e5bada57cf"; + sha256 = "1ggwkmi6haj7hayiki3nd9vrc14l4z1912jd06w22hmyl86926x9"; }; }; @@ -5835,12 +5857,12 @@ let xptemplate = buildVimPluginFrom2Nix { pname = "xptemplate"; - version = "2019-10-29"; + version = "2020-01-07"; src = fetchFromGitHub { owner = "drmingdrmer"; repo = "xptemplate"; - rev = "4dabcf320f18e33923dbcf793d3c04330dcb79a1"; - sha256 = "07sr3ixlgfv0sql48fxvyimwdb8xr3iklmzfxb5wxfxgvhr4xbs8"; + rev = "9cd1c622a5a7cc383ae3df2cec2bac5cb102fa7f"; + sha256 = "01szas3gv4zw1v6c8yp5p2hygf3fqmpx0y2h6sn8696pfph7vjk3"; }; }; @@ -5868,12 +5890,12 @@ let yats-vim = buildVimPluginFrom2Nix { pname = "yats-vim"; - version = "2020-01-06"; + version = "2020-01-13"; src = fetchFromGitHub { owner = "HerringtonDarkholme"; repo = "yats.vim"; - rev = "48184a10ecdda3efce0131aa73495f1edc449a33"; - sha256 = "0nsdq17r2m2pmnz077rliqdlwk5sn1aj3bxl648bsli7rjacgaqq"; + rev = "976d10ee24ce4d8790bcd80b3f7c6b8bbc9ec76d"; + sha256 = "0f3kgb07js6pjr6p03iyspn5k852y5b90w1ylas7lbgz32a1f3hp"; fetchSubmodules = true; }; }; @@ -5925,12 +5947,12 @@ let zig-vim = buildVimPluginFrom2Nix { pname = "zig-vim"; - version = "2020-01-02"; + version = "2020-01-12"; src = fetchFromGitHub { owner = "zig-lang"; repo = "zig.vim"; - rev = "7b644a313bf3e32a3b0c4616660d61f5ec8872d9"; - sha256 = "1icv1qa4wf1kaknfs045m8md2938qggzl6a5wf76lcn1iw5nr1cc"; + rev = "2a1de0f764e42f8b76daafc24249d6cb4a743c16"; + sha256 = "0lbry8s34ld97m05q091q2dmpfkn8k6nsj0q1vrbrsml5i5xig9c"; }; }; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 3c097c63fde8b6..b22a811d2a8013 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -377,6 +377,8 @@ rust-lang/rust.vim ryanoasis/vim-devicons Rykka/riv.vim ryvnf/readline.vim +sakhnik/nvim-gdb +saltstack/salt-vim samoshkin/vim-mergetool sbdchd/neoformat scrooloose/nerdcommenter diff --git a/pkgs/os-specific/linux/firejail/default.nix b/pkgs/os-specific/linux/firejail/default.nix index 9ccd39d3582eeb..5a1337b0998d57 100644 --- a/pkgs/os-specific/linux/firejail/default.nix +++ b/pkgs/os-specific/linux/firejail/default.nix @@ -36,10 +36,10 @@ stdenv.mkDerivation { sed -e "s@/etc/@$out/etc/@g" -e "/chmod u+s/d" -i Makefile ''; - # We need to set the directory for the .local override files back to + # We need to set the directory for the .local override files to # /etc/firejail so we can actually override them postInstall = '' - sed -E -e 's@^include (.*)(/firejail/.*.local)$@include /etc\2@g' -i $out/etc/firejail/*.profile + sed -E -e 's@^include (.*.local)$@include /etc/firejail/\1@g' -i $out/etc/firejail/*.profile ''; # At high parallelism, the build sometimes fails with: diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix index 4701dca2e901ce..052217c0060d14 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.14.163"; + version = "4.14.164"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0jdh54rqdsb3b908v2q4xjn8y45b7rdnwgab0s4qf5alznfcqagb"; + sha256 = "0jzbgpxlfy64q7zaqix87k8ci1fr9lkx1xr9m5zjniziydhi00x2"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.19.nix b/pkgs/os-specific/linux/kernel/linux-4.19.nix index 73852c4846d1a6..e938d8ff33ecb4 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.19.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.19.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.19.94"; + version = "4.19.95"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0rvlz94mjl7ygpmhz0yn2whx9dq9fmy0w1472bj16hkwbaki0an6"; + sha256 = "1c2g5wcf4zgy5q51qrf0s4hf3pr1j8gi8gn27w8cafn1xqrcmvaa"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index 2ee7241396fb13..0cdb2710b622d4 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.4.208"; + version = "4.4.209"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "03jj91z5dc0ybpjy9w6aanb3k53gcj7gsjc32h3ldf72hlmgz6aq"; + sha256 = "0m94795grq3sbj7jlmwc0ncq3vap9lf1z00sdiys17kjs3bcfbnh"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index e95a0d98139c17..a5fa03b774adb7 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.9.208"; + version = "4.9.209"; extraMeta.branch = "4.9"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0njjw1i8dilihn1hz62zra4b9y05fb3r2k2sqlkd0wfn86c1rbdp"; + sha256 = "1qarm90l1r4y68v5swhf81z6v6gspa8sw9jab3fxrz8mz6zdan02"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-5.3.nix b/pkgs/os-specific/linux/kernel/linux-5.3.nix deleted file mode 100644 index d83f0fb98130a7..00000000000000 --- a/pkgs/os-specific/linux/kernel/linux-5.3.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: - -with stdenv.lib; - -buildLinux (args // rec { - version = "5.3.18"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "133342nv9ddjad2rizmcbilg9rhg339sfqr9l77j4cgkqhblkw90"; - }; -} // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-5.4.nix b/pkgs/os-specific/linux/kernel/linux-5.4.nix index 00ab0accbdd85b..73fe68261abf04 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.4.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "5.4.10"; + version = "5.4.11"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1p9f0h9fl1xy13dag1x7j2ic8kdv0zsp42c8baxn7cz3llc04g7j"; + sha256 = "0b6pamnhyzf4n6sl8lxcnllrn41xmbldipfca23j1n71spjkdgb2"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index 799a84d96df61b..5102a1c2086b42 100644 --- a/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -1,8 +1,8 @@ { stdenv, lib, fetchsvn, linux , scripts ? fetchsvn { url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; - rev = "17185"; - sha256 = "0hyd7wp73w4555d42xcvk4x4nxrfckbzah2ckb4d2aqzxab87789"; + rev = "17198"; + sha256 = "0cr7jpag6kr3iili5zmv1iimi5a1c175dcj8qvhcspwkbv7f17mp"; } , ... }: diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix index dcb274c92545d2..b6231b5a9729e9 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "5.5-rc3"; + version = "5.5-rc6"; extraMeta.branch = "5.5"; # modDirVersion needs to be x.y.z, will always add .0 @@ -11,7 +11,7 @@ buildLinux (args // rec { src = fetchurl { url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz"; - sha256 = "1rf394d1d6c0mvf6006gq1bscq3jjcvj9xxmdwallfwpp9igs8id"; + sha256 = "0y4rsxynn0qprrsxy4v5vr4ihhavn43yqqp1qfrrxsfw15djncc2"; }; # Should the testing kernels ever be built on Hydra? diff --git a/pkgs/os-specific/linux/kernel/update-libre.sh b/pkgs/os-specific/linux/kernel/update-libre.sh index 3b8a00edcdaca6..aea12df55cc596 100755 --- a/pkgs/os-specific/linux/kernel/update-libre.sh +++ b/pkgs/os-specific/linux/kernel/update-libre.sh @@ -6,6 +6,7 @@ nixpkgs="$(git rev-parse --show-toplevel)" path="$nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix" old_rev="$(grep -o 'rev = ".*"' "$path" | awk -F'"' '{print $2}')" +old_sha256="$(grep -o 'sha256 = ".*"' "$path" | awk -F'"' '{print $2}')" svn_url=https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/ rev="$(curl -s "$svn_url" | grep -Em 1 -o 'Revision [0-9]+' | awk '{print $2}')" @@ -17,10 +18,16 @@ fi sha256="$(QUIET=1 nix-prefetch-svn "$svn_url" "$rev" | tail -1)" +if [ "$old_sha256" = "$sha256" ]; then + echo "No updates for linux-libre" + exit 0 +fi + sed -i -e "s/rev = \".*\"/rev = \"$rev\"/" \ -e "s/sha256 = \".*\"/sha256 = \"$sha256\"/" "$path" -if [ -n "$COMMIT" ]; then - git commit -qm "linux_latest-libre: $old_rev -> $rev" "$path" +if [ -n "${COMMIT-}" ]; then + git commit -qm "linux_latest-libre: $old_rev -> $rev" "$path" \ + $nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix echo "Updated linux_latest-libre $old_rev -> $rev" fi diff --git a/pkgs/os-specific/linux/rfkill/udev.nix b/pkgs/os-specific/linux/rfkill/udev.nix index 41dd3da9d31fbe..0575c46e28e3c9 100644 --- a/pkgs/os-specific/linux/rfkill/udev.nix +++ b/pkgs/os-specific/linux/rfkill/udev.nix @@ -8,18 +8,18 @@ # udev.packages = [ pkgs.rfkill_udev ]; # # Add a hook script in the managed etc directory, e.g.: -# etc = [ -# { source = pkgs.writeScript "rtfkill.hook" '' -# #!${pkgs.runtimeShell} +# etc."rfkill.hook" = { +# mode = "0755"; +# text = '' +# #!${pkgs.runtimeShell} # -# if [ "$RFKILL_STATE" -eq "1" ]; then -# exec ${config.system.build.upstart}/sbin/initctl emit -n antenna-on -# else -# exec ${config.system.build.upstart}/sbin/initctl emit -n antenna-off -# fi -# ''; -# target = "rfkill.hook"; -# } +# if [ "$RFKILL_STATE" -eq "1" ]; then +# exec ${config.system.build.upstart}/sbin/initctl emit -n antenna-on +# else +# exec ${config.system.build.upstart}/sbin/initctl emit -n antenna-off +# fi +# ''; +# } # Note: this package does not need the binaries # in the rfkill package. diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix index ae083f17ada951..c36ca2f8f509cb 100644 --- a/pkgs/servers/dante/default.nix +++ b/pkgs/servers/dante/default.nix @@ -11,7 +11,9 @@ stdenv.mkDerivation rec { buildInputs = [ pam libkrb5 cyrus_sasl miniupnpc ]; - configureFlags = ["--with-libc=libc${stdenv.targetPlatform.extensions.sharedLibrary}"]; + configureFlags = if !stdenv.isDarwin + then [ "--with-libc=libc.so.6" ] + else [ "--with-libc=libc${stdenv.targetPlatform.extensions.sharedLibrary}" ]; dontAddDisableDepTrack = stdenv.isDarwin; diff --git a/pkgs/servers/ftp/bftpd/default.nix b/pkgs/servers/ftp/bftpd/default.nix index e7c22904ceac60..34757462a176f4 100644 --- a/pkgs/servers/ftp/bftpd/default.nix +++ b/pkgs/servers/ftp/bftpd/default.nix @@ -5,11 +5,11 @@ let in stdenv.mkDerivation rec { name = "${pname}-${version}"; - version = "5.2"; + version = "5.4"; src = fetchurl { url = "mirror://sourceforge/project/${pname}/${pname}/${name}/${name}.tar.gz"; - sha256 = "0kmavljj3zwpgdib9nb14fnriiv0l9zm3hglimcyz26sxbw5jqky"; + sha256 = "19fd9r233wkjk8gdxn6qsjgfijiw67a48xhgbm2kq46bx80yf3pg"; }; preConfigure = '' diff --git a/pkgs/servers/mail/public-inbox/0002-msgtime-drop-Date-Parse-for-RFC2822.patch b/pkgs/servers/mail/public-inbox/0002-msgtime-drop-Date-Parse-for-RFC2822.patch new file mode 100644 index 00000000000000..ebc9a6f223797d --- /dev/null +++ b/pkgs/servers/mail/public-inbox/0002-msgtime-drop-Date-Parse-for-RFC2822.patch @@ -0,0 +1,172 @@ +From c9b5164c954cd0de80d971f1c4ced16bf41ea81b Mon Sep 17 00:00:00 2001 +From: Eric Wong +Date: Fri, 29 Nov 2019 12:25:07 +0000 +Subject: [PATCH 2/2] msgtime: drop Date::Parse for RFC2822 + +Date::Parse is not optimized for RFC2822 dates and isn't +packaged on OpenBSD. It's still useful for historical +email when email clients were less conformant, but is +less relevant for new emails. +--- + lib/PublicInbox/MsgTime.pm | 115 ++++++++++++++++++++++++++++++++----- + t/msgtime.t | 6 ++ + 2 files changed, 107 insertions(+), 14 deletions(-) + +diff --git a/lib/PublicInbox/MsgTime.pm b/lib/PublicInbox/MsgTime.pm +index 58e11d72..e9b27a49 100644 +--- a/lib/PublicInbox/MsgTime.pm ++++ b/lib/PublicInbox/MsgTime.pm +@@ -7,24 +7,114 @@ use strict; + use warnings; + use base qw(Exporter); + our @EXPORT_OK = qw(msg_timestamp msg_datestamp); +-use Date::Parse qw(str2time strptime); ++use Time::Local qw(timegm); ++my @MoY = qw(january february march april may june ++ july august september october november december); ++my %MoY; ++@MoY{@MoY} = (0..11); ++@MoY{map { substr($_, 0, 3) } @MoY} = (0..11); ++ ++my %OBSOLETE_TZ = ( # RFC2822 4.3 (Obsolete Date and Time) ++ EST => '-0500', EDT => '-0400', ++ CST => '-0600', CDT => '-0500', ++ MST => '-0700', MDT => '-0600', ++ PST => '-0800', PDT => '-0700', ++ UT => '+0000', GMT => '+0000', Z => '+0000', ++ ++ # RFC2822 states: ++ # The 1 character military time zones were defined in a non-standard ++ # way in [RFC822] and are therefore unpredictable in their meaning. ++); ++my $OBSOLETE_TZ = join('|', keys %OBSOLETE_TZ); + + sub str2date_zone ($) { + my ($date) = @_; ++ my ($ts, $zone); ++ ++ # RFC822 is most likely for email, but we can tolerate an extra comma ++ # or punctuation as long as all the data is there. ++ # We'll use '\s' since Unicode spaces won't affect our parsing. ++ # SpamAssassin ignores commas and redundant spaces, too. ++ if ($date =~ /(?:[A-Za-z]+,?\s+)? # day-of-week ++ ([0-9]+),?\s+ # dd ++ ([A-Za-z]+)\s+ # mon ++ ([0-9]{2,})\s+ # YYYY or YY (or YYY :P) ++ ([0-9]+)[:\.] # HH: ++ ((?:[0-9]{2})|(?:\s?[0-9])) # MM ++ (?:[:\.]((?:[0-9]{2})|(?:\s?[0-9])))? # :SS ++ \s+ # a TZ offset is required: ++ ([\+\-])? # TZ sign ++ [\+\-]* # I've seen extra "-" e.g. "--500" ++ ([0-9]+|$OBSOLETE_TZ)(?:\s|$) # TZ offset ++ /xo) { ++ my ($dd, $m, $yyyy, $hh, $mm, $ss, $sign, $tz) = ++ ($1, $2, $3, $4, $5, $6, $7, $8); ++ # don't accept non-English months ++ defined(my $mon = $MoY{lc($m)}) or return; ++ ++ if (defined(my $off = $OBSOLETE_TZ{$tz})) { ++ $sign = substr($off, 0, 1); ++ $tz = substr($off, 1); ++ } ++ ++ # Y2K problems: 3-digit years, follow RFC2822 ++ if (length($yyyy) <= 3) { ++ $yyyy += 1900; ++ ++ # and 2-digit years from '09 (2009) (0..49) ++ $yyyy += 100 if $yyyy < 1950; ++ } ++ ++ $ts = timegm($ss // 0, $mm, $hh, $dd, $mon, $yyyy); + +- my $ts = str2time($date); +- return undef unless(defined $ts); ++ # Compute the time offset from [+-]HHMM ++ $tz //= 0; ++ my ($tz_hh, $tz_mm); ++ if (length($tz) == 1) { ++ $tz_hh = $tz; ++ $tz_mm = 0; ++ } elsif (length($tz) == 2) { ++ $tz_hh = 0; ++ $tz_mm = $tz; ++ } else { ++ $tz_hh = $tz; ++ $tz_hh =~ s/([0-9]{2})\z//; ++ $tz_mm = $1; ++ } ++ while ($tz_mm >= 60) { ++ $tz_mm -= 60; ++ $tz_hh += 1; ++ } ++ $sign //= '+'; ++ my $off = $sign . ($tz_mm * 60 + ($tz_hh * 60 * 60)); ++ $ts -= $off; ++ $sign = '+' if $off == 0; ++ $zone = sprintf('%s%02d%02d', $sign, $tz_hh, $tz_mm); + +- # off is the time zone offset in seconds from GMT +- my ($ss,$mm,$hh,$day,$month,$year,$off) = strptime($date); +- return undef unless(defined $off); ++ # Time::Zone and Date::Parse are part of the same distibution, ++ # and we need Time::Zone to deal with tz names like "EDT" ++ } elsif (eval { require Date::Parse }) { ++ $ts = Date::Parse::str2time($date); ++ return undef unless(defined $ts); + +- # Compute the time zone from offset +- my $sign = ($off < 0) ? '-' : '+'; +- my $hour = abs(int($off / 3600)); +- my $min = ($off / 60) % 60; +- my $zone = sprintf('%s%02d%02d', $sign, $hour, $min); ++ # off is the time zone offset in seconds from GMT ++ my ($ss,$mm,$hh,$day,$month,$year,$off) = ++ Date::Parse::strptime($date); ++ return undef unless(defined $off); ++ ++ # Compute the time zone from offset ++ my $sign = ($off < 0) ? '-' : '+'; ++ my $hour = abs(int($off / 3600)); ++ my $min = ($off / 60) % 60; ++ ++ $zone = sprintf('%s%02d%02d', $sign, $hour, $min); ++ } else { ++ warn "Date::Parse missing for non-RFC822 date: $date\n"; ++ return undef; ++ } + ++ # Note: we've already applied the offset to $ts at this point, ++ # but we want to keep "git fsck" happy. + # "-1200" is the furthest westermost zone offset, + # but git fast-import is liberal so we use "-1400" + if ($zone >= 1400 || $zone <= -1400) { +@@ -59,9 +149,6 @@ sub msg_date_only ($) { + my @date = $hdr->header_raw('Date'); + my ($ts); + foreach my $d (@date) { +- # Y2K problems: 3-digit years +- $d =~ s!([A-Za-z]{3}) ([0-9]{3}) ([0-9]{2}:[0-9]{2}:[0-9]{2})! +- my $yyyy = $2 + 1900; "$1 $yyyy $3"!e; + $ts = eval { str2date_zone($d) } and return $ts; + if ($@) { + my $mid = $hdr->header_raw('Message-ID'); +diff --git a/t/msgtime.t b/t/msgtime.t +index 6b396602..d9643b65 100644 +--- a/t/msgtime.t ++++ b/t/msgtime.t +@@ -84,4 +84,10 @@ is_deeply(datestamp('Fri, 28 Jun 2002 12:54:40 -700'), [1025294080, '-0700']); + is_deeply(datestamp('Sat, 12 Jan 2002 12:52:57 -200'), [1010847177, '-0200']); + is_deeply(datestamp('Mon, 05 Nov 2001 10:36:16 -800'), [1004985376, '-0800']); + ++# obsolete formats described in RFC2822 ++for (qw(UT GMT Z)) { ++ is_deeply(datestamp('Fri, 02 Oct 1993 00:00:00 '.$_), [ 749520000, '+0000']); ++} ++is_deeply(datestamp('Fri, 02 Oct 1993 00:00:00 EDT'), [ 749534400, '-0400']); ++ + done_testing(); +-- +2.24.1 + diff --git a/pkgs/servers/mail/public-inbox/default.nix b/pkgs/servers/mail/public-inbox/default.nix index b47495585004e7..affcb0e8b2378d 100644 --- a/pkgs/servers/mail/public-inbox/default.nix +++ b/pkgs/servers/mail/public-inbox/default.nix @@ -1,4 +1,4 @@ -{ buildPerlPackage, lib, fetchurl, makeWrapper +{ buildPerlPackage, lib, fetchurl, fetchpatch, makeWrapper , DBDSQLite, EmailMIME, IOSocketSSL, IPCRun, Plack, PlackMiddlewareReverseProxy , SearchXapian, TimeDate, URI , git, highlight, openssl, xapian @@ -29,6 +29,14 @@ buildPerlPackage rec { sha256 = "0sa2m4f2x7kfg3mi4im7maxqmqvawafma8f7g92nyfgybid77g6s"; }; + patches = [ + (fetchpatch { + url = "https://public-inbox.org/meta/20200101032822.GA13063@dcvr/raw"; + sha256 = "0ncxqqkvi5lwi8zaa7lk7l8mf8h278raxsvbvllh3z7jhfb48r3l"; + }) + ./0002-msgtime-drop-Date-Parse-for-RFC2822.patch + ]; + outputs = [ "out" "devdoc" "sa_config" ]; postConfigure = '' diff --git a/pkgs/servers/rippled/default.nix b/pkgs/servers/rippled/default.nix index 840f63f3e05819..905e776ea362ef 100644 --- a/pkgs/servers/rippled/default.nix +++ b/pkgs/servers/rippled/default.nix @@ -1,34 +1,28 @@ -{ stdenv, fetchFromGitHub, fetchgit, fetchurl, git, cmake, pkgconfig +{ stdenv, fetchFromGitHub, fetchgit, fetchurl, runCommand, git, cmake, pkgconfig , openssl, boost, zlib }: let - sqlite3 = fetchurl { + sqlite3 = fetchurl rec { url = "https://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip"; sha256 = "0vh9aa5dyvdwsyd8yp88ss300mv2c2m40z79z569lcxa6fqwlpfy"; - }; - - beast = fetchgit { - url = "https://github.com/boostorg/beast.git"; - rev = "2f9a8440c2432d8a196571d6300404cb76314125"; - sha256 = "1n9ms5cn67b0p0mhldz5psgylds22sm5x22q7knrsf20856vlk5a"; - fetchSubmodules = false; - leaveDotGit = true; + passthru.url = url; }; docca = fetchgit { url = "https://github.com/vinniefalco/docca.git"; rev = "335dbf9c3613e997ed56d540cc8c5ff2e28cab2d"; - sha256 = "09cb90k0ygmnlpidybv6nzf6is51i80lnwlvad6ijc3gf1z6i1yh"; - fetchSubmodules = false; + sha256 = "1yisdg7q2p9q9gz0c446796p3ggx9s4d6g8w4j1pjff55655805h"; leaveDotGit = true; + fetchSubmodules = false; }; - rocksdb = fetchgit { + rocksdb = fetchgit rec { url = "https://github.com/facebook/rocksdb.git"; - rev = "a297643f2e327a8bc7061bfc838fdf11935a2cf2"; - sha256 = "00z8i4fwr27j9d4ymnls7rcgfvm6xh36a4hy2m2njx4x513pgyzw"; - fetchSubmodules = false; + rev = "v5.17.2"; + sha256 = "0d9ssggjls1hc4zhng65yg8slqlcw0lr23qr6f39shg42lzr227p"; leaveDotGit = true; + fetchSubmodules = false; + postFetch = "cd $out && git tag ${rev}"; }; lz4 = fetchgit rec { @@ -51,8 +45,8 @@ let soci = fetchgit { url = "https://github.com/SOCI/soci.git"; - rev = "3a1f602b3021b925d38828e3ff95f9e7f8887ff7"; - sha256 = "0lnps42cidlrn43h13b9yc8cs3fwgz7wb6a1kfc9rnw7swkh757f"; + rev = "04e1870294918d20761736743bb6136314c42dd5"; + sha256 = "0w3b7qi3bwn8bxh4qbqy6c1fw2bbwh7pxvk8b3qb6h4qgsh6kx89"; leaveDotGit = true; fetchSubmodules = false; }; @@ -67,11 +61,11 @@ let }; nudb = fetchgit rec { - url = "https://github.com/vinniefalco/NuDB.git"; - rev = "1.0.0"; - sha256 = "142bxicv25xaw4fmpw8bbblb1grdw30wyj181xl4a5734zw3qgmz"; + url = "https://github.com/CPPAlliance/NuDB.git"; + rev = "2.0.1"; + sha256 = "0h7hmwavrxzj1v547h3z0031ckwphjayfpv1mgcr6q86wm9p5468"; leaveDotGit = true; - fetchSubmodules = false; + fetchSubmodules = true; # submodules are needed, rocksdb is dependency postFetch = "cd $out && git tag ${rev}"; }; @@ -88,40 +82,54 @@ let url = "https://github.com/google/googletest.git"; rev = "c3bb0ee2a63279a803aaad956b9b26d74bf9e6e2"; sha256 = "0pj5b6jnrj5lrccz2disr8hklbnzd8hwmrwbfqmvhiwb9q9p0k2k"; - leaveDotGit = true; fetchSubmodules = false; + leaveDotGit = true; }; google-benchmark = fetchgit { url = "https://github.com/google/benchmark.git"; rev = "5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8"; sha256 = "0qg70j47zqnrbszlgrzmxpr4g88kq0gyq6v16bhaggfm83c6mg6i"; - leaveDotGit = true; fetchSubmodules = false; + leaveDotGit = true; }; + + # hack to merge rocksdb revisions from rocksdb and nudb, so build process + # will find both + rocksdb-merged = runCommand "rocksdb-merged" { + buildInputs = [ git ]; + } '' + commit=$(cd ${nudb} && git ls-tree HEAD extras/rocksdb | awk '{ print $3 }') + git clone ${rocksdb} $out && cd $out + git fetch ${nudb}/extras/rocksdb $commit + git checkout $commit + ''; in stdenv.mkDerivation rec { pname = "rippled"; - version = "1.2.1"; + version = "1.4.0"; src = fetchFromGitHub { owner = "ripple"; repo = "rippled"; rev = version; - sha256 = "1lm0zzz0hi2sh2f4iqq3scapzdjbxcjgr700fgham9wqgaj2ash5"; + sha256 = "1z04378bg8lcyrnn7sl3j2zfxbwwy2biasg1d4fbaq4snxg5d1pq"; }; hardeningDisable = ["format"]; - cmakeFlags = ["-Dstatic=OFF"]; + cmakeFlags = [ + "-Dstatic=OFF" + "-DBOOST_LIBRARYDIR=${boost.out}/lib" + "-DBOOST_INCLUDEDIR=${boost.dev}/include" + ]; nativeBuildInputs = [ pkgconfig cmake git ]; - buildInputs = [ openssl openssl.dev boost zlib ]; + buildInputs = [ openssl openssl.dev zlib ]; preConfigure = '' export HOME=$PWD - git config --global url."file://${beast}".insteadOf "https://github.com/vinniefalco/Beast.git" - git config --global url."file://${docca}".insteadOf "https://github.com/vinniefalco/docca.git" - git config --global url."file://${rocksdb}".insteadOf "https://github.com/facebook/rocksdb.git" + git config --global url."file://${docca}".insteadOf "${docca.url}" + git config --global url."file://${rocksdb-merged}".insteadOf "${rocksdb.url}" git config --global url."file://${lz4}".insteadOf "${lz4.url}" git config --global url."file://${libarchive}".insteadOf "${libarchive.url}" git config --global url."file://${soci}".insteadOf "${soci.url}" @@ -131,7 +139,7 @@ in stdenv.mkDerivation rec { git config --global url."file://${google-benchmark}".insteadOf "${google-benchmark.url}" git config --global url."file://${google-test}".insteadOf "${google-test.url}" - substituteInPlace CMakeLists.txt --replace "URL https://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip" "URL ${sqlite3}" + substituteInPlace Builds/CMake/deps/Sqlite.cmake --replace "URL ${sqlite3.url}" "URL ${sqlite3}" ''; doCheck = true; @@ -141,7 +149,7 @@ in stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Ripple P2P payment network reference server"; - homepage = https://ripple.com; + homepage = https://github.com/ripple/rippled; maintainers = with maintainers; [ ehmry offline ]; license = licenses.isc; platforms = [ "x86_64-linux" ]; diff --git a/pkgs/servers/web-apps/moodle/default.nix b/pkgs/servers/web-apps/moodle/default.nix index 2957d296dc4b2a..3de6005a3cf3ec 100644 --- a/pkgs/servers/web-apps/moodle/default.nix +++ b/pkgs/servers/web-apps/moodle/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, writeText }: let - version = "3.8"; + version = "3.8.1"; stableVersion = builtins.substring 0 2 (builtins.replaceStrings ["."] [""] version); in @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://download.moodle.org/stable${stableVersion}/${pname}-${version}.tgz"; - sha256 = "00ssx0drgp1fy062x6alp0x8di7hjn4xc87v8skpy3aznchfxyk9"; + sha256 = "1xz2wq16blw9p2b6wlrn9lr524gddm5jyac5prka8kp6lrk0v0y1"; }; phpConfig = writeText "config.php" '' diff --git a/pkgs/tools/admin/azure-cli/default.nix b/pkgs/tools/admin/azure-cli/default.nix index 1a492c41aeec7e..cc793f8300dcf4 100644 --- a/pkgs/tools/admin/azure-cli/default.nix +++ b/pkgs/tools/admin/azure-cli/default.nix @@ -1,12 +1,12 @@ { stdenv, lib, python, fetchFromGitHub, installShellFiles }: let - version = "2.0.79"; + version = "2.0.80"; src = fetchFromGitHub { owner = "Azure"; repo = "azure-cli"; rev = "azure-cli-${version}"; - sha256 = "0fzpq5fnqxkjghsjk4hi3jng5lgywpvj3fzb5sb7nb7ymvkvhad2"; + sha256 = "05j74cfxjpi3w79w0i5av3h2m81bavbsc581vvh773ixivndds1k"; }; # put packages that needs to be overriden in the py package scope diff --git a/pkgs/tools/admin/azure-cli/python-packages.nix b/pkgs/tools/admin/azure-cli/python-packages.nix index ac0e633cb967e7..290800e422605f 100644 --- a/pkgs/tools/admin/azure-cli/python-packages.nix +++ b/pkgs/tools/admin/azure-cli/python-packages.nix @@ -207,8 +207,8 @@ let azure-mgmt-authorization = overrideAzureMgmtPackage super.azure-mgmt-authorization "0.52.0" "zip" "0357laxgldb7lvvws81r8xb6mrq9dwwnr1bnwdnyj4bw6p21i9hn"; - azure-mgmt-storage = overrideAzureMgmtPackage super.azure-mgmt-storage "7.0.0" "zip" - "01f17fb1myskj72zarc67i1sxfvk66lid9zn12gwjrz2vqc6npkz"; + azure-mgmt-storage = overrideAzureMgmtPackage super.azure-mgmt-storage "7.1.0" "zip" + "03yjvw1dwkwsadsv60i625mr9zpdryy7ywvh7p8fg60djszh1p5l"; azure-mgmt-servicefabric = overrideAzureMgmtPackage super.azure-mgmt-servicefabric "0.2.0" "zip" "1bcq6fcgrsvmk6q7v8mxzn1180jm2qijdqkqbv1m117zp1wj5gxj"; diff --git a/pkgs/tools/admin/eksctl/default.nix b/pkgs/tools/admin/eksctl/default.nix index e5fcf3933ebc35..3cadafc633ee20 100644 --- a/pkgs/tools/admin/eksctl/default.nix +++ b/pkgs/tools/admin/eksctl/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "eksctl"; - version = "0.11.1"; + version = "0.12.0"; src = fetchFromGitHub { owner = "weaveworks"; repo = pname; rev = version; - sha256 = "197lf6cb1maam1yxy29wgp4dkakaavmwqvq2d9i4qxhscalrdra5"; + sha256 = "1m4hcj2bi9v3ngjj2x1fifcnb450jrij06vbi3j28slsdwn1bcc8"; }; - modSha256 = "04ba3dyfwlf0m6kn7yp7qyp3h2qdwp17y1f9pa79y3c6sd2nadk2"; + modSha256 = "1c8qyxzfazgw77rlv3yw2x39ymaq66jjd51im0jl4131a6hzj6fd"; subPackages = [ "cmd/eksctl" ]; diff --git a/pkgs/tools/misc/broot/default.nix b/pkgs/tools/misc/broot/default.nix index 63d5ff69e790c1..7980298eba16cf 100644 --- a/pkgs/tools/misc/broot/default.nix +++ b/pkgs/tools/misc/broot/default.nix @@ -1,17 +1,32 @@ -{ stdenv, rustPlatform, fetchFromGitHub }: +{ stdenv, rustPlatform, fetchFromGitHub, coreutils, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "broot"; - version = "0.10.2"; + version = "0.11.8"; src = fetchFromGitHub { owner = "Canop"; repo = pname; rev = "v${version}"; - sha256 = "1wisqb4cqdgsnjvmpgxbzs9zcw6npqw1kqxxs8mn33sxlikhbf2l"; + sha256 = "1pbjlfwv4s50s731ryrcc54200g2i04acdxrxk4kpcvi6b19kbky"; }; - cargoSha256 = "09gnyj97akychin1axp9kcww3c04xx7x1qnplhs2yxfki62r4y2b"; + cargoSha256 = "07ncclp4yqqr2lncw4bbcmknm09qzmdcq8iwkhyyfiy3fpyw9hqc"; + + nativeBuildInputs = [ installShellFiles ]; + + postPatch = '' + substituteInPlace src/verb_store.rs --replace '"/bin/' '"${coreutils}/bin/' + ''; + + postInstall = '' + # install shell completion files + OUT_DIR=target/release/build/broot-*/out + + installShellCompletion --bash $OUT_DIR/{br,broot}.bash + installShellCompletion --fish $OUT_DIR/{br,broot}.fish + installShellCompletion --zsh $OUT_DIR/{_br,_broot} + ''; meta = with stdenv.lib; { description = "An interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands"; diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index b64c527a6b9956..c9f61ee34592d1 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -35,11 +35,14 @@ python3Packages.buildPythonApplication rec { # # Still missing these tools: abootimg docx2txt dumpxsb enjarify js-beautify lipo oggDump otool procyon-decompiler Rscript wasm2wat zipnode # Also these libraries: python3-guestfs - pythonPath = with python3Packages; [ debian libarchive-c python_magic tlsh rpm pyxattr ] ++ [ - acl binutils-unwrapped bzip2 cdrkit colordiff coreutils cpio db diffutils + pythonPath = [ + binutils-unwrapped bzip2 colordiff coreutils cpio db diffutils dtc e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip - libarchive libcaca lz4 pgpdump progressbar33 sng sqlite squashfsTools unzip xxd xz - ] ++ lib.optionals enableBloat [ + libarchive libcaca lz4 pgpdump sng sqlite squashfsTools unzip xxd xz + ] + ++ (with python3Packages; [ debian libarchive-c python_magic tlsh rpm progressbar33 ]) + ++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr acl cdrkit ] + ++ lib.optionals enableBloat [ apktool cbfstool colord fpc ghc ghostscriptX giflib gnupg gnumeric imagemagick llvm jdk mono openssh pdftk poppler_utils tcpdump unoconv python3Packages.guestfs @@ -69,6 +72,6 @@ python3Packages.buildPythonApplication rec { homepage = https://wiki.debian.org/ReproducibleBuilds; license = licenses.gpl3Plus; maintainers = with maintainers; [ dezgeg ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/tools/misc/hakuneko/default.nix b/pkgs/tools/misc/hakuneko/default.nix index 8c2e7dc7451d94..0a27397551d942 100644 --- a/pkgs/tools/misc/hakuneko/default.nix +++ b/pkgs/tools/misc/hakuneko/default.nix @@ -1,28 +1,84 @@ -{ stdenv, fetchurl, wxGTK30, openssl, curl }: - +{ atomEnv +, autoPatchelfHook +, dpkg +, fetchurl +, makeDesktopItem +, makeWrapper +, udev +, stdenv +, wrapGAppsHook +}: +let + desktopItem = makeDesktopItem { + desktopName = "HakuNeko Desktop"; + genericName = "Manga & Anime Downloader"; + categories = "Network;FileTransfer;"; + exec = "hakuneko"; + icon = "hakuneko-desktop"; + name = "hakuneko-desktop"; + type = "Application"; + }; +in stdenv.mkDerivation rec { pname = "hakuneko"; - version = "1.4.2"; + version = "5.0.8"; - src = fetchurl { - url = "mirror://sourceforge/hakuneko/hakuneko_${version}_src.tar.gz"; - sha256 = "76a63fa05e91b082cb5a70a8abacef005354e99978ff8b1369f7aa0af7615d52"; - }; + src = { + "x86_64-linux" = fetchurl { + url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_amd64.deb"; + sha256 = "924df1d7a0ab54b918529165317e4428b423c9045548d1e36bd634914f7957f0"; + }; + "i686-linux" = fetchurl { + url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_i386.deb"; + sha256 = "988d8b0e8447dcd0a8d85927f5877bca9efb8e4b09ed3c80a6788390e54a48d2"; + }; + }."${stdenv.hostPlatform.system}"; + + dontBuild = true; + dontConfigure = true; + dontPatchELF = true; + dontWrapGApps = true; + + nativeBuildInputs = [ + autoPatchelfHook + dpkg + makeWrapper + wrapGAppsHook + ]; + + buildInputs = atomEnv.packages; + + unpackPhase = '' + # The deb file contains a setuid binary, so 'dpkg -x' doesn't work here + dpkg --fsys-tarfile $src | tar --extract + ''; - preConfigure = '' - substituteInPlace ./configure \ - --replace /bin/bash $shell - ''; + installPhase = '' + cp -R usr "$out" + # Overwrite existing .desktop file. + cp "${desktopItem}/share/applications/hakuneko-desktop.desktop" \ + "$out/share/applications/hakuneko-desktop.desktop" + ''; - buildInputs = [ wxGTK30 openssl curl ]; + runtimeDependencies = [ + udev.lib + ]; - meta = { - description = "Manga downloader"; - homepage = https://sourceforge.net/projects/hakuneko/; - license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.linux; + postFixup = '' + makeWrapper $out/lib/hakuneko-desktop/hakuneko $out/bin/hakuneko \ + "''${gappsWrapperArgs[@]}" + ''; - # This project was abandoned upstream. - broken = true; + meta = with stdenv.lib; { + description = "Manga & Anime Downloader"; + homepage = "https://sourceforge.net/projects/hakuneko/"; + license = licenses.unlicense; + maintainers = with maintainers; [ + nloomans + ]; + platforms = [ + "x86_64-linux" + "i686-linux" + ]; }; } diff --git a/pkgs/tools/misc/snapper/default.nix b/pkgs/tools/misc/snapper/default.nix index 466a5f3faf1cf8..283503f287888e 100644 --- a/pkgs/tools/misc/snapper/default.nix +++ b/pkgs/tools/misc/snapper/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "snapper"; - version = "0.8.7"; + version = "0.8.8"; src = fetchFromGitHub { owner = "openSUSE"; repo = "snapper"; rev = "v${version}"; - sha256 = "0605j4f3plb6q8lwf82y2jhply6dwj49jgxk8j16wsbf5k7lqzfq"; + sha256 = "0wpf82xf61r9r20whhb83wk3408wac1if8awqm3bb36b9j7ni5jr"; }; nativeBuildInputs = [ diff --git a/pkgs/tools/networking/axel/default.nix b/pkgs/tools/networking/axel/default.nix index 1fa43e5849e26b..a9ddd9a8b68229 100644 --- a/pkgs/tools/networking/axel/default.nix +++ b/pkgs/tools/networking/axel/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { description = "Console downloading program with some features for parallel connections for faster downloading"; homepage = "https://github.com/axel-download-accelerator/axel"; maintainers = with maintainers; [ pSub ]; - platforms = with platforms; linux; + platforms = with platforms; unix; license = licenses.gpl2; }; } diff --git a/pkgs/tools/networking/bandwhich/default.nix b/pkgs/tools/networking/bandwhich/default.nix index cfccefab351732..ae45e0c1fc1275 100644 --- a/pkgs/tools/networking/bandwhich/default.nix +++ b/pkgs/tools/networking/bandwhich/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "bandwhich"; - version = "0.8.0"; + version = "0.9.0"; src = fetchFromGitHub { owner = "imsnif"; repo = pname; rev = version; - sha256 = "1pd0hy17knalq4m5517ymbg95fa141843ir9283djlh3iqfgkm37"; + sha256 = "0gjk84a4ks5107vrchwwnslpbcrprmznjy3sqn2mrwfvw5biycb3"; }; - cargoSha256 = "14mb6rbjxv3r8awvy0rjc23lyhg92q1q1dik6q1za1aq9w8yipwf"; + cargoSha256 = "1sa81570cvvpqgdcpnb08b0q4c6ap8a2wxfp2z336jzbv0zgv8a6"; buildInputs = stdenv.lib.optional stdenv.isDarwin Security; diff --git a/pkgs/tools/security/fido2luks/default.nix b/pkgs/tools/security/fido2luks/default.nix new file mode 100644 index 00000000000000..0bb5a91a81a7a3 --- /dev/null +++ b/pkgs/tools/security/fido2luks/default.nix @@ -0,0 +1,32 @@ +{ stdenv +, rustPlatform +, fetchFromGitHub +, cryptsetup +, pkg-config +}: + +rustPlatform.buildRustPackage rec { + pname = "fido2luks"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "shimunn"; + repo = pname; + rev = version; + sha256 = "018qzbgmgm0f0d0c7i54nqqjbr4k5mzy1xfavi6hpifjll971wci"; + }; + + buildInputs = [ cryptsetup ]; + nativeBuildInputs = [ pkg-config ]; + + cargoSha256 = "1kf757wxxk5h8dfbz588qw1pnyjbg5qzr7rz14i7x8rhmn5xwb74"; + verifyCargoDeps = true; + + meta = with stdenv.lib; { + description = "Decrypt your LUKS partition using a FIDO2 compatible authenticator"; + homepage = "https://github.com/shimunn/fido2luks"; + license = licenses.gpl3; + maintainers = with maintainers; [ prusnak mmahut ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/security/jwt-cli/default.nix b/pkgs/tools/security/jwt-cli/default.nix index 7146cc52e9e1cb..83b630a4f4f679 100644 --- a/pkgs/tools/security/jwt-cli/default.nix +++ b/pkgs/tools/security/jwt-cli/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform }: +{ stdenv, fetchFromGitHub, rustPlatform, Security }: rustPlatform.buildRustPackage rec { pname = "jwt-cli"; @@ -13,6 +13,8 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "005y92acsn5j490jkp23ny7bsjd9ql1glybmbh4cyc8b15hmy618"; + buildInputs = stdenv.lib.optional stdenv.isDarwin Security; + meta = with stdenv.lib; { description = "Super fast CLI tool to decode and encode JWTs"; homepage = "https://github.com/mike-engel/jwt-cli"; diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix index 5d0e94bc803e51..54a8f4de7d7bf4 100644 --- a/pkgs/tools/security/pass/default.nix +++ b/pkgs/tools/security/pass/default.nix @@ -111,6 +111,12 @@ let '' + stdenv.lib.optionalString stdenv.isDarwin '' # 'pass edit' uses hdid, which is not available from the sandbox. rm -f tests/t0200-edit-tests.sh + rm -f tests/t0010-generate-tests.sh + rm -f tests/t0020-show-tests.sh + rm -f tests/t0050-mv-tests.sh + rm -f tests/t0100-insert-tests.sh + rm -f tests/t0300-reencryption.sh + rm -f tests/t0400-grep.sh ''; doCheck = false; diff --git a/pkgs/tools/text/mdcat/default.nix b/pkgs/tools/text/mdcat/default.nix index 626963bc60103c..6b19251acf8e82 100644 --- a/pkgs/tools/text/mdcat/default.nix +++ b/pkgs/tools/text/mdcat/default.nix @@ -2,26 +2,28 @@ rustPlatform.buildRustPackage rec { pname = "mdcat"; - version = "0.14.0"; + version = "0.15.0"; src = fetchFromGitHub { owner = "lunaryorn"; repo = pname; rev = "mdcat-${version}"; - sha256 = "1q8h6pc1i89j1zl4s234inl9v95vsdrry1fzlis89sl2mnbv8ywy"; + sha256 = "1x9c3cj3y8wvwr74kbz6nrdh61rinr98gcp3hnjpi6c3vg3xx4wh"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security; - cargoSha256 = "1hxsfls6fpllc9yg5ib3qz6pa62j1y1va8a6356j6812csk4ifnn"; + cargoSha256 = "1kc434pa72n9xll2r4ddmd9xdwv3ls36cwsmdry392j41zmics51"; checkInputs = [ ansi2html ]; checkPhase = '' # Skip tests that use the network and that include files. - cargo test -- --skip terminal::iterm2 --skip terminal::resources::tests::remote \ + cargo test -- --skip terminal::iterm2 \ --skip magic::tests::detect_mimetype_of_svg_image \ - --skip magic::tests::detect_mimetype_of_png_image + --skip magic::tests::detect_mimetype_of_png_image \ + --skip resources::tests::read_url_with_http_url_fails_when_status_404 \ + --skip resources::tests::read_url_with_http_url_returns_content_when_status_200 ''; meta = with stdenv.lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e065d471984d3..f5082bd3926362 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1298,7 +1298,7 @@ in burpsuite = callPackage ../tools/networking/burpsuite {}; - bs-platform = (callPackage ../development/compilers/bs-platform {}).bs-platform-621; + bs-platform = callPackage ../development/compilers/bs-platform {}; c3d = callPackage ../applications/graphics/c3d { inherit (darwin.apple_sdk.frameworks) Cocoa; @@ -1860,7 +1860,9 @@ in jotta-cli = callPackage ../applications/misc/jotta-cli { }; - jwt-cli = callPackage ../tools/security/jwt-cli { }; + jwt-cli = callPackage ../tools/security/jwt-cli { + inherit (darwin.apple_sdk.frameworks) Security; + }; kapacitor = callPackage ../servers/monitoring/kapacitor { }; @@ -3236,6 +3238,8 @@ in flux = callPackage ../development/compilers/flux { }; + fido2luks = callPackage ../tools/security/fido2luks {}; + fierce = callPackage ../tools/security/fierce { }; figlet = callPackage ../tools/misc/figlet { }; @@ -10481,6 +10485,8 @@ in rman = callPackage ../development/tools/misc/rman { }; + rnix-lsp = callPackage ../development/tools/rnix-lsp { }; + rolespec = callPackage ../development/tools/misc/rolespec { }; rr = callPackage ../development/tools/analysis/rr { }; @@ -10770,6 +10776,8 @@ in alure = callPackage ../development/libraries/alure { }; + alure2 = callPackage ../development/libraries/alure2 { }; + agg = callPackage ../development/libraries/agg { }; allegro = allegro4; @@ -11053,9 +11061,8 @@ in cpp-ipfs-api = callPackage ../development/libraries/cpp-ipfs-api { }; - cpp-netlib = callPackage ../development/libraries/cpp-netlib { - openssl = openssl_1_0_2; - }; + cpp-netlib = callPackage ../development/libraries/cpp-netlib {}; + uri = callPackage ../development/libraries/uri { }; cppcms = callPackage ../development/libraries/cppcms { }; @@ -13642,6 +13649,10 @@ in buildPythonApplication click future six; }; + prospector = callPackage ../development/tools/prospector { + python = python37; + }; + protobuf = protobuf3_7; protobuf3_11 = callPackage ../development/libraries/protobuf/3.11.nix { }; @@ -15666,7 +15677,9 @@ in libtool = darwin.cctools; }; - rippled = callPackage ../servers/rippled { }; + rippled = callPackage ../servers/rippled { + boost = boost17x; + }; rippled-validator-keys-tool = callPackage ../servers/rippled/validator-keys-tool.nix { boost = boost167.override { @@ -16338,14 +16351,6 @@ in ]; }; - linux_5_3 = callPackage ../os-specific/linux/kernel/linux-5.3.nix { - kernelPatches = [ - kernelPatches.bridge_stp_helper - kernelPatches.request_key_helper - kernelPatches.export_kernel_fpu_functions."5.3" - ]; - }; - linux_5_4 = callPackage ../os-specific/linux/kernel/linux-5.4.nix { kernelPatches = [ kernelPatches.bridge_stp_helper @@ -16568,7 +16573,6 @@ in linuxPackages_4_9 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_9); linuxPackages_4_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_14); linuxPackages_4_19 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_19); - linuxPackages_5_3 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_3); linuxPackages_5_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_4); # When adding to this list: @@ -18207,7 +18211,9 @@ in bleachbit = callPackage ../applications/misc/bleachbit { }; - blender = callPackage ../applications/misc/blender { }; + blender = callPackage ../applications/misc/blender { + inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics ForceFeedback OpenAL OpenGL; + }; bluefish = callPackage ../applications/editors/bluefish { gtk = gtk3; @@ -18549,6 +18555,7 @@ in docker-machine-kvm2 = callPackage ../applications/networking/cluster/docker-machine/kvm2.nix { }; docker-machine-xhyve = callPackage ../applications/networking/cluster/docker-machine/xhyve.nix { inherit (darwin.apple_sdk.frameworks) Hypervisor vmnet; + inherit (darwin) cctools; }; docker-distribution = callPackage ../applications/virtualization/docker/distribution.nix { }; @@ -23016,6 +23023,8 @@ in megaglest = callPackage ../games/megaglest {}; + mindustry = callPackage ../games/mindustry { }; + minecraft = callPackage ../games/minecraft { }; minecraft-server = callPackage ../games/minecraft-server { }; @@ -23907,6 +23916,8 @@ in nasc = callPackage ../applications/science/math/nasc { }; + nota = haskellPackages.callPackage ../applications/science/math/nota { }; + openblas = callPackage ../development/libraries/science/math/openblas { }; # A version of OpenBLAS using 32-bit integers on all platforms for compatibility with @@ -25791,5 +25802,4 @@ in sentencepiece = callPackage ../development/libraries/sentencepiece {}; kcli = callPackage ../development/tools/kcli {}; - } diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4a7743b1090106..4d956c494c053d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -468,6 +468,8 @@ let lambdaTerm = callPackage ../development/ocaml-modules/lambda-term { }; + lens = callPackage ../development/ocaml-modules/lens { }; + linenoise = callPackage ../development/ocaml-modules/linenoise { }; llvm = callPackage ../development/ocaml-modules/llvm { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3d64c41f4c2a34..369707d39c5fe2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -108,7 +108,7 @@ in { inherit buildSetupcfg; inherit (callPackage ../development/interpreters/python/hooks { }) - eggUnpackHook eggBuildHook eggInstallHook flitBuildHook pipBuildHook pipInstallHook pytestCheckHook pythonCatchConflictsHook pythonImportsCheckHook pythonRemoveBinBytecodeHook setuptoolsBuildHook setuptoolsCheckHook wheelUnpackHook; + eggUnpackHook eggBuildHook eggInstallHook flitBuildHook pipBuildHook pipInstallHook pytestCheckHook pythonCatchConflictsHook pythonImportsCheckHook pythonRemoveBinBytecodeHook setuptoolsBuildHook setuptoolsCheckHook venvShellHook wheelUnpackHook; # helpers @@ -903,6 +903,8 @@ in { oauthenticator = callPackage ../development/python-modules/oauthenticator { }; + onnx = callPackage ../development/python-modules/onnx { }; + ordered-set = callPackage ../development/python-modules/ordered-set { }; ortools = (toPythonModule (pkgs.or-tools.override { @@ -1392,6 +1394,8 @@ in { stups-fullstop = callPackage ../development/python-modules/stups-fullstop { }; + stups-pierone = callPackage ../development/python-modules/stups-pierone { }; + stups-tokens = callPackage ../development/python-modules/stups-tokens { }; stups-zign = callPackage ../development/python-modules/stups-zign { }; @@ -1669,6 +1673,8 @@ in { avro3k = callPackage ../development/python-modules/avro3k {}; + avro-python3 = callPackage ../development/python-modules/avro-python3 {}; + aws-lambda-builders = callPackage ../development/python-modules/aws-lambda-builders { }; python-slugify = callPackage ../development/python-modules/python-slugify { }; @@ -2652,6 +2658,8 @@ in { gpsoauth = callPackage ../development/python-modules/gpsoauth { }; + gpxpy = callPackage ../development/python-modules/gpxpy { }; + grip = callPackage ../development/python-modules/grip { }; gst-python = callPackage ../development/python-modules/gst-python { @@ -4824,6 +4832,12 @@ in { pylint = if isPy3k then callPackage ../development/python-modules/pylint { } else callPackage ../development/python-modules/pylint/1.9.nix { }; + pylint-celery = callPackage ../development/python-modules/pylint-celery { }; + + pylint-django = callPackage ../development/python-modules/pylint-django { }; + + pylint-flask = callPackage ../development/python-modules/pylint-flask { }; + pylint-plugin-utils = callPackage ../development/python-modules/pylint-plugin-utils { }; pyomo = callPackage ../development/python-modules/pyomo { }; @@ -4934,6 +4948,8 @@ in { pynmea2 = callPackage ../development/python-modules/pynmea2 {}; + pynrrd = callPackage ../development/python-modules/pynrrd { }; + pynzb = callPackage ../development/python-modules/pynzb { }; process-tests = callPackage ../development/python-modules/process-tests { }; @@ -5008,6 +5024,8 @@ in { python-markdown-math = callPackage ../development/python-modules/python-markdown-math { }; + python-miio = callPackage ../development/python-modules/python-miio { }; + python-pipedrive = callPackage ../development/python-modules/python-pipedrive { }; python-ptrace = callPackage ../development/python-modules/python-ptrace { }; diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix index 1ed3601270f888..ab7e4ce00d7d1e 100644 --- a/pkgs/top-level/release-small.nix +++ b/pkgs/top-level/release-small.nix @@ -156,7 +156,6 @@ with import ./release-lib.nix { inherit supportedSystems; }; time = linux; tinycc = linux; udev = linux; - unar = linux; unzip = all; usbutils = linux; utillinux = linux; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 7060fea588a5ce..e39b40be662d8d 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -105,7 +105,6 @@ let jobs.nix-info-tested.x86_64-linux # Ensure that X11/GTK are in order. jobs.thunderbird.x86_64-linux - jobs.unar.x86_64-linux jobs.cachix.x86_64-linux /*