From 27d9353047d1a63148e730e934b7aed81d5bfec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 14 Mar 2021 15:01:47 +0100 Subject: [PATCH 1/5] corrosion: init at unstable-2021-02-23 --- .../corrosion/cmake-install-full-dir.patch | 18 +++++++ .../build-managers/corrosion/default.nix | 54 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 74 insertions(+) create mode 100644 pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch create mode 100644 pkgs/development/tools/build-managers/corrosion/default.nix diff --git a/pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch b/pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch new file mode 100644 index 000000000000..da5e923e0fa5 --- /dev/null +++ b/pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/CorrosionConfig.cmake.in b/cmake/CorrosionConfig.cmake.in +index c042a00..491f53c 100644 +--- a/cmake/CorrosionConfig.cmake.in ++++ b/cmake/CorrosionConfig.cmake.in +@@ -4,11 +4,11 @@ if (Corrosion_FOUND) + return() + endif() + +-list(APPEND CMAKE_MODULE_PATH "${PACKAGE_PREFIX_DIR}/@CORROSION_INSTALL_PREFIX@@CMAKE_INSTALL_DATADIR@/cmake") ++list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_FULL_DATADIR@/cmake") + + add_executable(Corrosion::Generator IMPORTED GLOBAL) + set_property( + TARGET Corrosion::Generator +- PROPERTY IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/@CORROSION_INSTALL_PREFIX@@CMAKE_INSTALL_LIBEXECDIR@/corrosion-generator") ++ PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_FULL_LIBEXECDIR@/corrosion-generator") + + include(Corrosion) diff --git a/pkgs/development/tools/build-managers/corrosion/default.nix b/pkgs/development/tools/build-managers/corrosion/default.nix new file mode 100644 index 000000000000..2285579b0bbd --- /dev/null +++ b/pkgs/development/tools/build-managers/corrosion/default.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, rustPlatform +}: + +stdenv.mkDerivation rec { + pname = "corrosion"; + version = "unstable-2021-02-23"; + + src = fetchFromGitHub { + owner = "AndrewGaspar"; + repo = "corrosion"; + rev = "e6c35c7e55a59c8223577b5abc4d253b4a82898b"; + sha256 = "0vq6g3ggnqiln0q8gsr8rr5rrdgpfcgfly79jwcygxrviw37m44d"; + }; + + patches = [ + # https://github.com/AndrewGaspar/corrosion/issues/84 + ./cmake-install-full-dir.patch + ]; + + cargoRoot = "generator"; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + sourceRoot = "${src.name}/${cargoRoot}"; + name = "${pname}-${version}"; + sha256 = "1fsq8zzzq28fj2fh92wmg8kmdj4y10mcpdmlgxsygy5lbh4xs13f"; + }; + + nativeBuildInputs = [ + cmake + ] ++ (with rustPlatform; [ + cargoSetupHook + rust.cargo + rust.rustc + ]); + + cmakeFlags = [ + "-DRust_CARGO=${rustPlatform.rust.cargo}/bin/cargo" + + # tests cannot find cargo because Rust_CARGO is unset before tests + "-DCORROSION_BUILD_TESTS=OFF" + ]; + + meta = with lib; { + description = "Tool for integrating Rust into an existing CMake project"; + homepage = "https://github.com/AndrewGaspar/corrosion"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 565f68e9206e..94f5c9f76ecd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12312,6 +12312,8 @@ in cookiecutter = with python3Packages; toPythonApplication cookiecutter; + corrosion = callPackage ../development/tools/build-managers/corrosion { }; + corundum = callPackage ../development/tools/corundum { }; confluent-platform = callPackage ../servers/confluent-platform {}; From a0ec0bbd63a5b09e31df1f5435f298f33173a5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 7 Mar 2021 23:47:42 +0100 Subject: [PATCH 2/5] angelfish: init at 1.8.0 --- .../networking/browsers/angelfish/default.nix | 71 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 73 insertions(+) create mode 100644 pkgs/applications/networking/browsers/angelfish/default.nix diff --git a/pkgs/applications/networking/browsers/angelfish/default.nix b/pkgs/applications/networking/browsers/angelfish/default.nix new file mode 100644 index 000000000000..831fabf2deb1 --- /dev/null +++ b/pkgs/applications/networking/browsers/angelfish/default.nix @@ -0,0 +1,71 @@ +{ lib +, mkDerivation +, fetchFromGitLab +, cmake +, corrosion +, extra-cmake-modules +, kconfig +, kcoreaddons +, kdbusaddons +, ki18n +, kirigami2 +, knotifications +, kpurpose +, kwindowsystem +, qtquickcontrols2 +, qtwebengine +, rustPlatform +}: + +mkDerivation rec { + pname = "angelfish"; + version = "1.8.0"; + + src = fetchFromGitLab { + domain = "invent.kde.org"; + owner = "plasma-mobile"; + repo = "angelfish"; + rev = "v${version}"; + sha256 = "0pj2kw7lmxh7diwdcmk24qxqslavhvf23r2i6h549gbllbzk219f"; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + sha256 = "0cyrmhlg0kjr14842ckbjdljc2zc28al0y9i8w5l0qzr18krgc0m"; + }; + + nativeBuildInputs = [ + cmake + corrosion + extra-cmake-modules + ] ++ (with rustPlatform; [ + cargoSetupHook + rust.cargo + rust.rustc + ]); + + cmakeFlags = [ + "-DRust_CARGO=${rustPlatform.rust.cargo}/bin/cargo" + ]; + + buildInputs = [ + kconfig + kcoreaddons + kdbusaddons + ki18n + kirigami2 + knotifications + kpurpose + kwindowsystem + qtquickcontrols2 + qtwebengine + ]; + + meta = with lib; { + description = "Web browser for Plasma Mobile"; + homepage = "https://apps.kde.org/en/mobile.angelfish"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 94f5c9f76ecd..11fe1154fbaf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21602,6 +21602,8 @@ in }); android-studio = androidStudioPackages.stable; + angelfish = libsForQt5.callPackage ../applications/networking/browsers/angelfish { }; + animbar = callPackage ../applications/graphics/animbar { }; antfs-cli = callPackage ../applications/misc/antfs-cli {}; From dd2f61d22dc77bfd30a0c6d3ab8687c72f438653 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sat, 3 Apr 2021 16:08:21 +1000 Subject: [PATCH 3/5] .github/workflows/manual-*.yml: update cachix / install-nix actions --- .github/workflows/manual-nixos.yml | 4 ++-- .github/workflows/manual-nixpkgs.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/manual-nixos.yml b/.github/workflows/manual-nixos.yml index a75e84029301..fa1f8fc6911e 100644 --- a/.github/workflows/manual-nixos.yml +++ b/.github/workflows/manual-nixos.yml @@ -15,11 +15,11 @@ jobs: with: # pull_request_target checks out the base branch by default ref: refs/pull/${{ github.event.pull_request.number }}/merge - - uses: cachix/install-nix-action@v12 + - uses: cachix/install-nix-action@v13 with: # explicitly enable sandbox extra_nix_config: sandbox = true - - uses: cachix/cachix-action@v8 + - uses: cachix/cachix-action@v9 with: # This cache is for the nixos/nixpkgs manual builds and should not be trusted or used elsewhere. name: nixpkgs-ci diff --git a/.github/workflows/manual-nixpkgs.yml b/.github/workflows/manual-nixpkgs.yml index 7596719d9b50..192a4c6868a4 100644 --- a/.github/workflows/manual-nixpkgs.yml +++ b/.github/workflows/manual-nixpkgs.yml @@ -15,11 +15,11 @@ jobs: with: # pull_request_target checks out the base branch by default ref: refs/pull/${{ github.event.pull_request.number }}/merge - - uses: cachix/install-nix-action@v12 + - uses: cachix/install-nix-action@v13 with: # explicitly enable sandbox extra_nix_config: sandbox = true - - uses: cachix/cachix-action@v8 + - uses: cachix/cachix-action@v9 with: # This cache is for the nixos/nixpkgs manual builds and should not be trusted or used elsewhere. name: nixpkgs-ci From 7a3f21c1e453a57b5bbd5135bac2bfce7dc37d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 3 Apr 2021 10:46:30 +0200 Subject: [PATCH 4/5] linux: don't compress by ZSTD on 32-bit It doesn't build on i686 and I don't consider it worth deep investigation. I tried a VM test, too (nixosTests.knot). --- pkgs/os-specific/linux/kernel/common-config.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index c90dbd73f2fa..777a91241bbf 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -680,7 +680,14 @@ let DEBUG_MEMORY_INIT = option yes; }); - misc = { + misc = let + # Use zstd for kernel compression if 64-bit and newer than 5.9, otherwise xz. + # i686 issues: https://github.com/NixOS/nixpkgs/pull/117961#issuecomment-812106375 + useZstd = stdenv.buildPlatform.is64bit && versionAtLeast version "5.9"; + in { + KERNEL_XZ = mkIf (!useZstd) yes; + KERNEL_ZSTD = mkIf useZstd yes; + HID_BATTERY_STRENGTH = yes; # enabled by default in x86_64 but not arm64, so we do that here HIDRAW = yes; @@ -696,10 +703,6 @@ let MODULE_COMPRESS = yes; MODULE_COMPRESS_XZ = yes; - # use zstd for kernel compression if newer than 5.9, else xz. - KERNEL_XZ = whenOlder "5.9" yes; - KERNEL_ZSTD = whenAtLeast "5.9" yes; - SYSVIPC = yes; # System-V IPC AIO = yes; # POSIX asynchronous I/O From 68e901c68446539165b19b227f51f7fc2b3655f9 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 3 Apr 2021 14:43:52 +0200 Subject: [PATCH 5/5] pythonPackages.zopfli: 0.1.7 -> 0.1.8 https://github.com/obp/py-zopfli/releases/tag/v0.1.8 --- pkgs/development/python-modules/zopfli/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/zopfli/default.nix b/pkgs/development/python-modules/zopfli/default.nix index a80b3155b8ce..9d6757793511 100644 --- a/pkgs/development/python-modules/zopfli/default.nix +++ b/pkgs/development/python-modules/zopfli/default.nix @@ -2,14 +2,15 @@ buildPythonPackage rec { pname = "zopfli"; - version = "0.1.7"; + version = "0.1.8"; src = fetchPypi { inherit pname version; - sha256 = "512892714f0e3dcc9a77222cb509ed519f41ce2b92467e47a4b406a23b48561a"; + sha256 = "8b977dc07e3797907ab59e08096583bcd0b7e6c739849fbbeec09263f6356623"; extension = "zip"; }; + # doesn't work with pytestCheckHook checkInputs = [ pytest ]; meta = with lib; {