diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index f8e36eb1646c..b57b44414d21 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -832,7 +832,7 @@ in pkgs.gawk pkgs.gnugrep pkgs.gnused - pkgs.nettools + pkgs.hostname-debian pkgs.util-linux ]; }; diff --git a/nixos/modules/virtualisation/ec2-data.nix b/nixos/modules/virtualisation/ec2-data.nix index 84508da0c5a0..63fc61f12a78 100644 --- a/nixos/modules/virtualisation/ec2-data.nix +++ b/nixos/modules/virtualisation/ec2-data.nix @@ -34,7 +34,7 @@ with lib; ${optionalString (config.networking.hostName == "") '' echo "setting host name..." if [ -s /etc/ec2-metadata/hostname ]; then - ${pkgs.nettools}/bin/hostname $(cat /etc/ec2-metadata/hostname) + ${lib.getExe hostname-debian} -F /etc/ec2-metadata/hostname fi ''} diff --git a/pkgs/by-name/ho/hostname-debian/package.nix b/pkgs/by-name/ho/hostname-debian/package.nix index ca2c7866ef4b..631a7c7a98e7 100644 --- a/pkgs/by-name/ho/hostname-debian/package.nix +++ b/pkgs/by-name/ho/hostname-debian/package.nix @@ -1,27 +1,32 @@ { stdenv, lib, - fetchurl, + fetchFromGitLab, }: stdenv.mkDerivation rec { pname = "hostname-debian"; - version = "3.23"; + version = "3.25"; - src = fetchurl { - url = "https://deb.debian.org/debian/pool/main/h/hostname/hostname_${version}.tar.gz"; - sha256 = "sha256-vG0ZVLIoSYaf+LKmAuOfCLFwL2htS1jdeSfN61tIdu8="; + outputs = [ + "out" + "man" + ]; + + src = fetchFromGitLab { + domain = "salsa.debian.org"; + owner = "meskes"; + repo = "hostname"; + tag = "debian/${version}"; + hash = "sha256-Yq8P5bF/RRZnWuFW0y2u08oZrydAKfopOtbrwbeIu3w="; }; - postPatch = '' - substituteInPlace Makefile --replace 'install -o root -g root' 'install' - ''; makeFlags = [ - "BINDIR=$(out)/bin" - "MANDIR=$(out)/share/man" + "prefix=${placeholder "out"}" ]; meta = with lib; { + changelog = "https://salsa.debian.org/meskes/hostname/-/blob/${src.tag}/debian/changelog"; description = "Utility to set/show the host name or domain name"; longDescription = '' This package provides commands which can be used to display the system's @@ -29,6 +34,7 @@ stdenv.mkDerivation rec { ''; homepage = "https://tracker.debian.org/pkg/hostname"; license = licenses.gpl2Plus; + mainProgram = "hostname"; maintainers = with maintainers; [ posch ]; platforms = platforms.gnu; }; diff --git a/pkgs/by-name/xd/xdg-utils/package.nix b/pkgs/by-name/xd/xdg-utils/package.nix index 60ab18c0e4a7..0b26dfd1b128 100644 --- a/pkgs/by-name/xd/xdg-utils/package.nix +++ b/pkgs/by-name/xd/xdg-utils/package.nix @@ -21,8 +21,8 @@ glib, gnugrep, gnused, + hostname-debian, jq, - nettools, procps, which, xdg-user-dirs, @@ -166,7 +166,7 @@ let scripts = [ "bin/xdg-open" ]; interpreter = "${bash}/bin/bash"; inputs = commonDeps ++ [ - nettools + hostname-debian glib.bin "${placeholder "out"}/bin" ]; @@ -206,7 +206,7 @@ let scripts = [ "bin/xdg-screensaver" ]; interpreter = "${bash}/bin/bash"; inputs = commonDeps ++ [ - nettools + hostname-debian perl procps ]; @@ -340,7 +340,6 @@ stdenv.mkDerivation (self: { preferLocalBuild = true; xenias = lib.mapAttrsToList (hash: urls: fetchurl { inherit hash urls; }) { "sha256-SL95tM1AjOi7vDnCyT10s0tvQvc+ZSZBbkNOYXfbOy0=" = [ - "https://staging.cohostcdn.org/attachment/0f5d9832-0cda-4d07-b35f-832b287feb6c/kernelkisser.png" "https://static1.e621.net/data/0e/76/0e7672980d48e48c2d1373eb2505db5a.png" ]; "sha256-Si9AtB7J9o6rK/oftv+saST77CNaeWomWU5ECfbRioM=" = [