hostname-debian: set main program and use in more places (#422282)
This commit is contained in:
commit
20a1869006
@ -832,7 +832,7 @@ in
|
|||||||
pkgs.gawk
|
pkgs.gawk
|
||||||
pkgs.gnugrep
|
pkgs.gnugrep
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
pkgs.nettools
|
pkgs.hostname-debian
|
||||||
pkgs.util-linux
|
pkgs.util-linux
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ with lib;
|
|||||||
${optionalString (config.networking.hostName == "") ''
|
${optionalString (config.networking.hostName == "") ''
|
||||||
echo "setting host name..."
|
echo "setting host name..."
|
||||||
if [ -s /etc/ec2-metadata/hostname ]; then
|
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
|
fi
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
@ -1,27 +1,32 @@
|
|||||||
{
|
{
|
||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
fetchurl,
|
fetchFromGitLab,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "hostname-debian";
|
pname = "hostname-debian";
|
||||||
version = "3.23";
|
version = "3.25";
|
||||||
|
|
||||||
src = fetchurl {
|
outputs = [
|
||||||
url = "https://deb.debian.org/debian/pool/main/h/hostname/hostname_${version}.tar.gz";
|
"out"
|
||||||
sha256 = "sha256-vG0ZVLIoSYaf+LKmAuOfCLFwL2htS1jdeSfN61tIdu8=";
|
"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 = [
|
makeFlags = [
|
||||||
"BINDIR=$(out)/bin"
|
"prefix=${placeholder "out"}"
|
||||||
"MANDIR=$(out)/share/man"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
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";
|
description = "Utility to set/show the host name or domain name";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
This package provides commands which can be used to display the system's
|
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";
|
homepage = "https://tracker.debian.org/pkg/hostname";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
|
mainProgram = "hostname";
|
||||||
maintainers = with maintainers; [ posch ];
|
maintainers = with maintainers; [ posch ];
|
||||||
platforms = platforms.gnu;
|
platforms = platforms.gnu;
|
||||||
};
|
};
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
glib,
|
glib,
|
||||||
gnugrep,
|
gnugrep,
|
||||||
gnused,
|
gnused,
|
||||||
|
hostname-debian,
|
||||||
jq,
|
jq,
|
||||||
nettools,
|
|
||||||
procps,
|
procps,
|
||||||
which,
|
which,
|
||||||
xdg-user-dirs,
|
xdg-user-dirs,
|
||||||
@ -166,7 +166,7 @@ let
|
|||||||
scripts = [ "bin/xdg-open" ];
|
scripts = [ "bin/xdg-open" ];
|
||||||
interpreter = "${bash}/bin/bash";
|
interpreter = "${bash}/bin/bash";
|
||||||
inputs = commonDeps ++ [
|
inputs = commonDeps ++ [
|
||||||
nettools
|
hostname-debian
|
||||||
glib.bin
|
glib.bin
|
||||||
"${placeholder "out"}/bin"
|
"${placeholder "out"}/bin"
|
||||||
];
|
];
|
||||||
@ -206,7 +206,7 @@ let
|
|||||||
scripts = [ "bin/xdg-screensaver" ];
|
scripts = [ "bin/xdg-screensaver" ];
|
||||||
interpreter = "${bash}/bin/bash";
|
interpreter = "${bash}/bin/bash";
|
||||||
inputs = commonDeps ++ [
|
inputs = commonDeps ++ [
|
||||||
nettools
|
hostname-debian
|
||||||
perl
|
perl
|
||||||
procps
|
procps
|
||||||
];
|
];
|
||||||
@ -340,7 +340,6 @@ stdenv.mkDerivation (self: {
|
|||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
xenias = lib.mapAttrsToList (hash: urls: fetchurl { inherit hash urls; }) {
|
xenias = lib.mapAttrsToList (hash: urls: fetchurl { inherit hash urls; }) {
|
||||||
"sha256-SL95tM1AjOi7vDnCyT10s0tvQvc+ZSZBbkNOYXfbOy0=" = [
|
"sha256-SL95tM1AjOi7vDnCyT10s0tvQvc+ZSZBbkNOYXfbOy0=" = [
|
||||||
"https://staging.cohostcdn.org/attachment/0f5d9832-0cda-4d07-b35f-832b287feb6c/kernelkisser.png"
|
|
||||||
"https://static1.e621.net/data/0e/76/0e7672980d48e48c2d1373eb2505db5a.png"
|
"https://static1.e621.net/data/0e/76/0e7672980d48e48c2d1373eb2505db5a.png"
|
||||||
];
|
];
|
||||||
"sha256-Si9AtB7J9o6rK/oftv+saST77CNaeWomWU5ECfbRioM=" = [
|
"sha256-Si9AtB7J9o6rK/oftv+saST77CNaeWomWU5ECfbRioM=" = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user