diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 6647f94f8f83..5f5c5eab642d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1170,6 +1170,12 @@ githubId = 706854; name = "Etienne Laurin"; }; + atry = { + name = "Bo Yang"; + email = "atry@fb.com"; + github = "Atry"; + githubId = 601530; + }; attila-lendvai = { name = "Attila Lendvai"; email = "attila@lendvai.name"; @@ -6680,7 +6686,7 @@ }; khushraj = { email = "khushraj.rathod@gmail.com"; - github = "KhushrajRathod"; + github = "khrj"; githubId = 44947946; name = "Khushraj Rathod"; keys = [{ diff --git a/pkgs/applications/backup/vorta/default.nix b/pkgs/applications/backup/vorta/default.nix index 8e551f3db034..235827eb8335 100644 --- a/pkgs/applications/backup/vorta/default.nix +++ b/pkgs/applications/backup/vorta/default.nix @@ -8,13 +8,13 @@ python3Packages.buildPythonApplication rec { pname = "vorta"; - version = "0.8.4"; + version = "0.8.6"; src = fetchFromGitHub { owner = "borgbase"; repo = "vorta"; rev = "refs/tags/v${version}"; - sha256 = "sha256-eS/+7s9KgGCEhA6NgIzPlGM1daP+Ir2d1mmqse4YbIE="; + sha256 = "sha256-J/Cl+et4AS44PPG2SmOHosKVw0XtOyNL0qJk68OHwQc="; }; nativeBuildInputs = [ wrapQtAppsHook ]; diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index b553640d144e..9a2f7e07102f 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -672,7 +672,7 @@ in license = "MAME"; extraBuildInputs = [ libpng SDL ]; - SDL_CONFIG = "${SDL.dev}/bin/sdl-config"; + SDL_CONFIG = "${lib.getDev SDL}/bin/sdl-config"; dontAddPrefix = true; configurePlatforms = [ ]; makeFlags = lib.optional stdenv.hostPlatform.isAarch64 [ "platform=aarch64" ]; diff --git a/pkgs/applications/misc/gallery-dl/default.nix b/pkgs/applications/misc/gallery-dl/default.nix index 0d563da0eddf..b97a78a682de 100644 --- a/pkgs/applications/misc/gallery-dl/default.nix +++ b/pkgs/applications/misc/gallery-dl/default.nix @@ -2,20 +2,24 @@ buildPythonApplication rec { pname = "gallery_dl"; - version = "1.21.2"; + version = "1.22.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-xn+Y8WOIH6zkExO3ZNya3ZBwh90oSjSk00xfO0c23To="; + sha256 = "sha256-7gslntYAjH2nSyVKjofC2utjpzQo3aNVD1w5StHk288="; }; propagatedBuildInputs = [ requests yt-dlp ]; checkInputs = [ pytestCheckHook ]; + pytestFlagsArray = [ # requires network access "--ignore=test/test_results.py" "--ignore=test/test_downloader.py" + + # incompatible with pytestCheckHook + "--ignore=test/test_ytdl.py" ]; meta = with lib; { diff --git a/pkgs/desktops/gnome/apps/gedit/default.nix b/pkgs/desktops/gnome/apps/gedit/default.nix index 3269739df9af..dc5059901bb8 100644 --- a/pkgs/desktops/gnome/apps/gedit/default.nix +++ b/pkgs/desktops/gnome/apps/gedit/default.nix @@ -25,11 +25,11 @@ stdenv.mkDerivation rec { pname = "gedit"; - version = "42.0"; + version = "42.1"; src = fetchurl { url = "mirror://gnome/sources/gedit/${lib.versions.major version}/${pname}-${version}.tar.xz"; - sha256 = "qHmR9Clh609qvNuqu3hHYMI66u765jY9PiGmHpxFhDc="; + sha256 = "fx/UPfURDUw33mVBmT9B8PvD78eQkA6SBTR5ugaZIOk="; }; patches = [ diff --git a/pkgs/development/guile-modules/guile-sdl/default.nix b/pkgs/development/guile-modules/guile-sdl/default.nix index c6e250e6d717..f91f8cd01881 100644 --- a/pkgs/development/guile-modules/guile-sdl/default.nix +++ b/pkgs/development/guile-modules/guile-sdl/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { pkg-config ]; buildInputs = [ - SDL.dev + (lib.getDev SDL) SDL_image SDL_mixer SDL_ttf diff --git a/pkgs/development/libraries/SDL_compat/default.nix b/pkgs/development/libraries/SDL_compat/default.nix new file mode 100644 index 000000000000..2ba0a095f688 --- /dev/null +++ b/pkgs/development/libraries/SDL_compat/default.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, SDL2 +, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms +, openglSupport ? libGLSupported +, libGL +, libGLU +}: + +let + inherit (lib) optionals makeLibraryPath; + +in +stdenv.mkDerivation rec { + pname = "SDL_compat"; + version = "1.2.52"; + + src = fetchFromGitHub { + owner = "libsdl-org"; + repo = "sdl12-compat"; + rev = "release-" + version; + hash = "sha256-PDGlMI8q74JaqMQ5oX9Zt5CEr7frFQWECbuwq5g25eg="; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + propagatedBuildInputs = [ SDL2 ] + ++ optionals openglSupport [ libGL libGLU ]; + + enableParallelBuilding = true; + + setupHook = ../SDL/setup-hook.sh; + + postFixup = '' + for lib in $out/lib/*.so* ; do + if [[ -L "$lib" ]]; then + patchelf --set-rpath "$(patchelf --print-rpath $lib):${makeLibraryPath propagatedBuildInputs}" "$lib" + fi + done + ''; + + meta = with lib; { + description = "A cross-platform multimedia library - build SDL 1.2 applications against 2.0"; + homepage = "https://www.libsdl.org/"; + license = licenses.zlib; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/libraries/libdwarf/0.4.nix b/pkgs/development/libraries/libdwarf/0.4.nix new file mode 100644 index 000000000000..147bf3644879 --- /dev/null +++ b/pkgs/development/libraries/libdwarf/0.4.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchurl, zlib }: + +stdenv.mkDerivation rec { + pname = "libdwarf"; + version = "0.4.0"; + + src = fetchurl { + url = "https://www.prevanders.net/libdwarf-${version}.tar.xz"; + sha512 = "30e5c6c1fc95aa28a014007a45199160e1d9ba870b196d6f98e6dd21a349e9bb31bba1bd6817f8ef9a89303bed0562182a7d46fcbb36aedded76c2f1e0052e1e"; + }; + + configureFlags = [ "--enable-shared" "--disable-nonshared" ]; + + buildInputs = [ zlib ]; + + outputs = [ "bin" "lib" "dev" "out" ]; + + meta = { + homepage = "https://github.com/davea42/libdwarf-code"; + platforms = lib.platforms.unix; + license = lib.licenses.lgpl21Plus; + maintainers = [ lib.maintainers.atry ]; + }; +} diff --git a/pkgs/development/libraries/smpeg/default.nix b/pkgs/development/libraries/smpeg/default.nix index b671f47bf8cc..03af2e40fa3a 100644 --- a/pkgs/development/libraries/smpeg/default.nix +++ b/pkgs/development/libraries/smpeg/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/smpeg-config \ --prefix PATH ":" "${pkg-config}/bin" \ - --prefix PKG_CONFIG_PATH ":" "${SDL.dev}/lib/pkgconfig" + --prefix PKG_CONFIG_PATH ":" "${lib.getDev SDL}/lib/pkgconfig" ''; NIX_LDFLAGS = "-lX11"; diff --git a/pkgs/development/python-modules/google-cloud-logging/default.nix b/pkgs/development/python-modules/google-cloud-logging/default.nix index dc60abddb6df..3d07a80cce40 100644 --- a/pkgs/development/python-modules/google-cloud-logging/default.nix +++ b/pkgs/development/python-modules/google-cloud-logging/default.nix @@ -12,22 +12,21 @@ , proto-plus , pytestCheckHook , pytest-asyncio +, pythonOlder }: buildPythonPackage rec { pname = "google-cloud-logging"; - version = "3.0.0"; + version = "3.1.1"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-RS42Hh3Lwo8iCMCAXBp8usAwdkVWcD2XZW0FIYuTNwg="; + hash = "sha256-YjR2pdEWEWh84nixN/lDO4HssDlNN8CfhX1TOmBnsQs="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "google-cloud-appengine-logging >= 0.1.0, < 1.0.0dev" "google-cloud-appengine-logging >= 0.1.0" - ''; - propagatedBuildInputs = [ google-api-core google-cloud-appengine-logging diff --git a/pkgs/development/python-modules/graspologic/default.nix b/pkgs/development/python-modules/graspologic/default.nix index 1a246461e5f7..f16ba5fc4c77 100644 --- a/pkgs/development/python-modules/graspologic/default.nix +++ b/pkgs/development/python-modules/graspologic/default.nix @@ -45,5 +45,7 @@ buildPythonPackage rec { description = "A package for graph statistical algorithms"; license = licenses.asl20; # changing to `licenses.mit` in next release maintainers = with maintainers; [ bcdarwin ]; + # graspologic-native is not available + broken = true; }; } diff --git a/pkgs/development/python-modules/python-louvain/default.nix b/pkgs/development/python-modules/python-louvain/default.nix index 262370f6109d..699fc97f58e2 100644 --- a/pkgs/development/python-modules/python-louvain/default.nix +++ b/pkgs/development/python-modules/python-louvain/default.nix @@ -1,7 +1,10 @@ { lib , fetchPypi , buildPythonPackage +, fetchpatch , networkx +, pandas +, scipy , numpy }: buildPythonPackage rec { @@ -13,10 +16,21 @@ buildPythonPackage rec { sha256 = "sha256-t7ot9QAv0o0+54mklTK6rRH+ZI5PIRfPB5jnUgodpWs="; }; + patches = [ + # Fix test_karate + (fetchpatch { + name = "fix-karate-test-networkx-2.7.patch"; + url = "https://github.com/taynaud/python-louvain/pull/95/commits/c95d767e72f580cb15319fe08d72d87c9976640b.patch"; + sha256 = "sha256-9oJ9YvKl2sI8oGhfyauNS+HT4kXsDt0L8S2owluWdj0="; + }) + ]; + propagatedBuildInputs = [ networkx numpy ]; pythonImportsCheck = [ "community" ]; + checkInputs = [ pandas scipy ]; + meta = with lib; { homepage = "https://github.com/taynaud/python-louvain"; description = "Louvain Community Detection"; diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index 615b4e64aa4c..44b85624cf3f 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -32,6 +32,7 @@ , setproctitle , setuptools , shortuuid +, substituteAll , tqdm }: @@ -49,6 +50,13 @@ buildPythonPackage rec { hash = "sha256-ZY7nTj93piTEeHhW+H+nQ+ws2dDmmY6u3p7uz296PbA="; }; + patches = [ + (substituteAll { + src = ./hardcode-git-path.patch; + git = "${lib.getBin git}/bin/git"; + }) + ]; + # setuptools is necessary since pkg_resources is required at runtime. propagatedBuildInputs = [ click @@ -67,16 +75,6 @@ buildPythonPackage rec { shortuuid ]; - # wandb expects git to be in PATH. See https://gist.github.com/samuela/57aeee710e41ab2bf361b7ed8fbbeabf - # for the error message, and an example usage here: https://github.com/wandb/client/blob/d5f655b7ca7e3eac2f3a67a84bc5c2a664a31baf/wandb/sdk/internal/meta.py#L128. - # See https://github.com/NixOS/nixpkgs/pull/164176#discussion_r828801621 as to - # why we don't put it in propagatedBuildInputs. Note that this is difficult to - # test offline due to https://github.com/wandb/client/issues/3519. - postInstall = '' - mkdir -p $out/bin - ln -s ${git}/bin/git $out/bin/git - ''; - preCheck = '' export HOME=$(mktemp -d) ''; diff --git a/pkgs/development/python-modules/wandb/hardcode-git-path.patch b/pkgs/development/python-modules/wandb/hardcode-git-path.patch new file mode 100644 index 000000000000..6d91add9d383 --- /dev/null +++ b/pkgs/development/python-modules/wandb/hardcode-git-path.patch @@ -0,0 +1,83 @@ +diff --git a/functional_tests/kfp/wandb_probe.py b/functional_tests/kfp/wandb_probe.py +index 82fadfe1..25c1454c 100644 +--- a/functional_tests/kfp/wandb_probe.py ++++ b/functional_tests/kfp/wandb_probe.py +@@ -5,7 +5,7 @@ import subprocess + def wandb_probe_package(): + if not os.environ.get("WB_PROBE_PACKAGE"): + return +- s, o = subprocess.getstatusoutput("git rev-parse HEAD") ++ s, o = subprocess.getstatusoutput("@git@ rev-parse HEAD") + if s: + return + wandb_local = f"git+https://github.com/wandb/client.git@{o}#egg=wandb" +diff --git a/wandb/cli/cli.py b/wandb/cli/cli.py +index 5767e61c..56009fec 100644 +--- a/wandb/cli/cli.py ++++ b/wandb/cli/cli.py +@@ -1745,7 +1745,7 @@ def restore(ctx, run, no_git, branch, project, entity): + commit, json_config, patch_content, metadata = api.run_config( + project, run=run, entity=entity + ) +- repo = metadata.get("git", {}).get("repo") ++ repo = metadata.get("@git@", {}).get("repo") + image = metadata.get("docker") + restore_message = ( + """`wandb restore` needs to be run from the same git repository as the original run. +@@ -1764,7 +1764,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" + + if commit and api.git.enabled: + wandb.termlog(f"Fetching origin and finding commit: {commit}") +- subprocess.check_call(["git", "fetch", "--all"]) ++ subprocess.check_call(["@git@", "fetch", "--all"]) + try: + api.git.repo.commit(commit) + except ValueError: +@@ -1818,7 +1818,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" + # --reject is necessary or else this fails any time a binary file + # occurs in the diff + exit_code = subprocess.call( +- ["git", "apply", "--reject", patch_rel_path], cwd=root ++ ["@git@", "apply", "--reject", patch_rel_path], cwd=root + ) + if exit_code == 0: + wandb.termlog("Applied patch") +diff --git a/wandb/sdk/internal/internal_api.py b/wandb/sdk/internal/internal_api.py +index 612220b9..b761bfbd 100644 +--- a/wandb/sdk/internal/internal_api.py ++++ b/wandb/sdk/internal/internal_api.py +@@ -660,7 +660,7 @@ class Api: + ) + patch = BytesIO() + if self.git.dirty: +- self.git.repo.git.execute(["git", "diff"], output_stream=patch) ++ self.git.repo.git.execute(["@git@", "diff"], output_stream=patch) + patch.seek(0) + cwd = "." + if self.git.enabled: +diff --git a/wandb/sdk/internal/meta.py b/wandb/sdk/internal/meta.py +index 6c53f750..c385951a 100644 +--- a/wandb/sdk/internal/meta.py ++++ b/wandb/sdk/internal/meta.py +@@ -125,7 +125,7 @@ class Meta: + logger.debug("save patches") + try: + root = self._git.root +- diff_args = ["git", "diff"] ++ diff_args = ["@git@", "diff"] + if self._git.has_submodule_diff: + diff_args.append("--submodule=diff") + +diff --git a/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py b/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py +index 614df9f5..38db460b 100644 +--- a/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py ++++ b/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py +@@ -67,7 +67,7 @@ def get_git_changeset(): + repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + try: + git_log = subprocess.Popen( +- 'git log --pretty=format:%ct --quiet -1 HEAD', ++ '@git@ log --pretty=format:%ct --quiet -1 HEAD', + stdout=subprocess.PIPE, stderr=subprocess.PIPE, + shell=True, cwd=repo_dir, universal_newlines=True, + ) diff --git a/pkgs/development/web/bootstrap-studio/default.nix b/pkgs/development/web/bootstrap-studio/default.nix new file mode 100644 index 000000000000..988c27981460 --- /dev/null +++ b/pkgs/development/web/bootstrap-studio/default.nix @@ -0,0 +1,34 @@ +{ lib, fetchurl, appimageTools }: + +let + pname = "bootstrap-studio"; + version = "6.0.1"; + src = fetchurl { + url = "https://bootstrapstudio.io/releases/desktop/${version}/Bootstrap%20Studio.AppImage"; + sha256 = "sha256-piRqIB/bCF0IBZfXdlXrc7gmPTIUDbk8xhP7X5ozyWg="; + }; + appimageContents = appimageTools.extractType2 { inherit pname version src; }; +in +appimageTools.wrapType2 { + inherit pname version src; + + extraInstallCommands = '' + mv $out/bin/${pname}-${version} $out/bin/${pname} + + install -m 444 -D ${appimageContents}/bstudio.desktop -t $out/share/applications + + substituteInPlace $out/share/applications/bstudio.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' + + install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/0x0/apps/bstudio.png \ + $out/share/icons/hicolor/512x512/apps/bstudio.png + ''; + + meta = with lib; { + description = "Drag-and-drop designer for bootstrap"; + homepage = "https://bootstrapstudio.io/"; + license = licenses.unfree; + maintainers = with maintainers; [ khushraj ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/games/brogue/default.nix b/pkgs/games/brogue/default.nix index 891c9a40ec12..e5b0f838be1a 100644 --- a/pkgs/games/brogue/default.nix +++ b/pkgs/games/brogue/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { prePatch = '' sed -i Makefile -e 's,LIBTCODDIR=.*,LIBTCODDIR=${libtcod},g' \ - -e 's,sdl-config,${SDL.dev}/bin/sdl-config,g' + -e 's,sdl-config,${lib.getDev SDL}/bin/sdl-config,g' sed -i src/platform/tcod-platform.c -e "s,fonts/font,$out/share/brogue/fonts/font,g" make clean rm -rf src/libtcod* diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix index bd592dbc55d9..64841fbfea77 100644 --- a/pkgs/games/gargoyle/default.nix +++ b/pkgs/games/gargoyle/default.nix @@ -6,7 +6,7 @@ let jamenv = '' unset AR '' + (if stdenv.isDarwin then '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getDev SDL}/include/SDL" export GARGLKINI="$out/Applications/Gargoyle.app/Contents/Resources/garglk.ini" '' else '' export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/libexec/gargoyle" diff --git a/pkgs/games/hyperrogue/default.nix b/pkgs/games/hyperrogue/default.nix index 0397bb474da3..c1a3eddd25f4 100644 --- a/pkgs/games/hyperrogue/default.nix +++ b/pkgs/games/hyperrogue/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0bijgbqpc867pq8lbwwvcnc713gm51mmz625xb5br0q2qw09nkyh"; }; - CPPFLAGS = "-I${SDL.dev}/include/SDL"; + CPPFLAGS = "-I${lib.getDev SDL}/include/SDL"; buildInputs = [ autoreconfHook SDL SDL_ttf SDL_gfx SDL_mixer libpng glew ]; diff --git a/pkgs/games/liquidwar/default.nix b/pkgs/games/liquidwar/default.nix index 827c7d696c77..e012886c884d 100644 --- a/pkgs/games/liquidwar/default.nix +++ b/pkgs/games/liquidwar/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ; # To avoid problems finding SDL_types.h. - configureFlags = [ "CFLAGS=-I${SDL.dev}/include/SDL" ]; + configureFlags = [ "CFLAGS=-I${lib.getDev SDL}/include/SDL" ]; meta = with lib; { description = "Quick tactics game"; diff --git a/pkgs/games/meritous/default.nix b/pkgs/games/meritous/default.nix index e7dd1bee70c9..c7631f2370db 100644 --- a/pkgs/games/meritous/default.nix +++ b/pkgs/games/meritous/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { prePatch = '' substituteInPlace Makefile \ --replace "CPPFLAGS +=" "CPPFLAGS += -DSAVES_IN_HOME -DDATADIR=\\\"$out/share/meritous\\\"" \ - --replace sld-config ${SDL.dev}/bin/sdl-config + --replace sld-config ${lib.getDev SDL}/bin/sdl-config substituteInPlace src/audio.c \ --replace "filename[64]" "filename[256]" ''; diff --git a/pkgs/games/openxcom/default.nix b/pkgs/games/openxcom/default.nix index b877c3aac2fd..61f209aae4dc 100644 --- a/pkgs/games/openxcom/default.nix +++ b/pkgs/games/openxcom/default.nix @@ -1,26 +1,38 @@ -{lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, zlib, openssl, libyamlcpp, boost -, SDL, SDL_image, SDL_mixer, SDL_gfx }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, libGLU +, libGL +, zlib +, openssl +, libyamlcpp +, boost +, SDL +, SDL_image +, SDL_mixer +, SDL_gfx +}: -let version = "1.0.0.2019.10.18"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "openxcom"; - inherit version; + version = "1.0.0.2019.10.18"; + src = fetchFromGitHub { owner = "OpenXcom"; repo = "OpenXcom"; rev = "f9853b2cb8c8f741ac58707487ef493416d890a3"; - sha256 = "0kbfawj5wsp1mwfcm5mwpkq6s3d13pailjm5w268gqpxjksziyq0"; + hash = "sha256-APv49ZT94oeM4KVKGtUdoQ1t8Ly8lsocr+FqXiRXbk0="; }; nativeBuildInputs = [ cmake ]; buildInputs = [ SDL SDL_gfx SDL_image SDL_mixer boost libyamlcpp libGLU libGL openssl zlib ]; - meta = { + meta = with lib; { description = "Open source clone of UFO: Enemy Unknown"; homepage = "https://openxcom.org"; - maintainers = [ lib.maintainers.cpages ]; - platforms = lib.platforms.linux; - license = lib.licenses.gpl3; + maintainers = with maintainers; [ cpages ]; + platforms = platforms.linux; + license = licenses.gpl3; }; - } diff --git a/pkgs/games/pokerth/default.nix b/pkgs/games/pokerth/default.nix index ffae1b5cd8f6..f07b2a614d48 100644 --- a/pkgs/games/pokerth/default.nix +++ b/pkgs/games/pokerth/default.nix @@ -59,7 +59,7 @@ mkDerivation rec { "pokerth.pro" ]; - NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL"; + NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL"; meta = with lib; { homepage = "https://www.pokerth.net"; diff --git a/pkgs/games/quantumminigolf/default.nix b/pkgs/games/quantumminigolf/default.nix index 26a327dd3f52..d0e50a361582 100644 --- a/pkgs/games/quantumminigolf/default.nix +++ b/pkgs/games/quantumminigolf/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { ]; preBuild = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL -I${SDL_ttf}/include/SDL" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getDev SDL}/include/SDL -I${SDL_ttf}/include/SDL" sed -re 's@"(gfx|fonts|tracks)/@"'"$out"'/share/quantumminigolf/\1/@g' -i *.cpp ''; diff --git a/pkgs/games/rili/default.nix b/pkgs/games/rili/default.nix index 3a87fc0523c7..9c6252a6dda3 100644 --- a/pkgs/games/rili/default.nix +++ b/pkgs/games/rili/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { }) ]; - CPPFLAGS = "-I${SDL.dev}/include -I${SDL.dev}/include/SDL -I${SDL_mixer}/include"; + CPPFLAGS = "-I${lib.getDev SDL}/include -I${lib.getDev SDL}/include/SDL -I${SDL_mixer}/include"; nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ SDL SDL_mixer ]; diff --git a/pkgs/games/rott/default.nix b/pkgs/games/rott/default.nix index b3a517dab02b..131745ac03eb 100644 --- a/pkgs/games/rott/default.nix +++ b/pkgs/games/rott/default.nix @@ -1,5 +1,26 @@ -{stdenv, lib, fetchurl, SDL, SDL_mixer, makeDesktopItem, copyDesktopItems, runtimeShell, buildShareware ? false}: +{ stdenv +, lib +, fetchurl +, writeShellScript +, SDL +, SDL_mixer +, makeDesktopItem +, copyDesktopItems +, runtimeShell +, buildShareware ? false +}: +let + # Allow the game to be launched from a user's PATH and load the game data from the user's home directory. + launcher = writeShellScript "rott" '' + set -eEuo pipefail + dir=$HOME/.rott/data + test -e $dir || mkdir -p $dir + cd $dir + exec @out@/libexec/rott "$@" + ''; + +in stdenv.mkDerivation rec { pname = "rott"; version = "1.1.2"; @@ -10,27 +31,27 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ copyDesktopItems ]; + buildInputs = [ SDL SDL_mixer ]; - preBuild = '' - cd rott - make clean - make SHAREWARE=${if buildShareware then "1" else "0"} - ''; + sourceRoot = "rott-${version}/rott"; - # Include a wrapper script to allow the game to be launched from a user's PATH and load the game data from the user's home directory. + makeFlags = [ + "SHAREWARE=${if buildShareware then "1" else "0"}" + ]; + + # when using SDL_compat instead of SDL_classic, SDL_mixer isn't correctly + # detected, but there is no harm just specifying it + NIX_CFLAGS_COMPILE = [ + "-I${lib.getDev SDL_mixer}/include/SDL" + ]; installPhase = '' - mkdir -p $out/bin - cp rott $out/bin + runHook preInstall - cat > $out/bin/launch-rott < +Date: Tue, 17 May 2022 16:58:08 +0200 +Subject: [PATCH 1/2] hardcode dependencies + +--- + src/dbus.cpp | 2 +- + src/loaders/loader_x11.cpp | 2 +- + src/logging.cpp | 7 +++++++ + src/pci_ids.cpp | 6 ++---- + 4 files changed, 11 insertions(+), 6 deletions(-) + diff --git a/src/dbus.cpp b/src/dbus.cpp -index 44ffafc..9baf57b 100644 +index 3b3cccb..1405725 100644 --- a/src/dbus.cpp +++ b/src/dbus.cpp -@@ -162,7 +162,7 @@ bool dbus_manager::init(const std::string& requested_player) { - return true; - } +@@ -152,7 +152,7 @@ bool dbus_manager::get_media_player_metadata(metadata& meta, std::string name) { + } + bool dbus_manager::init_internal() { - if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("libdbus-1.so.3")) { + if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("@libdbus@/lib/libdbus-1.so.3")) { - std::cerr << "MANGOHUD: Could not load libdbus-1.so.3\n"; + SPDLOG_ERROR("Could not load libdbus-1.so.3"); return false; } diff --git a/src/loaders/loader_x11.cpp b/src/loaders/loader_x11.cpp -index 25c65bf..87488d5 100644 +index 4db6f78..c60d08c 100644 --- a/src/loaders/loader_x11.cpp +++ b/src/loaders/loader_x11.cpp -@@ -88,4 +88,4 @@ void libx11_loader::CleanUp(bool unload) { +@@ -89,4 +89,4 @@ void libx11_loader::CleanUp(bool unload) { } -std::shared_ptr g_x11(new libx11_loader("libX11.so.6")); +std::shared_ptr g_x11(new libx11_loader("@libX11@/lib/libX11.so.6")); diff --git a/src/logging.cpp b/src/logging.cpp -index ee8600b..c7c91a0 100644 +index b27f21e..48f5e03 100644 --- a/src/logging.cpp +++ b/src/logging.cpp -@@ -19,7 +19,10 @@ string exec(string command) { - #ifdef __gnu_linux__ - - // Open pipe to file -+ char* originalPath = getenv("PATH"); -+ setenv("PATH", "@path@", 1); - FILE* pipe = popen(command.c_str(), "r"); -+ setenv("PATH", originalPath, 1); - if (!pipe) { +@@ -22,7 +22,14 @@ string exec(string command) { + #endif + std::array buffer; + std::string result; ++ ++ char* originalPath = getenv("PATH"); ++ setenv("PATH", "@path@", 1); ++ + std::unique_ptr pipe(popen(command.c_str(), "r"), pclose); ++ ++ setenv("PATH", originalPath, 1); ++ + if (!pipe) { return "popen failed!"; - } + } diff --git a/src/pci_ids.cpp b/src/pci_ids.cpp -index 4e2a6d2..9490869 100644 +index feec222..6baa707 100644 --- a/src/pci_ids.cpp +++ b/src/pci_ids.cpp -@@ -22,12 +22,9 @@ std::istream& get_uncommented_line(std::istream& is, std::string &line) - +@@ -24,11 +24,9 @@ std::istream& get_uncommented_line(std::istream& is, std::string &line) void parse_pciids() { -- std::ifstream file("/usr/share/hwdata/pci.ids"); -+ std::ifstream file("@hwdata@/share/hwdata/pci.ids"); - if(file.fail()){ -- std::ifstream file("/usr/share/misc/pci.ids"); + std::ifstream file; +- file.open("/usr/share/hwdata/pci.ids"); ++ file.open("@hwdata@/share/hwdata/pci.ids"); + if (file.fail()){ +- file.open("/usr/share/misc/pci.ids"); - if (file.fail()) -- printf("MANGOHUD: can't find file pci.ids\n"); -- -+ printf("MANGOHUD: can't find file pci.ids\n"); +- SPDLOG_ERROR("can't find file pci.ids"); ++ SPDLOG_ERROR("can't find file pci.ids"); } std::string line; +-- +2.36.0 + diff --git a/pkgs/tools/graphics/mangohud/opengl32-nix-workaround.patch b/pkgs/tools/graphics/mangohud/opengl32-nix-workaround.patch index 4c6561180a13..f4f2e112d945 100644 --- a/pkgs/tools/graphics/mangohud/opengl32-nix-workaround.patch +++ b/pkgs/tools/graphics/mangohud/opengl32-nix-workaround.patch @@ -1,3 +1,12 @@ +From 1ac93cbf0eed951af6967a81f731a0f418ea0b3d Mon Sep 17 00:00:00 2001 +From: Atemu +Date: Tue, 17 May 2022 16:58:45 +0200 +Subject: [PATCH 2/2] opengl32 nix workaround + +--- + bin/mangohud.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/bin/mangohud.in b/bin/mangohud.in index 8ec21de..f65304a 100755 --- a/bin/mangohud.in @@ -10,3 +19,6 @@ index 8ec21de..f65304a 100755 +LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@ld_libdir_mangohud@:@mangohud32@/lib/mangohud" exec env MANGOHUD=1 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LD_PRELOAD="${LD_PRELOAD}" "$@" +-- +2.36.0 + diff --git a/pkgs/tools/graphics/quirc/default.nix b/pkgs/tools/graphics/quirc/default.nix index 6ad0262da3a1..0cf407faa0dc 100644 --- a/pkgs/tools/graphics/quirc/default.nix +++ b/pkgs/tools/graphics/quirc/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { buildInputs = [ SDL SDL_gfx libjpeg libpng opencv ]; makeFlags = [ "PREFIX=$(out)" ]; - NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL -I${SDL_gfx}/include/SDL"; + NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL -I${SDL_gfx}/include/SDL"; # Disable building of linux-only demos on darwin systems patches = lib.optionals stdenv.isDarwin [ ./0001-dont-build-demos.patch ]; diff --git a/pkgs/tools/security/yubikey-touch-detector/default.nix b/pkgs/tools/security/yubikey-touch-detector/default.nix index 5ea91c3012fd..e728b1b62c41 100644 --- a/pkgs/tools/security/yubikey-touch-detector/default.nix +++ b/pkgs/tools/security/yubikey-touch-detector/default.nix @@ -16,6 +16,15 @@ buildGoModule rec { buildInputs = [ libnotify ]; + postInstall = '' + install -Dm444 -t $out/share/doc/${pname} *.md + + install -Dm444 -t $out/lib/systemd/user *.{service,socket} + + substituteInPlace $out/lib/systemd/user/*.service \ + --replace /usr/bin/yubikey-touch-detector "$out/bin/yubikey-touch-detector --libnotify" + ''; + meta = with lib; { description = "A tool to detect when your YubiKey is waiting for a touch (to send notification or display a visual indicator on the screen)."; homepage = "https://github.com/maximbaz/yubikey-touch-detector"; diff --git a/pkgs/tools/video/mjpegtools/default.nix b/pkgs/tools/video/mjpegtools/default.nix index 4d9fdfd7820e..b9b1b228efa5 100644 --- a/pkgs/tools/video/mjpegtools/default.nix +++ b/pkgs/tools/video/mjpegtools/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ libdv libjpeg libpng ] ++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ]; - NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${SDL.dev}/include/SDL"; + NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${lib.getDev SDL}/include/SDL"; postPatch = '' sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0f4597100d21..39ca7f184999 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -258,6 +258,8 @@ with pkgs; bingo = callPackage ../development/tools/bingo {}; + bootstrap-studio = callPackage ../development/web/bootstrap-studio {}; + breakpad = callPackage ../development/misc/breakpad { }; buf = callPackage ../development/tools/buf { }; @@ -18439,6 +18441,7 @@ with pkgs; inherit (callPackage ../development/libraries/libdwarf { }) libdwarf dwarfdump; + libdwarf_0_4 = callPackage ../development/libraries/libdwarf/0.4.nix { }; libe57format = callPackage ../development/libraries/libe57format { }; @@ -20436,13 +20439,17 @@ with pkgs; autoreconfHook = buildPackages.autoreconfHook269; }; - SDL = callPackage ../development/libraries/SDL ({ + SDL_classic = callPackage ../development/libraries/SDL ({ inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa GLUT; } // lib.optionalAttrs stdenv.hostPlatform.isAndroid { # libGLU doesn’t work with Android’s SDL libGLU = null; }); + SDL_compat = callPackage ../development/libraries/SDL_compat { }; + + SDL = SDL_classic; + SDL_audiolib = callPackage ../development/libraries/SDL_audiolib { }; SDL_sixel = callPackage ../development/libraries/SDL_sixel { }; @@ -32029,7 +32036,7 @@ with pkgs; opentyrian = callPackage ../games/opentyrian { }; - openxcom = callPackage ../games/openxcom { }; + openxcom = callPackage ../games/openxcom { SDL = SDL_compat; }; openxray = callPackage ../games/openxray { }; @@ -32133,7 +32140,7 @@ with pkgs; rocksndiamonds = callPackage ../games/rocksndiamonds { }; - rott = callPackage ../games/rott { }; + rott = callPackage ../games/rott { SDL = SDL_compat; }; rott-shareware = rott.override { buildShareware = true; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 3ccfac4d0cfe..a0eafedf2fb6 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -330,7 +330,7 @@ let installPhase = "./Build install --prefix $out"; - SDL_INST_DIR = pkgs.SDL.dev; + SDL_INST_DIR = lib.getDev pkgs.SDL; buildInputs = [ pkgs.SDL ArchiveExtract ArchiveZip TextPatch ]; propagatedBuildInputs = [ CaptureTiny FileShareDir FileWhich ];