Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-04-15 00:02:06 +00:00 committed by GitHub
commit 42605fe1f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 1218 additions and 723 deletions

View file

@ -129,16 +129,21 @@ Let's present the luarocks way first and the manual one in a second time.
### Packaging a library on luarocks {#packaging-a-library-on-luarocks}
[Luarocks.org](https://luarocks.org/) is the main repository of lua packages.
The site proposes two types of packages, the rockspec and the src.rock
The site proposes two types of packages, the `rockspec` and the `src.rock`
(equivalent of a [rockspec](https://github.com/luarocks/luarocks/wiki/Rockspec-format) but with the source).
These packages can have different build types such as `cmake`, `builtin` etc .
Luarocks-based packages are generated in pkgs/development/lua-modules/generated-packages.nix from
the whitelist maintainers/scripts/luarocks-packages.csv and updated by running maintainers/scripts/update-luarocks-packages.
Luarocks-based packages are generated in [pkgs/development/lua-modules/generated-packages.nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/lua-modules/generated-packages.nix) from
the whitelist maintainers/scripts/luarocks-packages.csv and updated by running
the script
[maintainers/scripts/update-luarocks-packages](https://github.com/NixOS/nixpkgs/tree/master/maintainers/scripts/update-luarocks-packages):
```sh
./maintainers/scripts/update-luarocks-packages update
```
[luarocks2nix](https://github.com/nix-community/luarocks) is a tool capable of generating nix derivations from both rockspec and src.rock (and favors the src.rock).
The automation only goes so far though and some packages need to be customized.
These customizations go in `pkgs/development/lua-modules/overrides.nix`.
These customizations go in [pkgs/development/lua-modules/overrides.nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/lua-modules/overrides.nix).
For instance if the rockspec defines `external_dependencies`, these need to be manually added to the overrides.nix.
You can try converting luarocks packages to nix packages with the command `nix-shell -p luarocks-nix` and then `luarocks nix PKG_NAME`.

View file

@ -212,7 +212,7 @@ Note: this is not possible anymore for Neovim.
## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs}
Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]@[gitref]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names).
After running `./update.py`, if nvim-treesitter received an update, also run [`nvim-treesitter/update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py) to update the tree sitter grammars for `nvim-treesitter`.
@ -226,7 +226,7 @@ deoplete-fish = super.deoplete-fish.overrideAttrs(old: {
Sometimes plugins require an override that must be changed when the plugin is updated. This can cause issues when Vim plugins are auto-updated but the associated override isn't updated. For these plugins, the override should be written so that it specifies all information required to install the plugin, and running `./update.py` doesn't change the derivation for the plugin. Manually updating the override is required to update these types of plugins. An example of such a plugin is `LanguageClient-neovim`.
To add a new plugin, run `./update.py --add "[owner]/[name]"`. **NOTE**: This script automatically commits to your git repository. Be sure to check out a fresh branch before running.
To add a new plugin, run `./update.py add "[owner]/[name]"`. **NOTE**: This script automatically commits to your git repository. Be sure to check out a fresh branch before running.
Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `update.py` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of the Language Server Protocol integration with Vim/Neovim.

View file

@ -14752,6 +14752,12 @@
githubId = 187109;
name = "Bjarki Ágúst Guðmundsson";
};
surfaceflinger = {
email = "nat@nekopon.pl";
github = "surfaceflinger";
githubId = 44725111;
name = "nat";
};
suryasr007 = {
email = "94suryateja@gmail.com";
github = "suryasr007";

View file

@ -1,4 +1,7 @@
# Used by pkgs/applications/editors/vim/plugins/update.py and pkgs/applications/editors/kakoune/plugins/update.py
# python library used to update plugins:
# - pkgs/applications/editors/vim/plugins/update.py
# - pkgs/applications/editors/kakoune/plugins/update.py
# - maintainers/scripts/update-luarocks-packages
# format:
# $ nix run nixpkgs.python3Packages.black -c black update.py
@ -315,10 +318,10 @@ def run_nix_expr(expr):
with CleanEnvironment():
cmd = ["nix", "eval", "--extra-experimental-features",
"nix-command", "--impure", "--json", "--expr", expr]
log.debug("Running command %s", cmd)
log.debug("Running command %s", " ".join(cmd))
out = subprocess.check_output(cmd)
data = json.loads(out)
return data
data = json.loads(out)
return data
class Editor:
@ -344,12 +347,39 @@ class Editor:
self.cache_file = cache_file or f"{name}-plugin-cache.json"
self.nixpkgs_repo = None
def add(self, args):
'''CSV spec'''
log.debug("called the 'add' command")
fetch_config = FetchConfig(args.proc, args.github_token)
editor = self
for plugin_line in args.add_plugins:
log.debug("using plugin_line", plugin_line)
pdesc = PluginDesc.load_from_string(fetch_config, plugin_line)
log.debug("loaded as pdesc", pdesc)
append = [ pdesc ]
editor.rewrite_input(fetch_config, args.input_file, editor.deprecated, append=append)
plugin, _ = prefetch_plugin(pdesc, )
autocommit = not args.no_commit
if autocommit:
commit(
editor.nixpkgs_repo,
"{drv_name}: init at {version}".format(
drv_name=editor.get_drv_name(plugin.normalized_name),
version=plugin.version
),
[args.outfile, args.input_file],
)
# Expects arguments generated by 'update' subparser
def update(self, args ):
'''CSV spec'''
print("the update member function should be overriden in subclasses")
def get_current_plugins(self) -> List[Plugin]:
"""To fill the cache"""
data = run_nix_expr(self.get_plugins)
plugins = []
for name, attr in data.items():
print("get_current_plugins: name %s" % name)
p = Plugin(name, attr["rev"], attr["submodules"], attr["sha256"])
plugins.append(p)
return plugins
@ -358,7 +388,7 @@ class Editor:
'''CSV spec'''
return load_plugins_from_csv(config, plugin_file)
def generate_nix(self, plugins, outfile: str):
def generate_nix(self, _plugins, _outfile: str):
'''Returns nothing for now, writes directly to outfile'''
raise NotImplementedError()
@ -395,34 +425,28 @@ class Editor:
return rewrite_input(*args, **kwargs)
def create_parser(self):
parser = argparse.ArgumentParser(
common = argparse.ArgumentParser(
add_help=False,
description=(f"""
Updates nix derivations for {self.name} plugins.\n
By default from {self.default_in} to {self.default_out}"""
)
)
parser.add_argument(
"--add",
dest="add_plugins",
default=[],
action="append",
help=f"Plugin to add to {self.attr_path} from Github in the form owner/repo",
)
parser.add_argument(
common.add_argument(
"--input-names",
"-i",
dest="input_file",
default=self.default_in,
help="A list of plugins in the form owner/repo",
)
parser.add_argument(
common.add_argument(
"--out",
"-o",
dest="outfile",
default=self.default_out,
help="Filename to save generated nix code",
)
parser.add_argument(
common.add_argument(
"--proc",
"-p",
dest="proc",
@ -430,7 +454,7 @@ class Editor:
default=30,
help="Number of concurrent processes to spawn. Setting --github-token allows higher values.",
)
parser.add_argument(
common.add_argument(
"--github-token",
"-t",
type=str,
@ -438,16 +462,61 @@ class Editor:
help="""Allows to set --proc to higher values.
Uses GITHUB_API_TOKEN environment variables as the default value.""",
)
parser.add_argument(
common.add_argument(
"--no-commit", "-n", action="store_true", default=False,
help="Whether to autocommit changes"
)
parser.add_argument(
common.add_argument(
"--debug", "-d", choices=LOG_LEVELS.keys(),
default=logging.getLevelName(logging.WARN),
help="Adjust log level"
)
return parser
main = argparse.ArgumentParser(
parents=[common],
description=(f"""
Updates nix derivations for {self.name} plugins.\n
By default from {self.default_in} to {self.default_out}"""
)
)
subparsers = main.add_subparsers(dest="command", required=False)
padd = subparsers.add_parser(
"add", parents=[],
description="Add new plugin",
add_help=False,
)
padd.set_defaults(func=self.add)
padd.add_argument(
"add_plugins",
default=None,
nargs="+",
help=f"Plugin to add to {self.attr_path} from Github in the form owner/repo",
)
pupdate = subparsers.add_parser(
"update",
description="Update all or a subset of existing plugins",
add_help=False,
)
pupdate.set_defaults(func=self.update)
return main
def run(self,):
'''
Convenience function
'''
parser = self.create_parser()
args = parser.parse_args()
command = args.command or "update"
log.setLevel(LOG_LEVELS[args.debug])
log.info("Chose to run command: %s", command)
if not args.no_commit:
self.nixpkgs_repo = git.Repo(self.root, search_parent_directories=True)
getattr(self, command)(args)
@ -661,7 +730,6 @@ def commit(repo: git.Repo, message: str, files: List[Path]) -> None:
def update_plugins(editor: Editor, args):
"""The main entry function of this module. All input arguments are grouped in the `Editor`."""
log.setLevel(LOG_LEVELS[args.debug])
log.info("Start updating plugins")
fetch_config = FetchConfig(args.proc, args.github_token)
update = editor.get_update(args.input_file, args.outfile, fetch_config)
@ -684,18 +752,3 @@ def update_plugins(editor: Editor, args):
[args.outfile, args.input_file, editor.deprecated],
)
for plugin_line in args.add_plugins:
pdesc = PluginDesc.load_from_string(fetch_config, plugin_line)
append = [ pdesc ]
editor.rewrite_input(fetch_config, args.input_file, editor.deprecated, append=append)
update()
plugin, _ = prefetch_plugin(pdesc, )
if autocommit:
commit(
editor.nixpkgs_repo,
"{drv_name}: init at {version}".format(
drv_name=editor.get_drv_name(plugin.normalized_name),
version=plugin.version
),
[args.outfile, args.input_file],
)

View file

@ -203,11 +203,7 @@ def main():
default_out = ROOT.joinpath(GENERATED_NIXFILE)
)
parser = editor.create_parser()
args = parser.parse_args()
update_plugins(editor, args)
editor.run()
if __name__ == "__main__":

View file

@ -10,11 +10,13 @@ import ./make-test-python.nix ({ pkgs, ...} :
{
imports = [ ./common/user-account.nix ];
fonts.fonts = with pkgs; [ dejavu_fonts ];
services.cage = {
enable = true;
user = "alice";
# Disable color and bold and use a larger font to make OCR easier:
program = "${pkgs.xterm}/bin/xterm -cm -pc -fa Monospace -fs 24";
program = "${pkgs.xterm}/bin/xterm";
};
# Need to switch to a different GPU driver than the default one (-vga std) so that Cage can launch:

View file

@ -81,10 +81,7 @@ in lib.fix' (lib.extends overrides packages)
def main():
editor = KakouneEditor("kakoune", ROOT, GET_PLUGINS)
parser = editor.create_parser()
args = parser.parse_args()
pluginupdate.update_plugins(editor, args)
editor.run()
if __name__ == "__main__":

View file

@ -0,0 +1,19 @@
with import <localpkgs> {};
let
inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix;
inherit (neovimUtils) buildNeovimPluginFrom2Nix;
generated = callPackage <localpkgs/pkgs/applications/editors/vim/plugins/generated.nix> {
inherit buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix;
} {} {};
hasChecksum = value:
lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value;
getChecksum = name: value:
if hasChecksum value then {
submodules = value.src.fetchSubmodules or false;
sha256 = value.src.outputHash;
rev = value.src.rev;
} else null;
checksums = lib.mapAttrs getChecksum generated;
in
lib.filterAttrs (n: v: v != null) checksums

View file

@ -42,28 +42,14 @@ sys.path.insert(0, os.path.join(ROOT.parent.parent.parent.parent.parent, "mainta
import pluginupdate
from pluginupdate import run_nix_expr, PluginDesc
GET_PLUGINS = f"""(with import <localpkgs> {{}};
let
inherit (vimUtils.override {{inherit vim;}}) buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix;
generated = callPackage {ROOT}/generated.nix {{
inherit buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix;
}};
hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value;
getChecksum = name: value:
if hasChecksum value then {{
submodules = value.src.fetchSubmodules or false;
sha256 = value.src.outputHash;
rev = value.src.rev;
}} else null;
checksums = lib.mapAttrs getChecksum generated;
in lib.filterAttrs (n: v: v != null) checksums)"""
GET_PLUGINS_LUA = """
with import <localpkgs> {};
lib.attrNames lua51Packages"""
HEADER = (
"# This file has been generated by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!"
"# GENERATED by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!"
)
def isNeovimPlugin(plug: pluginupdate.Plugin) -> bool:
@ -118,34 +104,39 @@ class VimEditor(pluginupdate.Editor):
""".format(
buildFn="buildNeovimPluginFrom2Nix" if isNeovim else "buildVimPluginFrom2Nix", plugin=plugin, src_nix=src_nix, repo=repo)
print(content)
log.debug(content)
return content
def update(self, args):
pluginupdate.update_plugins(self, args)
if self.nvim_treesitter_updated:
print("updating nvim-treesitter grammars")
nvim_treesitter_dir = ROOT.joinpath("nvim-treesitter")
subprocess.check_call([nvim_treesitter_dir.joinpath("update.py")])
if self.nixpkgs_repo:
index = self.nixpkgs_repo.index
for diff in index.diff(None):
if diff.a_path == "pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix":
msg = "vimPlugins.nvim-treesitter: update grammars"
print(f"committing to nixpkgs: {msg}")
index.add([str(nvim_treesitter_dir.joinpath("generated.nix"))])
index.commit(msg)
return
print("no updates to nvim-treesitter grammars")
def main():
global luaPlugins
luaPlugins = run_nix_expr(GET_PLUGINS_LUA)
with open(f"{ROOT}/get-plugins.nix") as f:
GET_PLUGINS = f.read()
editor = VimEditor("vim", ROOT, GET_PLUGINS)
parser = editor.create_parser()
args = parser.parse_args()
pluginupdate.update_plugins(editor, args)
if editor.nvim_treesitter_updated:
print("updating nvim-treesitter grammars")
nvim_treesitter_dir = ROOT.joinpath("nvim-treesitter")
subprocess.check_call([nvim_treesitter_dir.joinpath("update.py")])
if editor.nixpkgs_repo:
index = editor.nixpkgs_repo.index
for diff in index.diff(None):
if diff.a_path == "pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix":
msg = "vimPlugins.nvim-treesitter: update grammars"
print(f"committing to nixpkgs: {msg}")
index.add([str(nvim_treesitter_dir.joinpath("generated.nix"))])
index.commit(msg)
return
print("no updates to nvim-treesitter grammars")
editor.run()
if __name__ == "__main__":

View file

@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
gettext
check
dbus
glib # for glib-compile-resources
];
buildInputs = [
@ -64,6 +65,7 @@ stdenv.mkDerivation rec {
mesonFlags = [
"-Ddocs=disabled" # docs do not seem to be installed
(lib.mesonEnable "tests" (stdenv.buildPlatform.canExecute stdenv.hostPlatform))
];
checkPhase = ''

View file

@ -2,13 +2,13 @@
(if stdenv.isDarwin then darwin.apple_sdk_11_0.clang14Stdenv else stdenv).mkDerivation rec {
pname = "signalbackup-tools";
version = "20230413";
version = "20230414";
src = fetchFromGitHub {
owner = "bepaald";
repo = pname;
rev = version;
hash = "sha256-7jIltC7YlnsvwADwKItFKKw5LUKDHux+b7frZfcNDyE=";
hash = "sha256-0pCItZCYdwX/Bl20HHc/FhIF4ZHsqz9aadfFYNdQ71M=";
};
postPatch = ''

View file

@ -0,0 +1,12 @@
prePhases+=" moveBuildDir"
moveBuildDir() {
mkdir -p $out/.build
cd $out/.build
}
postPhases+=" removeBuildDir"
removeBuildDir() {
rm -rf $out/.build
}

View file

@ -54,6 +54,13 @@ let
];
qtscript = [ ./qtscript.patch ];
qtserialport = [ ./qtserialport.patch ];
qtsystems = [
# Enable building with udisks support
(fetchpatch {
url = "https://salsa.debian.org/qt-kde-team/qt/qtsystems/-/raw/a23fd92222c33479d7f3b59e48116def6b46894c/debian/patches/2001_build_with_udisk.patch";
hash = "sha256-B/z/+tai01RU/bAJSCp5a0/dGI8g36nwso8MiJv27YM=";
})
];
qtwebengine = [
(fetchpatch {
url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a6f16c6daea3b5a1f7bc9f175d1645922c131563/qt5/qt5-webengine-python3.patch";
@ -166,6 +173,7 @@ let
qtserialport = callPackage ../modules/qtserialport.nix {};
qtspeech = callPackage ../modules/qtspeech.nix {};
qtsvg = callPackage ../modules/qtsvg.nix {};
qtsystems = callPackage ../modules/qtsystems.nix {};
qtscxml = callPackage ../modules/qtscxml.nix {};
qttools = callPackage ../modules/qttools.nix {};
qttranslations = callPackage ../modules/qttranslations.nix {};

View file

@ -34,6 +34,17 @@ lib.mapAttrs mk (lib.importJSON ./srcs-generated.json)
version = "5.212.0-alpha4";
};
# qtsystems has no official releases
qtsystems = {
version = "unstable-2019-01-03";
src = fetchFromGitHub {
owner = "qt";
repo = "qtsystems";
rev = "e3332ee38d27a134cef6621fdaf36687af1b6f4a";
hash = "sha256-P8MJgWiDDBCYo+icbNva0LODy0W+bmQTS87ggacuMP0=";
};
};
catapult = fetchgit {
url = "https://chromium.googlesource.com/catapult";
rev = "5eedfe23148a234211ba477f76fc2ea2e8529189";

View file

@ -0,0 +1,54 @@
{ qtModule
, stdenv
, lib
, bluez
, libevdev
, libX11
, pkg-config
, qtbase
, udev
, wrapQtAppsHook
}:
qtModule {
pname = "qtsystems";
outputs = [
"out"
"dev"
] ++ lib.optionals stdenv.hostPlatform.isLinux [
"bin"
];
qtInputs = [
qtbase
];
nativeBuildInputs = [
pkg-config
wrapQtAppsHook
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
bluez
libevdev
libX11
udev
];
qmakeFlags = [
"CONFIG+=git_build"
] ++ lib.optionals stdenv.hostPlatform.isLinux [
"CONFIG+=ofono"
"CONFIG+=udisks"
"CONFIG+=upower"
];
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
wrapQtApp $bin/bin/servicefw
'';
meta = {
maintainers = with lib.maintainers; [ OPNA2608 ];
};
}

View file

@ -5,7 +5,6 @@
, fetchpatch
, makeSetupHook
, makeWrapper
, cmake
, gst_all_1
, libglvnd
, darwin
@ -27,11 +26,6 @@ let
callPackage = self.newScope ({
inherit qtModule srcs;
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
cmake = cmake.overrideAttrs (attrs: {
patches = attrs.patches ++ [
./patches/cmake.patch
];
});
});
in
{
@ -44,18 +38,15 @@ let
withGtk3 = true;
inherit (srcs.qtbase) src version;
inherit developerBuild;
inherit (darwin.apple_sdk_11_0.frameworks) AGL AVFoundation AppKit GSS MetalKit;
inherit (darwin.apple_sdk_11_0.frameworks)
AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit;
patches = [
./patches/qtbase-qmake-mkspecs-mac.patch
./patches/qtbase-qmake-pkg-config.patch
./patches/qtbase-tzdir.patch
./patches/qtbase-variable-fonts.patch
# Remove symlink check causing build to bail out and fail.
# https://gitlab.kitware.com/cmake/cmake/-/issues/23251
(fetchpatch {
url = "https://github.com/Homebrew/formula-patches/raw/c363f0edf9e90598d54bc3f4f1bacf95abbda282/qt/qt_internal_check_if_path_has_symlinks.patch";
sha256 = "sha256-Gv2L8ymZSbJxcmUijKlT2NnkIB3bVH9D7YSsDX2noTU=";
})
./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch
./patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch
./patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch
./patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch
./patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch
./patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch
];
};
env = callPackage ./qt-env.nix { };

View file

@ -7,9 +7,6 @@
fixQtBuiltinPaths() {
local dir="$1"
local pattern="$2"
local bin="${!outputBin}"
local dev="${!outputDev}"
local doc="${!outputDoc}"
local lib="${!outputLib}"
if [ -d "$dir" ]; then
@ -17,48 +14,48 @@ fixQtBuiltinPaths() {
if grep -q '\$\$\[QT_' "${pr_:?}"; then
echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${pr_:?}'..."
sed -i "${pr_:?}" \
-e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$dev/bin|g" \
-e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$dev/libexec|g" \
-e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \
-e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \
-e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \
-e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \
-e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \
-e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g"
-e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g"
fi
done
elif [ -e "$dir" ]; then
if grep -q '\$\$\[QT_' "${dir:?}"; then
echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${dir:?}'..."
sed -i "${dir:?}" \
-e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$dev/bin|g" \
-e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$dev/libexec|g" \
-e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \
-e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \
-e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \
-e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \
-e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \
-e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \
-e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g"
-e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g"
fi
else
echo "fixQtBuiltinPaths: Warning: \`$dir' does not exist"

View file

@ -6,8 +6,6 @@
#
fixQtModulePaths() {
local dir="$1"
local bin="${!outputBin}"
local dev="${!outputDev}"
local lib="${!outputLib}"
if [ -d "$dir" ]; then
@ -17,8 +15,8 @@ fixQtModulePaths() {
sed -i "${pr:?}" \
-e "s|\\\$\\\$QT_MODULE_LIB_BASE|$lib/lib|g" \
-e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$lib/lib|g" \
-e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$dev/include|g" \
-e "s|\\\$\\\$QT_MODULE_BIN_BASE|$dev/bin|g"
-e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$lib/include|g" \
-e "s|\\\$\\\$QT_MODULE_BIN_BASE|$lib/bin|g"
fi
done
elif [ -e "$dir" ]; then
@ -26,11 +24,4 @@ fixQtModulePaths() {
else
echo "fixQtModulePaths: Warning: \`$dir' does not exist"
fi
if [ "z$bin" != "z$dev" ]; then
if [ -d "$bin/bin" ]; then
mkdir -p "$dev/bin"
lndir -silent "$bin/bin" "$dev/bin"
fi
fi
}

View file

@ -1,34 +0,0 @@
updateToolPath() {
local tool="$1"
local target="$2"
local original="${!outputBin}/$tool"
local actual="${!outputDev}/$tool"
if grep -q "$original" "$target"; then
echo "updateToolPath: Updating \`$original' in \`$target\'..."
sed -i "$target" -e "s|$original|$actual|"
fi
}
moveQtDevTools() {
if [ -n "$devTools" ]; then
for tool in $devTools; do
moveToOutput "$tool" "${!outputDev}"
done
if [ -d "${!outputDev}/mkspecs" ]; then
find "${!outputDev}/mkspecs" -name '*.pr?' | while read pr_; do
for tool in $devTools; do
updateToolPath "$tool" "$pr_"
done
done
fi
if [ -d "${!outputDev}/lib/cmake" ]; then
find "${!outputDev}/lib/cmake" -name '*.cmake' | while read cmake; do
for tool in $devTools; do
updateToolPath "$tool" "$cmake"
done
done
fi
fi
}

View file

@ -1,13 +1,13 @@
if [[ -n "${__nix_qtbase-}" ]]; then
# Throw an error if a different version of Qt was already set up.
if [[ "$__nix_qtbase" != "@dev@" ]]; then
if [[ "$__nix_qtbase" != "@out@" ]]; then
echo >&2 "Error: detected mismatched Qt dependencies:"
echo >&2 " @dev@"
echo >&2 " @out@"
echo >&2 " $__nix_qtbase"
exit 1
fi
else # Only set up Qt once.
__nix_qtbase="@dev@"
__nix_qtbase="@out@"
qtPluginPrefix=@qtPluginPrefix@
qtQmlPrefix=@qtQmlPrefix@
@ -30,7 +30,7 @@ else # Only set up Qt once.
fi
# Build tools are often confused if QMAKE is unset.
export QMAKE=@dev@/bin/qmake
export QMAKE=@out@/bin/qmake
export QMAKEPATH=
@ -53,25 +53,18 @@ else # Only set up Qt once.
# Prevent this hook from running multiple times
dontPatchMkspecs=1
local bin="${!outputBin}"
local dev="${!outputDev}"
local doc="${!outputDoc}"
local lib="${!outputLib}"
moveToOutput "mkspecs" "$dev"
moveToOutput "modules" "$dev"
moveToOutput "lib/*.prl" "$dev"
if [ -d "$dev/mkspecs/modules" ]; then
fixQtModulePaths "$dev/mkspecs/modules"
if [ -d "$lib/mkspecs/modules" ]; then
fixQtModulePaths "$lib/mkspecs/modules"
fi
if [ -d "$dev/mkspecs" ]; then
fixQtBuiltinPaths "$dev/mkspecs" '*.pr?'
if [ -d "$lib/mkspecs" ]; then
fixQtBuiltinPaths "$lib/mkspecs" '*.pr?'
fi
if [ -d "$dev/lib" ]; then
fixQtBuiltinPaths "$dev/lib" '*.pr?'
if [ -d "$lib/lib" ]; then
fixQtBuiltinPaths "$lib/lib" '*.pr?'
fi
}
if [ -z "${dontPatchMkspecs-}" ]; then

View file

@ -71,10 +71,14 @@
, unixODBC
, unixODBCDrivers
# darwin
, moveBuildTree
, xcbuild
, AGL
, AVFoundation
, AppKit
, Contacts
, CoreBluetooth
, EventKit
, GSS
, MetalKit
# optional dependencies
@ -166,6 +170,9 @@ stdenv.mkDerivation rec {
AGL
AVFoundation
AppKit
Contacts
CoreBluetooth
EventKit
GSS
MetalKit
] ++ lib.optional libGLSupported libGL;
@ -184,7 +191,8 @@ stdenv.mkDerivation rec {
++ lib.optional (libmysqlclient != null) libmysqlclient
++ lib.optional (postgresql != null) postgresql;
nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ];
nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ]
++ lib.optionals stdenv.isDarwin [ moveBuildTree ];
propagatedNativeBuildInputs = [ lndir ];
@ -204,14 +212,13 @@ stdenv.mkDerivation rec {
preHook = ''
. "$fix_qt_builtin_paths"
. "$fix_qt_module_paths"
. ${../hooks/move-qt-dev-tools.sh}
. ${../hooks/fix-qmake-libtool.sh}
'';
qtPluginPrefix = "lib/qt-6/plugins";
qtQmlPrefix = "lib/qt-6/qml";
cmakeFlags = [
"-DQT_EMBED_TOOLCHAIN_COMPILER=OFF"
"-DINSTALL_PLUGINSDIR=${qtPluginPrefix}"
"-DINSTALL_QMLDIR=${qtQmlPrefix}"
"-DQT_FEATURE_libproxy=ON"
@ -233,57 +240,11 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
devTools = [
"libexec/moc"
"libexec/rcc"
"libexec/syncqt.pl"
"libexec/qlalr"
"libexec/ensure_pro_file.cmake"
"libexec/cmake_automoc_parser"
"libexec/qvkgen"
"libexec/tracegen"
"libexec/uic"
"bin/fixqt4headers.pl"
"bin/moc"
"bin/qdbuscpp2xml"
"bin/qdbusxml2cpp"
"bin/qlalr"
"bin/qmake"
"bin/qmake6"
"bin/qt-cmake"
"bin/qt-cmake-private"
"bin/qt-cmake-private-install.cmake"
"bin/qt-cmake-standalone-test"
"bin/rcc"
"bin/syncqt.pl"
"bin/uic"
];
moveToDev = false;
postFixup = ''
moveToOutput "mkspecs" "$dev"
moveToOutput "modules" "$dev"
moveToOutput "lib/*.prl" "$dev"
fixQtModulePaths "$dev/mkspecs/modules"
fixQtBuiltinPaths "$dev" '*.pr?'
# Move development tools to $dev
moveQtDevTools
moveToOutput libexec "$dev"
# fixup .pc file (where to find 'moc' etc.)
if [ -f "$dev/lib/pkgconfig/Qt6Core.pc" ]; then
sed -i "$dev/lib/pkgconfig/Qt6Core.pc" \
-e "/^bindir=/ c bindir=$dev/bin" \
-e "/^libexecdir=/ c libexecdir=$dev/libexec"
fi
patchShebangs $out $dev
# QTEST_ASSERT and other macros keeps runtime reference to qtbase.dev
if [ -f "$dev/include/QtTest/qtestassert.h" ]; then
substituteInPlace "$dev/include/QtTest/qtestassert.h" --replace "__FILE__" "__BASE_FILE__"
fi
fixQtModulePaths "$out/mkspecs/modules"
fixQtBuiltinPaths "$out" '*.pr?'
'';
dontStrip = debugSymbols;

View file

@ -10,31 +10,8 @@ qtModule {
pname = "qtdeclarative";
qtInputs = [ qtbase qtlanguageserver qtshadertools ];
propagatedBuildInputs = [ openssl python3 ];
preConfigure = ''
export LD_LIBRARY_PATH="$PWD/build/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
'';
cmakeFlags = [
"-DQT6_INSTALL_PREFIX=${placeholder "out"}"
"-DQT_INSTALL_PREFIX=${placeholder "out"}"
];
patches = [
# prevent headaches from stale qmlcache data
../patches/qtdeclarative-default-disable-qmlcache.patch
];
postInstall = ''
substituteInPlace "$out/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake" \
--replace ''\'''${QT6_INSTALL_PREFIX}' "$dev"
'';
devTools = [
"bin/qml"
"bin/qmlcachegen"
"bin/qmleasing"
"bin/qmlimportscanner"
"bin/qmllint"
"bin/qmlmin"
"bin/qmlplugindump"
"bin/qmlprofiler"
"bin/qmlscene"
"bin/qmltestrunner"
];
}

View file

@ -15,30 +15,10 @@ qtModule {
../patches/qttools-paths.patch
];
env.NIX_CFLAGS_COMPILE = toString [
"-DNIX_OUTPUT_DEV=\"${placeholder "dev"}\""
"-DNIX_OUTPUT_OUT=\"${placeholder "out"}\""
];
devTools = [
"bin/qcollectiongenerator"
"bin/linguist"
"bin/assistant"
"bin/qdoc"
"bin/lconvert"
"bin/designer"
"bin/qtattributionsscanner"
"bin/lrelease"
"bin/lrelease-pro"
"bin/pixeltool"
"bin/lupdate"
"bin/lupdate-pro"
"bin/qtdiag"
"bin/qhelpgenerator"
"bin/qtplugininfo"
"bin/qthelpconverter"
"bin/lprodump"
"bin/qdistancefieldgenerator"
] ++ lib.optionals stdenv.isDarwin [
"bin/macdeployqt"
];
postInstall = ''
mkdir -p "$dev"
ln -s "$out/bin" "$dev/bin"
'';
}

View file

@ -110,6 +110,13 @@ qtModule {
substituteInPlace cmake/Functions.cmake \
--replace "/bin/bash" "${buildPackages.bash}/bin/bash"
# Patch library paths in sources
substituteInPlace src/core/web_engine_library_info.cpp \
--replace "QLibraryInfo::path(QLibraryInfo::DataPath)" "\"$out\"" \
--replace "QLibraryInfo::path(QLibraryInfo::TranslationsPath)" "\"$out/translations\"" \
--replace "QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)" "\"$out/libexec\""
''
+ lib.optionalString stdenv.isLinux ''
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \
src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
@ -118,12 +125,6 @@ qtModule {
substituteInPlace src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc \
--replace "/usr/share/X11/xkb" "${xkeyboard_config}/share/X11/xkb"
# Patch library paths in sources
substituteInPlace src/core/web_engine_library_info.cpp \
--replace "QLibraryInfo::path(QLibraryInfo::DataPath)" "\"$out\"" \
--replace "QLibraryInfo::path(QLibraryInfo::TranslationsPath)" "\"$out/translations\"" \
--replace "QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)" "\"$out/libexec\""
'';
cmakeFlags = [
@ -143,9 +144,12 @@ qtModule {
# android only. https://bugreports.qt.io/browse/QTBUG-100293
# "-DQT_FEATURE_webengine_native_spellchecker=ON"
"-DQT_FEATURE_webengine_sanitizer=ON"
"-DQT_FEATURE_webengine_webrtc_pipewire=ON"
"-DQT_FEATURE_webengine_kerberos=ON"
] ++ lib.optional enableProprietaryCodecs "-DQT_FEATURE_webengine_proprietary_codecs=ON";
] ++ lib.optionals stdenv.isLinux [
"-DQT_FEATURE_webengine_webrtc_pipewire=ON"
] ++ lib.optionals enableProprietaryCodecs [
"-DQT_FEATURE_webengine_proprietary_codecs=ON"
];
propagatedBuildInputs = [
# Image formats
@ -174,7 +178,7 @@ qtModule {
libevent
ffmpeg_4
] ++ lib.optionals stdenv.isLinux [
dbus
zlib
minizip
@ -226,12 +230,6 @@ qtModule {
export NINJAFLAGS="-j$NIX_BUILD_CORES"
'';
postFixup = ''
# This is required at runtime
mkdir -p $out/libexec
mv $dev/libexec/QtWebEngineProcess $out/libexec
'';
meta = with lib; {
description = "A web engine based on the Chromium web browser";
platforms = platforms.linux;

View file

@ -0,0 +1,50 @@
From 8880bc263a366aeb82056f0bf3f1b17b6ec26900 Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Thu, 13 Apr 2023 23:42:29 +0800
Subject: [PATCH 1/6] qtbase: qmake: always use libname instead of absolute
path in qmake files
In generated qmake files, absolute paths to qt libraries are embedded
and then used in linker flags. However as the libraries can be provided
by qt modules other than the one currently being built, the ebedded
paths can be incorrect.
---
cmake/QtFinishPrlFile.cmake | 7 ++++---
cmake/QtGenerateLibHelpers.cmake | 3 ---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake
index 32169e418c..4e754af367 100644
--- a/cmake/QtFinishPrlFile.cmake
+++ b/cmake/QtFinishPrlFile.cmake
@@ -61,9 +61,10 @@ foreach(line ${lines})
endif()
list(APPEND adjusted_libs "-framework" "${CMAKE_MATCH_1}")
else()
- # Not a framework, transform the Qt module into relocatable relative path.
- qt_strip_library_version_suffix(relative_lib "${relative_lib}")
- list(APPEND adjusted_libs "$$[QT_INSTALL_LIBS]/${relative_lib}")
+ # Not a framework, extract the library name and prepend an -l to make
+ # it relocatable.
+ qt_transform_absolute_library_paths_to_link_flags(lib_with_link_flag "${lib}")
+ list(APPEND adjusted_libs "${lib_with_link_flag}")
endif()
endif()
else()
diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake
index e3f4bbf881..f8bd26acc7 100644
--- a/cmake/QtGenerateLibHelpers.cmake
+++ b/cmake/QtGenerateLibHelpers.cmake
@@ -70,9 +70,6 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_
string(TOLOWER "${dir}" dir_lower)
# If library_path isn't in default link directories, we should add it to link flags.
list(FIND IMPLICIT_LINK_DIRECTORIES_LOWER "${dir_lower}" index)
- if(${index} EQUAL -1)
- list(APPEND out_list "-L\"${dir}\"")
- endif()
list(APPEND out_list "${lib_name_with_link_flag}")
else()
list(APPEND out_list "${library_path}")
--
2.39.2

View file

@ -1,5 +1,19 @@
From 034db4e75ec749ac78fcf8235fa659b0eca83c30 Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Fri, 14 Apr 2023 09:34:08 +0800
Subject: [PATCH 2/6] qtbase: qmake: fix mkspecs for darwin
---
mkspecs/common/mac.conf | 2 +-
mkspecs/features/mac/default_post.prf | 263 --------------------------
mkspecs/features/mac/default_pre.prf | 58 ------
mkspecs/features/mac/sdk.mk | 27 ---
mkspecs/features/mac/sdk.prf | 61 ------
mkspecs/features/mac/toolchain.prf | 5 -
6 files changed, 1 insertion(+), 415 deletions(-)
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index 61bea952..9909dae7 100644
index 61bea952b2..9909dae726 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \
@ -12,7 +26,7 @@ index 61bea952..9909dae7 100644
QMAKE_LFLAGS_REL_RPATH =
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 09db1764..aadfce87 100644
index 09db1764b1..aadfce875e 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -1,9 +1,5 @@
@ -299,7 +313,7 @@ index 09db1764..aadfce87 100644
generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS
generate_xcode_project.target = xcodeproj
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index e3534561..3b01424e 100644
index e3534561a5..3b01424e67 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -1,60 +1,2 @@
@ -364,7 +378,7 @@ index e3534561..3b01424e 100644
-xcode_copy_phase_strip_setting.value = NO
-QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting
diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk
index a32ceacb..e69de29b 100644
index a32ceacb6c..e69de29bb2 100644
--- a/mkspecs/features/mac/sdk.mk
+++ b/mkspecs/features/mac/sdk.mk
@@ -1,27 +0,0 @@
@ -396,7 +410,7 @@ index a32ceacb..e69de29b 100644
- endif
-endif
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 3a9c2778..e69de29b 100644
index 3a9c2778bb..e69de29bb2 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -1,61 +0,0 @@
@ -462,7 +476,7 @@ index 3a9c2778..e69de29b 100644
- cache($$tool_variable, set stash, $$tool)
-}
diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf
index df191eb1..e69de29b 100644
index df191eb13c..e69de29bb2 100644
--- a/mkspecs/features/mac/toolchain.prf
+++ b/mkspecs/features/mac/toolchain.prf
@@ -1,5 +0,0 @@
@ -471,3 +485,6 @@ index df191eb1..e69de29b 100644
-sdk: load(sdk)
-
-load(toolchain)
--
2.39.2

View file

@ -1,7 +1,17 @@
From bc91f05db85b774f26d6bce86e2e618dfc7a6883 Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Fri, 14 Apr 2023 09:34:46 +0800
Subject: [PATCH 3/6] qtbase: qmake: fix includedir in generated pkg-config
---
qmake/generators/makefile.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index da585bd9b2..3abf9cee83 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3390,8 +3390,7 @@ MakefileGenerator::writePkgConfigFile()
@@ -3402,8 +3402,7 @@ MakefileGenerator::writePkgConfigFile()
<< varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ")
// << varGlue("DEFINES","-D"," -D"," ")
;
@ -11,4 +21,6 @@ diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")
&& libDir != QLatin1String("/Library/Frameworks")) {
t << " -F${libdir}";
--
2.39.2

View file

@ -1,5 +1,14 @@
From d612c1d7161f95864b9383df84b16d8c24fbcc9b Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Fri, 14 Apr 2023 09:35:25 +0800
Subject: [PATCH 4/6] qtbase: fix locating tzdir on NixOS
---
src/corelib/time/qtimezoneprivate_tz.cpp | 27 +++++++++++++++---------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
index 627a4a81..a5f50acc 100644
index e87e34f76d..39bd79d4a4 100644
--- a/src/corelib/time/qtimezoneprivate_tz.cpp
+++ b/src/corelib/time/qtimezoneprivate_tz.cpp
@@ -51,7 +51,11 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash;
@ -15,7 +24,7 @@ index 627a4a81..a5f50acc 100644
if (!QFile::exists(path))
path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
@@ -727,18 +731,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId)
@@ -729,18 +733,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId)
if (!tzif.open(QIODevice::ReadOnly))
return ret;
} else {
@ -46,3 +55,6 @@ index 627a4a81..a5f50acc 100644
}
}
}
--
2.39.2

View file

@ -1,8 +1,8 @@
From 9ba9c690fb16188ff524b53def104e68e45cf5c3 Mon Sep 17 00:00:00 2001
From 5bd3672c7870b2e46e2a734dc9a9cb1837375a1c Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Tue, 21 Mar 2023 15:48:49 +0800
Subject: [PATCH] Deal with a font face at index 0 as Regular for Variable
fonts
Subject: [PATCH 5/6] qtbase: deal with a font face at index 0 as Regular for
Variable fonts
Reference: https://bugreports.qt.io/browse/QTBUG-111994
---

View file

@ -0,0 +1,32 @@
From f0017e872297168ab616096180891c7f312ef1a1 Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Wed, 12 Apr 2023 10:13:50 +0800
Subject: [PATCH 6/6] qtbase: qt-cmake: always use cmake from path
The generated qt-cmake scripts embeds the absolute path of cmake used
during the build of qtbase, bloating the runtime closure of qtbase.
---
bin/qt-cmake.in | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/bin/qt-cmake.in b/bin/qt-cmake.in
index f719257f60..571ffe788f 100755
--- a/bin/qt-cmake.in
+++ b/bin/qt-cmake.in
@@ -4,12 +4,7 @@
script_dir_path=`dirname $0`
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
-# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.
-original_cmake_path="@CMAKE_COMMAND@"
-cmake_path=$original_cmake_path
-if ! test -f "$cmake_path"; then
- cmake_path="cmake"
-fi
+cmake_path="cmake"
toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake"
--
2.39.2

View file

@ -1,123 +0,0 @@
commit bd8f6ecea0663bdd150aa48941cbd47d25874396
Author: Nick Cao <nickcao@nichi.co>
Date: Tue Apr 19 13:49:59 2022 +0800
patch cmake file generation for nixpkgs packaging
As of qt 6.3.0, installing components into different prefixes is not
supported. To workaround that, we move files to their designated in the
postInstall hook. However the generated cmake files still have
references to the original prefix, and would cause issues when using
said components as the dependency of other packages. The purpose of this
patch is to closely match the output layout of qt, and rewrite the
generated cmake files to point to the corrected pathes.
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 5a33349b19..677a6084d6 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -7,6 +7,7 @@
#include <cstring>
#include <sstream>
#include <utility>
+#include <cstdlib>
#include <cm/memory>
@@ -330,9 +331,21 @@ static void prefixItems(std::string& exportDirs)
for (std::string const& e : entries) {
exportDirs += sep;
sep = ";";
- if (!cmSystemTools::FileIsFullPath(e) &&
- e.find("${_IMPORT_PREFIX}") == std::string::npos) {
- exportDirs += "${_IMPORT_PREFIX}/";
+ if (!cmSystemTools::FileIsFullPath(e)) {
+ if (std::getenv("dev")) {
+ if (cmHasLiteralPrefix(e, "include") || cmHasLiteralPrefix(e, "./include")) {
+ exportDirs += std::getenv("dev");
+ } else if (cmHasLiteralPrefix(e, "mkspecs") || cmHasLiteralPrefix(e, "./mkspecs")) {
+ exportDirs += std::getenv("dev");
+ } else if (cmHasLiteralPrefix(e, "libexec") || cmHasLiteralPrefix(e, "./libexec")) {
+ exportDirs += std::getenv("dev");
+ } else {
+ exportDirs += std::getenv("out");
+ }
+ } else {
+ exportDirs += std::getenv("out");
+ }
+ exportDirs += "/";
}
exportDirs += e;
}
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index adccdfeece..ba248305bd 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -6,6 +6,7 @@
#include <memory>
#include <sstream>
#include <utility>
+#include <cstdlib>
#include "cmExportSet.h"
#include "cmFileSet.h"
@@ -266,7 +267,7 @@ void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os)
void cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string& input)
{
- cmGeneratorExpression::ReplaceInstallPrefix(input, "${_IMPORT_PREFIX}");
+ cmGeneratorExpression::ReplaceInstallPrefix(input, std::getenv("out"));
}
bool cmExportInstallFileGenerator::GenerateImportFileConfig(
@@ -382,9 +383,22 @@ void cmExportInstallFileGenerator::SetImportLocationProperty(
// Construct the installed location of the target.
std::string dest = itgen->GetDestination(config);
std::string value;
+
if (!cmSystemTools::FileIsFullPath(dest)) {
- // The target is installed relative to the installation prefix.
- value = "${_IMPORT_PREFIX}/";
+ if (std::getenv("dev")) {
+ if (cmHasLiteralPrefix(dest, "include") || cmHasLiteralPrefix(dest, "./include")) {
+ value = std::getenv("dev");
+ } else if (cmHasLiteralPrefix(dest, "mkspecs") || cmHasLiteralPrefix(dest, "./mkspecs")) {
+ value = std::getenv("dev");
+ } else if (cmHasLiteralPrefix(dest, "libexec") || cmHasLiteralPrefix(dest, "./libexec")) {
+ value = std::getenv("dev");
+ } else {
+ value = std::getenv("out");
+ }
+ } else {
+ value = std::getenv("out");
+ }
+ value += "/";
}
value += dest;
value += "/";
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index f988e54a19..cc5c7ac9fd 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -192,7 +192,20 @@ static void prefixItems(const std::string& content, std::string& result,
sep = ";";
if (!cmSystemTools::FileIsFullPath(e) &&
cmGeneratorExpression::Find(e) != 0) {
- result += prefix;
+ if (std::getenv("dev")) {
+ if (cmHasLiteralPrefix(e, "include") || cmHasLiteralPrefix(e, "./include")) {
+ result += std::getenv("dev");
+ } else if (cmHasLiteralPrefix(e, "mkspecs") || cmHasLiteralPrefix(e, "./mkspecs")) {
+ result += std::getenv("dev");
+ } else if (cmHasLiteralPrefix(e, "libexec") || cmHasLiteralPrefix(e, "./libexec")) {
+ result += std::getenv("dev");
+ } else {
+ result += std::getenv("out");
+ }
+ } else {
+ result += std::getenv("out");
+ }
+ result += "/";
}
result += e;
}

View file

@ -10,9 +10,9 @@ index d355b9dc..94fef33f 100644
+{
+ switch (location) {
+ case QLibraryInfo::BinariesPath:
+ return QLatin1String(NIX_OUTPUT_DEV) + QLatin1String("/bin");
+ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/bin");
+ case QLibraryInfo::LibraryExecutablesPath:
+ return QLatin1String(NIX_OUTPUT_DEV) + QLatin1String("/libexec");
+ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/libexec");
+ default:
+ return QLibraryInfo::path(location);
+ }

View file

@ -9,7 +9,7 @@ buildEnv {
postBuild = ''
rm "$out/bin/qmake"
cp "${qtbase.dev}/bin/qmake" "$out/bin"
cp "${qtbase}/bin/qmake" "$out/bin"
cat >"$out/bin/qt.conf" <<EOF
[Paths]
Prefix = $out

View file

@ -3,6 +3,7 @@
, cmake
, ninja
, perl
, moveBuildTree
, srcs
, patches ? [ ]
}:
@ -18,23 +19,17 @@ stdenv.mkDerivation (args // {
inherit pname version src;
patches = args.patches or patches.${pname} or [ ];
preHook = ''
. ${./hooks/move-qt-dev-tools.sh}
'';
buildInputs = args.buildInputs or [ ];
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ];
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]
++ lib.optionals stdenv.isDarwin [ moveBuildTree ];
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]);
moveToDev = false;
outputs = args.outputs or [ "out" "dev" ];
dontWrapQtApps = args.dontWrapQtApps or true;
postFixup = ''
moveToOutput "libexec" "''${!outputDev}"
moveQtDevTools
'' + args.postFixup or "";
meta = with lib; {
homepage = "https://www.qt.io/";
description = "A cross-platform application framework for C++";

View file

@ -8,6 +8,11 @@
, scikit-learn
, llvmPackages ? null
, pythonOlder
, python
, ocl-icd
, opencl-headers
, boost
, gpuSupport ? true
}:
buildPythonPackage rec {
@ -28,9 +33,13 @@ buildPythonPackage rec {
dontUseCmakeConfigure = true;
buildInputs = lib.optionals stdenv.cc.isClang [
buildInputs = (lib.optionals stdenv.cc.isClang [
llvmPackages.openmp
];
]) ++ (lib.optionals gpuSupport [
boost
ocl-icd
opencl-headers
]);
propagatedBuildInputs = [
numpy
@ -38,6 +47,10 @@ buildPythonPackage rec {
scikit-learn
];
buildPhase = ''
${python.pythonForBuild.interpreter} setup.py bdist_wheel ${lib.optionalString gpuSupport "--gpu"}
'';
postConfigure = ''
export HOME=$(mktemp -d)
'';
@ -51,11 +64,11 @@ buildPythonPackage rec {
"lightgbm"
];
meta = with lib; {
meta = {
description = "A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework";
homepage = "https://github.com/Microsoft/LightGBM";
changelog = "https://github.com/microsoft/LightGBM/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ teh costrouc ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ teh costrouc ];
};
}

View file

@ -20,14 +20,14 @@
buildPythonPackage rec {
pname = "nibabel";
version = "5.0.1";
version = "5.1.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-SvZQFbTMmZQEyvA04cFcGrZ1h5XCXWkH/3T127/p9D4=";
hash = "sha256-znPKXpVyCechmiI8tx93I1yd8qz00/J/hhujjpSBrFM=";
};
nativeBuildInputs = [

View file

@ -7,16 +7,16 @@
buildGoModule rec {
pname = "fq";
version = "0.4.0";
version = "0.5.0";
src = fetchFromGitHub {
owner = "wader";
repo = "fq";
rev = "v${version}";
hash = "sha256-2Sif6LUv99u/R4SrvsJoJ08aS5G/o34IC+4qAoRvX/g=";
hash = "sha256-Fg5J/iLxGUwb2QRZJMHLqK9dBECW9VsiZGX+LyUtyhw=";
};
vendorHash = "sha256-8YJ52stnRHyTfiEHVvUgzLMd14WHI5ZeNAPk77oXSlA=";
vendorHash = "sha256-sjzGtSBgRybcJvOXM4wKN5pTgihNrjUCMPsc62n3tLk=";
ldflags = [
"-s"

View file

@ -0,0 +1,20 @@
{ jazz2
, lib
, runCommand
}:
runCommand "jazz2-content"
{
inherit (jazz2) version src;
preferLocalBuild = true;
meta = with lib; {
description = "Assets needed for jazz2";
homepage = "https://github.com/deathkiller/jazz2-native";
license = licenses.gpl3;
maintainers = with maintainers; [ surfaceflinger ];
};
} ''
cp -r $src/Content $out
''

47
pkgs/games/jazz2/game.nix Normal file
View file

@ -0,0 +1,47 @@
{ cmake
, fetchFromGitHub
, glew
, glfw
, jazz2-content
, lib
, libGL
, libopenmpt
, libvorbis
, openal
, SDL2
, stdenv
, xorg
, zlib
}:
stdenv.mkDerivation rec {
pname = "jazz2";
version = "1.8.0";
src = fetchFromGitHub {
owner = "deathkiller";
repo = "jazz2-native";
rev = version;
sha256 = "fi1waoLAcnZB0lX+8+wQFoBYOSvVXYK3JKiu81GGF4U=";
};
patches = [ ./nocontent.patch ];
buildInputs = [ libGL SDL2 zlib glew glfw openal libvorbis libopenmpt xorg.libSM xorg.libICE xorg.libXext ];
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DNCINE_DOWNLOAD_DEPENDENCIES=OFF"
"-DGLFW_INCLUDE_DIR=${glfw}/include/GLFW"
"-DLIBOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include/libopenmpt"
"-DNCINE_OVERRIDE_CONTENT_PATH=${jazz2-content}"
];
meta = with lib; {
description = "Open-source Jazz Jackrabbit 2 reimplementation";
homepage = "https://github.com/deathkiller/jazz2-native";
license = licenses.gpl3;
maintainers = with maintainers; [ surfaceflinger ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,12 @@
diff --git a/cmake/ncine_installation.cmake b/cmake/ncine_installation.cmake
index 9ccb707..89c350f 100644
--- a/cmake/ncine_installation.cmake
+++ b/cmake/ncine_installation.cmake
@@ -195,7 +195,6 @@ endif()
#endif()
if(NOT EMSCRIPTEN)
- install(DIRECTORY "${NCINE_ROOT}/Content/" DESTINATION ${DATA_INSTALL_DESTINATION})
else()
install(FILES "${CMAKE_BINARY_DIR}/${CPACK_EXECUTABLE_NAME}.html" DESTINATION ".")
install(FILES "${CMAKE_BINARY_DIR}/${CPACK_EXECUTABLE_NAME}.data" DESTINATION ".")

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, substituteAll, pkg-config, gnused, autoreconfHook
{ lib, stdenv, fetchFromGitHub, substituteAll, fetchpatch, pkg-config, gnused, autoreconfHook
, gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash, which
, expat, libxslt, docbook_xsl, util-linux, mdadm, libgudev, libblockdev, parted
, gobject-introspection, docbook_xml_dtd_412, docbook_xml_dtd_43
@ -40,6 +40,11 @@ stdenv.mkDerivation rec {
xfsprogs ntfs3g parted util-linux
];
})
# Fix crash on exit, remove on upgrade to 2.10.
(fetchpatch {
url = "https://github.com/storaged-project/udisks/commit/6464e3083c27b9e4d97848b9e69e862f265511d5.patch";
hash = "sha256-XGprXjJLIL8l4P5MRTHV8GOQR1hpaaFiLgexGnO9Lvg=";
})
];
strictDeps = true;

View file

@ -48,6 +48,23 @@ in
};
};
analysis-kuromoji = esPlugin rec {
pluginName = "analysis-kuromoji";
version = esVersion;
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
sha256 =
if version == "7.17.3" then "1pwirciqzz092a30rys2y97mh62pwhlnk4mvv1a8g4640qmql2jx"
else if version == "6.8.21" then "0ywvqicxwcd5bn1j6gsdqhiagjmpha373p76p4lc2ric3in4dz3p"
else throw "unsupported version ${version} for plugin ${pluginName}";
};
meta = with lib; {
homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/analysis-kuromoji";
description = "The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into Elasticsearch.";
license = licenses.asl20;
};
};
analysis-lemmagen = esPlugin rec {
pluginName = "analysis-lemmagen";
version = esVersion;

File diff suppressed because it is too large Load diff

View file

@ -10,21 +10,20 @@
rustPlatform.buildRustPackage rec {
pname = "qdrant";
version = "1.1.0";
version = "1.1.1";
src = fetchFromGitHub {
owner = "qdrant";
repo = "qdrant";
rev = "refs/tags/v${version}";
sha256 = "sha256-mNprwomTVg/C75tPciQ4J8bb42ejpVKy/RSRcQySdvU=";
sha256 = "sha256-Kjao5TjVT8QVV2tKt7TTt9cYmYXRl/oPLi8UK1tc/nA=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"quantization-0.1.0" = "sha256-4TY08ScRbL4zVG428BTZu42ocAsPk/8wM+zzI8EFSrs=";
"raft-0.7.0" = "sha256-NflESS+CoTFMkCC2SYWgyMRHBe7+sMIbuElhUL5uMcg=";
"wal-0.1.2" = "sha256-vaPQff8pBqCJhACj4/t3AyPhnddHwsGWCI3IUr5uWro=";
"wal-0.1.2" = "sha256-EfCvwgHMfyiId8VjV+yFyNqoIv6fxF8UFcw1s46hF5k=";
};
};

View file

@ -1,6 +1,7 @@
{ lib
, python3
, fetchFromGitHub
, fetchpatch
, espeak-ng
, tts
}:
@ -8,37 +9,12 @@
let
python = python3.override {
packageOverrides = self: super: {
# API breakage with 0.9.0
# TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given
librosa = super.librosa.overridePythonAttrs (oldAttrs: rec {
version = "0.8.1";
src = super.fetchPypi {
pname = "librosa";
inherit version;
hash = "sha256-xT0F52iuSj5VOuIcLlAVKT5e+/1cEtSX8RBMtRnMprM=";
};
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ (with super; [
resampy
]);
doCheck = false;
});
numpy = super.numpy.overridePythonAttrs (oldAttrs: rec {
version = "1.23.5";
src = super.fetchPypi {
pname = "numpy";
inherit version;
extension = "tar.gz";
hash = "sha256-Gxdm1vOXwYFT1AAV3fx53bcVyrrcBNLSKNTlqLxN7Ro=";
};
doCheck = false;
});
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "tts";
version = "0.12.0";
version = "0.13.2";
format = "pyproject";
src = fetchFromGitHub {
@ -48,6 +24,17 @@ python.pkgs.buildPythonApplication rec {
hash = "sha256-3t4JYEwQ+puGLhGl3nn93qsL8IeOwlYtHXTrnZ5Cf+w=";
};
patches = [
(fetchpatch {
# upgrade librosa to 0.10.0
url = "https://github.com/coqui-ai/TTS/commit/4c829e74a1399ab083b566a70c1b7e879eda6e1e.patch";
hash = "sha256-QP9AnMbdEpGJywiZBreojHUjq29ihqy6HxvUtS5OKvQ=";
excludes = [
"requirements.txt"
];
})
];
postPatch = let
relaxedConstraints = [
"cython"

View file

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
'';
meta = with lib; {
inherit (src.homepage);
inherit (src.meta) homepage;
description = "A FUSE-based filesystem that uses the p7zip library";
longDescription = ''
fuse-7z-ng is a FUSE file system that uses the p7zip

View file

@ -31,7 +31,7 @@ mkDerivation rec {
cmakeFlags = [
# adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies
"-DCMAKE_PREFIX_PATH=${qt6.qtbase.dev}"
"-DCMAKE_PREFIX_PATH=${qt6.qtbase}"
"-DENABLE_QT4=0"
"-DENABLE_QT6=1"
];

View file

@ -1173,6 +1173,10 @@ with pkgs;
name = "keep-build-tree-hook";
} ../build-support/setup-hooks/keep-build-tree.sh;
moveBuildTree = makeSetupHook {
name = "move-build-tree-hook";
} ../build-support/setup-hooks/move-build-tree.sh;
enableGCOVInstrumentation = makeSetupHook {
name = "enable-gcov-instrumentation-hook";
} ../build-support/setup-hooks/enable-coverage-instrumentation.sh;
@ -35890,6 +35894,10 @@ with pkgs;
fish-fillets-ng = callPackage ../games/fish-fillets-ng { };
jazz2 = callPackage ../games/jazz2/game.nix { };
jazz2-content = callPackage ../games/jazz2/content.nix { };
jumpy = callPackage ../games/jumpy { };
flightgear = libsForQt5.callPackage ../games/flightgear { };