about summary refs log tree commit diff
path: root/pkgs/by-name/ls
diff options
context:
space:
mode:
authorNikolay Korotkiy <sikmir@disroot.org>2024-02-23 01:28:55 +0400
committerNikolay Korotkiy <sikmir@disroot.org>2024-02-23 01:28:55 +0400
commit52eace11d2ea1fb7863cb06756b6a45c01303bcd (patch)
treefbe789c05499a6731f33339b302744946eaff758 /pkgs/by-name/ls
parentce2f3c81a04ab1cb73ee4135b05f356c4546588e (diff)
lsd2dsl: migrate to by-name
Diffstat (limited to 'pkgs/by-name/ls')
-rw-r--r--pkgs/by-name/ls/lsd2dsl/package.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/by-name/ls/lsd2dsl/package.nix b/pkgs/by-name/ls/lsd2dsl/package.nix
new file mode 100644
index 0000000000000..40907c2c0e9dd
--- /dev/null
+++ b/pkgs/by-name/ls/lsd2dsl/package.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub
+, makeDesktopItem, copyDesktopItems, cmake
+, boost, libvorbis, libsndfile, minizip, gtest, qt5 }:
+
+stdenv.mkDerivation rec {
+  pname = "lsd2dsl";
+  version = "0.5.4";
+
+  src = fetchFromGitHub {
+    owner = "nongeneric";
+    repo = "lsd2dsl";
+    rev = "v${version}";
+    sha256 = "sha256-PLgfsVVrNBTxI4J0ukEOFRoBkbmB55/sLNn5KyiHeAc=";
+  };
+
+  nativeBuildInputs = [ cmake qt5.wrapQtAppsHook ] ++ lib.optional stdenv.isLinux copyDesktopItems;
+
+  buildInputs = [ boost libvorbis libsndfile minizip gtest qt5.qtwebkit ];
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=missing-braces";
+
+  desktopItems = lib.singleton (makeDesktopItem {
+    name = "lsd2dsl";
+    exec = "lsd2dsl-qtgui";
+    desktopName = "lsd2dsl";
+    genericName = "lsd2dsl";
+    comment = meta.description;
+    categories = [ "Dictionary" "FileTools" "Qt" ];
+  });
+
+  installPhase = ''
+    install -Dm755 console/lsd2dsl gui/lsd2dsl-qtgui -t $out/bin
+  '';
+
+  meta = with lib; {
+    homepage = "https://rcebits.com/lsd2dsl/";
+    description = "Lingvo dictionaries decompiler";
+    longDescription = ''
+      A decompiler for ABBYY Lingvo’s proprietary dictionaries.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+}