From 4f891220c1fa7d6d3c6be70312e9e979d20a70c1 Mon Sep 17 00:00:00 2001 From: reo101 Date: Fri, 2 Aug 2024 10:29:34 +0300 Subject: [PATCH] feat(pkgs): add `sdcv` --- pkgs/sdcv/default.nix | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkgs/sdcv/default.nix diff --git a/pkgs/sdcv/default.nix b/pkgs/sdcv/default.nix new file mode 100644 index 0000000..85636d2 --- /dev/null +++ b/pkgs/sdcv/default.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, darwin +# Fetchers +, fetchFromGitHub +# Build inputs +, cmake +, pkg-config +, iconv +, pcre +, readline +, glib +, zlib +, ... +}: + +stdenv.mkDerivation rec { + pname = "sdcv"; + version = "0.5.5"; + + src = fetchFromGitHub { + owner = "Dushistov"; + repo = pname; + rev = "v${version}"; + hash = "sha256-EyvljVXhOsdxIYOGTzD+T16nvW7/RNx3DuQ2OdhjXJ4="; + }; + + nativeBuildInputs = [ + pkg-config + cmake + iconv + ]; + + buildInputs = [ + pcre + readline + glib + zlib + ]; + + cmakeFlags = [ + # BUG: does not exit + "-DENABLE_NLS=OFF" + ]; + + meta = with lib; { + description = "Console version of StarDict"; + homepage = "https://github.com/Dushistov/sdcv"; + license = licenses.gpl2; + # maintainers = with maintainers; [ reo101 ]; + }; +}