about summary refs log tree commit diff
diff options
context:
space:
mode:
authormatthewcroughan <matt@croughan.sh>2023-12-30 20:10:32 +0000
committerEmery Hemingway <ehmry@posteo.net>2024-05-02 15:20:30 +0000
commit9cef9f6d3932ff1499a1d6660b15e2ed4c2192b3 (patch)
treedcd85cd84fb48e6dbb041707c69ac430d8837b3b
parenta50a19435946631427e209cfd0e047ae8edb1716 (diff)
nss-xhosts: init at unstable-2023-12-30
-rw-r--r--pkgs/by-name/xh/xhosts/Cargo.lock67
-rw-r--r--pkgs/by-name/xh/xhosts/package.nix34
2 files changed, 101 insertions, 0 deletions
diff --git a/pkgs/by-name/xh/xhosts/Cargo.lock b/pkgs/by-name/xh/xhosts/Cargo.lock
new file mode 100644
index 0000000000000..3b686a7cac57b
--- /dev/null
+++ b/pkgs/by-name/xh/xhosts/Cargo.lock
@@ -0,0 +1,67 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.151"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4"
+
+[[package]]
+name = "libnss"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48b67ef5ebef2a035ac8106c9b71176b6246be2a580ff4ee94bb80919e55b34c"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "paste 0.1.18",
+]
+
+[[package]]
+name = "paste"
+version = "0.1.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880"
+dependencies = [
+ "paste-impl",
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "paste"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
+
+[[package]]
+name = "paste-impl"
+version = "0.1.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6"
+dependencies = [
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "proc-macro-hack"
+version = "0.5.20+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
+
+[[package]]
+name = "xhosts"
+version = "0.1.0"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "libnss",
+ "paste 1.0.14",
+]
diff --git a/pkgs/by-name/xh/xhosts/package.nix b/pkgs/by-name/xh/xhosts/package.nix
new file mode 100644
index 0000000000000..ba6b5a184d3f7
--- /dev/null
+++ b/pkgs/by-name/xh/xhosts/package.nix
@@ -0,0 +1,34 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+}:
+
+rustPlatform.buildRustPackage {
+  pname = "nss-xhosts";
+  version = "unstable-2023-12-30";
+
+  src = fetchFromGitHub {
+    owner = "dvob";
+    repo = "nss-xhosts";
+    rev = "78658cc24abb2546936f2b298a27d4abdf629186";
+    hash = "sha256-saK9CxN4Ek1QBlPOydzEFei1217gPe5MZrUaUHh80hI=";
+  };
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+  };
+
+  postPatch = ''
+    ln -s ${./Cargo.lock} Cargo.lock
+  '';
+
+  postFixup = "mv $out/lib/*.so $out/lib/libnss_xhosts.so.2";
+
+  meta = with lib; {
+    description = "NSS Module which supports wildcards";
+    homepage = "https://github.com/dvob/nss-xhosts";
+    license = licenses.mit;
+    maintainers = with maintainers; [ matthewcroughan ];
+    mainProgram = "nss-xhosts";
+  };
+}