summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/tools/networking/userhosts/default.nix23
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/tools/networking/userhosts/default.nix b/pkgs/tools/networking/userhosts/default.nix
new file mode 100644
index 00000000000..6cec402638a
--- /dev/null
+++ b/pkgs/tools/networking/userhosts/default.nix
@@ -0,0 +1,23 @@
+{lib, stdenv, fetchFromGitHub, pkg-config, ncurses, libnl }:
+
+stdenv.mkDerivation rec {
+  pname = "userhosts";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "figiel";
+    repo = "hosts";
+    rev = "v${version}";
+    hash = "sha256-9uF0fYl4Zz/Ia2UKx7CBi8ZU8jfWoBfy2QSgTSwXo5A";
+  };
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "A libc wrapper providing per-user hosts file";
+    homepage = "https://github.com/figiel/hosts";
+    maintainers = [ maintainers.bobvanderlinden ];
+    license = licenses.cc0;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f03461d825d..174927ce3af 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -21951,6 +21951,8 @@ in
 
   usbutils = callPackage ../os-specific/linux/usbutils { };
 
+  userhosts = callPackage ../tools/networking/userhosts { };
+
   usermount = callPackage ../os-specific/linux/usermount { };
 
   util-linux = if stdenv.isLinux then callPackage ../os-specific/linux/util-linux { }