From 9ca7c79ed2cf8a223e1e9a8610c8157f765ddc6e Mon Sep 17 00:00:00 2001 From: aktaboot Date: Tue, 16 Apr 2024 17:24:23 +0200 Subject: [PATCH 1/2] dogedns: init at 0.2.6 --- pkgs/by-name/do/dogedns/package.nix | 47 +++++++++++++++++++ .../by-name/do/dogedns/remove-date-info.patch | 11 +++++ 2 files changed, 58 insertions(+) create mode 100644 pkgs/by-name/do/dogedns/package.nix create mode 100644 pkgs/by-name/do/dogedns/remove-date-info.patch diff --git a/pkgs/by-name/do/dogedns/package.nix b/pkgs/by-name/do/dogedns/package.nix new file mode 100644 index 000000000000..5903dc5568ca --- /dev/null +++ b/pkgs/by-name/do/dogedns/package.nix @@ -0,0 +1,47 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +, stdenv +, pkg-config +, openssl +, pandoc +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "dogedns"; + version = "0.2.6"; + + src = fetchFromGitHub { + owner = "Dj-Codeman"; + repo = "doge"; + rev = "6dd0383f31c096bfe2b6918c36b6e2c48414e753"; + hash = "sha256-cvqDSTHFf/le2jItGTSkAGURj64WRvOmMRI+vFH0/50="; + }; + + cargoHash = "sha256-v9AuX7FZfy18yu4P9ovHsL5AQIYhPa8NEsMziEeHCJ8="; + + 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 pandoc ] + ++ lib.optionals stdenv.isLinux [ pkg-config ]; + buildInputs = lib.optionals stdenv.isLinux [ openssl ] + ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + + postInstall = '' + installShellCompletion completions/doge.{bash,fish,zsh} + installManPage ./target/man/*.1 + ''; + + meta = with lib; { + description = "Reviving A command-line DNS client"; + homepage = "https://github.com/Dj-Codeman/doge"; + license = licenses.eupl12; + mainProgram = "doge"; + }; +} diff --git a/pkgs/by-name/do/dogedns/remove-date-info.patch b/pkgs/by-name/do/dogedns/remove-date-info.patch new file mode 100644 index 000000000000..0495ec4db461 --- /dev/null +++ b/pkgs/by-name/do/dogedns/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(beta debug build!)\\0m\n\\1;4;34m{}\\0m", tagline, version_string(), url) + } + else if is_development_version() { +- format!("{}\nv{} [{}] built on {} \\1;31m(beta-release!)\\0m\n\\1;4;34m{}\\0m", tagline, version_string(), git_hash(), build_date(), url) ++ format!("{}\nv{} [nixpkgs] \\1;31m(beta-release!)\\0m\n\\1;4;34m{}\\0m", tagline, version_string(), url) + } + else { + format!("{}\nv{}\n\\1;4;34m{}\\0m", tagline, version_string(), url) From 6ec76d93988e9562b47497a7edc9a131e39de08a Mon Sep 17 00:00:00 2001 From: aktaboot Date: Fri, 19 Apr 2024 13:13:52 +0200 Subject: [PATCH 2/2] maintainers: add aktaboot --- maintainers/maintainer-list.nix | 6 ++++++ pkgs/by-name/do/dogedns/package.nix | 1 + 2 files changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 74e66ce95ad6..507dc2fdfe6c 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -790,6 +790,12 @@ githubId = 20405311; name = "Aksh Gupta"; }; + aktaboot = { + email = "akhtaboo@protonmail.com"; + github = "aktaboot"; + githubId = 120214979; + name = "aktaboot"; + }; al3xtjames = { email = "nix@alextjam.es"; github = "al3xtjames"; diff --git a/pkgs/by-name/do/dogedns/package.nix b/pkgs/by-name/do/dogedns/package.nix index 5903dc5568ca..0c94a9506d2c 100644 --- a/pkgs/by-name/do/dogedns/package.nix +++ b/pkgs/by-name/do/dogedns/package.nix @@ -43,5 +43,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/Dj-Codeman/doge"; license = licenses.eupl12; mainProgram = "doge"; + maintainers = with maintainers; [ aktaboot ]; }; }