diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-09-10 07:06:45 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-09-10 07:06:45 +0200 |
commit | 1716d62f633cd091fce0d61517bb79504c300d36 (patch) | |
tree | 5abe8333c83e247f364cf835efc7fc669d36c311 /pkgs/development/tools/misc | |
parent | dc051dfdef1ec4c9bdd90b228764b6c24372597e (diff) | |
parent | 8752ff225446422b902d9f88d6f75f9928d4eb34 (diff) |
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r-- | pkgs/development/tools/misc/xxdiff/default.nix | 53 | ||||
-rw-r--r-- | pkgs/development/tools/misc/xxdiff/tip.nix | 36 |
2 files changed, 38 insertions, 51 deletions
diff --git a/pkgs/development/tools/misc/xxdiff/default.nix b/pkgs/development/tools/misc/xxdiff/default.nix index 51f4de8eacc..c187ad42c0e 100644 --- a/pkgs/development/tools/misc/xxdiff/default.nix +++ b/pkgs/development/tools/misc/xxdiff/default.nix @@ -1,28 +1,51 @@ -{ stdenv, fetchurl, qt4, flex, bison, docutils }: +{ lib, mkDerivation, fetchFromBitbucket, docutils, bison, flex, qmake +, qtbase +}: + +mkDerivation rec { + pname = "xxdiff"; + version = "5.0b1"; + + src = fetchFromBitbucket { + owner = "blais"; + repo = pname; + rev = "5e5f885dfc43559549a81c59e9e8c9525306356a"; + sha256 = "0gbvxrkwkbvag3298j89smszghpr8ilxxfb0cvsknfqdf15b296w"; + }; -stdenv.mkDerivation rec { - name = "xxdiff-4.0.1"; + nativeBuildInputs = [ bison docutils flex qmake ]; - src = fetchurl { - url = "mirror://sourceforge/xxdiff/${name}.tar.bz2"; - sha256 = "0050qd12fvlcfdh0iwjsaxgxdq7jsl70f85fbi7pz23skpddsn5z"; - }; + buildInputs = [ qtbase ]; + + dontUseQmakeConfigure = true; + + # c++11 and above is needed for building with Qt 5.9+ + NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + + sourceRoot = "source/src"; - nativeBuildInputs = [ flex bison qt4 docutils ]; + postPatch = '' + substituteInPlace xxdiff.pro --replace ../bin ./bin + ''; - buildInputs = [ qt4 ]; + preConfigure = '' + make -f Makefile.bootstrap + ''; - QMAKE = "qmake"; + installPhase = '' + runHook preInstall - configurePhase = "cd src; make -f Makefile.bootstrap"; + install -Dm555 -t $out/bin ./bin/xxdiff + install -Dm444 -t $out/share/doc/${pname} ${src}/README - installPhase = "mkdir -pv $out/bin; cp -v ../bin/xxdiff $out/bin"; + runHook postInstall + ''; - meta = with stdenv.lib; { - homepage = http://furius.ca/xxdiff/; + meta = with lib; { description = "Graphical file and directories comparator and merge tool"; + homepage = "http://furius.ca/xxdiff/"; license = licenses.gpl2; + maintainers = with maintainers; [ pSub raskin ]; platforms = platforms.linux; - maintainers = with maintainers; [ pSub ]; }; } diff --git a/pkgs/development/tools/misc/xxdiff/tip.nix b/pkgs/development/tools/misc/xxdiff/tip.nix deleted file mode 100644 index 04827fade70..00000000000 --- a/pkgs/development/tools/misc/xxdiff/tip.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ stdenv, fetchFromBitbucket, qtbase, flex, bison, docutils }: - -stdenv.mkDerivation { - name = "xxdiff-5.0b1"; - - src = fetchFromBitbucket { - owner = "blais"; - repo = "xxdiff"; - rev = "5e5f885dfc43559549a81c59e9e8c9525306356a"; - sha256 = "0gbvxrkwkbvag3298j89smszghpr8ilxxfb0cvsknfqdf15b296w"; - }; - - nativeBuildInputs = [ flex bison docutils ]; - - buildInputs = [ qtbase ]; - - # Fixes build with Qt 5.9 - NIX_CFLAGS_COMPILE = [ "-std=c++11" ]; - - preConfigure = '' - cd src - make -f Makefile.bootstrap - ''; - - postInstall = '' - install -D ../bin/xxdiff $out/bin/xxdiff - ''; - - meta = with stdenv.lib; { - homepage = http://furius.ca/xxdiff/; - description = "Graphical file and directories comparator and merge tool"; - license = licenses.gpl2; - platforms = platforms.linux; - maintainers = with maintainers; [ pSub raskin ]; - }; -} |