View Issue Details

IDProjectCategoryView StatusLast Update
0000711fileGeneralpublic2026-01-28 17:06
Reporterdoronbehar Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version5.46 
Summary0000711: `file` detects this Nix file as HTML from some reason
DescriptionHey, as described in the summary. See attached file. I expect it to report the file is `Unicode text, UTF-8 text`.
TagsNo tags attached.

Activities

doronbehar

2026-01-28 17:06

reporter  

package.nix (1,333 bytes)   
{
  lib,
  stdenv,
  fetchurl,
  libmnl,
  pkg-config,
  writeScript,
}:

stdenv.mkDerivation rec {
  pname = "ethtool";
  version = "6.15";

  src = fetchurl {
    url = "mirror://kernel/software/network/ethtool/ethtool-${version}.tar.xz";
    hash = "sha256-lHfDZRFNkQEgquxTNqHRYZbIM9hIb3xtpnvt71eICt4=";
  };

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = [
    libmnl
  ];

  enableParallelBuilding = true;

  passthru = {
    updateScript = writeScript "update-ethtool" ''
      #!/usr/bin/env nix-shell
      #!nix-shell -i bash -p curl pcre common-updater-scripts

      set -eu -o pipefail

      # Expect the text in format of '<a href="ethtool-VER.tar.xz">...</a>'
      # The page always lists versions newest to oldest. Pick the first one.
      new_version="$(curl -s https://mirrors.edge.kernel.org/pub/software/network/ethtool/ |
          pcregrep -o1 '<a href="ethtool-([0-9.]+)[.]tar[.]xz">' |
          head -n1)"
      update-source-version ethtool "$new_version"
    '';
  };

  meta = {
    description = "Utility for controlling network drivers and hardware";
    homepage = "https://www.kernel.org/pub/software/network/ethtool/";
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ bjornfor ];
    mainProgram = "ethtool";
  };
}
package.nix (1,333 bytes)   

Issue History

Date Modified Username Field Change
2026-01-28 17:06 doronbehar New Issue
2026-01-28 17:06 doronbehar File Added: package.nix