From c766d9dd8dad7f7913dc91afd3b020cc569dc61f Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 14 Jan 2023 13:06:51 -0500 Subject: [PATCH] dogdns: fix build, add figsoda as a maintainer --- pkgs/tools/networking/dogdns/default.nix | 8 +++++++- pkgs/tools/networking/dogdns/remove-date-info.patch | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/networking/dogdns/remove-date-info.patch diff --git a/pkgs/tools/networking/dogdns/default.nix b/pkgs/tools/networking/dogdns/default.nix index 288c5a073820..c69b3d1c74a9 100644 --- a/pkgs/tools/networking/dogdns/default.nix +++ b/pkgs/tools/networking/dogdns/default.nix @@ -21,6 +21,12 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-y3T0vXg7631FZ4bzcbQjz3Buui/DFxh9LG8BZWwynp0="; }; + patches = [ + # remove date info to make the build reproducible + # remove commit hash to avoid dependency on git and the need to keep `.git` + ./remove-date-info.patch + ]; + nativeBuildInputs = [ installShellFiles just pandoc ] ++ lib.optionals stdenv.isLinux [ pkg-config ]; buildInputs = lib.optionals stdenv.isLinux [ openssl ] @@ -43,7 +49,7 @@ rustPlatform.buildRustPackage rec { description = "Command-line DNS client"; homepage = "https://dns.lookup.dog"; license = licenses.eupl12; - maintainers = with maintainers; [ bbigras ]; + maintainers = with maintainers; [ bbigras figsoda ]; mainProgram = "dog"; }; } diff --git a/pkgs/tools/networking/dogdns/remove-date-info.patch b/pkgs/tools/networking/dogdns/remove-date-info.patch new file mode 100644 index 000000000000..539559a3911e --- /dev/null +++ b/pkgs/tools/networking/dogdns/remove-date-info.patch @@ -0,0 +1,11 @@ +--- a/build.rs ++++ b/build.rs +@@ -34,7 +34,7 @@ fn main() -> io::Result<()> { + format!("{}\nv{} \\1;31m(pre-release debug build!)\\0m\n\\1;4;34m{}\\0m", tagline, version_string(), url) + } + else if is_development_version() { +- format!("{}\nv{} [{}] built on {} \\1;31m(pre-release!)\\0m\n\\1;4;34m{}\\0m", tagline, version_string(), git_hash(), build_date(), url) ++ format!("{}\nv{} [nixpkgs] \\1;31m(pre-release!)\\0m\n\\1;4;34m{}\\0m", tagline, version_string(), url) + } + else { + format!("{}\nv{}\n\\1;4;34m{}\\0m", tagline, version_string(), url)