diff options
author | Aleksana <me@aleksana.moe> | 2024-04-20 21:23:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-20 21:23:12 +0800 |
commit | aa65fe8b64485a03dd0a103c9fcd9f6497fe21b2 (patch) | |
tree | 4da728d8951184b6a4b433b1621bb9681b2e0ebb /pkgs | |
parent | a9c8cc3ba68d327aea5359cf01c7f8ed766a5d55 (diff) | |
parent | 6ec76d93988e9562b47497a7edc9a131e39de08a (diff) |
Merge pull request #305139 from aktaboot/init-dogedns
dogedns: init at 0.2.6
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/do/dogedns/package.nix | 48 | ||||
-rw-r--r-- | pkgs/by-name/do/dogedns/remove-date-info.patch | 11 |
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/by-name/do/dogedns/package.nix b/pkgs/by-name/do/dogedns/package.nix new file mode 100644 index 0000000000000..0c94a9506d2c0 --- /dev/null +++ b/pkgs/by-name/do/dogedns/package.nix @@ -0,0 +1,48 @@ +{ 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"; + maintainers = with maintainers; [ aktaboot ]; + }; +} 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 0000000000000..0495ec4db4611 --- /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) |