commit 2265774f3f2c1d74c466952d1da05c0b2aced9e2 parent f6873c9b5c64b8b6d927b1f6c18498fa5c28f078 Author: Nikolay Korotkiy <sikmir@disroot.org> Date: Tue, 10 Oct 2023 17:12:00 +0400 Apply formatting Diffstat:
25 files changed, 250 insertions(+), 83 deletions(-)
diff --git a/flake.nix b/flake.nix @@ -7,16 +7,23 @@ }; outputs = { self, nixpkgs, flake-utils }: { - overlays.default = final: prev: import ./pkgs { pkgs = prev; }; - nixosModules = import ./modules; - } // flake-utils.lib.eachDefaultSystem (system: { + overlays.default = final: prev: import ./pkgs { pkgs = prev; }; + nixosModules = import ./modules; + } // flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + inherit (pkgs) lib; packages = flake-utils.lib.filterPackages system (import ./default.nix { - pkgs = nixpkgs.legacyPackages.${system}; + inherit pkgs; }); + in + { + inherit packages; legacyPackages = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; crossOverlays = [ self.overlays.default ]; }; + formatter = pkgs.nixpkgs-fmt; }); } diff --git a/pkgs/data/maps/gpxsee-maps/default.nix b/pkgs/data/maps/gpxsee-maps/default.nix @@ -35,28 +35,29 @@ stdenvNoCC.mkDerivation { hash = "sha256-JT9/sNFP8jGBBxRZZgjlJ4OFvP9HxjFp7ehj2HVVrGs="; }; - postPatch = let - insertApiKey = map: key: '' - substitute ${map}.{tpl,xml} \ - --replace "insert-your-apikey-here" "${key}" + postPatch = + let + insertApiKey = map: key: '' + substitute ${map}.{tpl,xml} \ + --replace "insert-your-apikey-here" "${key}" + ''; + in + '' + ${insertApiKey "World/Europe/FI/Ilmakuva" mmlApiKey} + ${insertApiKey "World/Europe/FI/Maastokartta" mmlApiKey} + ${insertApiKey "World/Europe/FI/Selkokartta" mmlApiKey} + ${insertApiKey "World/Europe/FI/Taustakartta" mmlApiKey} + ${insertApiKey "World/here-base" hereApiKey} + ${insertApiKey "World/here-vector" hereApiKey} + ${insertApiKey "World/heidelberg" openrouteserviceApiKey} + ${insertApiKey "World/MapTiler" maptilerApiKey} + ${insertApiKey "World/Mapbox" mapboxApiKey} + ${insertApiKey "World/Thunderforest-Landscape" thunderforestApiKey} + ${insertApiKey "World/Thunderforest-Neighbourhood" thunderforestApiKey} + ${insertApiKey "World/Thunderforest-OpenCycleMap" thunderforestApiKey} + ${insertApiKey "World/Thunderforest-Outdoors" thunderforestApiKey} + ${insertApiKey "World/Thunderforest-Transport" thunderforestApiKey} ''; - in - '' - ${insertApiKey "World/Europe/FI/Ilmakuva" mmlApiKey} - ${insertApiKey "World/Europe/FI/Maastokartta" mmlApiKey} - ${insertApiKey "World/Europe/FI/Selkokartta" mmlApiKey} - ${insertApiKey "World/Europe/FI/Taustakartta" mmlApiKey} - ${insertApiKey "World/here-base" hereApiKey} - ${insertApiKey "World/here-vector" hereApiKey} - ${insertApiKey "World/heidelberg" openrouteserviceApiKey} - ${insertApiKey "World/MapTiler" maptilerApiKey} - ${insertApiKey "World/Mapbox" mapboxApiKey} - ${insertApiKey "World/Thunderforest-Landscape" thunderforestApiKey} - ${insertApiKey "World/Thunderforest-Neighbourhood" thunderforestApiKey} - ${insertApiKey "World/Thunderforest-OpenCycleMap" thunderforestApiKey} - ${insertApiKey "World/Thunderforest-Outdoors" thunderforestApiKey} - ${insertApiKey "World/Thunderforest-Transport" thunderforestApiKey} - ''; installPhase = '' install -dm755 $out diff --git a/pkgs/embedded/chdk/default.nix b/pkgs/embedded/chdk/default.nix @@ -1,6 +1,12 @@ -{ lib, stdenv, fetchzip, gcc-arm-embedded, zip -, platform ? null, platformsub ? null -, fi2key ? null, fi2iv ? null +{ lib +, stdenv +, fetchzip +, gcc-arm-embedded +, zip +, platform ? null +, platformsub ? null +, fi2key ? null +, fi2iv ? null }: let diff --git a/pkgs/embedded/embox/default.nix b/pkgs/embedded/embox/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: { which makeWrapper ] ++ lib.optional (arch != "x86" && arch != "arm") pkgsCross."${arch}-embedded".stdenv.cc - ++ lib.optional (arch == "arm") gcc-arm-embedded; + ++ lib.optional (arch == "arm") gcc-arm-embedded; configurePhase = "make confload-${arch}/qemu"; diff --git a/pkgs/gemini/tom/default.nix b/pkgs/gemini/tom/default.nix @@ -1,5 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, makeWrapper -, lua5_3, memstreamHook, zlib +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, makeWrapper +, lua5_3 +, memstreamHook +, zlib }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/geospatial/geojson-pydantic/default.nix b/pkgs/geospatial/geojson-pydantic/default.nix @@ -15,7 +15,8 @@ python3Packages.buildPythonPackage rec { nativeBuildInputs = with python3Packages; [ flit ]; propagatedBuildInputs = with python3Packages; [ - pydantic shapely + pydantic + shapely ]; doCheck = false; diff --git a/pkgs/geospatial/qlandkartegt/default.nix b/pkgs/geospatial/qlandkartegt/default.nix @@ -1,6 +1,21 @@ -{ stdenv, lib, fetchurl, fetchpatch, cmake -, qtmultimedia, qtserialport, qtscript, qtwebkit, wrapQtAppsHook -, garmindev, gdal, gpsd, libdmtx, libexif, libGLU, proj }: +{ stdenv +, lib +, fetchurl +, fetchpatch +, cmake +, qtmultimedia +, qtserialport +, qtscript +, qtwebkit +, wrapQtAppsHook +, garmindev +, gdal +, gpsd +, libdmtx +, libexif +, libGLU +, proj +}: stdenv.mkDerivation rec { pname = "qlandkartegt"; @@ -53,8 +68,17 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake wrapQtAppsHook ]; buildInputs = [ - qtmultimedia qtserialport qtscript qtwebkit - garmindev gdal gpsd libdmtx libexif libGLU proj + qtmultimedia + qtserialport + qtscript + qtwebkit + garmindev + gdal + gpsd + libdmtx + libexif + libGLU + proj ]; cmakeFlags = [ diff --git a/pkgs/geospatial/tilesets-cli/default.nix b/pkgs/geospatial/tilesets-cli/default.nix @@ -1,5 +1,10 @@ -{ lib, fetchFromGitHub, python3Packages, jsonseq, supermercado -, testers, tilesets-cli +{ lib +, fetchFromGitHub +, python3Packages +, jsonseq +, supermercado +, testers +, tilesets-cli }: python3Packages.buildPythonApplication rec { diff --git a/pkgs/geospatial/titiler/default.nix b/pkgs/geospatial/titiler/default.nix @@ -1,5 +1,13 @@ -{ lib, fetchFromGitHub, python3Packages -, rio-stac, rio-tiler, geojson-pydantic, rio-cogeo, starlette-cramjam, cogeo-mosaic }: +{ lib +, fetchFromGitHub +, python3Packages +, rio-stac +, rio-tiler +, geojson-pydantic +, rio-cogeo +, starlette-cramjam +, cogeo-mosaic +}: let pname = "titiler"; version = "0.15.0"; diff --git a/pkgs/gpx/garta/default.nix b/pkgs/gpx/garta/default.nix @@ -1,5 +1,18 @@ -{ lib, stdenv, rustPlatform, rust, fetchFromGitLab, pkg-config -, atk, cairo, gdk-pixbuf, glib, gtk3, harfbuzz, openssl, pango, zlib +{ lib +, stdenv +, rustPlatform +, rust +, fetchFromGitLab +, pkg-config +, atk +, cairo +, gdk-pixbuf +, glib +, gtk3 +, harfbuzz +, openssl +, pango +, zlib }: rustPlatform.buildRustPackage rec { diff --git a/pkgs/gpx/gps-whatsnew/default.nix b/pkgs/gpx/gps-whatsnew/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation (finalAttrs: { }; postPatch = '' - sed -i '1 i #include <iostream>' gps_analyze.cpp + sed -i '1 i #include <iostream>' gps_analyze.cpp ''; nativeBuildInputs = [ qt5.qmake ]; diff --git a/pkgs/misc/capture2text/default.nix b/pkgs/misc/capture2text/default.nix @@ -43,14 +43,15 @@ stdenv.mkDerivation rec { "INCLUDEPATH+=${tesseract4}/include/tesseract" ]; - installPhase = if stdenv.isDarwin then '' - mkdir -p $out/Applications $out/bin - mv Capture2Text_CLI.app $out/Applications - ln -s $out/Applications/Capture2Text_CLI.app/Contents/MacOS/Capture2Text_CLI $out/bin/capture2text - '' else '' - install -Dm755 Capture2Text_CLI -t $out/bin - ln -s $out/bin/Capture2Text_CLI $out/bin/capture2text - ''; + installPhase = + if stdenv.isDarwin then '' + mkdir -p $out/Applications $out/bin + mv Capture2Text_CLI.app $out/Applications + ln -s $out/Applications/Capture2Text_CLI.app/Contents/MacOS/Capture2Text_CLI $out/bin/capture2text + '' else '' + install -Dm755 Capture2Text_CLI -t $out/bin + ln -s $out/bin/Capture2Text_CLI $out/bin/capture2text + ''; meta = with lib; { description = "Capture2Text enables users to quickly OCR a portion of the screen using a keyboard shortcut"; diff --git a/pkgs/misc/gaiagpsclient/default.nix b/pkgs/misc/gaiagpsclient/default.nix @@ -12,7 +12,12 @@ python3Packages.buildPythonApplication rec { }; propagatedBuildInputs = with python3Packages; [ - requests prettytable pytz tzlocal pyyaml pathvalidate + requests + prettytable + pytz + tzlocal + pyyaml + pathvalidate ]; nativeCheckInputs = with python3Packages; [ mock pytestCheckHook ]; diff --git a/pkgs/misc/graphene/default.nix b/pkgs/misc/graphene/default.nix @@ -1,5 +1,13 @@ -{ lib, stdenv, fetchFromGitHub, perl, pkg-config, wget -, db, libmicrohttpd, jansson, tcl +{ lib +, stdenv +, fetchFromGitHub +, perl +, pkg-config +, wget +, db +, libmicrohttpd +, jansson +, tcl }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/misc/musig/default.nix b/pkgs/misc/musig/default.nix @@ -1,5 +1,11 @@ -{ stdenv, lib, fetchFromGitHub, buildGoModule, pkg-config, portaudio -, testers, musig +{ stdenv +, lib +, fetchFromGitHub +, buildGoModule +, pkg-config +, portaudio +, testers +, musig }: buildGoModule rec { diff --git a/pkgs/misc/plotjuggler/default.nix b/pkgs/misc/plotjuggler/default.nix @@ -1,5 +1,18 @@ -{ lib, stdenv, fetchFromGitHub, cmake, desktopToDarwinBundle, wrapQtAppsHook -, qtsvg, qtwebsockets, qtx11extras, mosquitto, libdwarf, protobuf, zeromq, zstd }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, desktopToDarwinBundle +, wrapQtAppsHook +, qtsvg +, qtwebsockets +, qtx11extras +, mosquitto +, libdwarf +, protobuf +, zeromq +, zstd +}: stdenv.mkDerivation rec { pname = "plotjuggler"; diff --git a/pkgs/osm/gcgn-converter/default.nix b/pkgs/osm/gcgn-converter/default.nix @@ -18,7 +18,11 @@ python3Packages.buildPythonApplication rec { installPhase = let pythonEnv = python3Packages.python.withPackages (p: with p; [ - camelot pypdf geojson beautifulsoup4 tqdm + camelot + pypdf + geojson + beautifulsoup4 + tqdm ]); in '' diff --git a/pkgs/osm/memphis/default.nix b/pkgs/osm/memphis/default.nix @@ -1,5 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, gtk-doc, pkg-config -, cairo, expat, glib +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, gtk-doc +, pkg-config +, cairo +, expat +, glib }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/osm/osm-tags-transform/default.nix b/pkgs/osm/osm-tags-transform/default.nix @@ -1,5 +1,13 @@ -{ lib, stdenv, fetchFromGitHub, cmake -, bzip2, expat, libosmium, lua, protozero, zlib +{ lib +, stdenv +, fetchFromGitHub +, cmake +, bzip2 +, expat +, libosmium +, lua +, protozero +, zlib }: stdenv.mkDerivation (finalAttrs: { @@ -16,7 +24,12 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; buildInputs = [ - bzip2 expat libosmium lua protozero zlib + bzip2 + expat + libosmium + lua + protozero + zlib ]; cmakeFlags = [ diff --git a/pkgs/osm/smrender/default.nix b/pkgs/osm/smrender/default.nix @@ -1,5 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, cairo, librsvg -, Foundation, memstreamHook +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, pkg-config +, cairo +, librsvg +, Foundation +, memstreamHook , testers }: diff --git a/pkgs/perl-packages.nix b/pkgs/perl-packages.nix @@ -141,7 +141,7 @@ rec { url = "mirror://cpan/authors/id/A/AN/ANDYA/${pname}-${version}.tar.gz"; hash = "sha256-FNQGuR2pbWUh0NGoLSKjBidHZSJrhrClbn/93Plq578="; }; - propagatedBuildInputs = [ ]; + propagatedBuildInputs = [ ]; meta = with lib; { homepage = "https://metacpan.org/pod/IPC::ShareLite"; description = "IPC::ShareLite - Lightweight interface to shared memory"; diff --git a/pkgs/radio/fmreceiver/default.nix b/pkgs/radio/fmreceiver/default.nix @@ -1,5 +1,16 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, fftwFloat, libsamplerate, libsndfile, libusb1 -, portaudio, rtl-sdr, qmake, qwt, wrapQtAppsHook +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, fftwFloat +, libsamplerate +, libsndfile +, libusb1 +, portaudio +, rtl-sdr +, qmake +, qwt +, wrapQtAppsHook }: stdenv.mkDerivation rec { @@ -41,13 +52,14 @@ stdenv.mkDerivation rec { "--prefix ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH : ${lib.makeLibraryPath [ rtl-sdr ]}" ]; - installPhase = if stdenv.isDarwin then '' - mkdir -p $out/Applications - mv linux-bin/fmreceiver-2.0.app $out/Applications/fmreceiver.app - install_name_tool -change {,${qwt}/lib/}libqwt.6.dylib "$out/Applications/fmreceiver.app/Contents/MacOS/fmreceiver-2.0" - '' else '' - install -Dm755 linux-bin/fmreceiver-2.0 $out/bin/fmreceiver - ''; + installPhase = + if stdenv.isDarwin then '' + mkdir -p $out/Applications + mv linux-bin/fmreceiver-2.0.app $out/Applications/fmreceiver.app + install_name_tool -change {,${qwt}/lib/}libqwt.6.dylib "$out/Applications/fmreceiver.app/Contents/MacOS/fmreceiver-2.0" + '' else '' + install -Dm755 linux-bin/fmreceiver-2.0 $out/bin/fmreceiver + ''; meta = with lib; { description = "A simple FM receiver"; diff --git a/pkgs/radio/rtlsdr-airband/default.nix b/pkgs/radio/rtlsdr-airband/default.nix @@ -1,5 +1,15 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config -, fftwFloat, lame, libconfig, libshout, pulseaudio, rtl-sdr, soapysdr +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, fftwFloat +, lame +, libconfig +, libshout +, pulseaudio +, rtl-sdr +, soapysdr }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/suckless/imscript/default.nix b/pkgs/suckless/imscript/default.nix @@ -1,5 +1,15 @@ -{ lib, stdenv, fetchFromSourcehut, installShellFiles -, libpng, libjpeg, libtiff, libwebp, fftwFloat, libX11, gsl }: +{ lib +, stdenv +, fetchFromSourcehut +, installShellFiles +, libpng +, libjpeg +, libtiff +, libwebp +, fftwFloat +, libX11 +, gsl +}: stdenv.mkDerivation (finalAttrs: { pname = "imscript"; diff --git a/pkgs/suckless/mage/default.nix b/pkgs/suckless/mage/default.nix @@ -11,8 +11,8 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-7lCuwVB2MS9PkLRQc9XcunQGkOab46PYiSVQvJGMSng="; }; - configFile = lib.optionalString (conf!=null) (builtins.toFile "config.h" conf); - preBuild = lib.optionalString (conf!=null) "cp ${finalAttrs.configFile} config.h"; + configFile = lib.optionalString (conf != null) (builtins.toFile "config.h" conf); + preBuild = lib.optionalString (conf != null) "cp ${finalAttrs.configFile} config.h"; buildInputs = [ fontconfig imlib2 libXft ];