nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit b5849236be5edcf3c7dccae4edfbce811a24018c
parent 20d2157eed88ff7856b1a07f6a933322c40d7cb0
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Fri, 29 Jul 2022 11:39:27 +0300

Up

Diffstat:
Mpkgs/data/misc/routinodb/default.nix | 20++++++--------------
Mpkgs/default.nix | 1-
Dpkgs/development/libraries/qt-6/default.nix | 112-------------------------------------------------------------------------------
Dpkgs/development/libraries/qt-6/icu.nix | 94-------------------------------------------------------------------------------
4 files changed, 6 insertions(+), 221 deletions(-)

diff --git a/pkgs/data/misc/routinodb/default.nix b/pkgs/data/misc/routinodb/default.nix @@ -1,21 +1,13 @@ -{ lib, stdenv, fetchurl, routino }: +{ lib, stdenv, fetchurl, routino, prefix ? "Russia-NWFD" }: stdenv.mkDerivation rec { pname = "routinodb"; - version = "220615"; + version = "220728"; srcs = [ (fetchurl { - url = "https://download.geofabrik.de/europe/finland-${version}.osm.pbf"; - hash = "sha256-L766WI5TWbh5vmaAWvS2xHxGa936KilUpnSBLz9z+ug="; - }) - (fetchurl { - url = "https://download.geofabrik.de/europe/estonia-${version}.osm.pbf"; - hash = "sha256-XxkZCC9cSHFiKfFvFCIgmxssq1D170GbBV8sG9Wcej8="; - }) - (fetchurl { url = "https://download.geofabrik.de/russia/northwestern-fed-district-${version}.osm.pbf"; - hash = "sha256-aGhS/1n4tvoCrzMQHjerzM3mGhhQ/lNd7pGLsMe3YCU="; + hash = "sha256-1TdnM3OFkzIeHOgxXv7/iKmbtCZ/AKY5qT6ph1yt6C4="; }) ]; @@ -27,20 +19,20 @@ stdenv.mkDerivation rec { for src in $srcs; do ${routino}/bin/planetsplitter \ --dir=$out \ - --prefix=RussiaNW \ + --prefix=${prefix} \ --tagging=${routino}/share/routino/tagging.xml \ --parse-only --append $src done ${routino}/bin/planetsplitter \ --dir=$out \ - --prefix=RussiaNW \ + --prefix=${prefix} \ --tagging=${routino}/share/routino/tagging.xml \ --process-only ''; meta = with lib; { - description = "Routino Database (FIN+EST+NWFD)"; + description = "Routino Database"; homepage = "https://download.geofabrik.de/index.html"; license = licenses.free; maintainers = [ maintainers.sikmir ]; diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -67,7 +67,6 @@ lib.makeScope newScope ( libshell = callPackage ./development/libraries/libshell { }; microjson = callPackage ./development/libraries/microjson { }; - qt6 = callPackage ./development/libraries/qt-6 { }; ### DEVELOPMENT / PERL MODULES diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix @@ -1,112 +0,0 @@ -# https://gist.github.com/rprospero/dd8e16bad9f842409c85e63ade31c355 -{ lib, stdenv, fetchurl, requireFile, python3Packages, p7zip, libmysqlclient, autoPatchelfHook -, dbus, libxkbcommon, gdk-pixbuf, libdrm, libgssglue, mysql, gtkd -, cups, pango, postgresql, libGL, libglvnd, xorg, unixODBC }: - -let - aqt = python3Packages.buildPythonPackage rec { - pname = "aqtinstall"; - version = "1.2.4"; - src = python3Packages.fetchPypi { - inherit pname version; - sha256 = "fmaAYOSHrx5LVUoPlIw0p/0jMRVGSPE+teEVlNurz10="; - }; - propagatedBuildInputs = [ - python3Packages.setuptools-scm - python3Packages.texttable - python3Packages.patch - python3Packages.requests - semantic_version - p7zip - ]; - pipInstallFlags = [ "--no-deps" ]; - - doCheck = false; - }; - - semantic_version = python3Packages.buildPythonPackage rec { - pname = "semantic_version"; - version = "2.8.5"; - src = python3Packages.fetchPypi { - inherit pname version; - sha256 = "0sst4FWHYpNGebmhBOguynr0SMn0l00fPuzP9lHfilQ="; - }; - # propagatedBuildInputs = - # [ python3Packages.setuptools-scm python3Packages.semantic_verion ]; - # pipInstallFlags = [ "--no-deps" ]; - - doCheck = false; - }; - - qtbase = requireFile { - name = "6.1.1-0-202106031044qtbase-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z"; - message = '' - Download https://mirrors.ukfast.co.uk/sites/qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_611/qt.qt6.611.gcc_64/6.1.1-0-202106031044qtbase-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z - and add it to the nix store with nix-store --add-fixed sha256 <FILE>. - ''; - sha256 = "fcE1ShAuAbKPihOG4OILnijM0mgAsa5l8V8V1bOYykM="; - }; - qtsvg = requireFile { - name = "6.1.1-0-202106031044qtsvg-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z"; - message = '' - Download https://mirrors.ukfast.co.uk/sites/qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_611/qt.qt6.611.gcc_64/6.1.1-0-202106031044qtsvg-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z - and add it to the nix store with nix-store --add-fixed sha256 <FILE>. - ''; - sha256 = "zO9CAMNN7k5k51V4JcrCZFbAag3sn2gmd0YoYvh+qng="; - }; - -in stdenv.mkDerivation { - pname = "qt6"; - version = "6.1.1"; - unpackPhase = '' - ${p7zip}/bin/7z x ${qtbase} -o$out - ${p7zip}/bin/7z x ${qtsvg} -o$out - ''; - installPhase = '' - mkdir $out/lib - ln -s ${libmysqlclient}/lib/mysql/libmysqlclient.so $out/lib/libmysqlclient.so.21 - patchelf --set-rpath $out/lib $out/6.1.1/gcc_64/lib/libQt6Core.so.6.1.1 - echo No Install - ''; - nativeBuildInputs = [ autoPatchelfHook ]; - autoPatchelfIgnoreMissingDeps = false; - buildInputs = [ - dbus - libxkbcommon - stdenv.cc.cc.lib - - gdk-pixbuf - libdrm - (import ./icu.nix { - inherit lib stdenv fetchurl; - version = "56.1"; - sha256 = "OmTpEFxzTc9jHAs+1gQEUxvObA9aZL/hpkAqTMIxSBY="; - }) - libgssglue - mysql - libmysqlclient.dev - gtkd - - cups - pango - postgresql - libGL - libglvnd - libglvnd.dev - xorg.xcbutil - xorg.xcbutilwm - xorg.xcbutilkeysyms - xorg.xcbutilimage - xorg.xcbutilrenderutil - unixODBC - ]; - - meta = with lib; { - homepage = "http://www.qt.io"; - description = "A cross-platform application framework for C++"; - license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; - maintainers = [ maintainers.sikmir ]; - platforms = platforms.linux; - skip.ci = true; - }; -} diff --git a/pkgs/development/libraries/qt-6/icu.nix b/pkgs/development/libraries/qt-6/icu.nix @@ -1,94 +0,0 @@ -# https://gist.github.com/rprospero/dd8e16bad9f842409c85e63ade31c355 -{ lib, stdenv, fetchurl, version, sha256, patches ? [], patchFlags ? [] }: - -let - buildRootOnly = false; - pname = "icu4c"; - - baseAttrs = { - src = fetchurl { - url = "https://github.com/unicode-org/icu/releases/download/release-${lib.replaceChars [ "." ] [ "-" ] version}/icu4c-${lib.replaceChars [ "." ] [ "_" ] version}-src.tgz"; - inherit sha256; - }; - - postUnpack = '' - sourceRoot=''${sourceRoot}/source - echo Source root reset to ''${sourceRoot} - ''; - - # https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 - postPatch = if (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") && lib.versionOlder version "62.1" - then "substituteInPlace i18n/digitlst.cpp --replace '<xlocale.h>' '<locale.h>'" - else null; # won't find locale_t on darwin - - inherit patchFlags patches; - - preConfigure = '' - sed -i -e "s|/bin/sh|${stdenv.shell}|" configure - - # $(includedir) is different from $(prefix)/include due to multiple outputs - sed -i -e 's|^\(CPPFLAGS = .*\) -I\$(prefix)/include|\1 -I$(includedir)|' config/Makefile.inc.in - '' + lib.optionalString stdenv.isAarch32 '' - # From https://archlinuxarm.org/packages/armv7h/icu/files/icudata-stdlibs.patch - sed -e 's/LDFLAGSICUDT=-nodefaultlibs -nostdlib/LDFLAGSICUDT=/' -i config/mh-linux - ''; - - configureFlags = [ "--disable-debug" ] - ++ lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) "--enable-rpath"; - - enableParallelBuilding = true; - - meta = with lib; { - description = "Unicode and globalization support library"; - homepage = "http://site.icu-project.org/"; - maintainers = [ maintainers.sikmir ]; - platforms = platforms.all; - skip.ci = true; - }; - }; - - realAttrs = baseAttrs // { - name = pname + "-" + version; - - outputs = [ "out" "dev" ]; - outputBin = "dev"; - - # remove dependency on bootstrap-tools in early stdenv build - postInstall = lib.optionalString stdenv.isDarwin '' - sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc - '' + (let - replacements = [ - { from = "\${prefix}/include"; to = "${placeholder "dev"}/include"; } # --cppflags-searchpath - { from = "\${pkglibdir}/Makefile.inc"; to = "${placeholder "dev"}/lib/icu/Makefile.inc"; } # --incfile - { from = "\${pkglibdir}/pkgdata.inc"; to = "${placeholder "dev"}/lib/icu/pkgdata.inc"; } # --incpkgdatafile - ]; - in '' - substituteInPlace "$dev/bin/icu-config" \ - ${lib.concatMapStringsSep " " (r: "--replace '${r.from}' '${r.to}'") replacements} - ''); - - postFixup = ''moveToOutput lib/icu "$dev" ''; - }; - - buildRootOnlyAttrs = baseAttrs // { - name = pname + "-build-root-" + version; - - preConfigure = baseAttrs.preConfigure + '' - mkdir build - cd build - configureScript=../configure - ''; - - postBuild = '' - cd .. - mv build $out - echo "Doing build-root only, exiting now" >&2 - exit 0 - ''; - }; - - attrs = if buildRootOnly - then buildRootOnlyAttrs - else realAttrs; -in -stdenv.mkDerivation attrs