diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 190a8146ffaf..1cf7513d65e8 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7170,6 +7170,12 @@ githubId = 13791; name = "Luke Gorrie"; }; + luker = { + email = "luker@fenrirproject.org"; + github = "LucaFulchir"; + githubId = 2486026; + name = "Luca Fulchir"; + }; lumi = { email = "lumi@pew.im"; github = "lumi-me-not"; @@ -11126,6 +11132,12 @@ fingerprint = "4242 834C D401 86EF 8281 4093 86E3 0E5A 0F5F C59C"; }]; }; + smasher164 = { + email = "aindurti@gmail.com"; + github = "smasher164"; + githubId = 12636891; + name = "Akhil Indurti"; + }; smironov = { email = "grrwlf@gmail.com"; github = "grwlf"; diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix index 85d3ea5bd751..b41a2fd27be2 100644 --- a/nixos/modules/services/networking/mosquitto.nix +++ b/nixos/modules/services/networking/mosquitto.nix @@ -136,7 +136,7 @@ let + concatStringsSep "\n" (plainLines ++ optional (plainLines != []) '' - ${pkgs.mosquitto}/bin/mosquitto_passwd -U "$file" + ${cfg.package}/bin/mosquitto_passwd -U "$file" '' ++ hashedLines)); @@ -444,6 +444,15 @@ let globalOptions = with types; { enable = mkEnableOption "the MQTT Mosquitto broker"; + package = mkOption { + type = package; + default = pkgs.mosquitto; + defaultText = literalExpression "pkgs.mosquitto"; + description = '' + Mosquitto package to use. + ''; + }; + bridges = mkOption { type = attrsOf bridgeOptions; default = {}; @@ -565,7 +574,7 @@ in RuntimeDirectory = "mosquitto"; WorkingDirectory = cfg.dataDir; Restart = "on-failure"; - ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${configFile}"; + ExecStart = "${cfg.package}/bin/mosquitto -c ${configFile}"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; # Hardening diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index 82b07206a8b6..3a78a526460c 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -136,7 +136,7 @@ in # session requirements cinnamon-screensaver # cinnamon-killer-daemon: provided by cinnamon-common - gnome.networkmanagerapplet # session requirement - also nm-applet not needed + networkmanagerapplet # session requirement - also nm-applet not needed # For a polkit authentication agent polkit_gnome @@ -145,7 +145,7 @@ in nemo cinnamon-control-center cinnamon-settings-daemon - gnome.libgnomekbd + libgnomekbd orca # theme diff --git a/nixos/tests/lorri/default.nix b/nixos/tests/lorri/default.nix index 147ae999fdb1..c33c7503993d 100644 --- a/nixos/tests/lorri/default.nix +++ b/nixos/tests/lorri/default.nix @@ -14,7 +14,7 @@ import ../make-test-python.nix { ) # Start the daemon and wait until it is ready - machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr >&2 &") + machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr &") machine.wait_until_succeeds("grep --fixed-strings 'ready' lorri.stdout") # Ping the daemon diff --git a/pkgs/applications/audio/plexamp/default.nix b/pkgs/applications/audio/plexamp/default.nix index 31929567e411..c4c53de90f17 100644 --- a/pkgs/applications/audio/plexamp/default.nix +++ b/pkgs/applications/audio/plexamp/default.nix @@ -2,12 +2,12 @@ let pname = "plexamp"; - version = "3.9.0"; + version = "3.9.1"; src = fetchurl { url = "https://plexamp.plex.tv/plexamp.plex.tv/desktop/Plexamp-${version}.AppImage"; name="${pname}-${version}.AppImage"; - sha512 = "2OaV8dONv7yBcQsfecgfedP2ypBN6svD9rgZLgUwSydyH2+rODNPne4O7z2Hahm7Y0Ae+NFxbpQ9lbNbX0vhsg=="; + sha512 = "uassNLdCXx3WLarUMJNhU8fbXugG7yTLMQacPAszLoRdmbMwcN6wT7ED26VhlNVhY3xr02GjZSDw4/LADZWqKw=="; }; appimageContents = appimageTools.extractType2 { @@ -33,7 +33,7 @@ in appimageTools.wrapType2 { meta = with lib; { description = "A beautiful Plex music player for audiophiles, curators, and hipsters"; homepage = "https://plexamp.com/"; - changelog = "https://forums.plex.tv/t/plexamp-release-notes/221280/36"; + changelog = "https://forums.plex.tv/t/plexamp-release-notes/221280/37"; license = licenses.unfree; maintainers = with maintainers; [ killercup synthetica ]; platforms = [ "x86_64-linux" ]; diff --git a/pkgs/applications/networking/instant-messengers/signalbackup-tools/apple-sdk-missing-utimensat.patch b/pkgs/applications/networking/instant-messengers/signalbackup-tools/apple-sdk-missing-utimensat.patch new file mode 100644 index 000000000000..61474d0ab4fc --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/signalbackup-tools/apple-sdk-missing-utimensat.patch @@ -0,0 +1,34 @@ +diff --git a/signalbackup/setfiletimestamp.cc b/signalbackup/setfiletimestamp.cc +index f53a168..d2d1c5e 100644 +--- a/signalbackup/setfiletimestamp.cc ++++ b/signalbackup/setfiletimestamp.cc +@@ -21,24 +21,23 @@ + + #if !defined(_WIN32) && !defined(__MINGW64__) + +-#include +-#include ++#include + + bool SignalBackup::setFileTimeStamp(std::string const &file, long long int time_usec) const + { +- struct timespec ntimes[] = ++ struct timeval ntimes[] = + { + { // ntimes[0] = + time_usec / 1000, // tv_sec, seconds +- (time_usec % 1000) * 1000 // tv_usec, nanoseconds ++ static_cast(time_usec) // tv_usec, nanoseconds + }, + { // ntimes[1] = + time_usec / 1000, // tv_sec, seconds +- (time_usec % 1000) * 1000 // tv_usec, nanoseconds ++ static_cast(time_usec) // tv_usec, nanoseconds + } + }; + +- return (utimensat(AT_FDCWD, file.c_str(), ntimes, 0) == 0); ++ return (utimes(file.c_str(), ntimes) == 0); + } + + #else // this is poorly tested, I don't have windows diff --git a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix new file mode 100644 index 000000000000..5da0536b3794 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, fetchFromGitHub, openssl, sqlite }: + +stdenv.mkDerivation rec { + pname = "signalbackup-tools"; + version = "20220107"; + + src = fetchFromGitHub { + owner = "bepaald"; + repo = pname; + rev = version; + sha256 = "sha256-sB8/xQgSORtwupcwSejKUhHoz04exdYS0ymefw9wXDQ="; + }; + + # Remove when Apple SDK is >= 10.13 + patches = lib.optional (stdenv.system == "x86_64-darwin") ./apple-sdk-missing-utimensat.patch; + + buildInputs = [ openssl sqlite ]; + buildFlags = [ + "-Wall" + "-Wextra" + "-Wshadow" + "-Wold-style-cast" + "-Woverloaded-virtual" + "-pedantic" + "-std=c++2a" + "-O3" + "-march=native" + ]; + buildPhase = '' + $CXX $buildFlags */*.cc *.cc -lcrypto -lsqlite3 -o signalbackup-tools + ''; + + installPhase = '' + mkdir -p $out/bin + cp signalbackup-tools $out/bin/ + ''; + + meta = with lib; { + description = "Tool to work with Signal Backup files"; + homepage = "https://github.com/bepaald/signalbackup-tools"; + license = licenses.gpl3Only; + maintainers = [ maintainers.malo ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix index af8826388977..d24cff9e86ce 100644 --- a/pkgs/applications/science/math/mathematica/default.nix +++ b/pkgs/applications/science/math/mathematica/default.nix @@ -1,167 +1,172 @@ -{ lib, stdenv -, coreutils -, patchelf -, requireFile -, callPackage +{ lib +, stdenv +, autoPatchelfHook +, buildEnv , makeWrapper +, requireFile , alsa-lib +, cups , dbus +, flite , fontconfig , freetype -, gcc +, gcc-unwrapped , glib -, libssh2 +, gmpxx +, keyutils +, libGL +, libGLU +, libpcap +, libtins +, libuuid +, libxkbcommon +, libxml2 +, llvmPackages_12 +, matio +, mpfr , ncurses , opencv4 +, openjdk11 , openssl +, pciutils +, tre , unixODBC , xkeyboard_config , xorg , zlib -, libxml2 -, libuuid , lang ? "en" -, libGL -, libGLU }: let - l10n = - import ./l10ns.nix { - lib = lib; - inherit requireFile lang; - }; -in -stdenv.mkDerivation rec { + l10n = import ./l10ns.nix { + inherit lib requireFile lang; + }; +in stdenv.mkDerivation { inherit (l10n) version name src; - buildInputs = [ - coreutils - patchelf + nativeBuildInputs = [ + autoPatchelfHook makeWrapper + ]; + + buildInputs = [ alsa-lib - coreutils + cups.lib dbus + flite fontconfig freetype - gcc.cc - gcc.libc glib - libssh2 - ncurses - opencv4 - openssl - stdenv.cc.cc.lib - unixODBC - xkeyboard_config - libxml2 - libuuid - zlib + gmpxx + keyutils.lib libGL libGLU + libpcap + libtins + libuuid + libxkbcommon + libxml2 + llvmPackages_12.libllvm.lib + matio + mpfr + ncurses + opencv4 + openjdk11 + openssl + pciutils + tre + unixODBC + xkeyboard_config ] ++ (with xorg; [ - libX11 - libXext - libXtst - libXi - libXmu - libXrender - libxcb - libXcursor - libXfixes - libXrandr libICE libSM + libX11 + libXScrnSaver + libXcomposite + libXcursor + libXdamage + libXext + libXfixes + libXi + libXinerama + libXmu + libXrandr + libXrender + libXtst + libxcb ]); - ldpath = lib.makeLibraryPath buildInputs - + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") - (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs); + wrapProgramFlags = [ + "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gcc-unwrapped.lib zlib ]}" + "--prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}" + # Fix libQt errors - #96490 + "--set USE_WOLFRAM_LD_LIBRARY_PATH 1" + # Fix xkeyboard config path for Qt + "--set QT_XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb" + ]; unpackPhase = '' - echo "=== Extracting makeself archive ===" - # find offset from file + runHook preUnpack + + # Find offset from file offset=$(${stdenv.shell} -c "$(grep -axm1 -e 'offset=.*' $src); echo \$offset" $src) - dd if="$src" ibs=$offset skip=1 | tar -xf - - cd Unix + tail -c +$(($offset + 1)) $src | tar -xf - + + runHook postUnpack ''; installPhase = '' - cd Installer - # don't restrict PATH, that has already been done - sed -i -e 's/^PATH=/# PATH=/' MathInstaller + runHook preInstall - # Fix the installation script as follows: - # 1. Adjust the shebang - # 2. Use the wrapper in the desktop items + cd "$TMPDIR/Unix/Installer" + + mkdir -p "$out/lib/udev/rules.d" + + # Patch MathInstaller's shebangs and udev rules dir + patchShebangs MathInstaller substituteInPlace MathInstaller \ - --replace "/bin/bash" "/bin/sh" \ - --replace "Executables/Mathematica" "../../bin/mathematica" + --replace /etc/udev/rules.d $out/lib/udev/rules.d - # Install the desktop items - export XDG_DATA_HOME="$out/share" + # Remove PATH restriction, root and avahi daemon checks, and hostname call + sed -i ' + s/^PATH=/# &/ + s/isRoot="false"/# &/ + s/^checkAvahiDaemon$/# &/ + s/`hostname`/""/ + ' MathInstaller - echo "=== Running MathInstaller ===" - ./MathInstaller -auto -createdir=y -execdir=$out/bin -targetdir=$out/libexec/Mathematica -silent + # NOTE: some files placed under HOME may be useful + XDG_DATA_HOME="$out/share" HOME="$TMPDIR/home" vernierLink=y \ + ./MathInstaller -execdir="$out/bin" -targetdir="$out/libexec/Mathematica" -auto -verbose -createdir=y - # Fix library paths - cd $out/libexec/Mathematica/Executables - for path in mathematica MathKernel Mathematica WolframKernel wolfram math; do - sed -i -e "2iexport LD_LIBRARY_PATH=${zlib}/lib:${stdenv.cc.cc.lib}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}\n" $path - done + # Check if MathInstaller produced any errors + errLog="$out/libexec/Mathematica/InstallErrors" + if [ -f "$errLog" ]; then + echo "Installation errors:" + cat "$errLog" + return 1 + fi - # Fix xkeyboard config path for Qt - for path in mathematica Mathematica; do - sed -i -e "2iexport QT_XKB_CONFIG_ROOT=\"${xkeyboard_config}/share/X11/xkb\"\n" $path - done - - # Remove some broken libraries - rm -f $out/libexec/Mathematica/SystemFiles/Libraries/Linux-x86-64/libz.so* - - # Set environment variable to fix libQt errors - see https://github.com/NixOS/nixpkgs/issues/96490 - wrapProgram $out/bin/mathematica --set USE_WOLFRAM_LD_LIBRARY_PATH 1 + runHook postInstall ''; preFixup = '' - echo "=== PatchElfing away ===" - # This code should be a bit forgiving of errors, unfortunately - set +e - find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do - type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') - if [ -z "$type" ]; then - : - elif [ "$type" == "EXEC" ]; then - echo "patching $f executable <<" - patchelf --shrink-rpath "$f" - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ - "$f" \ - && patchelf --shrink-rpath "$f" \ - || echo unable to patch ... ignoring 1>&2 - elif [ "$type" == "DYN" ]; then - echo "patching $f library <<" - patchelf \ - --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ - "$f" \ - && patchelf --shrink-rpath "$f" \ - || echo unable to patch ... ignoring 1>&2 - else - echo "not patching $f <<: unknown elf type" - fi + for bin in $out/libexec/Mathematica/Executables/*; do + wrapProgram "$bin" ''${wrapProgramFlags[@]} done ''; + dontConfigure = true; dontBuild = true; - # This is primarily an IO bound build; there's little benefit to building remotely. + # This is primarily an IO bound build; there's little benefit to building remotely preferLocalBuild = true; - # all binaries are already stripped + # All binaries are already stripped dontStrip = true; - # we did this in prefixup already - dontPatchELF = true; + # NOTE: Some deps are still not found; ignore for now + autoPatchelfIgnoreMissingDeps = true; meta = with lib; { description = "Wolfram Mathematica computational software system"; diff --git a/pkgs/applications/version-management/pijul/default.nix b/pkgs/applications/version-management/pijul/default.nix index ac3beb54f6ec..858f15a50bbe 100644 --- a/pkgs/applications/version-management/pijul/default.nix +++ b/pkgs/applications/version-management/pijul/default.nix @@ -13,14 +13,14 @@ rustPlatform.buildRustPackage rec { pname = "pijul"; - version = "1.0.0-alpha.57"; + version = "1.0.0-beta"; src = fetchCrate { inherit version pname; - sha256 = "sha256-HhGUoO8UHJkfQ5QQ/H+PT8mqvdPb8Ok4D3j7QArLBeA="; + sha256 = "sha256-s7fHg6Le4y0yAyxOQf6iUUHA4dYsamlTUb0KISOHI7Q="; }; - cargoSha256 = "sha256-SyyJqUC7bCUJf53/+GJ/7+huab8hycNABwAFaHHmJtY="; + cargoSha256 = "sha256-09PWy1yfr1FY2AsKaoZZswi4P5JdNcumIOmTm+M21UE="; doCheck = false; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/common-updater/scripts/update-source-version b/pkgs/common-updater/scripts/update-source-version index 0ac6b3cf8c28..88cf7d459a72 100755 --- a/pkgs/common-updater/scripts/update-source-version +++ b/pkgs/common-updater/scripts/update-source-version @@ -10,7 +10,8 @@ die() { usage() { echo "Usage: $scriptName [] []" - echo " [--version-key=] [--system=] [--file=] [--rev=]" + echo " [--version-key=] [--source-key=]" + echo " [--system=] [--file=] [--rev=]" echo " [--ignore-same-hash] [--print-changes]" } @@ -25,6 +26,9 @@ for arg in "$@"; do --version-key=*) versionKey="${arg#*=}" ;; + --source-key=*) + sourceKey="${arg#*=}" + ;; --file=*) nixFile="${arg#*=}" if [[ ! -f "$nixFile" ]]; then @@ -79,6 +83,10 @@ if [[ -z "$versionKey" ]]; then versionKey=version fi +if [[ -z "$sourceKey" ]]; then + sourceKey=src +fi + # Allow finding packages among flake outputs in repos using flake-compat. pname=$(nix-instantiate $systemArg --eval --strict -A "$attr.name" || echo) if [[ -z "$pname" ]]; then @@ -106,7 +114,7 @@ if [[ -z "$nixFile" ]]; then fi # flake-compat will return paths in the Nix store, we need to correct for that. - possiblyOutPath=$(nix-instantiate $systemArg --eval -E "with $importTree; outPath" | tr -d '"') + possiblyOutPath=$(nix-instantiate $systemArg --eval -E "with $importTree; outPath" 2>/dev/null | tr -d '"') if [[ -n "$possiblyOutPath" ]]; then outPathEscaped=$(echo "$possiblyOutPath" | sed 's#[$^*\\.[|]#\\&#g') pwdEscaped=$(echo "$PWD" | sed 's#[$^*\\.[|]#\\&#g') @@ -114,21 +122,21 @@ if [[ -z "$nixFile" ]]; then fi fi -oldHashAlgo=$(nix-instantiate $systemArg --eval --strict -A "$attr.src.drvAttrs.outputHashAlgo" | tr -d '"') -oldHash=$(nix-instantiate $systemArg --eval --strict -A "$attr.src.drvAttrs.outputHash" | tr -d '"') +oldHashAlgo=$(nix-instantiate $systemArg --eval --strict -A "$attr.$sourceKey.drvAttrs.outputHashAlgo" | tr -d '"') +oldHash=$(nix-instantiate $systemArg --eval --strict -A "$attr.$sourceKey.drvAttrs.outputHash" | tr -d '"') if [[ -z "$oldHashAlgo" || -z "$oldHash" ]]; then - die "Couldn't evaluate old source hash from '$attr.src'!" + die "Couldn't evaluate old source hash from '$attr.$sourceKey'!" fi if [[ $(grep --count "$oldHash" "$nixFile") != 1 ]]; then die "Couldn't locate old source hash '$oldHash' (or it appeared more than once) in '$nixFile'!" fi -oldUrl=$(nix-instantiate $systemArg --eval -E "with $importTree; builtins.elemAt ($attr.src.drvAttrs.urls or [ $attr.src.url ]) 0" | tr -d '"') +oldUrl=$(nix-instantiate $systemArg --eval -E "with $importTree; builtins.elemAt ($attr.$sourceKey.drvAttrs.urls or [ $attr.$sourceKey.url ]) 0" | tr -d '"') if [[ -z "$oldUrl" ]]; then - die "Couldn't evaluate source url from '$attr.src'!" + die "Couldn't evaluate source url from '$attr.$sourceKey'!" fi oldVersion=$(nix-instantiate $systemArg --eval -E "with $importTree; $attr.${versionKey} or (builtins.parseDrvName $attr.name).version" | tr -d '"') @@ -146,9 +154,9 @@ if [[ "$oldVersion" = "$newVersion" ]]; then fi if [[ -n "$newRevision" ]]; then - oldRevision=$(nix-instantiate $systemArg --eval -E "with $importTree; $attr.src.rev" | tr -d '"') + oldRevision=$(nix-instantiate $systemArg --eval -E "with $importTree; $attr.$sourceKey.rev" | tr -d '"') if [[ -z "$oldRevision" ]]; then - die "Couldn't evaluate source revision from '$attr.src'!" + die "Couldn't evaluate source revision from '$attr.$sourceKey'!" fi fi @@ -228,7 +236,7 @@ fi # If new hash not given on the command line, recalculate it ourselves. if [[ -z "$newHash" ]]; then - nix-build $systemArg --no-out-link -A "$attr.src" 2>"$attr.fetchlog" >/dev/null || true + nix-build $systemArg --no-out-link -A "$attr.$sourceKey" 2>"$attr.fetchlog" >/dev/null || true # FIXME: use nix-build --hash here once https://github.com/NixOS/nix/issues/1172 is fixed newHash=$(sed '1,/hash mismatch in fixed-output derivation/d' "$attr.fetchlog" | grep --perl-regexp --only-matching 'got: +.+[:-]\K.+') @@ -242,12 +250,12 @@ fi if [[ -z "$newHash" ]]; then cat "$attr.fetchlog" >&2 - die "Couldn't figure out new hash of '$attr.src'!" + die "Couldn't figure out new hash of '$attr.$sourceKey'!" fi if [[ -z "${ignoreSameHash}" && "$oldVersion" != "$newVersion" && "$oldHash" = "$newHash" ]]; then mv "$nixFile.bak" "$nixFile" - die "Both the old and new source hashes of '$attr.src' were equivalent. Please fix the package's source URL to be dependent on '\${version}'!" + die "Both the old and new source hashes of '$attr.$sourceKey' were equivalent. Please fix the package's source URL to be dependent on '\${version}'!" fi sed -i "$nixFile" -re "s|\"$tempHashEscaped\"|\"$newHash\"|" diff --git a/pkgs/desktops/cinnamon/nemo/default.nix b/pkgs/desktops/cinnamon/nemo/default.nix index 9a0e054fd81e..47e43758447c 100644 --- a/pkgs/desktops/cinnamon/nemo/default.nix +++ b/pkgs/desktops/cinnamon/nemo/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { pname = "nemo"; - version = "5.2.0"; + version = "5.2.3"; # TODO: add plugins support (see https://github.com/NixOS/nixpkgs/issues/78327) @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { owner = "linuxmint"; repo = pname; rev = version; - hash = "sha256-ehcqRlI1d/KWNas36dz+hb7KU1H8wtQHTpg2fz1XdXU="; + sha256 = "sha256-kPxwWciNf4KQx3JG1qPQcZJeOa4B+udMyQmH8A7JcfQ="; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/interpreters/ivy/default.nix b/pkgs/development/interpreters/ivy/default.nix new file mode 100644 index 000000000000..1e994a7a603e --- /dev/null +++ b/pkgs/development/interpreters/ivy/default.nix @@ -0,0 +1,24 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "ivy"; + version = "0.1.13"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "robpike"; + repo = "ivy"; + sha256 = "sha256-IiQrmmHitKUItm/ZSTQ3jGO3ls8vPPexyOtUvfq3yeU="; + }; + + vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="; + + subPackages = [ "." ]; + + meta = with lib; { + homepage = "https://github.com/robpike/ivy"; + description = "ivy, an APL-like calculator"; + license = licenses.bsd3; + maintainers = with maintainers; [ smasher164 ]; + }; +} diff --git a/pkgs/development/libraries/umockdev/default.nix b/pkgs/development/libraries/umockdev/default.nix index e69d0e968982..f85834e85202 100644 --- a/pkgs/development/libraries/umockdev/default.nix +++ b/pkgs/development/libraries/umockdev/default.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation rec { pname = "umockdev"; - version = "0.17.2"; + version = "0.17.5"; outputs = [ "bin" "out" "dev" "devdoc" ]; src = fetchurl { url = "https://github.com/martinpitt/umockdev/releases/download/${version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-D9Kb67HACi8guMoT5n3Yp9INigjuuGAIyKMgcICBJmA="; + sha256 = "sha256-9mNKYFiQtzkBTQEuVWIfR9+e2jAqDszlHGMEQpcRe8U="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pynut2/default.nix b/pkgs/development/python-modules/pynut2/default.nix new file mode 100644 index 000000000000..11313dcadc69 --- /dev/null +++ b/pkgs/development/python-modules/pynut2/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +}: + +buildPythonPackage rec { + pname = "pynut2"; + version = "2.1.2"; + + src = fetchFromGitHub { + owner = "mezz64"; + repo = "python-nut2"; + rev = version; + sha256 = "1lg7n1frndfgw73s0ssl1h7kc6zxm7fpiwlc6v6d60kxzaj1dphx"; + }; + + propagatedBuildInputs = [ + requests + ]; + + pythonImportsCheck = [ "pynut2.nut2" ]; + + # tests are unmaintained and broken + doCheck = false; + + meta = with lib; { + description = "API overhaul of PyNUT, a Python library to allow communication with NUT (Network UPS Tools) servers."; + homepage = "https://github.com/mezz64/python-nut2"; + license = with licenses; [ gpl3Plus ]; + maintainers = [ maintainers.luker ]; + }; +} diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 64b9d9ca4c22..a3d787ad8e9f 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -26,7 +26,7 @@ , file, libvirt, glib, vips, taglib, libopus, linux-pam, libidn, protobuf, fribidi, harfbuzz , bison, flex, pango, python3, patchelf, binutils, freetds, wrapGAppsHook, atk , bundler, libsass, libexif, libselinux, libsepol, shared-mime-info, libthai, libdatrie -, CoreServices, DarwinTools, cctools, libtool +, CoreServices, DarwinTools, cctools, libtool, discount }@args: let @@ -135,6 +135,17 @@ in hardeningDisable = [ "format" ]; }; + rdiscount = attrs: { + # Use discount from nixpkgs instead of vendored version + dontBuild = false; + buildInputs = [ discount ]; + patches = [ + # Adapted from Debian: + # https://sources.debian.org/data/main/r/ruby-rdiscount/2.1.8-1/debian/patches/01_use-system-libmarkdown.patch + ./rdiscount-use-nixpkgs-libmarkdown.patch + ]; + }; + ethon = attrs: { dontBuild = false; postPatch = '' diff --git a/pkgs/development/ruby-modules/gem-config/rdiscount-use-nixpkgs-libmarkdown.patch b/pkgs/development/ruby-modules/gem-config/rdiscount-use-nixpkgs-libmarkdown.patch new file mode 100644 index 000000000000..3539b80ae374 --- /dev/null +++ b/pkgs/development/ruby-modules/gem-config/rdiscount-use-nixpkgs-libmarkdown.patch @@ -0,0 +1,14 @@ +diff --git a/ext/extconf.rb b/ext/extconf.rb +index 30764cb..b87ac2b 100644 +--- a/ext/extconf.rb ++++ b/ext/extconf.rb +@@ -46,4 +46,9 @@ if /mswin/.match RbConfig::CONFIG['host_os'] + $defs.push("-Dinline=__inline") + end + ++$srcs = %w[ ++ rdiscount.c ++] ++have_library('markdown') ++ + create_makefile('rdiscount') diff --git a/pkgs/development/tools/ronn/default.nix b/pkgs/development/tools/ronn/default.nix index 3569638b2183..4d06db77a692 100644 --- a/pkgs/development/tools/ronn/default.nix +++ b/pkgs/development/tools/ronn/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, bundlerEnv, bundlerUpdateScript, makeWrapper, groff }: +{ stdenv, lib, bundlerEnv, bundlerUpdateScript, makeWrapper, groff, callPackage }: stdenv.mkDerivation rec { pname = "ronn"; @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { passthru.updateScript = bundlerUpdateScript "ronn"; + passthru.tests.reproducible-html-manpage = callPackage ./test-reproducible-html.nix { }; + meta = with lib; { description = "markdown-based tool for building manpages"; homepage = "https://rtomayko.github.io/ronn/"; diff --git a/pkgs/development/tools/ronn/test-reproducible-html.nix b/pkgs/development/tools/ronn/test-reproducible-html.nix new file mode 100644 index 000000000000..6bc9d6cdbf9f --- /dev/null +++ b/pkgs/development/tools/ronn/test-reproducible-html.nix @@ -0,0 +1,30 @@ +{ runCommand +, diffutils +, ronn +}: +runCommand "ronn-test-reproducible-html" { } '' + set -euo pipefail + + cat > aprog.1.ronn << EOF + aprog + ===== + + ## AUTHORS + + Vincent Haupert + EOF + + # We have to repeat the manpage generation a few times to be confident + # it is in fact reproducible. + for i in {1..20}; do + ${ronn}/bin/ronn --html --pipe aprog.1.ronn > aprog.1.html-1 + ${ronn}/bin/ronn --html --pipe aprog.1.ronn > aprog.1.html-2 + + ${diffutils}/bin/diff -q aprog.1.html-1 aprog.1.html-2 \ + || (printf 'The HTML manpage is not reproducible (round %d)' "$i" && exit 1) + done + + echo 'The HTML manpage appears reproducible' + + mkdir $out +'' diff --git a/pkgs/development/tools/rust/svd2rust/default.nix b/pkgs/development/tools/rust/svd2rust/default.nix index acf86ee50a74..20501594c439 100644 --- a/pkgs/development/tools/rust/svd2rust/default.nix +++ b/pkgs/development/tools/rust/svd2rust/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "svd2rust"; - version = "0.19.0"; + version = "0.21.0"; src = fetchCrate { inherit pname version; - sha256 = "sha256-LNJd88Gw8HaE1qnRbD7mipVEFgG7jCsyUu9pbwY/4JY="; + sha256 = "0mxzbbxrg1jysxpjqcvgwwmh8qf0lyf64fl1gxxp0whph0x279qj"; }; - cargoSha256 = "sha256-Qg/wA3R98FAb8UZ5s7GOEgOeifrqwFJ4lg0BC2SZOE8="; + cargoSha256 = "0kvya6swx1nsxxlhn2w8x4dhl4j3v56jxqr2h259cx6lzv3xjhin"; buildInputs = lib.optional stdenv.isDarwin libiconv; diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 8888fba7b74d..2169c5c7b98f 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -589,7 +589,7 @@ "nuki" = ps: with ps; [ pynuki ]; "numato" = ps: with ps; [ ]; # missing inputs: numato-gpio "number" = ps: with ps; [ ]; - "nut" = ps: with ps; [ ]; # missing inputs: pynut2 + "nut" = ps: with ps; [ pynut2 ]; "nws" = ps: with ps; [ pynws ]; "nx584" = ps: with ps; [ pynx584 ]; "nzbget" = ps: with ps; [ ]; # missing inputs: pynzbgetapi @@ -1348,6 +1348,7 @@ "nsw_rural_fire_service_feed" "nuki" "number" + "nut" "nws" "nx584" "octoprint" diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index 1d26379c396a..8cc39c1f44af 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -1,10 +1,8 @@ { lib , mkDerivation , fetchurl -, fetchpatch , variant ? "standalone" , fetchFromGitHub -, fetchFromGitLab , cmake , pkg-config , opencv3 @@ -20,6 +18,12 @@ , gimp ? null , qtbase , qttools +, writeShellScript +, common-updater-scripts +, gnugrep +, gnused +, coreutils +, jq }: let @@ -52,61 +56,42 @@ assert lib.assertMsg (builtins.all (d: d != null) variants.${variant}.extraDeps mkDerivation rec { pname = "gmic-qt${lib.optionalString (variant != "standalone") "-${variant}"}"; - version = "2.7.1"; + version = "3.0.0"; gmic-community = fetchFromGitHub { owner = "dtschump"; repo = "gmic-community"; - rev = "3fd528f20a2a7d651e96078c205ff21efb9cdd1a"; - sha256 = "08d37b49qgh5d4rds7hvr5wjj4p1y8cnbidz1cyqsibq0555pwq2"; + rev = "df23b08bc52767762f0e38d040cd8ffeea4b865e"; + sha256 = "euk5RsFPBgx2czAukPRdi/O4ahgXO8J8VJdiGHNge5M="; }; - CImg = fetchFromGitLab { - domain = "framagit.org"; + CImg = fetchFromGitHub { owner = "dtschump"; repo = "CImg"; rev = "v.${version}"; - sha256 = "1mfkjvf5r3ppc1dd6yvqn7xlhgzfg9k1k5v2sq2k9m70g8p7rgpd"; + sha256 = "dC4VuWTz0uyFxLjBQ+2ggndHaCErcoI7tJMfkqbWmeg="; }; gmic_stdlib = fetchurl { name = "gmic_stdlib.h"; url = "http://gmic.eu/gmic_stdlib${lib.replaceStrings ["."] [""] version}.h"; - sha256 = "0v12smknr1s44s6wq2gbnw0hb98xrwp6i3zg9wf49cl7s9qf76j3"; + sha256 = "CAYSxw5NCmE29hie1/J1csBcdQvIrmZ/+mNMl0sLLGI="; }; gmic = fetchFromGitHub { owner = "dtschump"; repo = "gmic"; rev = "v.${version}"; - sha256 = "0pa6kflr1gqgzh8rk7bylvkxs989r5jy0q7b62mnzx8895slwfb5"; + sha256 = "PyeJmjOqjbHlZ1Xl3IpoOD6oZEcUrHNHqF7Ft1RZDL4="; }; gmic_qt = fetchFromGitHub { owner = "c-koi"; repo = "gmic-qt"; rev = "v.${version}"; - sha256 = "08a0660083wv5fb1w9qqhm4f8cfwbqq723qzqq647mid1n7sy959"; + sha256 = "nENXumOArRAHENqnBUjM7m+I5hf/WAFTVfm6cJgnv+0="; }; - patches = [ - # Install GIMP plug-in to a correct destination - # https://github.com/c-koi/gmic-qt/pull/78 - ./fix-gimp-plugin-path.patch - ]; - - unpackPhase = '' - cp -r ${gmic} gmic - ln -s ${gmic-community} gmic-community - cp -r ${gmic_qt} gmic_qt - chmod -R +w gmic gmic_qt - ln -s ${CImg} CImg - - cp ${gmic_stdlib} gmic/src/gmic_stdlib.h - - cd gmic_qt - ''; - nativeBuildInputs = [ cmake pkg-config @@ -130,15 +115,54 @@ mkDerivation rec { "-DGMIC_QT_HOST=${if variant == "standalone" then "none" else variant}" ]; - postFixup = lib.optionalString (variant == "gimp") '' - echo "wrapping $out/${gimp.targetPluginDir}/gmic_gimp_qt" - wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt" + unpackPhase = '' + cp -r ${gmic} gmic + ln -s ${gmic-community} gmic-community + cp -r ${gmic_qt} gmic_qt + chmod -R +w gmic gmic_qt + ln -s ${CImg} CImg + + cp ${gmic_stdlib} gmic/src/gmic_stdlib.h + + cd gmic_qt ''; + postFixup = lib.optionalString (variant == "gimp") '' + echo "wrapping $out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt" + wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt" + ''; + + passthru = { + updateScript = writeShellScript "${pname}-update-script" '' + set -o errexit + PATH=${lib.makeBinPath [ common-updater-scripts curl gnugrep gnused coreutils jq ]} + + latestVersion=$(curl 'https://gmic.eu/files/source/' | grep -E 'gmic_[^"]+\.tar\.gz' | sed -E 's/.+&1 >/dev/null | tee eval-warnings.log + # Catch any trace calls not caught by NIX_ABORT_ON_WARN (lib.warn) if [ -s eval-warnings.log ]; then echo "Nixpkgs on $platform evaluated with warnings, aborting" exit 1 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 41c308c35451..9bb000e68c50 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6052,6 +6052,8 @@ in { pynuki = callPackage ../development/python-modules/pynuki { }; + pynut2 = callPackage ../development/python-modules/pynut2 { }; + pynws = callPackage ../development/python-modules/pynws { }; pynx584 = callPackage ../development/python-modules/pynx584 { };