diff options
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r-- | pkgs/applications/graphics/antimony/default.nix | 13 | ||||
-rw-r--r-- | pkgs/applications/graphics/inkscape/default.nix | 10 | ||||
-rw-r--r-- | pkgs/applications/graphics/rx/default.nix | 58 | ||||
-rw-r--r-- | pkgs/applications/graphics/write_stylus/default.nix | 20 |
4 files changed, 83 insertions, 18 deletions
diff --git a/pkgs/applications/graphics/antimony/default.nix b/pkgs/applications/graphics/antimony/default.nix index 3c39aadda98..04e64b76d3f 100644 --- a/pkgs/applications/graphics/antimony/default.nix +++ b/pkgs/applications/graphics/antimony/default.nix @@ -1,22 +1,22 @@ { stdenv, fetchFromGitHub, libpng, python3 -, libGLU_combined, qtbase, ncurses +, libGLU_combined, qtbase, wrapQtAppsHook, ncurses , cmake, flex, lemon }: let - gitRev = "c0038e3ea82fec6119de364bcbc3370955ed46a2"; + gitRev = "6dfe6822e0279a4cc2f1c60e85b42212627285fe"; gitBranch = "develop"; gitTag = "0.9.3"; in stdenv.mkDerivation { pname = "antimony"; - version = "2018-10-20"; + version = "2019-10-30"; src = fetchFromGitHub { owner = "mkeeter"; repo = "antimony"; rev = gitRev; - sha256 = "01cjcjppbb0gvh6npcsaidzpfcfzrqhhi07z4v0jkfyi0fl125v4"; + sha256 = "07zlkwlk79czq8dy85b6n3ds3g36l8qy4ix849ady6ia3gm8981j"; }; patches = [ ./paths-fix.patch ]; @@ -29,7 +29,8 @@ in buildInputs = [ libpng python3 python3.pkgs.boost - libGLU_combined qtbase ncurses + libGLU_combined qtbase wrapQtAppsHook + ncurses ]; nativeBuildInputs = [ cmake flex lemon ]; @@ -44,7 +45,7 @@ in meta = with stdenv.lib; { description = "A computer-aided design (CAD) tool from a parallel universe"; - homepage = "https://github.com/mkeeter/antimony"; + homepage = https://github.com/mkeeter/antimony; license = licenses.mit; maintainers = with maintainers; [ rnhmjoj ]; platforms = platforms.linux; diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index e3fa897aec6..17b5a716491 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, perlPackages, libXft +{ stdenv, fetchurl, fetchpatch, pkgconfig, perlPackages, libXft , libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2 , glibmm, libsigcxx, lcms, boost, gettext, makeWrapper , gsl, gtkspell2, cairo, python2, poppler, imagemagick, libwpg, librevenge @@ -19,6 +19,14 @@ stdenv.mkDerivation rec { sha256 = "0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p"; }; + patches = [ + (fetchpatch { + name = "inkscape-poppler_0_76_compat.patch"; + url = "https://gitlab.com/inkscape/inkscape/commit/e831b034746f8dc3c3c1b88372751f6dcb974831.diff"; + sha256 = "096rdyi6ppjq1h9jwwsm9hb99nggfrfinik8rm23jkn4h2zl01zf"; + }) + ]; + # Inkscape hits the ARGMAX when linking on macOS. It appears to be # CMake’s ARGMAX check doesn’t offer enough padding for NIX_LDFLAGS. # Setting strictDeps it avoids duplicating some dependencies so it diff --git a/pkgs/applications/graphics/rx/default.nix b/pkgs/applications/graphics/rx/default.nix new file mode 100644 index 00000000000..4e8519d17b6 --- /dev/null +++ b/pkgs/applications/graphics/rx/default.nix @@ -0,0 +1,58 @@ +{ stdenv, rustPlatform, fetchFromGitHub, makeWrapper +, cmake, pkgconfig +, xorg ? null +, vulkan-loader ? null }: + +assert stdenv.isLinux -> xorg != null; +assert stdenv.isLinux -> vulkan-loader != null; + +let + graphicsBackend = if stdenv.isDarwin then "metal" else "vulkan"; +in + with stdenv.lib; + rustPlatform.buildRustPackage rec { + pname = "rx"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "cloudhead"; + repo = pname; + rev = "v${version}"; + sha256 = "0f6cw8zqr45bprj8ibhp89bb2a077g4zinfrdn943csdmh47qzcl"; + }; + + cargoSha256 = "05bqsw0nw24xysq86qa3hx9b5ncf50wfxsgpy388yrs2dfnphwlx"; + + nativeBuildInputs = [ cmake pkgconfig makeWrapper ]; + + buildInputs = optionals stdenv.isLinux + (with xorg; [ + # glfw-sys dependencies: + libX11 libXrandr libXinerama libXcursor libXi libXext + ]); + + cargoBuildFlags = [ "--features=${graphicsBackend}" ]; + + # TODO: better to factor that into the rust platform + checkPhase = '' + runHook preCheck + echo "Running cargo test" + cargo test --features=${graphicsBackend} + runHook postCheck + ''; + + postInstall = optional stdenv.isLinux '' + mkdir -p $out/share/applications + cp $src/rx.desktop $out/share/applications + wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib + ''; + + meta = { + description = "Modern and extensible pixel editor implemented in Rust"; + homepage = "https://cloudhead.io/rx/"; + license = licenses.gpl3; + maintainers = with maintainers; [ minijackson ]; + platforms = with platforms; (linux ++ darwin ++ windows); + inherit version; + }; + } diff --git a/pkgs/applications/graphics/write_stylus/default.nix b/pkgs/applications/graphics/write_stylus/default.nix index 232eeeb0115..0f1020b0b07 100644 --- a/pkgs/applications/graphics/write_stylus/default.nix +++ b/pkgs/applications/graphics/write_stylus/default.nix @@ -1,4 +1,12 @@ { stdenv, lib, qtbase, qtsvg, libglvnd, fetchurl, makeDesktopItem }: +let + # taken from: https://www.iconfinder.com/icons/50835/edit_pencil_write_icon + # license: Free for commercial use + desktopIcon = fetchurl { + url = "https://www.iconfinder.com/icons/50835/download/png/256"; + sha256 = "0abdya42yf9alxbsmc2nf8jwld50zfria6z3d4ncvp1zw2a9jhb8"; + }; +in stdenv.mkDerivation rec { pname = "write_stylus"; version = "209"; @@ -7,7 +15,7 @@ stdenv.mkDerivation rec { name = "Write"; exec = "Write"; comment = "A word processor for handwriting"; - icon = "write_stylus"; + icon = desktopIcon; desktopName = "Write"; genericName = "Write"; categories = "Office;Graphics"; @@ -18,13 +26,6 @@ stdenv.mkDerivation rec { sha256 = "1p6glp4vdpwl8hmhypayc4cvs3j9jfmjfhhrgqm2xkgl5bfbv2qd"; }; - # taken from: https://www.iconfinder.com/icons/50835/edit_pencil_write_icon - # license: Free for commercial use - icon = fetchurl { - url = "https://oyra.eu/write/icon.tar.gz"; - sha256 = "1zd98g63apwi17qc1hm1g14maain5d18g4afadxm30qjz2s0mvs8"; - }; - sourceRoot = "."; dontBuild = true; @@ -35,9 +36,6 @@ stdenv.mkDerivation rec { # symlink the binary to bin/ ln -s $out/Write/Write $out/bin/Write - # untar icons - tar -xzf ${icon} *.tar.gz -C $out/ - mkdir -p $out/share/applications ln -s ${desktopItem}/share/applications/* $out/share/applications/ ''; |