From 13162b9ddb3dd92e4c75c55b1f73f3731384b2d6 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 23 Apr 2017 17:52:36 +0300 Subject: [PATCH] fritzing: 0.9.0b -> 0.9.3b Fixes #24943. --- .../science/electronics/fritzing/default.nix | 41 ++++++++++++++----- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/science/electronics/fritzing/default.nix b/pkgs/applications/science/electronics/fritzing/default.nix index 0f817a71a701..838697f1394f 100644 --- a/pkgs/applications/science/electronics/fritzing/default.nix +++ b/pkgs/applications/science/electronics/fritzing/default.nix @@ -1,24 +1,45 @@ -{ stdenv, fetchurl, qtbase, qtsvg, qmakeHook, boost }: +{ stdenv, fetchpatch, fetchFromGitHub, makeQtWrapper, qmakeHook, pkgconfig +, qtbase, qtsvg, qtserialport, boost, libgit2 +}: stdenv.mkDerivation rec { - version = "0.9.0b"; name = "fritzing-${version}"; + version = "0.9.3b"; - src = fetchurl { - url = "http://fritzing.org/download/${version}/source-tarball/fritzing-${version}.source.tar_1.bz2"; - sha256 = "181qnknq1j5x075icpw2qk0sc4wcj9f2hym533vs936is0wxp2gk"; + src = fetchFromGitHub { + owner = "fritzing"; + repo = "fritzing-app"; + rev = version; + sha256 = "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"; }; - unpackPhase = '' - tar xjf ${src} - ''; + parts = fetchFromGitHub { + owner = "fritzing"; + repo = "fritzing-parts"; + rev = version; + sha256 = "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"; + }; - buildInputs = [ qtbase qtsvg boost qmakeHook ]; + patches = [(fetchpatch { + name = "0001-Squashed-commit-of-the-following.patch"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-Squashed-commit-of-the-following.patch?h=fritzing"; + sha256 = "1cv6myidxhy28i8m8v13ghzkvx5978p9dcd8v7885y0l1h3108mf"; + })]; + + buildInputs = [ qtbase qtsvg qtserialport boost libgit2 ]; + + nativeBuildInputs = [ qmakeHook makeQtWrapper pkgconfig ]; qmakeFlags = [ "phoenix.pro" ]; + enableParallelBuilding = true; + preConfigure = '' - cd fritzing-${version}.source + ln -s "$parts" parts + ''; + + postInstall = '' + wrapQtProgram $out/bin/Fritzing ''; meta = {