mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
commit
88eff1efac
31
pkgs/applications/misc/sdcv/default.nix
Normal file
31
pkgs/applications/misc/sdcv/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ stdenv, fetchurl, pkgconfig, glib, gettext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name= "sdcv-0.4.2";
|
||||
|
||||
meta = {
|
||||
homepage = http://sdcv.sourceforge.net/;
|
||||
description = "Console version of StarDict program";
|
||||
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/sdcv/${name}.tar.bz2";
|
||||
sha256 = "1cnyv7gd1qvz8ma8545d3aq726wxrx4km7ykl97831irx5wz0r51";
|
||||
};
|
||||
|
||||
patches = ( if stdenv.isDarwin
|
||||
then [ ./sdcv.cpp.patch-darwin ./utils.hpp.patch ]
|
||||
else [ ./sdcv.cpp.patch ] );
|
||||
|
||||
buildInputs = [ pkgconfig glib gettext ];
|
||||
|
||||
preBuild = ''
|
||||
sed -i 's/guint32 page_size/size_t page_size/' src/lib/lib.cpp
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__";
|
||||
}
|
||||
|
12
pkgs/applications/misc/sdcv/sdcv.cpp.patch
Normal file
12
pkgs/applications/misc/sdcv/sdcv.cpp.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/src/utils.hpp
|
||||
+++ b/src/utils.hpp
|
||||
@@ -2,6 +2,9 @@
|
||||
#define _UTILS_HPP_
|
||||
|
||||
#include <string>
|
||||
+#include <stdio.h>
|
||||
+#include <cstdlib>
|
||||
+
|
||||
using std::string;
|
||||
|
||||
extern bool stdio_getline(FILE *in, string &str);
|
19
pkgs/applications/misc/sdcv/sdcv.cpp.patch-darwin
Normal file
19
pkgs/applications/misc/sdcv/sdcv.cpp.patch-darwin
Normal file
@ -0,0 +1,19 @@
|
||||
--- a/src/sdcv.cpp
|
||||
+++ b/src/sdcv.cpp
|
||||
@@ -27,13 +27,13 @@
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <clocale>
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+#include <memory>
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <getopt.h>
|
||||
-#include <string>
|
||||
-#include <vector>
|
||||
-#include <memory>
|
||||
|
||||
#include "libwrapper.hpp"
|
||||
#include "readline.hpp"
|
10
pkgs/applications/misc/sdcv/utils.hpp.patch
Normal file
10
pkgs/applications/misc/sdcv/utils.hpp.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/src/utils.hpp
|
||||
+++ b/src/utils.hpp
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _UTILS_HPP_
|
||||
|
||||
#include <string>
|
||||
+#include <cstdlib>
|
||||
using std::string;
|
||||
|
||||
extern bool stdio_getline(FILE *in, string &str);
|
@ -1617,6 +1617,8 @@ let
|
||||
|
||||
scrot = callPackage ../tools/graphics/scrot { };
|
||||
|
||||
sdcv = callPackage ../applications/misc/sdcv { };
|
||||
|
||||
seccure = callPackage ../tools/security/seccure/0.4.nix { };
|
||||
|
||||
setserial = builderDefsPackage (import ../tools/system/setserial) {
|
||||
|
Loading…
Reference in New Issue
Block a user