uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
48
pkgs/tools/graphics/aaphoto/default.nix
Normal file
48
pkgs/tools/graphics/aaphoto/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, jasper
|
||||
, libpng
|
||||
, libjpeg
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aaphoto";
|
||||
version = "0.45";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://log69.com/downloads/aaphoto_sources_${version}.tar.gz";
|
||||
sha256 = "sha256-06koJM7jNVFqVgqg6BmOZ74foqk6yjUIFnwULzPZ4go=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
jasper
|
||||
libpng
|
||||
libjpeg
|
||||
zlib
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 NEWS README REMARKS TODO -t $out/share/doc/${pname}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://log69.com/aaphoto_en.html";
|
||||
description = "Free and open source automatic photo adjusting software";
|
||||
longDescription = ''
|
||||
Auto Adjust Photo tries to give a solution for the automatic color
|
||||
correction of photos. This means setting the contrast, color balance,
|
||||
saturation and gamma levels of the image by analization.
|
||||
|
||||
This can be a solution for those kind of users who are not able to manage
|
||||
and correct images with complicated graphical softwares, or just simply
|
||||
don't intend to spend a lot of time with manually correcting the images
|
||||
one-by-one.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.isDarwin; # aaphoto.c:237:10: fatal error: 'omp.h' file not found
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/graphics/adriconf/default.nix
Normal file
40
pkgs/tools/graphics/adriconf/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, cmake
|
||||
, pkg-config
|
||||
, libdrm
|
||||
, libGL
|
||||
, atkmm
|
||||
, pcre
|
||||
, gtkmm3
|
||||
, pugixml
|
||||
, mesa
|
||||
, pciutils
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "adriconf";
|
||||
version = "2.5.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "mesa";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nxqrs8c1sRruZLwFwK/JfXQPfpEq08Pe2n7ojQkH3SM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ libdrm libGL atkmm pcre gtkmm3 pugixml mesa pciutils ];
|
||||
|
||||
cmakeFlags = [ "-DENABLE_UNIT_TESTS=off" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gitlab.freedesktop.org/mesa/adriconf/";
|
||||
description = "A GUI tool used to configure open source graphics drivers";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ muscaln ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
68
pkgs/tools/graphics/agi/default.nix
Normal file
68
pkgs/tools/graphics/agi/default.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, autoPatchelfHook
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
, copyDesktopItems
|
||||
, wrapGAppsHook
|
||||
, gobject-introspection
|
||||
, gdk-pixbuf
|
||||
, jre
|
||||
, androidenv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "agi";
|
||||
version = "3.1.0-dev-20220314";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/google/agi-dev-releases/releases/download/v${version}/agi-${version}-linux.zip";
|
||||
sha256 = "sha256-j/ozkIoRM+G7fi0qBG8UGKPtrn6DR6KNK0Hc53dxsMw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
makeWrapper
|
||||
wrapGAppsHook
|
||||
gdk-pixbuf
|
||||
gobject-introspection
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/{bin,lib}
|
||||
cp ./{agi,gapis,gapir,gapit,device-info} $out/bin
|
||||
cp lib/gapic.jar $out/lib
|
||||
wrapProgram $out/bin/agi \
|
||||
--add-flags "--vm ${jre}/bin/java" \
|
||||
--add-flags "--jar $out/lib/gapic.jar" \
|
||||
--add-flags "--adb ${androidenv.androidPkgs_9_0.platform-tools}/bin/adb"
|
||||
for i in 16 32 48 64 96 128 256 512 1024; do
|
||||
install -D ${src}/icon.png $out/share/icons/hicolor/''${i}x$i/apps/agi.png
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = [(makeDesktopItem {
|
||||
name = "agi";
|
||||
desktopName = "Android GPU Inspector";
|
||||
exec = "agi";
|
||||
icon = "agi";
|
||||
categories = [ "Development" "Debugger" "Graphics" "3DGraphics" ];
|
||||
})];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/google/agi/";
|
||||
description = "Android GPU Inspector";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.asl20;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ maintainers.ivar ];
|
||||
};
|
||||
}
|
||||
95
pkgs/tools/graphics/amber/default.nix
Normal file
95
pkgs/tools/graphics/amber/default.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, python3
|
||||
, vulkan-headers
|
||||
, vulkan-loader
|
||||
}:
|
||||
let
|
||||
glslang = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "glslang";
|
||||
rev = "81cc10a498b25a90147cccd6e8939493c1e9e20e";
|
||||
hash = "sha256-jTOxZ1nU7kvtdWjPzyIp/5ZeKw3JtYyqhlFeIE7CyX8=";
|
||||
};
|
||||
|
||||
lodepng = fetchFromGitHub {
|
||||
owner = "lvandeve";
|
||||
repo = "lodepng";
|
||||
rev = "5601b8272a6850b7c5d693dd0c0e16da50be8d8d";
|
||||
hash = "sha256-dD8QoyOoGov6VENFNTXWRmen4nYYleoZ8+4TpICNSpo=";
|
||||
};
|
||||
|
||||
shaderc = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "shaderc";
|
||||
rev = "e72186b66bb90ed06aaf15cbdc9a053581a0616b";
|
||||
hash = "sha256-hd1IGsWksgAfB8Mq5yZOzSyNGxXsCJxb350pD/Gcskk=";
|
||||
};
|
||||
|
||||
spirv-headers = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "SPIRV-Headers";
|
||||
rev = "b42ba6d92faf6b4938e6f22ddd186dbdacc98d78";
|
||||
hash = "sha256-ks9JCj5rj+Xu++7z5RiHDkU3/sFXhcScw8dATfB/ot0=";
|
||||
};
|
||||
|
||||
spirv-tools = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "SPIRV-Tools";
|
||||
rev = "a73e724359a274d7cf4f4248eba5be1e7764fbfd";
|
||||
hash = "sha256-vooJHtgVRlBNkQG4hulYOxIgHH4GMhXw7N4OEbkKJvU=";
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "amber";
|
||||
version = "unstable-2022-04-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = pname;
|
||||
rev = "8b145a6c89dcdb4ec28173339dd176fb7b6f43ed";
|
||||
hash = "sha256-+xFYlUs13khT6r475eJJ+XS875h2sb+YbJ8ZN4MOSAA=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
python3
|
||||
];
|
||||
|
||||
# Tests are disabled so we do not have to pull in googletest and more dependencies
|
||||
cmakeFlags = [ "-DAMBER_SKIP_TESTS=ON" ];
|
||||
|
||||
prePatch = ''
|
||||
cp -r ${glslang}/ third_party/glslang
|
||||
cp -r ${lodepng}/ third_party/lodepng
|
||||
cp -r ${shaderc}/ third_party/shaderc
|
||||
cp -r ${spirv-tools}/ third_party/spirv-tools
|
||||
cp -r ${spirv-headers}/ third_party/spirv-headers
|
||||
chmod u+w -R third_party
|
||||
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "-Werror" ""
|
||||
substituteInPlace tools/update_build_version.py \
|
||||
--replace "not os.path.exists(directory)" "True"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 -t $out/bin amber image_diff
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multi-API shader test framework";
|
||||
homepage = "https://github.com/google/amber";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ Flakebi ];
|
||||
};
|
||||
}
|
||||
84
pkgs/tools/graphics/appleseed/default.nix
Normal file
84
pkgs/tools/graphics/appleseed/default.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, boost165, pkg-config, guile,
|
||||
eigen, libpng, python3, libGLU, qt4, openexr, openimageio,
|
||||
opencolorio_1, xercesc, ilmbase, osl, seexpr, makeWrapper
|
||||
}:
|
||||
|
||||
let boost_static = boost165.override {
|
||||
enableStatic = true;
|
||||
enablePython = true;
|
||||
python = python3;
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
|
||||
pname = "appleseed";
|
||||
version = "2.0.5-beta";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "appleseedhq";
|
||||
repo = "appleseed";
|
||||
rev = version;
|
||||
sha256 = "1sq9s0rzjksdn8ayp1g17gdqhp7fqks8v1ddd3i5rsl96b04fqx5";
|
||||
};
|
||||
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
|
||||
buildInputs = [
|
||||
boost_static guile eigen libpng python3
|
||||
libGLU qt4 openexr openimageio opencolorio_1 xercesc
|
||||
osl seexpr
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
"-I${openexr.dev}/include/OpenEXR"
|
||||
"-I${ilmbase.dev}/include/OpenEXR"
|
||||
"-I${openimageio.dev}/include/OpenImageIO"
|
||||
|
||||
"-Wno-unused-but-set-variable"
|
||||
"-Wno-error=class-memaccess"
|
||||
"-Wno-error=maybe-uninitialized"
|
||||
"-Wno-error=catch-value"
|
||||
"-Wno-error=stringop-truncation"
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_EXTERNAL_XERCES=ON" "-DUSE_EXTERNAL_OCIO=ON" "-DUSE_EXTERNAL_OIIO=ON"
|
||||
"-DUSE_EXTERNAL_OSL=ON" "-DWITH_CLI=ON" "-DWITH_STUDIO=ON" "-DWITH_TOOLS=ON"
|
||||
"-DUSE_EXTERNAL_PNG=ON" "-DUSE_EXTERNAL_ZLIB=ON"
|
||||
"-DUSE_EXTERNAL_EXR=ON" "-DUSE_EXTERNAL_SEEXPR=ON"
|
||||
"-DWITH_PYTHON=ON"
|
||||
"-DWITH_DISNEY_MATERIAL=ON"
|
||||
"-DUSE_SSE=ON"
|
||||
"-DUSE_SSE42=ON"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open source, physically-based global illumination rendering engine";
|
||||
homepage = "https://appleseedhq.net/";
|
||||
maintainers = with maintainers; [ hodapp ];
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
# Work around a bug in the CMake build:
|
||||
postInstall = ''
|
||||
chmod a+x $out/bin/*
|
||||
wrapProgram $out/bin/appleseed.studio --set PYTHONHOME ${python3}
|
||||
'';
|
||||
}
|
||||
|
||||
# TODO: Is the below problematic?
|
||||
|
||||
# CMake Warning (dev) at /nix/store/dsyw2zla2h3ld2p0jj4cv0j3wal1bp3h-cmake-3.11.2/share/cmake-3.11/Modules/FindOpenGL.cmake:270 (message):
|
||||
# Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
|
||||
# available. Run "cmake --help-policy CMP0072" for policy details. Use the
|
||||
# cmake_policy command to set the policy and suppress this warning.
|
||||
#
|
||||
# FindOpenGL found both a legacy GL library:
|
||||
#
|
||||
# OPENGL_gl_LIBRARY: /nix/store/yxrgmcz2xlgn113wz978a91qbsy4rc8g-libGL-1.0.0/lib/libGL.so
|
||||
#
|
||||
# and GLVND libraries for OpenGL and GLX:
|
||||
#
|
||||
# OPENGL_opengl_LIBRARY: /nix/store/yxrgmcz2xlgn113wz978a91qbsy4rc8g-libGL-1.0.0/lib/libOpenGL.so
|
||||
# OPENGL_glx_LIBRARY: /nix/store/yxrgmcz2xlgn113wz978a91qbsy4rc8g-libGL-1.0.0/lib/libGLX.so
|
||||
#
|
||||
# OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
|
||||
# compatibility with CMake 3.10 and below the legacy GL library will be used.
|
||||
130
pkgs/tools/graphics/argyllcms/default.nix
Normal file
130
pkgs/tools/graphics/argyllcms/default.nix
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
{ stdenv, fetchzip, jam, unzip, libX11, libXxf86vm, libXrandr, libXinerama
|
||||
, libXrender, libXext, libtiff, libjpeg, libpng, libXScrnSaver, writeText
|
||||
, libXdmcp, libXau, lib, openssl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "argyllcms";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchzip {
|
||||
# Kind of flacky URL, it was reaturning 406 and inconsistent binaries for a
|
||||
# while on me. It might be good to find a mirror
|
||||
url = "https://www.argyllcms.com/Argyll_V${version}_src.zip";
|
||||
sha256 = "sha256-UNjCcqJgbRSox55OP3pLdKFHY0NPLHEq3nwqvxWre7U=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ jam unzip ];
|
||||
|
||||
postPatch = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
substituteInPlace Jambase \
|
||||
--replace "-m64" ""
|
||||
'';
|
||||
|
||||
preConfigure = let
|
||||
# The contents of this file comes from the Jamtop file from the
|
||||
# root of the ArgyllCMS distribution, rewritten to pick up Nixpkgs
|
||||
# library paths. When ArgyllCMS is updated, make sure that changes
|
||||
# in that file is reflected here.
|
||||
jamTop = writeText "argyllcms_jamtop" ''
|
||||
DESTDIR = "/" ;
|
||||
REFSUBDIR = "share/argyllcms" ;
|
||||
|
||||
# Keep this DESTDIR anchored to Jamtop. PREFIX is used literally
|
||||
ANCHORED_PATH_VARS = DESTDIR ;
|
||||
|
||||
# Tell standalone libraries that they are part of Argyll:
|
||||
DEFINES += ARGYLLCMS ;
|
||||
|
||||
# enable serial instruments & support
|
||||
USE_SERIAL = true ;
|
||||
|
||||
# enable fast serial instruments & support
|
||||
USE_FAST_SERIAL = true ; # (Implicit in USE_SERIAL too)
|
||||
|
||||
# enable USB instruments & support
|
||||
USE_USB = true ;
|
||||
|
||||
# enable dummy Demo Instrument (only if code is available)
|
||||
USE_DEMOINST = true ;
|
||||
|
||||
# enable Video Test Patch Generator and 3DLUT device support
|
||||
# (V2.0.0 and above)
|
||||
USE_VTPGLUT = false ;
|
||||
|
||||
# enable Printer device support
|
||||
USE_PRINTER = false ;
|
||||
|
||||
# enable CMF Measurement device and accessory support (if present)
|
||||
USE_CMFM = false ;
|
||||
|
||||
# Use ArgyllCMS version of libusb (deprecated - don't use)
|
||||
USE_LIBUSB = false ;
|
||||
|
||||
# Compile in graph plotting code (Not fully implemented)
|
||||
USE_PLOT = true ; # [true]
|
||||
|
||||
JPEGLIB = ;
|
||||
JPEGINC = ;
|
||||
HAVE_JPEG = true ;
|
||||
|
||||
TIFFLIB = ;
|
||||
TIFFINC = ;
|
||||
HAVE_TIFF = true ;
|
||||
|
||||
PNGLIB = ;
|
||||
PNGINC = ;
|
||||
HAVE_PNG = true ;
|
||||
|
||||
ZLIB = ;
|
||||
ZINC = ;
|
||||
HAVE_Z = true ;
|
||||
|
||||
SSLLIB = ;
|
||||
SSLINC = ;
|
||||
HAVE_SSL = true ;
|
||||
|
||||
LINKFLAGS +=
|
||||
${lib.concatStringsSep " " (map (x: "-L${x}/lib") buildInputs)}
|
||||
-ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss
|
||||
-ljpeg -ltiff -lpng -lssl ;
|
||||
'';
|
||||
in ''
|
||||
cp ${jamTop} Jamtop
|
||||
substituteInPlace Makefile --replace "-j 3" "-j $NIX_BUILD_CORES"
|
||||
# Remove tiff, jpg and png to be sure the nixpkgs-provided ones are used
|
||||
rm -rf tiff jpg png
|
||||
|
||||
export AR="$AR rusc"
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
libtiff libjpeg libpng libX11 libXxf86vm libXrandr libXinerama libXext
|
||||
libXrender libXScrnSaver libXdmcp libXau openssl
|
||||
];
|
||||
|
||||
buildFlags = [ "all" ];
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
# Install udev rules, but remove lines that set up the udev-acl
|
||||
# stuff, since that is handled by udev's own rules (70-udev-acl.rules)
|
||||
postInstall = ''
|
||||
rm -v $out/bin/License.txt
|
||||
mkdir -p $out/etc/udev/rules.d
|
||||
sed -i '/udev-acl/d' usb/55-Argyll.rules
|
||||
cp -v usb/55-Argyll.rules $out/etc/udev/rules.d/
|
||||
|
||||
sed -i -e 's/^CREATED .*/CREATED "'"$(date -d @$SOURCE_DATE_EPOCH)"'"/g' $out/share/argyllcms/RefMediumGamut.gam
|
||||
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.argyllcms.com";
|
||||
description = "Color management system (compatible with ICC)";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
78
pkgs/tools/graphics/astc-encoder/default.nix
Normal file
78
pkgs/tools/graphics/astc-encoder/default.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{ lib
|
||||
, gccStdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, simdExtensions ? null
|
||||
}:
|
||||
|
||||
with rec {
|
||||
# SIMD instruction sets to compile for. If none are specified by the user,
|
||||
# an appropriate one is selected based on the detected host system
|
||||
isas = with gccStdenv.hostPlatform;
|
||||
if simdExtensions != null then lib.toList simdExtensions
|
||||
else if avx2Support then [ "AVX2" ]
|
||||
else if sse4_1Support then [ "SSE41" ]
|
||||
else if isx86_64 then [ "SSE2" ]
|
||||
else if isAarch64 then [ "NEON" ]
|
||||
else [ "NONE" ];
|
||||
|
||||
archFlags = lib.optionals gccStdenv.hostPlatform.isAarch64 [ "-DARCH=aarch64" ];
|
||||
|
||||
# CMake Build flags for the selected ISAs. For a list of flags, see
|
||||
# https://github.com/ARM-software/astc-encoder/blob/main/Docs/Building.md
|
||||
isaFlags = map ( isa: "-DISA_${isa}=ON" ) isas;
|
||||
|
||||
# The suffix of the binary to link as 'astcenc'
|
||||
mainBinary = builtins.replaceStrings
|
||||
[ "AVX2" "SSE41" "SSE2" "NEON" "NONE" ]
|
||||
[ "avx2" "sse4.1" "sse2" "neon" "none" ]
|
||||
( builtins.head isas );
|
||||
};
|
||||
|
||||
gccStdenv.mkDerivation rec {
|
||||
pname = "astc-encoder";
|
||||
version = "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ARM-software";
|
||||
repo = "astc-encoder";
|
||||
rev = version;
|
||||
sha256 = "sha256-TzVO2xQOuE87h8j4UwkpnAaFwkvy5dZge8zDNR/mVf0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = isaFlags ++ archFlags ++ [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
];
|
||||
|
||||
# Set a fixed build year to display within help output (otherwise, it would be 1980)
|
||||
postPatch = ''
|
||||
substituteInPlace Source/cmake_core.cmake \
|
||||
--replace 'string(TIMESTAMP astcencoder_YEAR "%Y")' 'set(astcencoder_YEAR "2022")'
|
||||
'';
|
||||
|
||||
# Link binaries into environment and provide 'astcenc' link
|
||||
postInstall = ''
|
||||
mv $out/astcenc $out/bin
|
||||
ln -s $out/bin/astcenc-${mainBinary} $out/bin/astcenc
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/ARM-software/astc-encoder";
|
||||
description = "An encoder for the ASTC texture compression format";
|
||||
longDescription = ''
|
||||
The Adaptive Scalable Texture Compression (ASTC) format is
|
||||
widely supported by mobile and desktop graphics hardware and
|
||||
provides better quality at a given bitrate compared to ETC2.
|
||||
|
||||
This program supports both compression and decompression in LDR
|
||||
and HDR mode and can read various image formats. Run `astcenc
|
||||
-help` to see all the options.
|
||||
'';
|
||||
platforms = platforms.unix;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ dasisdormax ];
|
||||
broken = !gccStdenv.is64bit;
|
||||
};
|
||||
}
|
||||
86
pkgs/tools/graphics/asymptote/default.nix
Normal file
86
pkgs/tools/graphics/asymptote/default.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchurl, fetchpatch
|
||||
, autoreconfHook, bison, glm, flex
|
||||
, freeglut, ghostscriptX, imagemagick, fftw
|
||||
, boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv
|
||||
, python3Packages
|
||||
, zlib, perl, curl
|
||||
, texLive, texinfo
|
||||
, darwin
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.67";
|
||||
pname = "asymptote";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vectorgraphics";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-dMgsKBg6YQ3mdx3jFqjX4vZeizaier8+ZQUl4J6QXNE=";
|
||||
};
|
||||
|
||||
patches =
|
||||
(lib.optional (lib.versionOlder version "2.68")
|
||||
(fetchpatch {
|
||||
url = "https://github.com/vectorgraphics/asymptote/commit/3361214340d58235f4dbb8f24017d0cd5d94da72.patch";
|
||||
hash = "sha256-1RYMZcwbjBAM7aAXFBbwst0eozWYFtJ8HcicjXogS/w=";
|
||||
}))
|
||||
;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
bison
|
||||
flex
|
||||
bison
|
||||
texinfo
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ghostscriptX imagemagick fftw
|
||||
boehmgc ncurses readline gsl libsigsegv
|
||||
zlib perl curl
|
||||
texLive
|
||||
] ++ (with python3Packages; [
|
||||
python
|
||||
pyqt5
|
||||
]);
|
||||
|
||||
propagatedBuildInputs = [
|
||||
glm
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
freeglut libGLU libGL mesa.osmesa
|
||||
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
OpenGL GLUT Cocoa
|
||||
]);
|
||||
|
||||
preConfigure = ''
|
||||
HOME=$TMP
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-latex=$out/share/texmf/tex/latex"
|
||||
"--with-context=$out/share/texmf/tex/context/third"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc";
|
||||
|
||||
postInstall = ''
|
||||
mv $out/share/info/asymptote/*.info $out/share/info/
|
||||
sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info
|
||||
rmdir $out/share/info/asymptote
|
||||
rm -f $out/share/info/dir
|
||||
|
||||
rm -rf $out/share/texmf
|
||||
install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool for programming graphics intended to replace Metapost";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.raskin ];
|
||||
broken = stdenv.isDarwin; # https://github.com/vectorgraphics/asymptote/issues/69
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/graphics/barcode/default.nix
Normal file
29
pkgs/tools/graphics/barcode/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.99";
|
||||
pname = "barcode";
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8";
|
||||
};
|
||||
patches = [
|
||||
# Pull upstream patch for -fno-common toolchains.
|
||||
(fetchpatch {
|
||||
name = "fno-common.patch";
|
||||
url = "http://git.savannah.gnu.org/cgit/barcode.git/patch/?id=4654f68706a459c9602d9932b56a56e8930f7d53";
|
||||
sha256 = "15kclzcwlh0ymr7m48vc0m8z98q0wf4xbfcky4g1y8yvvpvvrfgc";
|
||||
})
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "GNU barcode generator";
|
||||
maintainers = with maintainers; [ raskin ];
|
||||
platforms = platforms.linux; # Maybe other non-darwin Unix
|
||||
downloadPage = "https://ftp.gnu.org/gnu/barcode/";
|
||||
homepage = "https://www.gnu.org/software/barcode/";
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/graphics/blockhash/default.nix
Normal file
30
pkgs/tools/graphics/blockhash/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchFromGitHub, python3, pkg-config, imagemagick, wafHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "blockhash";
|
||||
version = "0.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "commonsmachinery";
|
||||
repo = "blockhash";
|
||||
rev = "v${version}";
|
||||
sha256 = "0x3lvhnkb4c3pyq6p81qnnqimz35wpippiac506dgjx3b1848v35";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python3 pkg-config wafHook ];
|
||||
buildInputs = [ imagemagick ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/commonsmachinery/blockhash";
|
||||
description = ''
|
||||
This is a perceptual image hash calculation tool based on algorithm
|
||||
descibed in Block Mean Value Based Image Perceptual Hashing by Bian Yang,
|
||||
Fan Gu and Xiamu Niu.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.infinisil ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/graphics/blur-effect/default.nix
Normal file
33
pkgs/tools/graphics/blur-effect/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, gdk-pixbuf, libGL, mesa }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "blur-effect";
|
||||
version = "1.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sonald";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0cjw7iz0p7x1bi4vmwrivfidry5wlkgfgdl9wly88cm3z9ib98jj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gdk-pixbuf
|
||||
libGL
|
||||
mesa
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/sonald/blur-effect";
|
||||
description = "Off-screen image blurring utility using OpenGL ES 3.0";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.hostPlatform.isDarwin; # packages 'libdrm' and 'gbm' not found
|
||||
maintainers = with maintainers; [ romildo ];
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/graphics/briss/default.nix
Normal file
29
pkgs/tools/graphics/briss/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# The releases of this project are apparently precompiled to .jar files.
|
||||
|
||||
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "briss";
|
||||
version = "0.9";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/briss/briss-${version}.tar.gz";
|
||||
sha256 = "45dd668a9ceb9cd59529a9fefe422a002ee1554a61be07e6fc8b3baf33d733d9";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [makeWrapper];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin";
|
||||
mkdir -p "$out/share";
|
||||
install -D -m444 -t "$out/share" *.jar
|
||||
makeWrapper "${jre}/bin/java" "$out/bin/briss" --add-flags "-Xms128m -Xmx1024m -cp \"$out/share/\" -jar \"$out/share/briss-${version}.jar\""
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://sourceforge.net/projects/briss/";
|
||||
description = "Java application for cropping PDF files";
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
||||
license = lib.licenses.gpl3;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/graphics/cfdg/default.nix
Normal file
35
pkgs/tools/graphics/cfdg/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libpng, bison, flex, ffmpeg, icu }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cfdg";
|
||||
version = "3.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "MtnViewJohn";
|
||||
repo = "context-free";
|
||||
rev = "Version${version}";
|
||||
sha256 = "13m8npccacmgxbs4il45zw53dskjh53ngv2nxahwqw8shjrws4mh";
|
||||
};
|
||||
|
||||
buildInputs = [ libpng bison flex ffmpeg icu ];
|
||||
|
||||
postPatch = ''
|
||||
sed -e "/YY_NO_UNISTD/a#include <stdio.h>" -i src-common/cfdg.l
|
||||
sed -e '1i#include <algorithm>' -i src-common/{cfdg,builder,ast}.cpp
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp cfdg $out/bin/
|
||||
|
||||
mkdir -p $out/share/doc/${pname}-${version}
|
||||
cp *.txt $out/share/doc/${pname}-${version}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Context-free design grammar - a tool for graphics generation";
|
||||
maintainers = with maintainers; [ raskin ];
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://contextfreeart.org/";
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
||||
9
pkgs/tools/graphics/cfdg/src-for-default.nix
Normal file
9
pkgs/tools/graphics/cfdg/src-for-default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
version="3.0.2";
|
||||
name="cfdg-3.0.2";
|
||||
hash="1pd1hjippbhad8l4s4lsglykh22i24qfrgmnxrsx71bvcqbr356p";
|
||||
url="http://www.contextfreeart.org/download/ContextFreeSource3.0.2.tgz";
|
||||
advertisedUrl="http://www.contextfreeart.org/download/ContextFreeSource3.0.2.tgz";
|
||||
|
||||
|
||||
}
|
||||
6
pkgs/tools/graphics/cfdg/src-info-for-default.nix
Normal file
6
pkgs/tools/graphics/cfdg/src-info-for-default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
downloadPage = "https://contextfreeart.org/mediawiki/index.php/Download_page";
|
||||
baseName = "cfdg";
|
||||
sourceRegexp = ".*[.]tgz";
|
||||
versionExtractorSedScript = ''s/[^0-9]*([0-9.]*)[.]tgz/\1/'';
|
||||
}
|
||||
39
pkgs/tools/graphics/convchain/default.nix
Normal file
39
pkgs/tools/graphics/convchain/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{lib, stdenv, fetchFromGitHub, mono}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "convchain";
|
||||
version = "0.0pre20160901";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mxgmn";
|
||||
repo = "ConvChain";
|
||||
rev = "8abb1e88a496fcae4c0ae31acd4eea55957dab68";
|
||||
sha256 = "0lnscljgbw0s90sfcahwvnxakml0f4d8jxi5ikm4ak8qgnvw6rql";
|
||||
};
|
||||
buildPhase = ''
|
||||
mcs ConvChain.cs -out:convchain.exe -r:System.Drawing
|
||||
mcs ConvChainFast.cs -out:convchainfast.exe -r:System.Drawing
|
||||
grep -m1 -B999 '^[*][/]' ConvChainFast.cs > COPYING.MIT
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/{bin,share/doc/convchain,share/convchain}
|
||||
cp README.md COPYING.MIT "$out"/share/doc/convchain
|
||||
cp convchain*.exe "$out"/bin
|
||||
cp -r [Ss]amples samples.xml "$out/share/convchain"
|
||||
|
||||
echo "#! ${stdenv.shell}" >> "$out/bin/convchain"
|
||||
echo "chmod u+w ." >> "$out/bin/convchain"
|
||||
echo "'${mono}/bin/mono' '$out/bin/convchain.exe' \"\$@\"" >> "$out/bin/convchain"
|
||||
chmod a+x "$out/bin/convchain"
|
||||
|
||||
echo "#! ${stdenv.shell}" >> "$out/bin/convchainfast"
|
||||
echo "chmod u+w ." >> "$out/bin/convchainfast"
|
||||
echo "'${mono}/bin/mono' '$out/bin/convchainfast.exe' \"\$@\"" >> "$out/bin/convchainfast"
|
||||
chmod a+x "$out/bin/convchainfast"
|
||||
'';
|
||||
buildInputs = [mono];
|
||||
meta = {
|
||||
description = "Bitmap generation from a single example with convolutions and MCMC";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/graphics/cuneiform/default.nix
Normal file
44
pkgs/tools/graphics/cuneiform/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchurl, cmake, imagemagick }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "cuneiform";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/cuneiform-linux/1.1/1.1/+download/cuneiform-linux-1.1.0.tar.bz2";
|
||||
sha256 = "1bdvppyfx2184zmzcylskd87cxv56d8f32jf7g1qc8779l2hszjp";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchurl {
|
||||
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/a2ec92f05de006b56d16ac6a6c370d54a554861a/cuneiform/trunk/build-fix.patch";
|
||||
sha256 = "19cmrlx4khn30qqrpyayn7bicg8yi0wpz1x1bvqqrbvr3kwldxyj";
|
||||
})
|
||||
(fetchurl {
|
||||
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch";
|
||||
sha256 = "14bp2f4dvlgxnpdza1rgszhkbxhp6p7lhgnb1s7c1x7vwdrx0ri7";
|
||||
})
|
||||
];
|
||||
|
||||
# Workaround build failure on -fno-common toolchains like upstream
|
||||
# gcc-10. Otherwise build fails as:
|
||||
# ld: CMakeFiles/rbal.dir/src/statsearchbl.cpp.o:(.bss+0x0):
|
||||
# multiple definition of `minrow'; CMakeFiles/rbal.dir/src/linban.c.o:(.bss+0xa3a): first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
postPatch = ''
|
||||
rm cuneiform_src/Kern/hhh/tigerh/h/strings.h
|
||||
'';
|
||||
|
||||
buildInputs = [ imagemagick ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multi-language OCR system";
|
||||
homepage = "https://launchpad.net/cuneiform-linux";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.raskin ];
|
||||
};
|
||||
}
|
||||
43
pkgs/tools/graphics/dcraw/default.nix
Normal file
43
pkgs/tools/graphics/dcraw/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{lib, stdenv, fetchurl, libjpeg, lcms2, gettext, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dcraw";
|
||||
version = "9.28.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.dechifro.org/dcraw/archive/dcraw-${version}.tar.gz";
|
||||
sha256 = "1fdl3xa1fbm71xzc3760rsjkvf0x5jdjrvdzyg2l9ka24vdc7418";
|
||||
};
|
||||
|
||||
nativeBuildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||
buildInputs = [ libjpeg lcms2 gettext ];
|
||||
|
||||
# Jasper is disabled because the library is abandoned and has many
|
||||
# CVEs.
|
||||
patchPhase = ''
|
||||
substituteInPlace install \
|
||||
--replace 'prefix=/usr/local' 'prefix=$out' \
|
||||
--replace gcc '$CC' \
|
||||
--replace '-ljasper' '-DNO_JASPER=1'
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out/bin
|
||||
sh -e install
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.dechifro.org/dcraw/";
|
||||
description = "Decoder for many camera raw picture formats";
|
||||
license = lib.licenses.free;
|
||||
platforms = lib.platforms.unix; # Once had cygwin problems
|
||||
maintainers = [ ];
|
||||
knownVulnerabilities = [
|
||||
"CVE-2018-19655"
|
||||
"CVE-2018-19565"
|
||||
"CVE-2018-19566"
|
||||
"CVE-2018-19567"
|
||||
"CVE-2018-19568"
|
||||
];
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/graphics/diagrams-builder/default.nix
Normal file
44
pkgs/tools/graphics/diagrams-builder/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
If user need access to more haskell package for building his
|
||||
diagrams, he simply has to pass these package through the
|
||||
extra packages function as follow in `config.nix`:
|
||||
|
||||
~~~
|
||||
diagrams-builder.override {
|
||||
extraPackages = self : [myHaskellPackage];
|
||||
}
|
||||
~~~
|
||||
*/
|
||||
|
||||
{ lib, stdenv, ghcWithPackages, makeWrapper, diagrams-builder, extraPackages ? (self: []) }:
|
||||
|
||||
let
|
||||
|
||||
# Used same technique as for the yiCustom package.
|
||||
wrappedGhc = ghcWithPackages
|
||||
(self: [ diagrams-builder ] ++ extraPackages self);
|
||||
ghcVersion = wrappedGhc.version;
|
||||
|
||||
exeWrapper = backend : ''
|
||||
makeWrapper \
|
||||
"${diagrams-builder}/bin/diagrams-builder-${backend}" "$out/bin/diagrams-builder-${backend}" \
|
||||
--set NIX_GHC ${wrappedGhc}/bin/ghc \
|
||||
--set NIX_GHC_LIBDIR ${wrappedGhc}/lib/ghc-${ghcVersion}
|
||||
'';
|
||||
|
||||
backends = ["svg" "cairo" "ps"];
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "diagrams-builder";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildCommand = with lib;
|
||||
concatStringsSep "\n" (map exeWrapper backends);
|
||||
|
||||
# Will be faster to build the wrapper locally then to fetch it from a binary cache.
|
||||
preferLocalBuild = true;
|
||||
meta = diagrams-builder.meta;
|
||||
}
|
||||
43
pkgs/tools/graphics/directx-shader-compiler/default.nix
Normal file
43
pkgs/tools/graphics/directx-shader-compiler/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, ninja, python3, git }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "directx-shader-compiler";
|
||||
version = "1.6.2112";
|
||||
|
||||
# Put headers in dev, there are lot of them which aren't necessary for
|
||||
# using the compiler binary.
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "microsoft";
|
||||
repo = "DirectXShaderCompiler";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-+oh7oWJCE0CLehnqpE2J9aIfMFbtfLAKwI9ETmCg/TA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake git ninja python3 ];
|
||||
|
||||
cmakeFlags = [ "-C../cmake/caches/PredefinedParams.cmake" ];
|
||||
|
||||
# The default install target installs heaps of LLVM stuff.
|
||||
#
|
||||
# Upstream issue: https://github.com/microsoft/DirectXShaderCompiler/issues/3276
|
||||
#
|
||||
# The following is based on the CI script:
|
||||
# https://github.com/microsoft/DirectXShaderCompiler/blob/master/appveyor.yml#L63-L66
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/lib $dev/include
|
||||
mv bin/dxc* $out/bin/
|
||||
mv lib/libdxcompiler.so* lib/libdxcompiler.*dylib $out/lib/
|
||||
cp -r $src/include/dxc $dev/include/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A compiler to compile HLSL programs into DXIL and SPIR-V";
|
||||
homepage = "https://github.com/microsoft/DirectXShaderCompiler";
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
license = licenses.ncsa;
|
||||
maintainers = with maintainers; [ expipiplus1 Flakebi ];
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/graphics/ditaa/default.nix
Normal file
35
pkgs/tools/graphics/ditaa/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchurl, jre }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ditaa";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/stathissideris/ditaa/releases/download/v${version}/ditaa-${version}-standalone.jar";
|
||||
sha256 = "1acnl7khz8aasg230nbsx9dyf8716scgb5l3679cb2bdzxisl64l";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/lib
|
||||
|
||||
cp ${src} "$out/lib/ditaa.jar"
|
||||
|
||||
cat > "$out/bin/ditaa" << EOF
|
||||
#!${stdenv.shell}
|
||||
exec ${jre}/bin/java -jar "$out/lib/ditaa.jar" "\$@"
|
||||
EOF
|
||||
|
||||
chmod a+x "$out/bin/ditaa"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert ascii art diagrams into proper bitmap graphics";
|
||||
homepage = "https://github.com/stathissideris/ditaa";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.lgpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/graphics/dmtx-utils/default.nix
Normal file
35
pkgs/tools/graphics/dmtx-utils/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, libdmtx
|
||||
, imagemagick
|
||||
, Foundation
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dmtx-utils";
|
||||
version = "0.7.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dmtx";
|
||||
repo = "dmtx-utils";
|
||||
rev = "v${version}";
|
||||
sha256 = "06m3qncqdlcnmw83n95yrx2alaq6bld320ax26z4ndnla41yk0p4";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [ libdmtx imagemagick ]
|
||||
++ lib.optional stdenv.isDarwin Foundation;
|
||||
|
||||
meta = {
|
||||
description = "Data matrix command-line utilities";
|
||||
homepage = "https://github.com/dmtx/dmtx-utils";
|
||||
changelog = "https://github.com/dmtx/dmtx-utils/blob/v${version}/ChangeLog";
|
||||
license = lib.licenses.lgpl2;
|
||||
maintainers = [ lib.maintainers.raskin ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/graphics/dpic/default.nix
Normal file
23
pkgs/tools/graphics/dpic/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dpic";
|
||||
version = "2021.11.01";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ece.uwaterloo.ca/~aplevich/dpic/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-TkMc5tG+sPHfjiCxli5bIteJfq5ZG36+HaqZOk/v6oI=";
|
||||
};
|
||||
|
||||
# The prefix passed to configure is not used.
|
||||
makeFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An implementation of the pic little language for creating drawings";
|
||||
homepage = "https://ece.uwaterloo.ca/~aplevich/dpic/";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ aespinosa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
25
pkgs/tools/graphics/editres/default.nix
Normal file
25
pkgs/tools/graphics/editres/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, libXt, libXaw, libXres, utilmacros }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "editres";
|
||||
version = "1.0.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/app/editres-${version}.tar.gz";
|
||||
sha256 = "10mbgijb6ac6wqb2grpy9mrazzw68jxjkxr9cbdf1111pa64yj19";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libXt libXaw libXres utilmacros ];
|
||||
|
||||
configureFlags = [ "--with-appdefaultdir=$(out)/share/X11/app-defaults/editres" ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://cgit.freedesktop.org/xorg/app/editres/";
|
||||
description = "A dynamic resource editor for X Toolkit applications";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
43
pkgs/tools/graphics/enblend-enfuse/default.nix
Normal file
43
pkgs/tools/graphics/enblend-enfuse/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchzip
|
||||
, autoreconfHook
|
||||
, boost
|
||||
, freeglut
|
||||
, glew
|
||||
, gsl
|
||||
, lcms2
|
||||
, libpng
|
||||
, libtiff
|
||||
, libGLU
|
||||
, libGL
|
||||
, vigra
|
||||
, help2man
|
||||
, pkg-config
|
||||
, perl
|
||||
, texlive
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "enblend-enfuse";
|
||||
version = "unstable-2022-03-06";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://sourceforge.net/code-snapshots/hg/e/en/enblend/code/enblend-code-0f423c72e51872698fe2985ca3bd453961ffe4e0.zip";
|
||||
sha256 = "sha256-0gCUSdg3HR3YeIbOByEBCZh2zGlYur6DeCOzUM53fdc=";
|
||||
stripRoot = true;
|
||||
};
|
||||
|
||||
buildInputs = [ boost freeglut glew gsl lcms2 libpng libtiff libGLU libGL vigra ];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook help2man perl pkg-config texlive.combined.scheme-small ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs src/embrace
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://enblend.sourceforge.net/";
|
||||
description = "Blends away the seams in a panoramic image mosaic using a multiresolution spline";
|
||||
license = licenses.gpl2;
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
52
pkgs/tools/graphics/eplot/default.nix
Normal file
52
pkgs/tools/graphics/eplot/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib, stdenv, fetchurl, gnuplot, ruby }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "eplot";
|
||||
version = "2.09";
|
||||
|
||||
# Upstream has been contacted (2015-03) regarding providing versioned
|
||||
# download URLs. Initial response was positive, but no action yet.
|
||||
src = fetchurl {
|
||||
url = "http://liris.cnrs.fr/christian.wolf/software/eplot/download/eplot";
|
||||
sha256 = "0y9x82i3sfpgxsqz2w42r6iad6ph7vxb7np1xbwapx5iipciclw5";
|
||||
};
|
||||
|
||||
ecSrc = fetchurl {
|
||||
url = "http://liris.cnrs.fr/christian.wolf/software/eplot/download/ec";
|
||||
sha256 = "0fg31g8mrcx14h2rjcf091cbd924n19z55iscaiflspifya30yhd";
|
||||
};
|
||||
|
||||
buildInputs = [ ruby ];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
cp "$src" "$out/bin/eplot"
|
||||
cp "$ecSrc" "$out/bin/ec"
|
||||
chmod +x "$out/bin/"*
|
||||
|
||||
sed -i -e "s|gnuplot -persist|${gnuplot}/bin/gnuplot -persist|" "$out/bin/eplot"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Create plots quickly with gnuplot";
|
||||
longDescription = ''
|
||||
eplot ("easy gnuplot") is a ruby script which allows to pipe data easily
|
||||
through gnuplot and create plots quickly, which can be saved in
|
||||
postscript, PDF, PNG or EMF files. Plotting of multiple files into a
|
||||
single diagram is supported.
|
||||
|
||||
This package also includes the complementary 'ec' tool (say "extract
|
||||
column").
|
||||
'';
|
||||
homepage = "https://perso.liris.cnrs.fr/christian.wolf/software/eplot/";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ bjornfor shamilton ];
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/graphics/epstool/default.nix
Normal file
31
pkgs/tools/graphics/epstool/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.08";
|
||||
pname = "epstool";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ftp.de.debian.org/debian/pool/main/e/epstool/epstool_${version}+repack.orig.tar.gz";
|
||||
sha256 = "1pfgqbipwk36clhma2k365jkpvyy75ahswn8jczzys382jalpwgk";
|
||||
};
|
||||
|
||||
makeFlags = [
|
||||
"CC=${stdenv.cc.targetPrefix}cc"
|
||||
"CLINK=${stdenv.cc.targetPrefix}cc"
|
||||
"LINK=${stdenv.cc.targetPrefix}cc"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
make EPSTOOL_ROOT=$out install
|
||||
'';
|
||||
|
||||
patches = [ ./gcc43.patch ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A utility to create or extract preview images in EPS files, fix bounding boxes and convert to bitmaps";
|
||||
homepage = "http://pages.cs.wisc.edu/~ghost/gsview/epstool.htm";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.asppsa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
20
pkgs/tools/graphics/epstool/gcc43.patch
Normal file
20
pkgs/tools/graphics/epstool/gcc43.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- epstool-3.08.orig/src/epstool.c 2005-06-10 04:41:00.000000000 -0500
|
||||
+++ epstool-3.08/src/epstool.c 2009-02-16 20:55:43.186140029 -0600
|
||||
@@ -2824,7 +2824,7 @@
|
||||
code = -1;
|
||||
}
|
||||
if ((code==0) && stdout_name && (hChildStdoutWr == -1)) {
|
||||
- handle = open(stdout_name, O_WRONLY | O_CREAT);
|
||||
+ handle = open(stdout_name, O_WRONLY | O_CREAT, 0644);
|
||||
hChildStdoutWr = dup2(handle, 1);
|
||||
if (handle != -1)
|
||||
close(handle);
|
||||
@@ -2832,7 +2832,7 @@
|
||||
code = -1;
|
||||
}
|
||||
if ((code==0) && stderr_name && (hChildStderrWr == -1)) {
|
||||
- handle = open(stderr_name, O_WRONLY | O_CREAT);
|
||||
+ handle = open(stderr_name, O_WRONLY | O_CREAT, 0644);
|
||||
hChildStderrWr = dup2(handle, 2);
|
||||
if (handle != -1)
|
||||
close(handle);
|
||||
48
pkgs/tools/graphics/escrotum/default.nix
Normal file
48
pkgs/tools/graphics/escrotum/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, python3Packages, fetchFromGitHub
|
||||
, gtk3
|
||||
, pango
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
with python3Packages; buildPythonApplication {
|
||||
pname = "escrotum";
|
||||
version = "unstable-2020-12-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Roger";
|
||||
repo = "escrotum";
|
||||
rev = "a41d0f11bb6af4f08e724b8ccddf8513d905c0d1";
|
||||
sha256 = "sha256-z0AyTbOEE60j/883X17mxgoaVlryNtn0dfEB0C18G2s=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
pango
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
gobject-introspection
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ pygobject3 xcffib pycairo numpy ];
|
||||
|
||||
# Cannot find pango without strictDeps = false
|
||||
strictDeps = false;
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $man/share/man/man1
|
||||
cp man/escrotum.1 $man/share/man/man1/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Roger/escrotum";
|
||||
description = "Linux screen capture using pygtk, inspired by scrot";
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ rasendubi ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
45
pkgs/tools/graphics/exif/default.nix
Normal file
45
pkgs/tools/graphics/exif/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, libexif
|
||||
, popt
|
||||
, libintl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "exif";
|
||||
version = "0.6.22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libexif";
|
||||
repo = pname;
|
||||
rev = "${pname}-${builtins.replaceStrings ["."] ["_"] version}-release";
|
||||
sha256 = "1xlb1gdwxm3rmw7vlrynhvjp9dkwmvw23mxisdbdmma7ah2nda3i";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "CVE-2021-27815.part-1.patch";
|
||||
url = "https://github.com/libexif/exif/commit/f6334d9d32437ef13dc902f0a88a2be0063d9d1c.patch";
|
||||
sha256 = "0mfx7l8w3w1c2mn5h5d6s7gdfyd91wnml8v0f19v5sdn70hx5aa4";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "CVE-2021-27815.part-2.patch";
|
||||
url = "https://github.com/libexif/exif/commit/eb84b0e3c5f2a86013b6fcfb800d187896a648fa.patch";
|
||||
sha256 = "11lyvy20maisiyhxgxvm85v5l5ba7p0bpd4m0g4ryli32mrwwy0l";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ libexif popt libintl ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://libexif.github.io";
|
||||
description = "A utility to read and manipulate EXIF data in digital photographs";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.lgpl21Plus;
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/graphics/exifprobe/default.nix
Normal file
31
pkgs/tools/graphics/exifprobe/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "exifprobe";
|
||||
version = "unstable-2018-06-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hfiguiere";
|
||||
repo = "exifprobe";
|
||||
rev = "ce1ea2bc3dbbe8092b26f41cd89831cafe633d69";
|
||||
sha256 = "1c1fhc0v1m452lgnfcijnvrc0by06qfbhn3zkliqi60kv8l2isbp";
|
||||
};
|
||||
|
||||
CFLAGS = [ "-O2" ];
|
||||
|
||||
installFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
postInstall = ''
|
||||
mv $out/usr/bin $out/bin
|
||||
mv $out/usr/share $out/share
|
||||
rm -r $out/usr
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool for reading EXIF data from image files produced by digital cameras";
|
||||
homepage = "https://github.com/hfiguiere/exifprobe";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ siraben ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/graphics/exiftags/default.nix
Normal file
27
pkgs/tools/graphics/exiftags/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{lib, stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "exiftags";
|
||||
version = "1.01";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://johnst.org/sw/exiftags/exiftags-${version}.tar.gz";
|
||||
sha256 = "194ifl6hybx2a5x8jhlh9i56k3qfc6p2l72z0ii1b7v0bzg48myr";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
sed -i -e s@/usr/local@$out@ Makefile
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin $out/man/man1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://johnst.org/sw/exiftags/";
|
||||
description = "Displays EXIF data from JPEG files";
|
||||
license = lib.licenses.free;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; unix;
|
||||
};
|
||||
}
|
||||
45
pkgs/tools/graphics/facedetect/default.nix
Normal file
45
pkgs/tools/graphics/facedetect/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, python3Packages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "facedetect";
|
||||
version = "0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wavexx";
|
||||
repo = "facedetect";
|
||||
rev = "v${version}";
|
||||
sha256 = "0mddh71cjbsngpvjli406ndi2x613y39ydgb8bi4z1jp063865sd";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "python3-support.patch";
|
||||
url = "https://gitlab.com/wavexx/facedetect/-/commit/8037d4406eb76dd5c106819f72c3562f8b255b5b.patch";
|
||||
sha256 = "1752k37pbkigiwglx99ba9360ahzzrrb65a8d77k3xs4c3bcmk2p";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ python3Packages.python python3Packages.wrapPython ];
|
||||
pythonPath = [ python3Packages.numpy python3Packages.opencv4 ];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace facedetect \
|
||||
--replace /usr/share/opencv "${python3Packages.opencv4}/share/opencv4"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -v -m644 -D README.rst $out/share/doc/${pname}-${version}/README.rst
|
||||
install -v -m755 -D facedetect $out/bin/facedetect
|
||||
wrapPythonPrograms
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.thregr.org/~wavexx/software/facedetect/";
|
||||
description = "A simple face detector for batch processing";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.rycee ];
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/graphics/fbv/default.nix
Normal file
36
pkgs/tools/graphics/fbv/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, getopt, libjpeg, libpng12, giflib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fbv";
|
||||
version = "1.0b";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://s-tech.elsat.net.pl/fbv/fbv-${version}.tar.gz";
|
||||
sha256 = "0g5b550vk11l639y8p5sx1v1i6ihgqk0x1hd0ri1bc2yzpdbjmcv";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/void-linux/void-packages/4a5bfe522ea5afd8203e804dc6a642d0871cd6dd/srcpkgs/fbv/patches/giflib-5.1.patch";
|
||||
sha256 = "00q1zcn92yvvyij68bnq0m1sr3a411w914f4nyp6mpz0j5xc6dc7";
|
||||
})
|
||||
];
|
||||
|
||||
patchFlags = [ "-p0" ];
|
||||
|
||||
buildInputs = [ getopt libjpeg libpng12 giflib ];
|
||||
makeFlags = [ "LDFLAGS=-lgif" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/{bin,man/man1}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "View pictures on a linux framebuffer device";
|
||||
homepage = "http://s-tech.elsat.net.pl/fbv/";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
59
pkgs/tools/graphics/feedgnuplot/default.nix
Normal file
59
pkgs/tools/graphics/feedgnuplot/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ lib, fetchFromGitHub, makeWrapper
|
||||
, makeFontsConf, freefont_ttf, gnuplot, perl, perlPackages
|
||||
, stdenv, shortenPerlShebang
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
|
||||
|
||||
in
|
||||
|
||||
perlPackages.buildPerlPackage rec {
|
||||
pname = "feedgnuplot";
|
||||
version = "1.58";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dkogan";
|
||||
repo = "feedgnuplot";
|
||||
rev = "v${version}";
|
||||
sha256 = "1qix4lwwyhqibz0a6q2rrb497rmk00v1fvmdyinj0dqmgjw155zr";
|
||||
};
|
||||
|
||||
outputs = [ "out" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin shortenPerlShebang;
|
||||
|
||||
buildInputs = [ gnuplot perl ]
|
||||
++ (with perlPackages; [ ListMoreUtils IPCRun StringShellQuote ]);
|
||||
|
||||
# Fontconfig error: Cannot load default config file
|
||||
FONTCONFIG_FILE = fontsConf;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
# Tests require gnuplot 4.6.4 and are completely skipped with gnuplot 5.
|
||||
doCheck = false;
|
||||
|
||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||
shortenPerlShebang $out/bin/feedgnuplot
|
||||
'' + ''
|
||||
wrapProgram $out/bin/feedgnuplot \
|
||||
--prefix "PATH" ":" "$PATH" \
|
||||
--prefix "PERL5LIB" ":" "$PERL5LIB"
|
||||
install -D -m 444 -t $out/share/bash-completion/completions \
|
||||
completions/bash/feedgnuplot
|
||||
install -D -m 444 -t $out/share/zsh/site-functions \
|
||||
completions/zsh/_feedgnuplot
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "General purpose pipe-oriented plotting tool";
|
||||
homepage = "https://github.com/dkogan/feedgnuplot/";
|
||||
license = with licenses; [ artistic1 gpl1Plus ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ mnacamura ];
|
||||
};
|
||||
}
|
||||
48
pkgs/tools/graphics/fgallery/default.nix
Normal file
48
pkgs/tools/graphics/fgallery/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchurl, unzip, makeWrapper, perlPackages
|
||||
, coreutils, zip, imagemagick, pngcrush, lcms2
|
||||
, facedetect, fbida }:
|
||||
|
||||
# TODO: add optional dependencies (snippet from fgallery source):
|
||||
#
|
||||
# if(system("jpegoptim -V >/dev/null 2>&1")) {
|
||||
# $jpegoptim = 0;
|
||||
# }
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fgallery";
|
||||
version = "1.8.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.thregr.org/~wavexx/software/fgallery/releases/fgallery-${version}.zip";
|
||||
sha256 = "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper unzip ];
|
||||
buildInputs = (with perlPackages; [ perl ImageExifTool CpanelJSONXS ]);
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
mkdir -p "$out/share/fgallery"
|
||||
|
||||
cp -r * "$out/share/fgallery"
|
||||
ln -s -r "$out/share/fgallery/fgallery" "$out/bin/fgallery"
|
||||
|
||||
# Don't preserve file attributes when copying files to output directories.
|
||||
# (fgallery copies parts of itself to each output directory, and without
|
||||
# this change the read-only nix store causes some bumps in the workflow.)
|
||||
sed -i -e "s|'cp'|'cp', '--no-preserve=all'|g" "$out/share/fgallery/fgallery"
|
||||
|
||||
wrapProgram "$out/share/fgallery/fgallery" \
|
||||
--set PERL5LIB "$PERL5LIB" \
|
||||
--set PATH "${lib.makeBinPath
|
||||
[ coreutils zip imagemagick pngcrush lcms2 facedetect fbida ]}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Static photo gallery generator";
|
||||
homepage = "https://www.thregr.org/~wavexx/software/fgallery/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
||||
52
pkgs/tools/graphics/fim/default.nix
Normal file
52
pkgs/tools/graphics/fim/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ gcc9Stdenv, fetchurl, autoconf, automake, pkg-config, lib
|
||||
, perl, flex, bison, readline, libexif
|
||||
, x11Support ? true, SDL
|
||||
, svgSupport ? true, inkscape
|
||||
, asciiArtSupport ? true, aalib
|
||||
, gifSupport ? true, giflib
|
||||
, tiffSupport ? true, libtiff
|
||||
, jpegSupport ? true, libjpeg
|
||||
, pngSupport ? true, libpng
|
||||
}:
|
||||
|
||||
gcc9Stdenv.mkDerivation rec {
|
||||
pname = "fim";
|
||||
version = "0.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://savannah/fbi-improved/${pname}-${version}-trunk.tar.gz";
|
||||
sha256 = "124b7c4flx5ygmy5sqq0gpvxqzafnknbcj6f45ddnbdxik9lazzp";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace doc/vim2html.pl \
|
||||
--replace /usr/bin/perl ${perl}/bin/perl
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ autoconf automake pkg-config ];
|
||||
|
||||
buildInputs = with lib;
|
||||
[ perl flex bison readline libexif ]
|
||||
++ optional x11Support SDL
|
||||
++ optional svgSupport inkscape
|
||||
++ optional asciiArtSupport aalib
|
||||
++ optional gifSupport giflib
|
||||
++ optional tiffSupport libtiff
|
||||
++ optional jpegSupport libjpeg
|
||||
++ optional pngSupport libpng;
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-lSDL";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A lightweight, highly customizable and scriptable image viewer";
|
||||
longDescription = ''
|
||||
FIM (Fbi IMproved) is a lightweight, console based image viewer that aims
|
||||
to be a highly customizable and scriptable for users who are comfortable
|
||||
with software like the VIM text editor or the Mutt mail user agent.
|
||||
'';
|
||||
homepage = "https://www.nongnu.org/fbi-improved/";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ primeos ];
|
||||
};
|
||||
}
|
||||
70
pkgs/tools/graphics/findimagedupes/default.nix
Normal file
70
pkgs/tools/graphics/findimagedupes/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper, perl, perlPackages, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "findimagedupes";
|
||||
version = "2.19.1";
|
||||
|
||||
# fetching this from GitHub does not contain the correct version number
|
||||
src = fetchurl {
|
||||
url = "http://www.jhnc.org/findimagedupes/findimagedupes-${version}.tar.gz";
|
||||
sha256 = "sha256-5NBPoXNZays5wzpQYar4uZZb0P/zB7fdecE+SjkJjcI=";
|
||||
};
|
||||
|
||||
# Work around the "unpacker appears to have produced no directories"
|
||||
setSourceRoot = "sourceRoot=$(pwd)";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||
|
||||
buildInputs = [ perl ] ++ (with perlPackages; [
|
||||
DBFile
|
||||
FileMimeInfo
|
||||
FileBaseDir
|
||||
#GraphicsMagick
|
||||
ImageMagick
|
||||
Inline
|
||||
InlineC
|
||||
ParseRecDescent
|
||||
]);
|
||||
|
||||
# use /tmp as a storage
|
||||
# replace GraphicsMagick with ImageMagick, because perl bindings are not yet available
|
||||
postPatch = ''
|
||||
substituteInPlace findimagedupes \
|
||||
--replace "DIRECTORY => '/usr/local/lib/findimagedupes';" "DIRECTORY => '/tmp';" \
|
||||
--replace "Graphics::Magick" "Image::Magick"
|
||||
'';
|
||||
|
||||
buildPhase = "
|
||||
runHook preBuild
|
||||
${perl}/bin/pod2man findimagedupes > findimagedupes.1
|
||||
runHook postBuild
|
||||
";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D -m 755 findimagedupes $out/bin/findimagedupes
|
||||
installManPage findimagedupes.1
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram "$out/bin/findimagedupes" \
|
||||
--prefix PERL5LIB : "${with perlPackages; makePerlPath [
|
||||
DBFile
|
||||
FileMimeInfo
|
||||
FileBaseDir
|
||||
#GraphicsMagick
|
||||
ImageMagick
|
||||
Inline
|
||||
InlineC
|
||||
ParseRecDescent
|
||||
]}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.jhnc.org/findimagedupes/";
|
||||
description = "Finds visually similar or duplicate images";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ stunkymonkey ];
|
||||
};
|
||||
}
|
||||
42
pkgs/tools/graphics/flam3/default.nix
Normal file
42
pkgs/tools/graphics/flam3/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, libjpeg
|
||||
, libpng
|
||||
, libxml2
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "flam3";
|
||||
version = "3.1.1+date=2018-04-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scottdraves";
|
||||
repo = pname;
|
||||
rev = "7fb50c82e90e051f00efcc3123d0e06de26594b2";
|
||||
hash = "sha256-cKRfmTcyWY2LyxqojTzxD2wnxu5eh3emHi51bhS3gYg=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
libjpeg
|
||||
libpng
|
||||
libxml2
|
||||
zlib
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://flam3.com/";
|
||||
description = "Cosmic recursive fractal flames";
|
||||
longDescription = ''
|
||||
Flames are algorithmically generated images and animations. The software
|
||||
was originally written in 1992 and released as open source, aka free
|
||||
software. Over the years it has been greatly expanded, and is now widely
|
||||
used to create art and special effects. The shape and color of each image
|
||||
is specified by a long string of numbers - a genetic code of sorts.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/graphics/ggobi/default.nix
Normal file
26
pkgs/tools/graphics/ggobi/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, libxml2, gtk2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.1.11";
|
||||
pname = "ggobi";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.ggobi.org/downloads/ggobi-${version}.tar.bz2";
|
||||
sha256 = "2c4ddc3ab71877ba184523e47b0637526e6f3701bd9afb6472e6dfc25646aed7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libxml2 gtk2 ];
|
||||
|
||||
configureFlags = [ "--with-all-plugins" ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Visualization program for exploring high-dimensional data";
|
||||
homepage = "http://www.ggobi.org/";
|
||||
license = licenses.cpl10;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.michelk ];
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/graphics/gifsicle/default.nix
Normal file
35
pkgs/tools/graphics/gifsicle/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchurl, xorgproto, libXt, libX11
|
||||
, gifview ? false
|
||||
, static ? stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gifsicle";
|
||||
version = "1.93";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.lcdf.org/gifsicle/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-kvZweXMr9MHaCH5q4JBSBYRuWsd3ulyqZtEqc6qUNEc=";
|
||||
};
|
||||
|
||||
buildInputs = optionals gifview [ xorgproto libXt libX11 ];
|
||||
|
||||
configureFlags = optional (!gifview) "--disable-gifview";
|
||||
|
||||
LDFLAGS = optionalString static "-static";
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
./src/gifsicle --info logo.gif
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Command-line tool for creating, editing, and getting information about GIF images and animations";
|
||||
homepage = "https://www.lcdf.org/gifsicle/";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = with lib.maintainers; [ zimbatm ];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/graphics/gifski/default.nix
Normal file
25
pkgs/tools/graphics/gifski/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "gifski";
|
||||
version = "1.6.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ImageOptim";
|
||||
repo = "gifski";
|
||||
rev = version;
|
||||
sha256 = "sha256-TD6MSZfvJ8fLJxvDh4fc4Dij5t4WSH2/i9Jz7eBmlME=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-kG0svhytDzm2dc//8WTFm1sI3WS0Ny9yhYTSMoXnt8I=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "GIF encoder based on libimagequant (pngquant)";
|
||||
homepage = "https://gif.ski/";
|
||||
license = licenses.agpl3;
|
||||
maintainers = [ maintainers.marsam ];
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/graphics/glee/default.nix
Normal file
33
pkgs/tools/graphics/glee/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{lib, stdenv, fetchgit, cmake, libGLU, libGL, xorg }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glee";
|
||||
rev = "f727ec7463d514b6279981d12833f2e11d62b33d";
|
||||
version = "20170205-${lib.strings.substring 0 7 rev}";
|
||||
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "https://git.code.sf.net/p/${pname}/${pname}";
|
||||
sha256 = "13mf3s7nvmj26vr2wbcg08l4xxqsc1ha41sx3bfghvq8c5qpk2ph";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ libGLU libGL xorg.libX11 ];
|
||||
|
||||
configureScript = ''
|
||||
cmake
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
sed -i 's/readme/Readme/' cmake_install.cmake
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GL Easy Extension Library";
|
||||
homepage = "https://sourceforge.net/p/glee/glee/";
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
65
pkgs/tools/graphics/glmark2/default.nix
Normal file
65
pkgs/tools/graphics/glmark2/default.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, makeWrapper
|
||||
, libjpeg
|
||||
, libpng
|
||||
, xorg
|
||||
, libX11
|
||||
, libGL
|
||||
, libdrm
|
||||
, udev
|
||||
, python3
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, mesa
|
||||
, wafHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glmark2";
|
||||
version = "2021.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "glmark2";
|
||||
repo = "glmark2";
|
||||
rev = version;
|
||||
sha256 = "sha256-S6KkazkG+kdx02MPwrYvCFWSOtM6t5xT0OTE9PLCzas=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wafHook makeWrapper ];
|
||||
buildInputs = [
|
||||
libjpeg
|
||||
libpng
|
||||
xorg.libxcb
|
||||
libX11
|
||||
libdrm
|
||||
python3
|
||||
udev
|
||||
wayland
|
||||
wayland-protocols
|
||||
mesa
|
||||
];
|
||||
|
||||
wafConfigureFlags = [ "--with-flavors=x11-gl,x11-glesv2,drm-gl,drm-glesv2,wayland-gl,wayland-glesv2" ];
|
||||
|
||||
postInstall = ''
|
||||
for binary in $out/bin/glmark2*; do
|
||||
wrapProgram $binary \
|
||||
--set LD_LIBRARY_PATH ${libGL}/lib
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "OpenGL (ES) 2.0 benchmark";
|
||||
homepage = "https://github.com/glmark2/glmark2";
|
||||
license = licenses.gpl3Plus;
|
||||
longDescription = ''
|
||||
glmark2 is a benchmark for OpenGL (ES) 2.0. It uses only the subset of
|
||||
the OpenGL 2.0 API that is compatible with OpenGL ES 2.0.
|
||||
'';
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.wmertens ];
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/graphics/glxinfo/default.nix
Normal file
35
pkgs/tools/graphics/glxinfo/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchurl, libGL, libX11 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glxinfo";
|
||||
version = "8.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.freedesktop.org/pub/mesa/demos/mesa-demos-${version}.tar.bz2";
|
||||
sha256 = "0zgzbz55a14hz83gbmm0n9gpjnf5zadzi2kjjvkn6khql2a9rs81";
|
||||
};
|
||||
|
||||
buildInputs = [ libX11 libGL ];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
buildPhase = "
|
||||
$CC src/xdemos/{glxinfo.c,glinfo_common.c} -o glxinfo -lGL -lX11
|
||||
$CC src/xdemos/glxgears.c -o glxgears -lGL -lX11 -lm
|
||||
$CC src/egl/opengles2/es2_info.c -o es2_info -lEGL -lGLESv2 -lX11
|
||||
$CC src/egl/opengles2/es2gears.c src/egl/eglut/{eglut.c,eglut_x11.c} -o es2gears -Isrc/egl/eglut -lEGL -lGLESv2 -lX11 -lm
|
||||
$CC src/egl/opengl/eglinfo.c -o eglinfo -lEGL -lGLESv2 -lX11
|
||||
";
|
||||
|
||||
installPhase = "
|
||||
install -Dm 555 -t $out/bin glx{info,gears} es2{_info,gears} eglinfo
|
||||
";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Test utilities for OpenGL";
|
||||
homepage = "https://www.mesa3d.org/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
||||
168
pkgs/tools/graphics/gmic-qt/default.nix
Normal file
168
pkgs/tools/graphics/gmic-qt/default.nix
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchurl
|
||||
, variant ? "standalone"
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, opencv3
|
||||
, openexr
|
||||
, graphicsmagick
|
||||
, fftw
|
||||
, zlib
|
||||
, libjpeg
|
||||
, libtiff
|
||||
, libpng
|
||||
, curl
|
||||
, krita ? null
|
||||
, gimp ? null
|
||||
, qtbase
|
||||
, qttools
|
||||
, writeShellScript
|
||||
, common-updater-scripts
|
||||
, gnugrep
|
||||
, gnused
|
||||
, coreutils
|
||||
, jq
|
||||
}:
|
||||
|
||||
let
|
||||
variants = {
|
||||
gimp = {
|
||||
extraDeps = [
|
||||
gimp
|
||||
gimp.gtk
|
||||
];
|
||||
description = "GIMP plugin for the G'MIC image processing framework";
|
||||
};
|
||||
|
||||
krita = {
|
||||
extraDeps = [
|
||||
krita
|
||||
];
|
||||
description = "Krita plugin for the G'MIC image processing framework";
|
||||
};
|
||||
|
||||
standalone = {
|
||||
description = "Versatile front-end to the image processing framework G'MIC";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
assert lib.assertMsg (builtins.hasAttr variant variants) "gmic-qt variant “${variant}” is not supported. Please use one of ${lib.concatStringsSep ", " (builtins.attrNames variants)}.";
|
||||
|
||||
assert lib.assertMsg (builtins.all (d: d != null) variants.${variant}.extraDeps or []) "gmic-qt variant “${variant}” is missing one of its dependencies.";
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "gmic-qt${lib.optionalString (variant != "standalone") "-${variant}"}";
|
||||
version = "3.0.0";
|
||||
|
||||
gmic-community = fetchFromGitHub {
|
||||
owner = "dtschump";
|
||||
repo = "gmic-community";
|
||||
rev = "df23b08bc52767762f0e38d040cd8ffeea4b865e";
|
||||
sha256 = "euk5RsFPBgx2czAukPRdi/O4ahgXO8J8VJdiGHNge5M=";
|
||||
};
|
||||
|
||||
CImg = fetchFromGitHub {
|
||||
owner = "dtschump";
|
||||
repo = "CImg";
|
||||
rev = "v.${version}";
|
||||
sha256 = "dC4VuWTz0uyFxLjBQ+2ggndHaCErcoI7tJMfkqbWmeg=";
|
||||
};
|
||||
|
||||
gmic_stdlib = fetchurl {
|
||||
name = "gmic_stdlib.h";
|
||||
url = "http://gmic.eu/gmic_stdlib${lib.replaceStrings ["."] [""] version}.h";
|
||||
sha256 = "CAYSxw5NCmE29hie1/J1csBcdQvIrmZ/+mNMl0sLLGI=";
|
||||
};
|
||||
|
||||
gmic = fetchFromGitHub {
|
||||
owner = "dtschump";
|
||||
repo = "gmic";
|
||||
rev = "v.${version}";
|
||||
sha256 = "PyeJmjOqjbHlZ1Xl3IpoOD6oZEcUrHNHqF7Ft1RZDL4=";
|
||||
};
|
||||
|
||||
gmic_qt = fetchFromGitHub {
|
||||
owner = "c-koi";
|
||||
repo = "gmic-qt";
|
||||
rev = "v.${version}";
|
||||
sha256 = "nENXumOArRAHENqnBUjM7m+I5hf/WAFTVfm6cJgnv+0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
qttools
|
||||
fftw
|
||||
zlib
|
||||
libjpeg
|
||||
libtiff
|
||||
libpng
|
||||
opencv3
|
||||
openexr
|
||||
graphicsmagick
|
||||
curl
|
||||
] ++ variants.${variant}.extraDeps or [];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGMIC_QT_HOST=${if variant == "standalone" then "none" else variant}"
|
||||
];
|
||||
|
||||
unpackPhase = ''
|
||||
cp -r ${gmic} gmic
|
||||
ln -s ${gmic-community} gmic-community
|
||||
cp -r ${gmic_qt} gmic_qt
|
||||
chmod -R +w gmic gmic_qt
|
||||
ln -s ${CImg} CImg
|
||||
|
||||
cp ${gmic_stdlib} gmic/src/gmic_stdlib.h
|
||||
|
||||
cd gmic_qt
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString (variant == "gimp") ''
|
||||
echo "wrapping $out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt"
|
||||
wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = writeShellScript "${pname}-update-script" ''
|
||||
set -o errexit
|
||||
PATH=${lib.makeBinPath [ common-updater-scripts curl gnugrep gnused coreutils jq ]}
|
||||
|
||||
latestVersion=$(curl 'https://gmic.eu/files/source/' | grep -E 'gmic_[^"]+\.tar\.gz' | sed -E 's/.+<a href="gmic_([^"]+)\.tar\.gz".+/\1/g' | sort --numeric-sort --reverse | head -n1)
|
||||
|
||||
if [[ "${version}" = "$latestVersion" ]]; then
|
||||
echo "The new version same as the old version."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# gmic-community is not versioned so let’s just update to master.
|
||||
communityLatestCommit=$(curl "https://api.github.com/repos/dtschump/gmic-community/commits/master")
|
||||
communityLatestSha=$(echo "$communityLatestCommit" | jq .sha --raw-output)
|
||||
communityLatestDate=$(echo "$communityLatestCommit" | jq .commit.committer.date --raw-output | sed 's/T.\+//')
|
||||
update-source-version --source-key=gmic-community "gmic-qt" "unstable-$communityLatestDate" --rev="$communityLatestSha"
|
||||
|
||||
for component in CImg gmic_stdlib gmic gmic_qt; do
|
||||
# The script will not perform an update when the version attribute is up to date from previous platform run
|
||||
# We need to clear it before each run
|
||||
update-source-version "--source-key=$component" "gmic-qt" 0 "$(printf '0%.0s' {1..64})"
|
||||
update-source-version "--source-key=$component" "gmic-qt" $latestVersion
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = variants.${variant}.description;
|
||||
homepage = "http://gmic.eu/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
56
pkgs/tools/graphics/gmic/default.nix
Normal file
56
pkgs/tools/graphics/gmic/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, cmake
|
||||
, ninja
|
||||
, pkg-config
|
||||
, opencv
|
||||
, openexr
|
||||
, graphicsmagick
|
||||
, fftw
|
||||
, zlib
|
||||
, libjpeg
|
||||
, libtiff
|
||||
, libpng
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gmic";
|
||||
version = "3.0.0";
|
||||
|
||||
outputs = [ "out" "lib" "dev" "man" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://gmic.eu/files/source/gmic_${version}.tar.gz";
|
||||
sha256 = "sha256-PwVruebb8GdK9Mjc5Z9BmBchh2Yvf7s2zGPryMG3ESA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fftw
|
||||
zlib
|
||||
libjpeg
|
||||
libtiff
|
||||
libpng
|
||||
opencv
|
||||
openexr
|
||||
graphicsmagick
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_LIB_STATIC=OFF"
|
||||
"-DENABLE_CURL=OFF"
|
||||
"-DENABLE_DYNAMIC_LINKING=ON"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open and full-featured framework for image processing";
|
||||
homepage = "https://gmic.eu/";
|
||||
license = licenses.cecill20;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
80
pkgs/tools/graphics/gnuplot/default.nix
Normal file
80
pkgs/tools/graphics/gnuplot/default.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper, pkg-config, texinfo
|
||||
, cairo, gd, libcerf, pango, readline, zlib
|
||||
, withTeXLive ? false, texlive
|
||||
, withLua ? false, lua
|
||||
, withCaca ? false, libcaca
|
||||
, libX11 ? null
|
||||
, libXt ? null
|
||||
, libXpm ? null
|
||||
, libXaw ? null
|
||||
, aquaterm ? false
|
||||
, withWxGTK ? false, wxGTK ? null
|
||||
, fontconfig ? null
|
||||
, gnused ? null
|
||||
, coreutils ? null
|
||||
, withQt ? false, mkDerivation, qttools, qtbase, qtsvg
|
||||
}:
|
||||
|
||||
assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null);
|
||||
let
|
||||
withX = libX11 != null && !aquaterm && !stdenv.isDarwin;
|
||||
in
|
||||
(if withQt then mkDerivation else stdenv.mkDerivation) rec {
|
||||
pname = "gnuplot";
|
||||
version = "5.4.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gnuplot/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-UfiburkPltNUP5UjU2jRiOseJu2ilpEiVqvNNTW9TYQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkg-config texinfo ] ++ lib.optional withQt qttools;
|
||||
|
||||
buildInputs =
|
||||
[ cairo gd libcerf pango readline zlib ]
|
||||
++ lib.optional withTeXLive (texlive.combine { inherit (texlive) scheme-small; })
|
||||
++ lib.optional withLua lua
|
||||
++ lib.optional withCaca libcaca
|
||||
++ lib.optionals withX [ libX11 libXpm libXt libXaw ]
|
||||
++ lib.optionals withQt [ qtbase qtsvg ]
|
||||
++ lib.optional withWxGTK wxGTK;
|
||||
|
||||
postPatch = ''
|
||||
# lrelease is in qttools, not in qtbase.
|
||||
sed -i configure -e 's|''${QT5LOC}/lrelease|lrelease|'
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
(if withX then "--with-x" else "--without-x")
|
||||
(if withQt then "--with-qt=qt5" else "--without-qt")
|
||||
(if aquaterm then "--with-aquaterm" else "--without-aquaterm")
|
||||
] ++ lib.optional withCaca "--with-caca";
|
||||
|
||||
CXXFLAGS = lib.optionalString (stdenv.isDarwin && withQt) "-std=c++11";
|
||||
|
||||
postInstall = lib.optionalString withX ''
|
||||
wrapProgram $out/bin/gnuplot \
|
||||
--prefix PATH : '${gnused}/bin' \
|
||||
--prefix PATH : '${coreutils}/bin' \
|
||||
--prefix PATH : '${fontconfig.bin}/bin' \
|
||||
--run '. ${./set-gdfontpath-from-fontconfig.sh}'
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.gnuplot.info/";
|
||||
description = "A portable command-line driven graphing utility for many platforms";
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
license = {
|
||||
# Essentially a BSD license with one modifaction:
|
||||
# Permission to modify the software is granted, but not the right to
|
||||
# distribute the complete modified source code. Modifications are to
|
||||
# be distributed as patches to the released version. Permission to
|
||||
# distribute binaries produced by compiling modified sources is granted,
|
||||
# provided you: ...
|
||||
url = "https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/Copyright";
|
||||
};
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
p=( $(fc-list : file | sed "s@/[^/]*: @@" | sort -u) )
|
||||
IFS=:
|
||||
export GDFONTPATH="${GDFONTPATH}${GDFONTPATH:+:}${p[*]}"
|
||||
unset IFS p
|
||||
119
pkgs/tools/graphics/goverlay/default.nix
Normal file
119
pkgs/tools/graphics/goverlay/default.nix
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
{ lib
|
||||
, writeScriptBin
|
||||
, bash
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fpc
|
||||
, lazarus-qt
|
||||
, wrapQtAppsHook
|
||||
, breeze-qt5
|
||||
, libGL
|
||||
, libGLU
|
||||
, libqt5pas
|
||||
, libX11
|
||||
, coreutils
|
||||
, git
|
||||
, gnugrep
|
||||
, libnotify
|
||||
, polkit
|
||||
, procps
|
||||
, systemd
|
||||
, util-linux
|
||||
, vulkan-tools
|
||||
, which
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
let
|
||||
# Finds data files using the XDG Base Directory Specification
|
||||
# See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
find-xdg-data-files = writeScriptBin "find-xdg-data-files" ''
|
||||
#!${bash}/bin/sh
|
||||
IFS=:
|
||||
for xdg_data_dir in ''${XDG_DATA_HOME:-$HOME/.local/share}:''${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do
|
||||
if [ -f "$xdg_data_dir/$1" ]; then
|
||||
echo "$xdg_data_dir/$1"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "goverlay";
|
||||
version = "0.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "benjamimgois";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-oXkGrMHjs8uui0pzGYW8jnttet/5IX0r8eat0n5saFk=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
patches = [
|
||||
# Find MangoHud & vkBasalt Vulkan layers using the XDG Base Directory Specification
|
||||
./find-xdg-data-files.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace 'prefix = /usr/local' "prefix = $out"
|
||||
|
||||
substituteInPlace overlayunit.pas \
|
||||
--replace '/usr/share/icons/hicolor/128x128/apps/goverlay.png' "$out/share/icons/hicolor/128x128/apps/goverlay.png"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
fpc
|
||||
lazarus-qt
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
breeze-qt5
|
||||
libGL
|
||||
libGLU
|
||||
libqt5pas
|
||||
libX11
|
||||
];
|
||||
|
||||
NIX_LDFLAGS = "-lGLU -rpath ${lib.makeLibraryPath buildInputs}";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
HOME=$(mktemp -d) lazbuild --lazarusdir=${lazarus-qt}/share/lazarus -B goverlay.lpi
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--prefix PATH : ${lib.makeBinPath [
|
||||
bash
|
||||
coreutils
|
||||
find-xdg-data-files
|
||||
git
|
||||
gnugrep
|
||||
libnotify
|
||||
polkit
|
||||
procps
|
||||
systemd
|
||||
util-linux.bin
|
||||
vulkan-tools
|
||||
which
|
||||
]}"
|
||||
|
||||
# Force xcb since libqt5pas doesn't support Wayland
|
||||
# See https://github.com/benjamimgois/goverlay/issues/107
|
||||
"--set QT_QPA_PLATFORM xcb"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "An opensource project that aims to create a Graphical UI to help manage Linux overlays";
|
||||
homepage = "https://github.com/benjamimgois/goverlay";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ kira-bruneau ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/graphics/goverlay/find-xdg-data-files.patch
Normal file
40
pkgs/tools/graphics/goverlay/find-xdg-data-files.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
diff --git a/overlayunit.pas b/overlayunit.pas
|
||||
index 97a088d..4c42414 100644
|
||||
--- a/overlayunit.pas
|
||||
+++ b/overlayunit.pas
|
||||
@@ -5007,7 +5007,7 @@ begin
|
||||
//Determine Mangohud dependency status
|
||||
|
||||
//locate MangoHud and store result in tmp folder
|
||||
- RunCommand('bash -c ''find /usr/share/vulkan/implicit_layer.d/MangoHud.json >> /tmp/goverlay/dependency_mangohud''', s);
|
||||
+ RunCommand('bash -c ''find-xdg-data-files vulkan/implicit_layer.d/MangoHud.json >> /tmp/goverlay/dependency_mangohud''', s);
|
||||
|
||||
// Assign Text file dependency_mangohud to variable mangohudVAR
|
||||
AssignFile(mangohudVAR, '/tmp/goverlay/dependency_mangohud');
|
||||
@@ -5016,7 +5016,7 @@ begin
|
||||
CloseFile(mangohudVAR);
|
||||
|
||||
// Read String and store value on mangohuddependencyVALUE based on result
|
||||
- if mangohudSTR = '/usr/share/vulkan/implicit_layer.d/MangoHud.json' then
|
||||
+ if mangohudSTR <> '' then
|
||||
mangohuddependencyVALUE := 1
|
||||
else
|
||||
mangohuddependencyVALUE := 0;
|
||||
@@ -5025,7 +5025,7 @@ begin
|
||||
//Determine vkBasalt dependency staus
|
||||
|
||||
//locate vkBasalt and store result in tmp folder
|
||||
- RunCommand('bash -c ''find /usr/share/vulkan/implicit_layer.d/vkBasalt.json >> /tmp/goverlay/dependency_vkbasalt''', s);
|
||||
+ RunCommand('bash -c ''find-xdg-data-files vulkan/implicit_layer.d/vkBasalt.json >> /tmp/goverlay/dependency_vkbasalt''', s);
|
||||
|
||||
// Assign Text file dependency_mangohud to variable mangohudVAR
|
||||
AssignFile(vkbasaltVAR, '/tmp/goverlay/dependency_vkbasalt');
|
||||
@@ -5034,7 +5034,7 @@ begin
|
||||
CloseFile(vkbasaltVAR);
|
||||
|
||||
// Read String and store value on vkbasaltdependencyVALUE based on result
|
||||
- if vkbasaltSTR = '/usr/share/vulkan/implicit_layer.d/vkBasalt.json' then
|
||||
+ if vkbasaltSTR <> '' then
|
||||
vkbasaltdependencyVALUE := 1
|
||||
else
|
||||
vkbasaltdependencyVALUE := 0;
|
||||
31
pkgs/tools/graphics/graph-cli/default.nix
Normal file
31
pkgs/tools/graphics/graph-cli/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib
|
||||
, python3Packages
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "graph-cli";
|
||||
version = "0.1.7";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit version;
|
||||
pname = "graph_cli";
|
||||
sha256 = "sha256-/v9COgAjuunJ06HHl55J0moV1p4uO+N+w2QwE8tgebQ=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
numpy
|
||||
pandas
|
||||
matplotlib
|
||||
];
|
||||
|
||||
# does not contain tests despite reference in Makefile
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "graph_cli" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI to create graphs from CSV files";
|
||||
homepage = "https://github.com/mcastorina/graph-cli/";
|
||||
license = with licenses; [ gpl3Only ];
|
||||
maintainers = with maintainers; [ leungbk ];
|
||||
};
|
||||
}
|
||||
17
pkgs/tools/graphics/graph-easy/default.nix
Normal file
17
pkgs/tools/graphics/graph-easy/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, perlPackages, fetchurl }:
|
||||
|
||||
perlPackages.buildPerlPackage {
|
||||
pname = "Graph-Easy";
|
||||
version = "0.76";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/S/SH/SHLOMIF/Graph-Easy-0.76.tar.gz";
|
||||
sha256 = "d4a2c10aebef663b598ea37f3aa3e3b752acf1fbbb961232c3dbe1155008d1fa";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Render/convert graphs in/from various formats";
|
||||
license = licenses.gpl1;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.jensbin ];
|
||||
};
|
||||
}
|
||||
110
pkgs/tools/graphics/graphviz/default.nix
Normal file
110
pkgs/tools/graphics/graphviz/default.nix
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, cairo
|
||||
, expat
|
||||
, flex
|
||||
, fontconfig
|
||||
, gd
|
||||
, gts
|
||||
, libdevil
|
||||
, libjpeg
|
||||
, libpng
|
||||
, libtool
|
||||
, pango
|
||||
, bash
|
||||
, bison
|
||||
, xorg
|
||||
, ApplicationServices
|
||||
, python3
|
||||
, fltk
|
||||
, exiv2
|
||||
, withXorg ? true
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) optional optionals optionalString;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "graphviz";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "graphviz";
|
||||
repo = "graphviz";
|
||||
# use rev as tags have disappeared before
|
||||
rev = "24cf7232bb8728823466e0ef536862013893e567";
|
||||
sha256 = "sha256-qqrpCJ9WP8wadupp4YRJMMaSCeFIDuFDQvEOpbG/wGM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
python3
|
||||
bison
|
||||
flex
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libpng
|
||||
libjpeg
|
||||
expat
|
||||
fontconfig
|
||||
gd
|
||||
gts
|
||||
libdevil
|
||||
pango
|
||||
bash
|
||||
] ++ optionals withXorg (with xorg; [ libXrender libXaw libXpm ])
|
||||
++ optionals stdenv.isDarwin [ ApplicationServices ];
|
||||
|
||||
hardeningDisable = [ "fortify" ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-ltdl-lib=${libtool.lib}/lib"
|
||||
"--with-ltdl-include=${libtool}/include"
|
||||
] ++ lib.optional (xorg == null) "--without-x";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
CPPFLAGS = lib.optionalString (withXorg && stdenv.isDarwin)
|
||||
"-I${cairo.dev}/include/cairo";
|
||||
|
||||
# ''
|
||||
# substituteInPlace rtest/rtest.sh \
|
||||
# --replace "/bin/ksh" "${mksh}/bin/mksh"
|
||||
# '';
|
||||
|
||||
doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs
|
||||
|
||||
postPatch = ''
|
||||
for f in $(find . -name Makefile.in); do
|
||||
substituteInPlace $f --replace "-lstdc++" "-lc++"
|
||||
done
|
||||
'';
|
||||
|
||||
preAutoreconf = "./autogen.sh";
|
||||
|
||||
postFixup = optionalString withXorg ''
|
||||
substituteInPlace $out/bin/dotty --replace '`which lefty`' $out/bin/lefty
|
||||
substituteInPlace $out/bin/vimdot \
|
||||
--replace '"/usr/bin/vi"' '"$(command -v vi)"' \
|
||||
--replace '"/usr/bin/vim"' '"$(command -v vim)"' \
|
||||
--replace /usr/bin/vimdot $out/bin/vimdot \
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (python3.pkgs) pygraphviz;
|
||||
inherit fltk exiv2;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://graphviz.org";
|
||||
description = "Graph visualization tools";
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ bjornfor raskin ];
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/graphics/grim/default.nix
Normal file
36
pkgs/tools/graphics/grim/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromSourcehut, pixman, libpng, libjpeg, meson, ninja, wayland, pkg-config, scdoc, wayland-protocols }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "grim";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~emersion";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-lwJn1Lysv1qLauqmrduUlzdoKUrUM5uBjv+dWSsrM6w=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
scdoc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pixman
|
||||
libpng
|
||||
libjpeg
|
||||
wayland
|
||||
wayland-protocols
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Grab images from a Wayland compositor";
|
||||
homepage = "https://github.com/emersion/grim";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ buffet ];
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/graphics/gromit-mpx/default.nix
Normal file
38
pkgs/tools/graphics/gromit-mpx/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, gtk, glib, pcre, libappindicator, libpthreadstubs, libXdmcp
|
||||
, libxkbcommon, libepoxy, at-spi2-core, dbus, libdbusmenu
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gromit-mpx";
|
||||
version = "1.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bk138";
|
||||
repo = "gromit-mpx";
|
||||
rev = version;
|
||||
sha256 = "sha256-2inmcKSdvHs7WaU095liH12Og9ezsNSs2qygltWOclw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapGAppsHook ];
|
||||
buildInputs = [
|
||||
gtk glib pcre libappindicator libpthreadstubs
|
||||
libXdmcp libxkbcommon libepoxy at-spi2-core
|
||||
dbus libdbusmenu
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Desktop annotation tool";
|
||||
|
||||
longDescription = ''
|
||||
Gromit-MPX (GRaphics Over MIscellaneous Things) is a small tool
|
||||
to make annotations on the screen.
|
||||
'';
|
||||
|
||||
homepage = "https://github.com/bk138/gromit-mpx";
|
||||
maintainers = with maintainers; [ pjones ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2Plus;
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/graphics/guff/default.nix
Normal file
25
pkgs/tools/graphics/guff/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "guff";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "silentbicycle";
|
||||
repo = "guff";
|
||||
rev = "v${version}";
|
||||
sha256 = "0n8mc9j3044j4b3vgc94ryd2j9ik6g73fqja54yxfdfrks4ksyds";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A plot device";
|
||||
homepage = "https://github.com/silentbicycle/guff";
|
||||
license = licenses.isc;
|
||||
maintainers = [ maintainers.marsam ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/graphics/hobbits/default.nix
Normal file
36
pkgs/tools/graphics/hobbits/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, mkDerivation, fetchFromGitHub
|
||||
, cmake, pkg-config, pffft, libpcap, libusb1, python3
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "hobbits";
|
||||
version = "0.53.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Mahlet-Inc";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-dMFsv2M96+65JxTOq0CG+vm7a75GkD7N7PmbsyZ2Fog=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/hobbits-core/settingsdata.cpp \
|
||||
--replace "pythonHome = \"/usr\"" "pythonHome = \"${python3}\""
|
||||
substituteInPlace cmake/gitversion.cmake \
|
||||
--replace "[Mystery Build]" "${version}"
|
||||
'';
|
||||
|
||||
buildInputs = [ pffft libpcap libusb1 python3 ];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A multi-platform GUI for bit-based analysis, processing, and visualization";
|
||||
homepage = "https://github.com/Mahlet-Inc/hobbits";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/graphics/ibniz/default.nix
Normal file
26
pkgs/tools/graphics/ibniz/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchurl, SDL }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ibniz";
|
||||
version = "1.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.pelulamu.net/ibniz/${pname}-${version}.tar.gz";
|
||||
sha256 = "10b4dka8zx7y84m1a58z9j2vly8mz9aw9wn8z9vx9av739j95wp2";
|
||||
};
|
||||
|
||||
buildInputs = [ SDL ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ibniz $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Virtual machine designed for extremely compact low-level audiovisual programs";
|
||||
homepage = "https://github.com/viznut/IBNIZ";
|
||||
license = licenses.zlib;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.dezgeg ];
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/graphics/icoutils/default.nix
Normal file
38
pkgs/tools/graphics/icoutils/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchurl, libpng, perl, perlPackages, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "icoutils";
|
||||
version = "0.32.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://savannah/icoutils/icoutils-${version}.tar.bz2";
|
||||
sha256 = "1q66cksms4l62y0wizb8vfavhmf7kyfgcfkynil3n99s0hny1aqp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ libpng perl ];
|
||||
propagatedBuildInputs = [ perlPackages.LWP ];
|
||||
|
||||
# Fixes a build failure on aarch64-darwin. Define for all Darwin targets for when x86_64-darwin
|
||||
# upgrades to a newer SDK.
|
||||
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-DTARGET_OS_IPHONE=0";
|
||||
|
||||
patchPhase = ''
|
||||
patchShebangs extresso/extresso
|
||||
patchShebangs extresso/extresso.in
|
||||
patchShebangs extresso/genresscript
|
||||
patchShebangs extresso/genresscript.in
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram $out/bin/extresso --prefix PERL5LIB : $PERL5LIB
|
||||
wrapProgram $out/bin/genresscript --prefix PERL5LIB : $PERL5LIB
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.nongnu.org/icoutils/";
|
||||
description = "Set of programs to deal with Microsoft Windows(R) icon and cursor files";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = with lib.platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/graphics/ifm/default.nix
Normal file
30
pkgs/tools/graphics/ifm/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchzip, autoreconfHook, bison, flex, help2man, perl, tk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ifm";
|
||||
version = "2015-11-08";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://bitbucket.org/zondo/ifm/get/dca0774e4d3a.zip";
|
||||
sha256 = "14af21qjd5jvsscm6vxpsdrnipdr33g6niagzmykrhyfhwcbjahi";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook bison flex help2man ];
|
||||
|
||||
buildInputs = [ perl tk ]; # perl and wish are not run but written as shebangs.
|
||||
|
||||
# Workaround build failure on -fno-common toolchains:
|
||||
# ld: libvars.a(vars-freeze-lex.o):src/libvars/vars-freeze-lex.l:23:
|
||||
# multiple definition of `line_number'; ifm-main.o:src/ifm-main.c:46: first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
enableParallelBuilding = false; # ifm-scan.l:16:10: fatal error: ifm-parse.h: No such file or directory
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://bitbucket.org/zondo/ifm";
|
||||
description = "Interactive fiction mapper";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
};
|
||||
}
|
||||
42
pkgs/tools/graphics/imageworsener/default.nix
Normal file
42
pkgs/tools/graphics/imageworsener/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, zlib
|
||||
, libpng
|
||||
, libjpeg
|
||||
, libwebp
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "imageworsener";
|
||||
version = "1.3.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://entropymine.com/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1dhjhlfrdng50dxxd306adzm54ir62pz99h4v0yi6rg56nxv5q5s";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tests/runtest
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/doc/imageworsener
|
||||
cp readme.txt technical.txt $out/share/doc/imageworsener
|
||||
'';
|
||||
|
||||
buildInputs = [ zlib libpng libjpeg libwebp ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A raster image scaling and processing utility";
|
||||
homepage = "https://entropymine.com/imageworsener/";
|
||||
changelog = "https://github.com/jsummers/${pname}/blob/${version}/changelog.txt";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ emily smitop ];
|
||||
mainProgram = "imagew";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/graphics/imgur-screenshot/default.nix
Normal file
29
pkgs/tools/graphics/imgur-screenshot/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub, makeWrapper, curl, jq, gnugrep, libnotify, scrot, which, xclip }:
|
||||
|
||||
let deps = lib.makeBinPath [ curl jq gnugrep libnotify scrot which xclip ];
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "2.0.0";
|
||||
pname = "imgur-screenshot";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jomo";
|
||||
repo = "imgur-screenshot";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fkhvfraijbrw806pgij41bn1hc3r7l7l3snkicmshxj83lmsd5k";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 imgur-screenshot $out/bin/imgur-screenshot
|
||||
wrapProgram $out/bin/imgur-screenshot --prefix PATH ':' ${deps}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool for easy screencapping and uploading to imgur";
|
||||
homepage = "https://github.com/jomo/imgur-screenshot/";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ lw ];
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/graphics/imgurbash2/default.nix
Normal file
31
pkgs/tools/graphics/imgurbash2/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, bash, curl, xsel }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "imgurbash2";
|
||||
version = "3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ram-on";
|
||||
repo = "imgurbash2";
|
||||
rev = version;
|
||||
sha256 = "10zs6p17psl1vq5vpkfkf9nrlmibk6v1ds3yxbf1rip1zaqlwxg6";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cat <<EOF >$out/bin/imgurbash2
|
||||
#!${bash}/bin/bash
|
||||
PATH=${lib.makeBinPath [curl xsel]}:\$PATH
|
||||
EOF
|
||||
cat imgurbash2 >> $out/bin/imgurbash2
|
||||
chmod +x $out/bin/imgurbash2
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A shell script that uploads images to imgur";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
homepage = "https://github.com/ram-on/imgurbash2";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
From 53ce5fe7e73d7ed95c9e12b52dd4984723f865fa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zdenko=20Podobn=C3=BD?= <zdenop@gmail.com>
|
||||
Date: Sun, 6 Apr 2014 21:25:27 +0200
|
||||
Subject: [PATCH] fix build with leptonica 1.70
|
||||
|
||||
---
|
||||
configure.ac | 1 +
|
||||
src/jbig2.cc | 13 +++++++++----
|
||||
2 files changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fe37c22..753a607 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -55,6 +55,7 @@ AC_CHECK_LIB([lept], [findFileFormatStream], [], [
|
||||
echo "Error! Leptonica not detected."
|
||||
exit -1
|
||||
])
|
||||
+AC_CHECK_FUNCS(expandBinaryPower2Low,,)
|
||||
# test for function - it should detect leptonica dependecies
|
||||
|
||||
# Check for possible dependancies of leptonica.
|
||||
diff --git a/src/jbig2.cc b/src/jbig2.cc
|
||||
index e10f042..515c1ef 100644
|
||||
--- a/src/jbig2.cc
|
||||
+++ b/src/jbig2.cc
|
||||
@@ -130,11 +130,16 @@ segment_image(PIX *pixb, PIX *piximg) {
|
||||
// input color image, so we have to do it this way...
|
||||
// is there a better way?
|
||||
// PIX *pixd = pixExpandBinary(pixd4, 4);
|
||||
- PIX *pixd = pixCreate(piximg->w, piximg->h, 1);
|
||||
- pixCopyResolution(pixd, piximg);
|
||||
- if (verbose) pixInfo(pixd, "mask image: ");
|
||||
- expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
|
||||
+ PIX *pixd;
|
||||
+#ifdef HAVE_EXPANDBINARYPOWER2LOW
|
||||
+ pixd = pixCreate(piximg->w, piximg->h, 1);
|
||||
+ pixCopyResolution(pixd, piximg);
|
||||
+ expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
|
||||
pixd4->data, pixd4->w, pixd4->h, pixd4->wpl, 4);
|
||||
+#else
|
||||
+ pixd = pixExpandBinaryPower2(pixd4, 4);
|
||||
+#endif
|
||||
+ if (verbose) pixInfo(pixd, "mask image: ");
|
||||
|
||||
pixDestroy(&pixd4);
|
||||
pixDestroy(&pixsf4);
|
||||
35
pkgs/tools/graphics/jbig2enc/default.nix
Normal file
35
pkgs/tools/graphics/jbig2enc/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub, leptonica, zlib, libwebp, giflib, libjpeg, libpng, libtiff }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jbig2enc";
|
||||
version = "0.28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "agl";
|
||||
repo = "jbig2enc";
|
||||
rev = "${version}-dist";
|
||||
hash = "sha256-Y3IVTjvO5tqn/O076y/llnTyenKpbx1WyT/JFZ/s0VY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ leptonica zlib libwebp giflib libjpeg libpng libtiff ];
|
||||
|
||||
patches = [
|
||||
# https://github.com/agl/jbig2enc/commit/53ce5fe7e73d7ed95c9e12b52dd4984723f865fa
|
||||
./53ce5fe7e73d7ed95c9e12b52dd4984723f865fa.patch
|
||||
];
|
||||
|
||||
# This is necessary, because the resulting library has
|
||||
# /tmp/nix-build-jbig2enc/src/.libs before /nix/store/jbig2enc/lib
|
||||
# in its rpath, which means that patchelf --shrink-rpath removes
|
||||
# the /nix/store one. By cleaning up before fixup, we ensure that
|
||||
# the /tmp/nix-build-jbig2enc/src/.libs directory is gone.
|
||||
preFixup = ''
|
||||
make clean
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Encoder for the JBIG2 image compression format";
|
||||
license = lib.licenses.asl20;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/graphics/jhead/default.nix
Normal file
36
pkgs/tools/graphics/jhead/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libjpeg }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jhead";
|
||||
version = "3.06.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Matthias-Wandel";
|
||||
repo = "jhead";
|
||||
rev = version;
|
||||
sha256 = "0zgh36486cpcnf7xg6dwf7rhz2h4gpayqvdk8hmrx6y418b2pfyf";
|
||||
};
|
||||
|
||||
buildInputs = [ libjpeg ];
|
||||
|
||||
makeFlags = [ "CPPFLAGS=" "CFLAGS=-O3" "LDFLAGS=" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p \
|
||||
$out/bin \
|
||||
$out/man/man1 \
|
||||
$out/share/doc/${pname}-${version}
|
||||
|
||||
cp -v jhead $out/bin
|
||||
cp -v jhead.1 $out/man/man1
|
||||
cp -v *.txt $out/share/doc/${pname}-${version}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.sentex.net/~mwandel/jhead/";
|
||||
description = "Exif Jpeg header manipulation tool";
|
||||
license = licenses.publicDomain;
|
||||
maintainers = with maintainers; [ rycee ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/graphics/jpegexiforient/default.nix
Normal file
27
pkgs/tools/graphics/jpegexiforient/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
stdenv.mkDerivation {
|
||||
pname = "jpegexiforient";
|
||||
version = "unstable-2002-02-17";
|
||||
src = fetchurl {
|
||||
url = "http://sylvana.net/jpegcrop/jpegexiforient.c";
|
||||
sha256 = "1v0f42cvs0397g9v46p294ldgxwbp285npg6npgnlnvapk6nzh5s";
|
||||
};
|
||||
unpackPhase = ''
|
||||
cp $src jpegexiforient.c
|
||||
'';
|
||||
buildPhase = ''
|
||||
$CC -o jpegexiforient jpegexiforient.c
|
||||
'';
|
||||
installPhase = ''
|
||||
install -Dt $out/bin jpegexiforient
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "Utility program to get and set the Exif Orientation Tag";
|
||||
homepage = "http://sylvana.net/jpegcrop/exif_orientation.html";
|
||||
# Website doesn't mention any license, but I think it's safe to assume this
|
||||
# to be free since it's from IJG, the current maintainers of libjpeg
|
||||
license = licenses.free;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ infinisil ];
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/graphics/ldgallery/compiler/default.nix
Normal file
37
pkgs/tools/graphics/ldgallery/compiler/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# generated with cabal2nix by ./generate.sh
|
||||
{ mkDerivation, aeson, base, cmdargs, containers, data-ordlist
|
||||
, directory, fetchgit, filepath, Glob, hpack, parallel-io, process
|
||||
, safe, lib, text, time, yaml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ldgallery-compiler";
|
||||
version = "2.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/pacien/ldgallery.git";
|
||||
sha256 = "1a82wy6ns1434gdba2l04crvr5waf03y02bappcxqci2cfb1cznz";
|
||||
rev = "e93f7b1eb84c083d67567115284c0002a3a7d5fc";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/compiler; echo source root reset to $sourceRoot";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
enableSeparateDataOutput = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson base cmdargs containers data-ordlist directory filepath Glob
|
||||
parallel-io process safe text time yaml
|
||||
];
|
||||
libraryToolDepends = [ hpack ];
|
||||
executableHaskellDepends = [
|
||||
aeson base cmdargs containers data-ordlist directory filepath Glob
|
||||
parallel-io process safe text time yaml
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson base cmdargs containers data-ordlist directory filepath Glob
|
||||
parallel-io process safe text time yaml
|
||||
];
|
||||
prePatch = "hpack";
|
||||
homepage = "https://ldgallery.pacien.org";
|
||||
description = "A static generator which turns a collection of tagged pictures into a searchable web gallery";
|
||||
license = lib.licenses.agpl3;
|
||||
maintainers = with lib.maintainers; [ pacien ];
|
||||
}
|
||||
19
pkgs/tools/graphics/ldgallery/compiler/generate.sh
Executable file
19
pkgs/tools/graphics/ldgallery/compiler/generate.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p cabal2nix
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
|
||||
echo "Regenerates the nix file for the ldgallery-compiler package."
|
||||
echo "Usage: $0 <git release tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "# generated with cabal2nix by ./generate.sh" > default.nix
|
||||
|
||||
cabal2nix \
|
||||
--maintainer pacien \
|
||||
--subpath compiler \
|
||||
--revision $1 \
|
||||
"https://github.com/pacien/ldgallery.git" \
|
||||
>> default.nix
|
||||
53
pkgs/tools/graphics/ldgallery/default.nix
Normal file
53
pkgs/tools/graphics/ldgallery/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib, pkgs, makeWrapper, haskellPackages, haskell, pandoc, imagemagick, CoreServices }:
|
||||
|
||||
with lib;
|
||||
with haskell.lib.compose;
|
||||
|
||||
let
|
||||
ldgallery-viewer = pkgs.callPackage ./viewer { inherit CoreServices; };
|
||||
inherit (haskellPackages) ldgallery-compiler;
|
||||
|
||||
in
|
||||
|
||||
# making sure that the versions of the compiler and viewer parts are in sync
|
||||
assert ldgallery-compiler.version == versions.majorMinor ldgallery-viewer.version;
|
||||
|
||||
justStaticExecutables (overrideCabal (oldAttrs: {
|
||||
pname = "ldgallery"; # bundled viewer + compiler
|
||||
|
||||
buildTools = (oldAttrs.buildTools or []) ++ [ makeWrapper pandoc ];
|
||||
|
||||
prePatch = ''
|
||||
# add viewer dist to data
|
||||
ln -s "${ldgallery-viewer}/share/ldgallery/viewer" "data/"
|
||||
|
||||
${oldAttrs.prePatch or ""}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
${oldAttrs.postInstall or ""}
|
||||
|
||||
# wrapper for runtime dependencies registration
|
||||
wrapProgram "$out/bin/ldgallery" \
|
||||
--prefix PATH : ${lib.makeBinPath [ imagemagick ]}
|
||||
|
||||
# bash completion
|
||||
mkdir -p "$out/share/bash-completion/completions"
|
||||
"$out/bin/ldgallery" \
|
||||
--help=bash \
|
||||
> "$out/share/bash-completion/completions/ldgallery"
|
||||
|
||||
# man pages
|
||||
mkdir -p $out/share/man/man{1,7}
|
||||
ln -s ${ldgallery-viewer}/share/man/man7/* "$out/share/man/man7/"
|
||||
pandoc --standalone --to man \
|
||||
"../ldgallery-quickstart.7.md" \
|
||||
--output "$out/share/man/man7/ldgallery-quickstart.7"
|
||||
pandoc --standalone --to man \
|
||||
"ldgallery.1.md" \
|
||||
--output "$out/share/man/man1/ldgallery.1"
|
||||
'';
|
||||
|
||||
# other package metadata (maintainer, description, license, ...)
|
||||
# are inherited from the compiler package
|
||||
}) ldgallery-compiler)
|
||||
54
pkgs/tools/graphics/ldgallery/viewer/default.nix
Normal file
54
pkgs/tools/graphics/ldgallery/viewer/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkgs, nodejs-12_x, pandoc, CoreServices }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
# Note for maintainers:
|
||||
# * keep version in sync with the ldgallery compiler
|
||||
# * regenerate node-*.nix with `./generate.sh <git release tag>`
|
||||
sourcePkg = fetchFromGitHub {
|
||||
owner = "pacien";
|
||||
repo = "ldgallery";
|
||||
rev = "v2.0";
|
||||
sha256 = "1a82wy6ns1434gdba2l04crvr5waf03y02bappcxqci2cfb1cznz";
|
||||
};
|
||||
|
||||
nodePackages = import ./node-composition.nix {
|
||||
inherit pkgs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
|
||||
# some native node dependencies still require NodeJS 12 with Python 2
|
||||
nodejs = nodejs-12_x;
|
||||
};
|
||||
|
||||
nodePkg = nodePackages.package.override {
|
||||
src = "${sourcePkg}/viewer";
|
||||
postInstall = "npm run build";
|
||||
buildInputs = optionals stdenv.isDarwin [ CoreServices ];
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
# making sure that the source and the node package are in sync
|
||||
assert versions.majorMinor nodePkg.version == removePrefix "v" sourcePkg.rev;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = nodePkg.packageName;
|
||||
version = nodePkg.version;
|
||||
src = nodePkg;
|
||||
|
||||
buildInputs = [ pandoc ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/ldgallery"
|
||||
cp -rp "lib/node_modules/ldgallery-viewer/dist" \
|
||||
"$out/share/ldgallery/viewer/"
|
||||
cp -rp "lib/node_modules/ldgallery-viewer/examples" \
|
||||
"$out/share/ldgallery/viewer/"
|
||||
|
||||
mkdir -p "$out/share/man/man7"
|
||||
pandoc --standalone --to man \
|
||||
"lib/node_modules/ldgallery-viewer/ldgallery-viewer.7.md" \
|
||||
--output "$out/share/man/man7/ldgallery-viewer.7"
|
||||
'';
|
||||
}
|
||||
30
pkgs/tools/graphics/ldgallery/viewer/generate.sh
Executable file
30
pkgs/tools/graphics/ldgallery/viewer/generate.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -I nixpkgs=../../../../.. -i bash -p nodePackages.node2nix
|
||||
|
||||
# TODO: merge with other node packages in nixpkgs/pkgs/development/node-packages once
|
||||
# * support for npm projects in sub-directories is added to node2nix:
|
||||
# https://github.com/svanderburg/node2nix/issues/177
|
||||
# * we find a way to enable development dependencies for some of the packages
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
|
||||
echo "Regenerates the node composition and package nix files for the ldgallery-viewer package."
|
||||
echo "Usage: $0 <git release tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wget https://github.com/pacien/ldgallery/raw/$1/viewer/package.json
|
||||
wget https://github.com/pacien/ldgallery/raw/$1/viewer/package-lock.json
|
||||
|
||||
# Development dependencies are required for this Vue application to build
|
||||
node2nix \
|
||||
--node-env ../../../../development/node-packages/node-env.nix \
|
||||
--development \
|
||||
--input ./package.json \
|
||||
--lock ./package-lock.json \
|
||||
--output node-packages.nix \
|
||||
--composition node-composition.nix \
|
||||
--no-copy-node-env
|
||||
|
||||
rm package.json package-lock.json
|
||||
17
pkgs/tools/graphics/ldgallery/viewer/node-composition.nix
Normal file
17
pkgs/tools/graphics/ldgallery/viewer/node-composition.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# This file has been generated by node2nix 1.9.0. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ../../../../development/node-packages/node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
||||
13281
pkgs/tools/graphics/ldgallery/viewer/node-packages.nix
generated
Normal file
13281
pkgs/tools/graphics/ldgallery/viewer/node-packages.nix
generated
Normal file
File diff suppressed because it is too large
Load diff
26
pkgs/tools/graphics/leela/default.nix
Normal file
26
pkgs/tools/graphics/leela/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, poppler }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "leela";
|
||||
version = "12.fe7a35a";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TrilbyWhite";
|
||||
repo = "Leela";
|
||||
rev = "576a60185b191d3a3030fef10492fe32d2125563";
|
||||
sha256 = "1k6n758r9dhjmc1pnpk6qzpg0q7pkq2hf18z3b0s2z198jpkg9s3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ poppler ];
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" "MANDIR=$(out)/share/man" ];
|
||||
|
||||
meta = {
|
||||
description = "CLI frontend to the poppler-glib libary of PDF tools";
|
||||
homepage = "https://github.com/TrilbyWhite/Leela";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = [ lib.maintainers.puffnfresh ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/graphics/lepton/default.nix
Normal file
24
pkgs/tools/graphics/lepton/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, git, glibc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2019-08-20";
|
||||
pname = "lepton-unstable";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "lepton";
|
||||
owner = "dropbox";
|
||||
rev = "3d1bc19da9f13a6e817938afd0f61a81110be4da";
|
||||
sha256 = "0aqs6nvcbq8cbfv8699fa634bsz7csmk0169n069yvv17d1c07fd";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake git ];
|
||||
buildInputs = lib.optionals stdenv.isLinux [ glibc.static ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/dropbox/lepton";
|
||||
description = "A tool to losslessly compress JPEGs";
|
||||
license = licenses.asl20;
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
maintainers = with maintainers; [ artemist ];
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/graphics/logstalgia/default.nix
Normal file
44
pkgs/tools/graphics/logstalgia/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchurl, SDL2, ftgl, pkg-config, libpng, libjpeg, pcre, SDL2_image, glew
|
||||
, libGLU, libGL, boost, glm, freetype }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "logstalgia";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/acaudwell/Logstalgia/releases/download/${pname}-${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1agwjlwzp1c86hqb1p7rmzqzhd3wpnyh8whsfq4sbx01wj0l0gzd";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ glew SDL2 ftgl libpng libjpeg pcre SDL2_image libGLU libGL boost
|
||||
glm freetype ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://logstalgia.io/";
|
||||
description = "Website traffic visualization tool";
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
longDescription = ''
|
||||
Logstalgia is a website traffic visualization that replays or
|
||||
streams web-server access logs as a pong-like battle between the
|
||||
web server and an never ending torrent of requests.
|
||||
|
||||
Requests appear as colored balls (the same color as the host)
|
||||
which travel across the screen to arrive at the requested
|
||||
location. Successful requests are hit by the paddle while
|
||||
unsuccessful ones (eg 404 - File Not Found) are missed and pass
|
||||
through.
|
||||
|
||||
The paths of requests are summarized within the available space by
|
||||
identifying common path prefixes. Related paths are grouped
|
||||
together under headings. For instance, by default paths ending in
|
||||
png, gif or jpg are grouped under the heading Images. Paths that
|
||||
don’t match any of the specified groups are lumped together under
|
||||
a Miscellaneous section.
|
||||
'';
|
||||
|
||||
platforms = platforms.gnu ++ platforms.linux;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/graphics/lsix/default.nix
Normal file
36
pkgs/tools/graphics/lsix/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenvNoCC, fetchFromGitHub, makeWrapper, imagemagick }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "lsix";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hackerb9";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-Qx6/PFm1XBmEI6iI+Ref9jNe6sXIhsVL4VQ1CX+caZE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 lsix -t $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/lsix \
|
||||
--prefix PATH : ${lib.makeBinPath [ imagemagick ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Shows thumbnails in terminal using sixel graphics";
|
||||
homepage = "https://github.com/hackerb9/lsix";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ kidonng ];
|
||||
};
|
||||
}
|
||||
81
pkgs/tools/graphics/luxcorerender/default.nix
Normal file
81
pkgs/tools/graphics/luxcorerender/default.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ lib, config, stdenv, fetchFromGitHub, symlinkJoin, wrapGAppsHook, cmake, boost172
|
||||
, pkg-config, flex, bison, libpng, libtiff, zlib, python3, embree, openexr
|
||||
, openimagedenoise, openimageio, tbb, c-blosc, gtk3, pcre, doxygen
|
||||
# OpenCL Support
|
||||
, withOpenCL ? true, ocl-icd
|
||||
# Cuda Support
|
||||
, withCuda ? config.cudaSupport or false, cudatoolkit }:
|
||||
|
||||
let
|
||||
boostWithPython = boost172.override {
|
||||
enablePython = true;
|
||||
enableNumpy = true;
|
||||
python = python3;
|
||||
};
|
||||
|
||||
# Requires a version number like "<MAJOR><MINOR>"
|
||||
pythonVersion = (lib.versions.major python3.version)
|
||||
+ (lib.versions.minor python3.version);
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "luxcorerender";
|
||||
version = "2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LuxCoreRender";
|
||||
repo = "LuxCore";
|
||||
rev = "luxcorerender_v${version}";
|
||||
sha256 = "0xvivw79719fa1q762b76nyvzawfd3hmp8y5j04bax8a7f8mfa9k";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake flex bison doxygen wrapGAppsHook ];
|
||||
|
||||
buildInputs = [
|
||||
libpng
|
||||
libtiff
|
||||
zlib
|
||||
boostWithPython.dev
|
||||
python3
|
||||
embree
|
||||
openexr
|
||||
openimagedenoise
|
||||
tbb
|
||||
c-blosc
|
||||
gtk3
|
||||
pcre
|
||||
openimageio.dev
|
||||
openimageio.out
|
||||
] ++ lib.optionals withOpenCL [ ocl-icd ]
|
||||
++ lib.optionals withCuda [ cudatoolkit ];
|
||||
|
||||
cmakeFlags = [ "-DPYTHON_V=${pythonVersion}" ]
|
||||
++ lib.optional (!withOpenCL) "-DLUXRAYS_DISABLE_OPENCL=1"
|
||||
++ lib.optional (!withCuda) "-DLUXRAYS_DISABLE_CUDA=1";
|
||||
|
||||
preConfigure = ''
|
||||
NIX_LDFLAGS+=" -lpython3"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/lib
|
||||
cp -va bin/* $out/bin
|
||||
cp -va lib/* $out/lib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open source, physically based, unbiased rendering engine";
|
||||
homepage = "https://luxcorerender.org/";
|
||||
maintainers = with maintainers; [ hodapp ];
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
# TODO (might not be necessary):
|
||||
#
|
||||
# luxcoreui still gives warnings like: "failed to commit changes to
|
||||
# dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The
|
||||
# name ca.desrt.dconf was not provided by any .service files"
|
||||
|
||||
# CMake complains of the FindOpenGL/GLVND preference
|
||||
36
pkgs/tools/graphics/maim/default.nix
Normal file
36
pkgs/tools/graphics/maim/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, zlib, libpng, libjpeg, libwebp, libGLU, libGL, glm
|
||||
, libX11, libXext, libXfixes, libXrandr, libXcomposite, slop, icu
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "maim";
|
||||
version = "5.7.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "naelstrof";
|
||||
repo = "maim";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-uFtiwaM3H09vfvz3wVvumbqkoZhLNJxONkMqqqrJBs4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ zlib libpng libjpeg libwebp libGLU libGL glm
|
||||
libX11 libXext libXfixes libXrandr libXcomposite slop icu ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
inherit (src.meta) homepage;
|
||||
description = "A command-line screenshot utility";
|
||||
longDescription = ''
|
||||
maim (make image) takes screenshots of your desktop. It has options to
|
||||
take only a region, and relies on slop to query for regions. maim is
|
||||
supposed to be an improved scrot.
|
||||
'';
|
||||
changelog = "https://github.com/naelstrof/maim/releases/tag/v${version}";
|
||||
platforms = lib.platforms.all;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
152
pkgs/tools/graphics/mangohud/default.nix
Normal file
152
pkgs/tools/graphics/mangohud/default.nix
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, substituteAll
|
||||
, coreutils
|
||||
, curl
|
||||
, gawk
|
||||
, glxinfo
|
||||
, gnugrep
|
||||
, gnused
|
||||
, lsof
|
||||
, xdg-utils
|
||||
, dbus
|
||||
, hwdata
|
||||
, libX11
|
||||
, mangohud32
|
||||
, vulkan-headers
|
||||
, glslang
|
||||
, makeWrapper
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, python3Packages
|
||||
, unzip
|
||||
, vulkan-loader
|
||||
, libXNVCtrl
|
||||
, wayland
|
||||
, spdlog
|
||||
, addOpenGLRunpath
|
||||
}:
|
||||
|
||||
let
|
||||
# Derived from subprojects/imgui.wrap
|
||||
imgui = rec {
|
||||
version = "1.81";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ocornut";
|
||||
repo = "imgui";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-rRkayXk3xz758v6vlMSaUu5fui6NR8Md3njhDB0gJ18=";
|
||||
};
|
||||
patch = fetchurl {
|
||||
url = "https://wrapdb.mesonbuild.com/v2/imgui_${version}-1/get_patch";
|
||||
hash = "sha256-bQC0QmkLalxdj4mDEdqvvOFtNwz2T1MpTDuMXGYeQ18=";
|
||||
};
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "mangohud";
|
||||
version = "0.6.7-1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "flightlessmango";
|
||||
repo = "MangoHud";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-60cZYo+d679KRggLBGbpLYM5Iu1XySEEGp+MxZs6wF0=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "doc" "man" ];
|
||||
|
||||
# Unpack subproject sources
|
||||
postUnpack = ''(
|
||||
cd "$sourceRoot/subprojects"
|
||||
cp -R --no-preserve=mode,ownership ${imgui.src} imgui-${imgui.version}
|
||||
unzip ${imgui.patch}
|
||||
)'';
|
||||
|
||||
patches = [
|
||||
# Hard code dependencies. Can't use makeWrapper since the Vulkan
|
||||
# layer can be used without the mangohud executable by setting MANGOHUD=1.
|
||||
(substituteAll {
|
||||
src = ./hardcode-dependencies.patch;
|
||||
|
||||
path = lib.makeBinPath [
|
||||
coreutils
|
||||
curl
|
||||
gawk
|
||||
glxinfo
|
||||
gnugrep
|
||||
gnused
|
||||
lsof
|
||||
xdg-utils
|
||||
];
|
||||
|
||||
libdbus = dbus.lib;
|
||||
inherit hwdata libX11;
|
||||
})
|
||||
] ++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux") [
|
||||
# Support 32bit OpenGL applications by appending the mangohud32
|
||||
# lib path to LD_LIBRARY_PATH.
|
||||
#
|
||||
# This workaround is necessary since on Nix's build of ld.so, $LIB
|
||||
# always expands to lib even when running an 32bit application.
|
||||
#
|
||||
# See https://github.com/NixOS/nixpkgs/issues/101597.
|
||||
(substituteAll {
|
||||
src = ./opengl32-nix-workaround.patch;
|
||||
inherit mangohud32;
|
||||
})
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Duse_system_vulkan=enabled"
|
||||
"-Dvulkan_datadir=${vulkan-headers}/share"
|
||||
"-Dwith_wayland=enabled"
|
||||
"-Duse_system_spdlog=enabled"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
glslang
|
||||
makeWrapper
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
python3Packages.Mako
|
||||
python3Packages.python
|
||||
unzip
|
||||
vulkan-loader
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
libX11
|
||||
libXNVCtrl
|
||||
wayland
|
||||
spdlog
|
||||
];
|
||||
|
||||
# Support 32bit Vulkan applications by linking in 32bit Vulkan layer
|
||||
# This is needed for the same reason the 32bit OpenGL workaround is needed.
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
|
||||
ln -s ${mangohud32}/share/vulkan/implicit_layer.d/MangoHud.json \
|
||||
"$out/share/vulkan/implicit_layer.d/MangoHud.x86.json"
|
||||
'';
|
||||
|
||||
# Support Nvidia cards by adding OpenGL path and support overlaying
|
||||
# Vulkan applications without requiring MangoHud to be installed
|
||||
postFixup = ''
|
||||
wrapProgram "$out/bin/mangohud" \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ addOpenGLRunpath.driverLink ]} \
|
||||
--prefix XDG_DATA_DIRS : "$out/share"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more";
|
||||
homepage = "https://github.com/flightlessmango/MangoHud";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kira-bruneau zeratax ];
|
||||
};
|
||||
}
|
||||
75
pkgs/tools/graphics/mangohud/hardcode-dependencies.patch
Normal file
75
pkgs/tools/graphics/mangohud/hardcode-dependencies.patch
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
From 56a191f6db6d530c2bc89d9d3395b4c9768d108f Mon Sep 17 00:00:00 2001
|
||||
From: Atemu <atemu.main@gmail.com>
|
||||
Date: Tue, 17 May 2022 16:58:08 +0200
|
||||
Subject: [PATCH 1/2] hardcode dependencies
|
||||
|
||||
---
|
||||
src/dbus.cpp | 2 +-
|
||||
src/loaders/loader_x11.cpp | 2 +-
|
||||
src/logging.cpp | 7 +++++++
|
||||
src/pci_ids.cpp | 6 ++----
|
||||
4 files changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/dbus.cpp b/src/dbus.cpp
|
||||
index 3b3cccb..1405725 100644
|
||||
--- a/src/dbus.cpp
|
||||
+++ b/src/dbus.cpp
|
||||
@@ -152,7 +152,7 @@ bool dbus_manager::get_media_player_metadata(metadata& meta, std::string name) {
|
||||
}
|
||||
|
||||
bool dbus_manager::init_internal() {
|
||||
- if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("libdbus-1.so.3")) {
|
||||
+ if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("@libdbus@/lib/libdbus-1.so.3")) {
|
||||
SPDLOG_ERROR("Could not load libdbus-1.so.3");
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/loaders/loader_x11.cpp b/src/loaders/loader_x11.cpp
|
||||
index 4db6f78..c60d08c 100644
|
||||
--- a/src/loaders/loader_x11.cpp
|
||||
+++ b/src/loaders/loader_x11.cpp
|
||||
@@ -89,4 +89,4 @@ void libx11_loader::CleanUp(bool unload) {
|
||||
|
||||
}
|
||||
|
||||
-std::shared_ptr<libx11_loader> g_x11(new libx11_loader("libX11.so.6"));
|
||||
+std::shared_ptr<libx11_loader> g_x11(new libx11_loader("@libX11@/lib/libX11.so.6"));
|
||||
diff --git a/src/logging.cpp b/src/logging.cpp
|
||||
index b27f21e..48f5e03 100644
|
||||
--- a/src/logging.cpp
|
||||
+++ b/src/logging.cpp
|
||||
@@ -22,7 +22,14 @@ string exec(string command) {
|
||||
#endif
|
||||
std::array<char, 128> buffer;
|
||||
std::string result;
|
||||
+
|
||||
+ char* originalPath = getenv("PATH");
|
||||
+ setenv("PATH", "@path@", 1);
|
||||
+
|
||||
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"), pclose);
|
||||
+
|
||||
+ setenv("PATH", originalPath, 1);
|
||||
+
|
||||
if (!pipe) {
|
||||
return "popen failed!";
|
||||
}
|
||||
diff --git a/src/pci_ids.cpp b/src/pci_ids.cpp
|
||||
index feec222..6baa707 100644
|
||||
--- a/src/pci_ids.cpp
|
||||
+++ b/src/pci_ids.cpp
|
||||
@@ -24,11 +24,9 @@ std::istream& get_uncommented_line(std::istream& is, std::string &line)
|
||||
void parse_pciids()
|
||||
{
|
||||
std::ifstream file;
|
||||
- file.open("/usr/share/hwdata/pci.ids");
|
||||
+ file.open("@hwdata@/share/hwdata/pci.ids");
|
||||
if (file.fail()){
|
||||
- file.open("/usr/share/misc/pci.ids");
|
||||
- if (file.fail())
|
||||
- SPDLOG_ERROR("can't find file pci.ids");
|
||||
+ SPDLOG_ERROR("can't find file pci.ids");
|
||||
}
|
||||
|
||||
std::string line;
|
||||
--
|
||||
2.36.0
|
||||
|
||||
24
pkgs/tools/graphics/mangohud/opengl32-nix-workaround.patch
Normal file
24
pkgs/tools/graphics/mangohud/opengl32-nix-workaround.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
From 1ac93cbf0eed951af6967a81f731a0f418ea0b3d Mon Sep 17 00:00:00 2001
|
||||
From: Atemu <atemu.main@gmail.com>
|
||||
Date: Tue, 17 May 2022 16:58:45 +0200
|
||||
Subject: [PATCH 2/2] opengl32 nix workaround
|
||||
|
||||
---
|
||||
bin/mangohud.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bin/mangohud.in b/bin/mangohud.in
|
||||
index 8ec21de..f65304a 100755
|
||||
--- a/bin/mangohud.in
|
||||
+++ b/bin/mangohud.in
|
||||
@@ -23,6 +23,6 @@ fi
|
||||
# figure out whether the 32 or 64 bit version should be used, and will search
|
||||
# for it in the correct directory
|
||||
LD_PRELOAD="${LD_PRELOAD}:${MANGOHUD_LIB_NAME}"
|
||||
-LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@ld_libdir_mangohud@"
|
||||
+LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@ld_libdir_mangohud@:@mangohud32@/lib/mangohud"
|
||||
|
||||
exec env MANGOHUD=1 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LD_PRELOAD="${LD_PRELOAD}" "$@"
|
||||
--
|
||||
2.36.0
|
||||
|
||||
25
pkgs/tools/graphics/mesa-demos/default.nix
Normal file
25
pkgs/tools/graphics/mesa-demos/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl, freeglut, glew, libGL, libGLU, libX11, libXext, mesa, pkg-config, wayland }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mesa-demos";
|
||||
version = "8.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.freedesktop.org/pub/mesa/demos/${pname}-${version}.tar.bz2";
|
||||
sha256 = "0zgzbz55a14hz83gbmm0n9gpjnf5zadzi2kjjvkn6khql2a9rs81";
|
||||
};
|
||||
|
||||
buildInputs = [ freeglut glew libX11 libXext libGL libGLU mesa mesa.osmesa wayland ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
configureFlags = [ "--with-system-data-files" ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Collection of demos and test programs for OpenGL and Mesa";
|
||||
homepage = "https://www.mesa3d.org/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ andersk ];
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/graphics/metapixel/default.nix
Normal file
33
pkgs/tools/graphics/metapixel/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libpng, libjpeg, giflib, perl, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "metapixel";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "schani";
|
||||
repo = pname;
|
||||
rev = "98ee9daa093b6c334941242e63f90b1c2876eb4f";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309";
|
||||
};
|
||||
|
||||
makeFlags = [ "metapixel" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libpng libjpeg giflib perl ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp metapixel $out/bin/metapixel
|
||||
cp metapixel-prepare $out/bin/metapixel-prepare
|
||||
cp metapixel-sizesort $out/bin/metapixel-sizesort
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/schani/metapixel";
|
||||
description = "Tool for generating photomosaics";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ dandellion ];
|
||||
};
|
||||
}
|
||||
53
pkgs/tools/graphics/mscgen/default.nix
Normal file
53
pkgs/tools/graphics/mscgen/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib, stdenv
|
||||
, bison
|
||||
, fetchurl
|
||||
, flex
|
||||
, gd
|
||||
, libjpeg
|
||||
, libpng
|
||||
, libwebp
|
||||
, pkg-config
|
||||
, runtimeShell
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mscgen";
|
||||
version = "0.20";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.mcternan.me.uk/mscgen/software/mscgen-src-${version}.tar.gz";
|
||||
sha256 = "3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bison flex pkg-config ];
|
||||
buildInputs = [ gd libjpeg libpng libwebp zlib ];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
sed -i -e "s|#!/bin/bash|#!${runtimeShell}|" test/renderercheck.sh
|
||||
'';
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.mcternan.me.uk/mscgen/";
|
||||
description = "Convert Message Sequence Chart descriptions into PNG, SVG, or EPS images";
|
||||
license = lib.licenses.gpl2;
|
||||
|
||||
longDescription = ''
|
||||
Mscgen is a small program that parses Message Sequence Chart
|
||||
descriptions and produces PNG, SVG, EPS or server side image maps
|
||||
(ismaps) as the output. Message Sequence Charts (MSCs) are a way
|
||||
of representing entities and interactions over some time period
|
||||
and are often used in combination with SDL. MSCs are popular in
|
||||
Telecoms to specify how protocols operate although MSCs need not
|
||||
be complicated to create or use. Mscgen aims to provide a simple
|
||||
text language that is clear to create, edit and understand, which
|
||||
can also be transformed into common image formats for display or
|
||||
printing.
|
||||
'';
|
||||
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
126
pkgs/tools/graphics/netpbm/default.nix
Normal file
126
pkgs/tools/graphics/netpbm/default.nix
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchsvn
|
||||
, pkg-config
|
||||
, libjpeg
|
||||
, libpng
|
||||
, jbigkit
|
||||
, flex
|
||||
, zlib
|
||||
, perl
|
||||
, libxml2
|
||||
, makeWrapper
|
||||
, libtiff
|
||||
, enableX11 ? false
|
||||
, libX11
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
# Determine version and revision from:
|
||||
# https://sourceforge.net/p/netpbm/code/HEAD/log/?path=/advanced
|
||||
pname = "netpbm";
|
||||
version = "10.97.4";
|
||||
|
||||
outputs = [ "bin" "out" "dev" ];
|
||||
|
||||
src = fetchsvn {
|
||||
url = "https://svn.code.sf.net/p/netpbm/code/advanced";
|
||||
rev = "4275";
|
||||
sha256 = "SEKxjlKNJijOk1MNIktSf/YTLxBq8gEHyjLUVtXG5OI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
flex
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
perl
|
||||
libpng
|
||||
libjpeg
|
||||
libxml2
|
||||
libtiff
|
||||
jbigkit
|
||||
] ++ lib.optional enableX11 libX11;
|
||||
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# Environment variables
|
||||
STRIPPROG = "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip";
|
||||
|
||||
postPatch = ''
|
||||
# Install libnetpbm.so symlink to correct destination
|
||||
substituteInPlace lib/Makefile \
|
||||
--replace '/sharedlink' '/lib'
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
cp config.mk.in config.mk
|
||||
|
||||
# Disable building static library
|
||||
echo "STATICLIB_TOO = N" >> config.mk
|
||||
|
||||
# Enable cross-compilation
|
||||
echo 'AR = ${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar' >> config.mk
|
||||
echo 'CC = ${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc' >> config.mk
|
||||
echo 'CC_FOR_BUILD = ${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc' >> config.mk
|
||||
echo 'LD_FOR_BUILD = $(CC_FOR_BUILD)' >> config.mk
|
||||
echo 'PKG_CONFIG = ${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config' >> config.mk
|
||||
echo 'RANLIB = ${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib' >> config.mk
|
||||
|
||||
# Use libraries from Nixpkgs
|
||||
echo "TIFFLIB = libtiff.so" >> config.mk
|
||||
echo "TIFFLIB_NEEDS_JPEG = N" >> config.mk
|
||||
echo "TIFFLIB_NEEDS_Z = N" >> config.mk
|
||||
echo "JPEGLIB = libjpeg.so" >> config.mk
|
||||
echo "JBIGLIB = libjbig.a" >> config.mk
|
||||
# Insecure
|
||||
echo "JASPERLIB = NONE" >> config.mk
|
||||
|
||||
# Fix path to rgb.txt
|
||||
echo "RGB_DB_PATH = $out/share/netpbm/misc/rgb.txt" >> config.mk
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
echo "LDSHLIB=-dynamiclib -install_name $out/lib/libnetpbm.\$(MAJ).dylib" >> config.mk
|
||||
echo "NETPBMLIBTYPE = dylib" >> config.mk
|
||||
echo "NETPBMLIBSUFFIX = dylib" >> config.mk
|
||||
'' + ''
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
make package pkgdir=$out
|
||||
|
||||
rm -rf $out/*_template $out/{pkginfo,README,VERSION} $out/man/web
|
||||
|
||||
mkdir -p $out/share/netpbm
|
||||
mv $out/misc $out/share/netpbm/
|
||||
|
||||
moveToOutput bin "''${!outputBin}"
|
||||
|
||||
# wrap any scripts that expect other programs in the package to be in their PATH
|
||||
for prog in ppmquant; do
|
||||
wrapProgram "''${!outputBin}/bin/$prog" --prefix PATH : "''${!outputBin}/bin"
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
homepage = "http://netpbm.sourceforge.net/";
|
||||
description = "Toolkit for manipulation of graphic images";
|
||||
license = lib.licenses.free; # http://netpbm.svn.code.sourceforge.net/p/netpbm/code/trunk/doc/copyright_summary
|
||||
platforms = with lib.platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/graphics/netpbm/update.sh
Executable file
40
pkgs/tools/graphics/netpbm/update.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p bash -p subversion -p common-updater-scripts -i bash
|
||||
|
||||
die() {
|
||||
echo "error: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
attr=netpbm
|
||||
svnRoot=https://svn.code.sf.net/p/netpbm/code/advanced
|
||||
|
||||
oldRev=$(nix-instantiate --eval -E "with import ./. {}; $attr.src.rev" | tr -d '"')
|
||||
if [[ -z "$oldRev" ]]; then
|
||||
die "Could not extract old revision."
|
||||
fi
|
||||
|
||||
latestRev=$(svn info --show-item "last-changed-revision" "$svnRoot")
|
||||
if [[ -z "$latestRev" ]]; then
|
||||
die "Could not find out last changed revision."
|
||||
fi
|
||||
|
||||
versionInfo=$(svn cat -r "$latestRev" "$svnRoot/version.mk")
|
||||
if [[ -z "$versionInfo" ]]; then
|
||||
die "Could not get version info."
|
||||
fi
|
||||
|
||||
nixFile=$(nix-instantiate --eval --strict -A "$attr.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/')
|
||||
if [[ ! -f "$nixFile" ]]; then
|
||||
die "Could not evaluate '$attr.meta.position' to locate the .nix file!"
|
||||
fi
|
||||
|
||||
# h remembers if we found the pattern; on the last line, if a pattern was previously found, we exit with 1
|
||||
# https://stackoverflow.com/a/12145797/160386
|
||||
sed -i "$nixFile" -re '/(\brev\b\s*=\s*)"'"$oldRev"'"/{ s||\1"'"$latestRev"'"|; h }; ${x; /./{x; q1}; x}' && die "Unable to update revision."
|
||||
|
||||
majorRelease=$(grep --perl-regex --only-matching 'NETPBM_MAJOR_RELEASE = \K.+' <<< "$versionInfo")
|
||||
minorRelease=$(grep --perl-regex --only-matching 'NETPBM_MINOR_RELEASE = \K.+' <<< "$versionInfo")
|
||||
pointRelease=$(grep --perl-regex --only-matching 'NETPBM_POINT_RELEASE = \K.+' <<< "$versionInfo")
|
||||
|
||||
update-source-version "$attr" "$majorRelease.$minorRelease.$pointRelease"
|
||||
67
pkgs/tools/graphics/nifskope/default.nix
Normal file
67
pkgs/tools/graphics/nifskope/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ lib, stdenv, fetchFromGitHub, qmake, qtbase, qttools, substituteAll, libGLU, wrapQtAppsHook, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "nifskope";
|
||||
version = "2.0.dev7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "niftools";
|
||||
repo = "nifskope";
|
||||
rev = "47b788d26ae0fa12e60e8e7a4f0fa945a510c7b2"; # `v${version}` doesn't work with submodules
|
||||
sha256 = "1wqpn53rkq28ws3apqghkzyrib4wis91x171ns64g8kp4q6mfczi";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./external-lib-paths.patch
|
||||
(substituteAll {
|
||||
src = ./qttools-bins.patch;
|
||||
qttools = "${qttools.dev}/bin";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "qt512-build-fix.patch";
|
||||
url = "https://github.com/niftools/nifskope/commit/30954e7f01f3d779a2a1fd37d363e8a6ad560bd3.patch";
|
||||
sha256 = "0d6xjj2mjjhdd7w1aig5f75jksjni16jyj0lxsz51pys6xqb6fpj";
|
||||
})
|
||||
] ++ (lib.optional stdenv.isAarch64 ./no-sse-on-arm.patch);
|
||||
|
||||
buildInputs = [ qtbase qttools libGLU.dev ];
|
||||
nativeBuildInputs = [ qmake wrapQtAppsHook ];
|
||||
|
||||
preConfigure = ''
|
||||
shopt -s globstar
|
||||
for i in **/*.cpp; do
|
||||
substituteInPlace $i --replace /usr/share/nifskope $out/share/nifskope
|
||||
done
|
||||
'';
|
||||
|
||||
# Inspired by install/linux-install/nifskope.spec.in.
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
d=$out/share/nifskope
|
||||
mkdir -p $out/bin $out/share/applications $out/share/pixmaps $d/{shaders,lang}
|
||||
cp release/NifSkope $out/bin/
|
||||
cp ./res/nifskope.png $out/share/pixmaps/
|
||||
cp release/{nif.xml,kfm.xml,style.qss} $d/
|
||||
cp res/shaders/*.frag res/shaders/*.prog res/shaders/*.vert $d/shaders/
|
||||
cp ./res/lang/*.ts ./res/lang/*.tm $d/lang/
|
||||
cp ./install/linux-install/nifskope.desktop $out/share/applications
|
||||
|
||||
substituteInPlace $out/share/applications/nifskope.desktop \
|
||||
--replace 'Exec=nifskope' "Exec=$out/bin/NifSkope" \
|
||||
--replace 'Icon=nifskope' "Icon=$out/share/pixmaps/nifskope.png"
|
||||
|
||||
find $out/share -type f -exec chmod -x {} \;
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://niftools.sourceforge.net/wiki/NifSkope";
|
||||
description = "A tool for analyzing and editing NetImmerse/Gamebryo '*.nif' files";
|
||||
maintainers = with maintainers; [ eelco ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/graphics/nifskope/external-lib-paths.patch
Normal file
33
pkgs/tools/graphics/nifskope/external-lib-paths.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
diff --git a/NifSkope.pro b/NifSkope.pro
|
||||
index 1c0bc5a..cc29fc5 100644
|
||||
--- a/NifSkope.pro
|
||||
+++ b/NifSkope.pro
|
||||
@@ -330,14 +330,14 @@ nvtristrip {
|
||||
}
|
||||
|
||||
qhull {
|
||||
- !*msvc*:QMAKE_CFLAGS += -isystem ../nifskope/lib/qhull/src
|
||||
- !*msvc*:QMAKE_CXXFLAGS += -isystem ../nifskope/lib/qhull/src
|
||||
+ !*msvc*:QMAKE_CFLAGS += -isystem ./lib/qhull/src
|
||||
+ !*msvc*:QMAKE_CXXFLAGS += -isystem ./lib/qhull/src
|
||||
else:INCLUDEPATH += lib/qhull/src
|
||||
HEADERS += $$files($$PWD/lib/qhull/src/libqhull/*.h, false)
|
||||
}
|
||||
|
||||
gli {
|
||||
- !*msvc*:QMAKE_CXXFLAGS += -isystem ../nifskope/lib/gli/gli -isystem ../nifskope/lib/gli/external
|
||||
+ !*msvc*:QMAKE_CXXFLAGS += -isystem ./lib/gli/gli -isystem ./lib/gli/external
|
||||
else:INCLUDEPATH += lib/gli/gli lib/gli/external
|
||||
HEADERS += $$files($$PWD/lib/gli/gli/*.hpp, true)
|
||||
HEADERS += $$files($$PWD/lib/gli/gli/*.inl, true)
|
||||
@@ -346,8 +346,8 @@ gli {
|
||||
}
|
||||
|
||||
zlib {
|
||||
- !*msvc*:QMAKE_CFLAGS += -isystem ../nifskope/lib/zlib
|
||||
- !*msvc*:QMAKE_CXXFLAGS += -isystem ../nifskope/lib/zlib
|
||||
+ !*msvc*:QMAKE_CFLAGS += -isystem ./lib/zlib
|
||||
+ !*msvc*:QMAKE_CXXFLAGS += -isystem ./lib/zlib
|
||||
else:INCLUDEPATH += lib/zlib
|
||||
HEADERS += $$files($$PWD/lib/zlib/*.h, false)
|
||||
SOURCES += $$files($$PWD/lib/zlib/*.c, false)
|
||||
19
pkgs/tools/graphics/nifskope/no-sse-on-arm.patch
Normal file
19
pkgs/tools/graphics/nifskope/no-sse-on-arm.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff --git a/NifSkope.pro b/NifSkope.pro
|
||||
index cc29fc5..b17bb6e 100644
|
||||
--- a/NifSkope.pro
|
||||
+++ b/NifSkope.pro
|
||||
@@ -428,13 +428,10 @@ win32 {
|
||||
# Optimization flags
|
||||
QMAKE_CXXFLAGS_DEBUG -= -O0 -g
|
||||
QMAKE_CXXFLAGS_DEBUG *= -Og -g3
|
||||
- QMAKE_CXXFLAGS_RELEASE *= -O3 -mfpmath=sse
|
||||
+ QMAKE_CXXFLAGS_RELEASE *= -O3
|
||||
|
||||
# C++11 Support
|
||||
QMAKE_CXXFLAGS_RELEASE *= -std=c++14
|
||||
-
|
||||
- # Extension flags
|
||||
- QMAKE_CXXFLAGS_RELEASE *= -msse2 -msse
|
||||
}
|
||||
|
||||
win32 {
|
||||
22
pkgs/tools/graphics/nifskope/qttools-bins.patch
Normal file
22
pkgs/tools/graphics/nifskope/qttools-bins.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/NifSkope_targets.pri b/NifSkope_targets.pri
|
||||
index 05324c2..d8389b1 100644
|
||||
--- a/NifSkope_targets.pri
|
||||
+++ b/NifSkope_targets.pri
|
||||
@@ -11,7 +11,7 @@ else:EXE = ""
|
||||
## lupdate / lrelease
|
||||
###############################
|
||||
|
||||
-QMAKE_LUPDATE = $$[QT_INSTALL_BINS]/lupdate$${EXE}
|
||||
+QMAKE_LUPDATE = @qttools@/lupdate$${EXE}
|
||||
exists($$QMAKE_LUPDATE) {
|
||||
# Make target for Updating .ts
|
||||
updatets.target = updatets
|
||||
@@ -23,7 +23,7 @@ exists($$QMAKE_LUPDATE) {
|
||||
message("lupdate could not be found, ignoring make target")
|
||||
}
|
||||
|
||||
-QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease$${EXE}
|
||||
+QMAKE_LRELEASE = @qttools@/lrelease$${EXE}
|
||||
exists($$QMAKE_LRELEASE) {
|
||||
# Build Step for Releasing .ts->.qm
|
||||
updateqm.input = TRANSLATIONS
|
||||
56
pkgs/tools/graphics/nip2/default.nix
Normal file
56
pkgs/tools/graphics/nip2/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, glib
|
||||
, libxml2
|
||||
, flex
|
||||
, bison
|
||||
, vips
|
||||
, gtk2
|
||||
, fftw
|
||||
, gsl
|
||||
, goffice
|
||||
, libgsf
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nip2";
|
||||
version = "8.7.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/libvips/nip2/releases/download/v${version}/nip2-${version}.tar.gz";
|
||||
sha256 = "0l7n427njif53npqn02gfjjly8y3khbrkzqxp10j5vp9h97psgiw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
flex
|
||||
pkg-config
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
libxml2
|
||||
vips
|
||||
gtk2
|
||||
fftw
|
||||
gsl
|
||||
goffice
|
||||
libgsf
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/nip2 --set VIPSHOME "$out"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/libvips/nip2";
|
||||
description = "Graphical user interface for VIPS image processing system";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ kovirobi ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/graphics/optar/default.nix
Normal file
35
pkgs/tools/graphics/optar/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchurl, imagemagick, libpng }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "optar";
|
||||
version = "20150210";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ronja.twibright.com/optar.tgz";
|
||||
sha256 = "10lr31k3xfcpa6vxkbl3abph7j3gks2210489khnnzmhmfdnm1a4";
|
||||
};
|
||||
|
||||
buildInputs = [ libpng ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/local $out
|
||||
|
||||
substituteInPlace pgm2ps \
|
||||
--replace 'convert ' "${lib.getBin imagemagick}/bin/convert "
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "OPTical ARchiver - it's a codec for encoding data on paper";
|
||||
homepage = "http://ronja.twibright.com/optar/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = with platforms; linux; # possibly others, but only tested on Linux
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/graphics/optipng/default.nix
Normal file
44
pkgs/tools/graphics/optipng/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchurl, libpng
|
||||
, static ? stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
# This package comes with its own copy of zlib, libpng and pngxtern
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "optipng";
|
||||
version = "0.7.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/optipng/optipng-${version}.tar.gz";
|
||||
sha256 = "0lj4clb851fzpaq446wgj0sfy922zs5l5misbpwv6w7qrqrz4cjg";
|
||||
};
|
||||
|
||||
buildInputs = [ libpng ];
|
||||
|
||||
LDFLAGS = optional static "-static";
|
||||
# Workaround for crash in cexcept.h. See
|
||||
# https://github.com/NixOS/nixpkgs/issues/28106
|
||||
preConfigure = ''
|
||||
export LD=$CC
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-system-zlib"
|
||||
"--with-system-libpng"
|
||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
#"-prefix=$out"
|
||||
];
|
||||
|
||||
postInstall = if stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isWindows then ''
|
||||
mv "$out"/bin/optipng{,.exe}
|
||||
'' else null;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://optipng.sourceforge.net/";
|
||||
description = "A PNG optimizer";
|
||||
license = licenses.zlib;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
22
pkgs/tools/graphics/oxipng/default.nix
Normal file
22
pkgs/tools/graphics/oxipng/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, stdenv, fetchCrate, rustPlatform }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
version = "5.0.1";
|
||||
pname = "oxipng";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit version pname;
|
||||
sha256 = "1g2m6ifmppgq086w3vzdsihnba4qrzmnf5k13bgah2qasnl97qfh";
|
||||
};
|
||||
|
||||
cargoSha256 = "1dkfplmi21wgks8pfxxc3kww89i9wq7fq5j7jm7a8zi59p3xdars";
|
||||
|
||||
doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/shssoichiro/oxipng";
|
||||
description = "A multithreaded lossless PNG compression optimizer";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dywedir ];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/graphics/pdf2svg/default.nix
Normal file
25
pkgs/tools/graphics/pdf2svg/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
|
||||
, cairo, gtk2, poppler }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pdf2svg";
|
||||
version = "0.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "db9052";
|
||||
repo = "pdf2svg";
|
||||
rev = "v${version}";
|
||||
sha256 = "14ffdm4y26imq99wjhkrhy9lp33165xci1l5ndwfia8hz53bl02k";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ cairo poppler gtk2 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "PDF converter to SVG format";
|
||||
homepage = "http://www.cityinthesky.co.uk/opensource/pdf2svg";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.ianwookim ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/graphics/pdftag/default.nix
Normal file
24
pkgs/tools/graphics/pdftag/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, meson, vala, ninja
|
||||
, gtk3, poppler, wrapGAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pdftag";
|
||||
version = "1.0.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arrufat";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1paj8hs27akzsivn01a30fl3zx5gfn1h89wxg2m72fd806hk0hql";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config meson ninja wrapGAppsHook vala ];
|
||||
buildInputs = [ gtk3 poppler ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Edit metadata found in PDFs";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ leenaars ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/graphics/pdftoipe/default.nix
Normal file
33
pkgs/tools/graphics/pdftoipe/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, poppler
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pdftoipe";
|
||||
version = "7.2.24.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "otfried";
|
||||
repo = "ipe-tools";
|
||||
rev = "v${version}";
|
||||
sha256 = "jlrjrjzZQo79CKMySayhCm1dqLh89wOQuXrXa2aqc0k=";
|
||||
};
|
||||
sourceRoot = "source/pdftoipe";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ poppler ];
|
||||
|
||||
installPhase = ''
|
||||
install -D pdftoipe $out/bin/pdftoipe
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A program that tries to convert arbitrary PDF documents to Ipe files";
|
||||
homepage = "https://github.com/otfried/ipe-tools";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ yrd ];
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue