diff options
author | Doron Behar <doron.behar@gmail.com> | 2023-09-21 11:31:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 11:31:17 +0300 |
commit | 8ace65ff3d7696b7a03ea9583b39df27b3153984 (patch) | |
tree | 69941ed73d256dd7f21a95f58418f5e4d3e2eec4 /pkgs | |
parent | 13526b82c2d87009ac9a1433595ab014c00bb91b (diff) |
treewide: use finalAttrs in all packages I maintain (#255902)
* mpd-touch-screen-gui: use finalAttrs in mkDerivation; reformat * musescore: use finalAttrs in mkDerivation * syncthingtray: use stdenv.mkDerivation with a function; reformat * ocrfeeder: use finalAttrs in mkDerivation; reformat * castget: use finalAttrs in mkDerivation * gnome-network-displays: use finalAttrs in mkDerivation * mailreaders: use finalAttrs in mkDerivation * mswatch: use finalAttrs in mkDerivation * uhd: use finalAttrs in mkDerivation * maxima: use finalAttrs in mkDerivation * qalculate-gtk: use finalAttrs in mkDerivation * qalculate-qt: use finalAttrs in mkDerivation * wxmaxima: use finalAttrs in mkDerivation * lammps: use finalAttrs in mkDerivation * mlterm: use finalAttrs in mkDerivation * video-trimmer: use finalAttrs in mkDerivation * nerdfonts: use finalAttrs in mkDerivation * gnomeExtensions.easyScreenCast: use finalAttrs in mkDerivation * octave: use finalAttrs in mkDerivation; reformat * comedilib: use finalAttrs in mkDerivation * cpp-utilities: use finalAttrs in mkDerivation * libsForQt5.kpeoplevcard: use finalAttrs in mkDerivation; reformat * liberio: use finalAttrs in mkDerivation * libqalculate: use finalAttrs in mkDerivation; reformat * libwtk-sdl2: use finalAttrs in mkDerivation * libsForQt5.pulseaudio-qt: use finalAttrs in mkDerivation; reformat * qrupdate: use finalAttrs in mkDerivation; reformat * libsForQt5.qtforkawesome: use finalAttrs in mkDerivation; reformat * libsForQt5.qtutilities: use finalAttrs in mkDerivation; reformat * sqlitecpp: use finalAttrs in mkDerivation; reformat * tweeny: use finalAttrs in mkDerivation * volk: use finalAttrs in mkDerivation * wiringpi: use finalAttrs in mkDerivation * snzip: use finalAttrs in mkDerivation; reformat * bpm-tools: use finalAttrs in mkDerivation; reformat * sacd: use finalAttrs in mkDerivation * gtk-gnutella: use finalAttrs in mkDerivation; reformat * sile: use finalAttrs in mkDerivation * pplatex: use finalAttrs in mkDerivation; reformat
Diffstat (limited to 'pkgs')
41 files changed, 331 insertions, 278 deletions
diff --git a/pkgs/applications/audio/mpd-touch-screen-gui/default.nix b/pkgs/applications/audio/mpd-touch-screen-gui/default.nix index 482fe8f66f4c9..ce00cb2bd03e7 100644 --- a/pkgs/applications/audio/mpd-touch-screen-gui/default.nix +++ b/pkgs/applications/audio/mpd-touch-screen-gui/default.nix @@ -1,8 +1,8 @@ { lib , stdenv , fetchFromGitHub -, autoreconfHook , pkg-config +, autoreconfHook , SDL2 , SDL2_ttf , SDL2_image @@ -14,13 +14,13 @@ , dejavu_fonts }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "mpd-touch-screen-gui"; version = "unstable-2022-12-30"; src = fetchFromGitHub { owner = "muesli4"; - repo = pname; + repo = "mpd-touch-screen-gui"; rev = "156eaebede89da2b83a98d8f9dfa46af12282fb4"; sha256 = "sha256-vr/St4BghrndjUQ0nZI/uJq+F/MjEj6ulc4DYwQ/pgU="; }; @@ -60,4 +60,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.all; }; -} +}) diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix index 6c5b772521136..d42117e1babe7 100644 --- a/pkgs/applications/audio/musescore/default.nix +++ b/pkgs/applications/audio/musescore/default.nix @@ -46,14 +46,14 @@ let Carbon ; } else portaudio; -in stdenv'.mkDerivation rec { +in stdenv'.mkDerivation (finalAttrs: { pname = "musescore"; version = "4.1.1"; src = fetchFromGitHub { owner = "musescore"; repo = "MuseScore"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-jXievVIA0tqLdKLy6oPaOHPIbDoFstveEQBri9M0Aoo="; }; patches = [ @@ -168,4 +168,4 @@ in stdenv'.mkDerivation rec { broken = (stdenv.isLinux && stdenv.isAarch64); mainProgram = "mscore"; }; -} +}) diff --git a/pkgs/applications/graphics/ocrfeeder/default.nix b/pkgs/applications/graphics/ocrfeeder/default.nix index 1c473d2c41f66..25df4c69c66c0 100644 --- a/pkgs/applications/graphics/ocrfeeder/default.nix +++ b/pkgs/applications/graphics/ocrfeeder/default.nix @@ -1,27 +1,27 @@ { lib, stdenv , fetchurl , pkg-config -, gtk3 -, gtkspell3 -, isocodes -, goocanvas2 +, wrapGAppsHook , intltool , itstool , libxml2 +, gobject-introspection +, gtk3 +, goocanvas2 +, gtkspell3 +, isocodes , gnome , python3 -, gobject-introspection -, wrapGAppsHook , tesseract4 , extraOcrEngines ? [] # other supported engines are: ocrad gocr cuneiform }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ocrfeeder"; version = "0.8.5"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + url = "mirror://gnome/sources/${finalAttrs.pname}/${lib.versions.majorMinor finalAttrs.version}/${finalAttrs.pname}-${finalAttrs.version}.tar.xz"; sha256 = "sha256-sD0qWUndguJzTw0uy0FIqupFf4OX6dTFvcd+Mz+8Su0="; }; @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { ] ++ extraOcrEngines); preFixup = '' - gappsWrapperArgs+=(--prefix PATH : "${enginesPath}") + gappsWrapperArgs+=(--prefix PATH : "${finalAttrs.enginesPath}") gappsWrapperArgs+=(--set ISO_CODES_DIR "${isocodes}/share/xml/iso-codes") ''; @@ -70,4 +70,4 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/applications/misc/syncthingtray/default.nix b/pkgs/applications/misc/syncthingtray/default.nix index 627f099796389..c464fddcc7022 100644 --- a/pkgs/applications/misc/syncthingtray/default.nix +++ b/pkgs/applications/misc/syncthingtray/default.nix @@ -11,6 +11,7 @@ , qtutilities , qtforkawesome , boost +, wrapQtAppsHook , cmake , kio , plasma-framework @@ -29,14 +30,14 @@ https://github.com/NixOS/nixpkgs/issues/199596#issuecomment-1310136382 */ , autostartExecPath ? "syncthingtray" }: -mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { version = "1.4.6"; pname = "syncthingtray"; src = fetchFromGitHub { owner = "Martchus"; repo = "syncthingtray"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-/HAqO0eVFt4YLGeTbZSZcH2pOojvykukAGTBHZTfKLQ="; }; @@ -54,6 +55,7 @@ mkDerivation rec { ; nativeBuildInputs = [ + wrapQtAppsHook cmake qttools ] @@ -64,7 +66,7 @@ mkDerivation rec { # Don't test on Darwin because output is .app doInstallCheck = !stdenv.isDarwin; installCheckPhase = '' - $out/bin/syncthingtray --help | grep ${version} + $out/bin/syncthingtray --help | grep ${finalAttrs.version} ''; cmakeFlags = [ @@ -85,4 +87,4 @@ mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.linux ++ platforms.darwin; }; -} +}) diff --git a/pkgs/applications/networking/feedreaders/castget/default.nix b/pkgs/applications/networking/feedreaders/castget/default.nix index e79a387e07f57..86bb8f3042ec1 100644 --- a/pkgs/applications/networking/feedreaders/castget/default.nix +++ b/pkgs/applications/networking/feedreaders/castget/default.nix @@ -10,12 +10,12 @@ , glibcLocales }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "castget"; version = "2.0.1"; src = fetchurl { - url = "http://savannah.nongnu.org/download/castget/castget-${version}.tar.bz2"; + url = "http://savannah.nongnu.org/download/castget/castget-${finalAttrs.version}.tar.bz2"; hash = "sha256-Q4tffsfjGkXtN1ZjD+RH9CAVrNpT7AkgL0hihya16HU="; }; @@ -51,4 +51,4 @@ stdenv.mkDerivation rec { license = licenses.gpl2; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/applications/networking/gnome-network-displays/default.nix b/pkgs/applications/networking/gnome-network-displays/default.nix index f2f26a85f61f9..b9722b6989ff1 100644 --- a/pkgs/applications/networking/gnome-network-displays/default.nix +++ b/pkgs/applications/networking/gnome-network-displays/default.nix @@ -20,12 +20,12 @@ , pipewire }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gnome-network-displays"; version = "0.90.5"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + url = "mirror://gnome/sources/${finalAttrs.pname}/${lib.versions.majorMinor finalAttrs.version}/${finalAttrs.pname}-${finalAttrs.version}.tar.xz"; sha256 = "sha256-2SBVQK4fJeK8Y2UrrL0g5vQIerDdGE1nhFc6ke4oIpI="; }; @@ -77,4 +77,4 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/applications/networking/mailreaders/imapfilter.nix b/pkgs/applications/networking/mailreaders/imapfilter.nix index d0072a00c5a61..3a9e2db3ecd88 100644 --- a/pkgs/applications/networking/mailreaders/imapfilter.nix +++ b/pkgs/applications/networking/mailreaders/imapfilter.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, openssl, lua, pcre2 }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "imapfilter"; version = "2.8.1"; src = fetchFromGitHub { owner = "lefcha"; repo = "imapfilter"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-nHKZ3skRbDhKWocaw5mbaRnZC37FxFIVd08iFgrEA0s="; }; makeFlags = [ @@ -24,4 +24,4 @@ stdenv.mkDerivation rec { platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ doronbehar ]; }; -} +}) diff --git a/pkgs/applications/networking/mailreaders/mswatch/default.nix b/pkgs/applications/networking/mailreaders/mswatch/default.nix index 2706b9c4597f2..f7ba4bb1bf126 100644 --- a/pkgs/applications/networking/mailreaders/mswatch/default.nix +++ b/pkgs/applications/networking/mailreaders/mswatch/default.nix @@ -8,7 +8,7 @@ , glib }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "mswatch"; # Stable release won't compile successfully version = "unstable-2018-11-21"; @@ -35,4 +35,4 @@ stdenv.mkDerivation { platforms = platforms.linux; maintainers = with maintainers; [ doronbehar ]; }; -} +}) diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix index 873c49dd9a7c8..23c0a7285868c 100644 --- a/pkgs/applications/radio/uhd/default.nix +++ b/pkgs/applications/radio/uhd/default.nix @@ -41,7 +41,7 @@ let ); in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "uhd"; # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz # and xxx.yyy.zzz. Hrmpf... style keeps changing @@ -52,14 +52,15 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "EttusResearch"; repo = "uhd"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-khVOHlvacZc4EMg4m55rxEqPvLY1xURpAfOW905/3jg="; }; # Firmware images are downloaded (pre-built) from the respective release on Github uhdImagesSrc = fetchurl { - url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz"; + url = "https://github.com/EttusResearch/uhd/releases/download/v${finalAttrs.version}/uhd-images_${finalAttrs.version}.tar.xz"; sha256 = "V8ldW8bvYWbrDAvpWpHcMeLf9YvF8PIruDAyNK/bru4="; }; + # TODO: Add passthru.updateScript that will update both of the above hashes... cmakeFlags = [ "-DENABLE_LIBUHD=ON" @@ -105,7 +106,7 @@ stdenv.mkDerivation rec { # pythonEnv for runtime as well. The utilities' runtime dependencies are # handled at the environment ++ optionals (enableExamples) [ ncurses ncurses.dev ] - ++ optionals (enablePythonApi || enableUtils) [ pythonEnv ] + ++ optionals (enablePythonApi || enableUtils) [ finalAttrs.pythonEnv ] ++ optionals (enableDpdk) [ dpdk ] ; @@ -128,7 +129,7 @@ stdenv.mkDerivation rec { # UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images` installFirmware = '' mkdir -p "$out/share/uhd/images" - tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out/share/uhd/images" + tar --strip-components=1 -xvf "${finalAttrs.uhdImagesSrc}" -C "$out/share/uhd/images" ''; # -DENABLE_TESTS=ON installs the tests, we don't need them in the output @@ -157,4 +158,4 @@ stdenv.mkDerivation rec { platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ bjornfor fpletz tomberek doronbehar ]; }; -} +}) diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix index c102c645b3bf9..e7ac178cd5d13 100644 --- a/pkgs/applications/science/math/maxima/default.nix +++ b/pkgs/applications/science/math/maxima/default.nix @@ -18,12 +18,12 @@ let searchPath = lib.makeBinPath (lib.filter (x: x != null) [ lisp-compiler rlwrap tk gnuplot ]); in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "maxima"; version = "5.46.0"; src = fetchurl { - url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; + url = "mirror://sourceforge/${finalAttrs.pname}/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; sha256 = "sha256-c5Dwa0jaZckDPosvYpuXi5AFZFSlQCLbfecOIiWqiwc="; }; @@ -52,11 +52,11 @@ stdenv.mkDerivation rec { done # Move emacs modules and documentation into the right place. mkdir -p $out/share/emacs $out/share/doc - ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp - ln -s ../maxima/${version}/doc $out/share/doc/maxima + ln -s ../maxima/${finalAttrs.version}/emacs $out/share/emacs/site-lisp + ln -s ../maxima/${finalAttrs.version}/doc $out/share/doc/maxima '' + (lib.optionalString (lisp-compiler.pname == "ecl") '' - cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/" + cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${finalAttrs.version}/binary-ecl/" '') ; @@ -115,4 +115,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.unix; }; -} +}) diff --git a/pkgs/applications/science/math/qalculate-gtk/default.nix b/pkgs/applications/science/math/qalculate-gtk/default.nix index 405561510be0e..f245e8745b4a0 100644 --- a/pkgs/applications/science/math/qalculate-gtk/default.nix +++ b/pkgs/applications/science/math/qalculate-gtk/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, intltool, autoreconfHook, pkg-config, libqalculate, gtk3, curl, wrapGAppsHook }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "qalculate-gtk"; version = "4.8.0"; src = fetchFromGitHub { owner = "qalculate"; repo = "qalculate-gtk"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-GYy3Ot2vjXpCp89Rib3Ua0XeVGOOTejKcaqNZvPmxm0="; }; @@ -24,4 +24,4 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; platforms = platforms.all; }; -} +}) diff --git a/pkgs/applications/science/math/qalculate-qt/default.nix b/pkgs/applications/science/math/qalculate-qt/default.nix index be9dd27695f7e..34d2d98171eb5 100644 --- a/pkgs/applications/science/math/qalculate-qt/default.nix +++ b/pkgs/applications/science/math/qalculate-qt/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, intltool, pkg-config, qmake, wrapQtAppsHook, libqalculate, qtbase, qttools, qtsvg, qtwayland }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "qalculate-qt"; version = "4.8.0"; src = fetchFromGitHub { owner = "qalculate"; repo = "qalculate-qt"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-7VlaoiY+HgHCMZCegUdy2wpgfx3fKaViMtkdNRleHaA="; }; @@ -33,4 +33,4 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; platforms = platforms.unix; }; -} +}) diff --git a/pkgs/applications/science/math/wxmaxima/default.nix b/pkgs/applications/science/math/wxmaxima/default.nix index ee2f62317c0cd..c475dbd5ef2b6 100644 --- a/pkgs/applications/science/math/wxmaxima/default.nix +++ b/pkgs/applications/science/math/wxmaxima/default.nix @@ -10,14 +10,14 @@ , glib }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs:{ pname = "wxmaxima"; version = "23.02.1"; src = fetchFromGitHub { owner = "wxMaxima-developers"; repo = "wxmaxima"; - rev = "Version-${version}"; + rev = "Version-${finalAttrs.version}"; sha256 = "sha256-Lrj/oJNmKlCkNbnCGY2TewCospwajKdWgmKkreHzEIU="; }; @@ -51,4 +51,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/pkgs/applications/science/molecular-dynamics/lammps/default.nix index 580dbb6796800..f11e9bdeeb13e 100644 --- a/pkgs/applications/science/molecular-dynamics/lammps/default.nix +++ b/pkgs/applications/science/molecular-dynamics/lammps/default.nix @@ -43,7 +43,7 @@ , extraBuildInputs ? [] }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { # LAMMPS has weird versioning converted to ISO 8601 format version = "2Aug2023"; pname = "lammps"; @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "lammps"; repo = "lammps"; - rev = "stable_${version}"; + rev = "stable_${finalAttrs.version}"; hash = "sha256-6T4YAa4iN3pJpODGPW+faR16xxyYYdkHLavtiPUbZ4o="; }; preConfigure = '' @@ -117,4 +117,4 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.costrouc maintainers.doronbehar ]; mainProgram = "lmp"; }; -} +}) diff --git a/pkgs/applications/terminal-emulators/mlterm/default.nix b/pkgs/applications/terminal-emulators/mlterm/default.nix index dce5ad9d063a7..3614046f6846c 100644 --- a/pkgs/applications/terminal-emulators/mlterm/default.nix +++ b/pkgs/applications/terminal-emulators/mlterm/default.nix @@ -96,14 +96,14 @@ let in lib.withFeatureAs (commaSepList != "") featureName commaSepList ; -in stdenv.mkDerivation rec { +in stdenv.mkDerivation (finalAttrs: { pname = "mlterm"; version = "3.9.3"; src = fetchFromGitHub { owner = "arakiken"; - repo = pname; - rev = version; + repo = "mlterm"; + rev = finalAttrs.version; sha256 = "sha256-gfs5cdwUUwSBWwJJSaxrQGWJvLkI27RMlk5QvDALEDg="; }; @@ -217,4 +217,4 @@ in stdenv.mkDerivation rec { platforms = platforms.all; mainProgram = desktopBinary; }; -} +}) diff --git a/pkgs/applications/video/video-trimmer/default.nix b/pkgs/applications/video/video-trimmer/default.nix index a0ca4b5b19064..d61f30de1be57 100644 --- a/pkgs/applications/video/video-trimmer/default.nix +++ b/pkgs/applications/video/video-trimmer/default.nix @@ -16,21 +16,21 @@ , ffmpeg-full }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "video-trimmer"; version = "0.8.1"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "YaLTeR"; - repo = pname; - rev = "v${version}"; + repo = "video-trimmer"; + rev = "v${finalAttrs.version}"; hash = "sha256-nr0PAvp4wlswQBNN2LLyYQMpk3IIleHf3+978XhUGGQ="; }; cargoDeps = rustPlatform.fetchCargoTarball { - inherit src; - name = "${pname}-${version}"; + inherit (finalAttrs) src; + name = "${finalAttrs.pname}-${finalAttrs.version}"; hash = "sha256-YFbLMpQbHUtxRrBVarcoIeDsvc26NWc1YhMeCaLgJAc="; }; @@ -74,4 +74,4 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/data/fonts/nerdfonts/default.nix b/pkgs/data/fonts/nerdfonts/default.nix index 123e5cb18abe6..b2576d0fca468 100644 --- a/pkgs/data/fonts/nerdfonts/default.nix +++ b/pkgs/data/fonts/nerdfonts/default.nix @@ -37,7 +37,7 @@ let ) selectedFontsShas; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { inherit version; inherit srcs; pname = "nerdfonts"; @@ -69,4 +69,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; hydraPlatforms = []; # 'Output limit exceeded' on Hydra }; -} +}) diff --git a/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix b/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix index 342f03d618ad4..51c3c83609572 100644 --- a/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix +++ b/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, substituteAll, glib, gnome, gettext, jq, intltool }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gnome-shell-extension-EasyScreenCast"; version = "1.7.0"; src = fetchFromGitHub { owner = "EasyScreenCast"; repo = "EasyScreenCast"; - rev = version; + rev = finalAttrs.version; hash = "sha256-+cH/gczCdxoSrLp5nD82Spo8bSGyRnUUut3Xkmr9f3o="; }; @@ -34,4 +34,4 @@ stdenv.mkDerivation rec { platforms = platforms.linux; broken = true; }; -} +}) diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index b257933e0d63a..c8441cbae1fb8 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -1,9 +1,6 @@ { stdenv , pkgs , lib -# Note: either stdenv.mkDerivation or, for octaveFull, the qt-5 mkDerivation -# with wrapQtAppsHook (comes from libsForQt5.callPackage) -, mkDerivation , fetchurl , gfortran , ncurses @@ -27,26 +24,25 @@ , curl , rapidjson , blas, lapack -# These two should use the same lapack and blas as the above -, qrupdate, arpack, suitesparse ? null +# These 3 should use the same lapack and blas as the above, see code prepending +, qrupdate, arpack, suitesparse # If set to true, the above 5 deps are overridden to use the blas and lapack # with 64 bit indexes support. If all are not compatible, the build will fail. , use64BitIdx ? false , libwebp , gl2ps -, ghostscript ? null -, hdf5 ? null -, glpk ? null -, gnuplot ? null +, ghostscript +, hdf5 +, glpk +, gnuplot # - Include support for GNU readline: , enableReadline ? true -, readline ? null +, readline # - Build Java interface: , enableJava ? true -, jdk ? null -, python ? null -, overridePlatforms ? null -, sundials ? null +, jdk +, python3 +, sundials # - Packages required for building extra packages. , newScope , callPackage @@ -54,17 +50,13 @@ , makeWrapper # - Build Octave Qt GUI: , enableQt ? false -, qtbase ? null -, qtsvg ? null -, qtscript ? null -, qscintilla ? null -, qttools ? null +, qt5 +, qscintilla , libiconv , darwin }: let - # Not always evaluated blas' = if use64BitIdx then blas.override { @@ -90,7 +82,7 @@ let blas = blas'; lapack = lapack'; }; - # Not always suitesparse is required at all + # We keep the option to not enable suitesparse support by putting it null suitesparse' = if suitesparse != null then suitesparse.override { blas = blas'; @@ -99,24 +91,14 @@ let else null ; - - octavePackages = import ../../../top-level/octave-packages.nix { - inherit pkgs; - inherit lib stdenv fetchurl newScope; - octave = self; - }; - - wrapOctave = callPackage ./wrap-octave.nix { - octave = self; - inherit (pkgs) makeSetupHook makeWrapper; - }; - - self = mkDerivation rec { + # To avoid confusion later in passthru + allPkgs = pkgs; +in stdenv.mkDerivation (finalAttrs: { version = "8.3.0"; pname = "octave"; src = fetchurl { - url = "mirror://gnu/octave/${pname}-${version}.tar.gz"; + url = "mirror://gnu/octave/octave-${finalAttrs.version}.tar.gz"; sha256 = "sha256-K0gRHLZ7MSgX5dHz4XH1utFRK7Bn4WdLnEspKBiVuXo="; }; @@ -142,41 +124,35 @@ let arpack' libwebp gl2ps - ] - ++ lib.optionals enableQt [ - qtbase - qtsvg + ghostscript + hdf5 + glpk + suitesparse' + sundials + gnuplot + python3 + ] ++ lib.optionals enableQt [ + qt5.qtbase + qt5.qtsvg qscintilla - ] - ++ lib.optionals (ghostscript != null) [ ghostscript ] - ++ lib.optionals (hdf5 != null) [ hdf5 ] - ++ lib.optionals (glpk != null) [ glpk ] - ++ lib.optionals (suitesparse != null) [ suitesparse' ] - ++ lib.optionals (enableJava) [ jdk ] - ++ lib.optionals (sundials != null) [ sundials ] - ++ lib.optionals (gnuplot != null) [ gnuplot ] - ++ lib.optionals (python != null) [ python ] - ++ lib.optionals (!stdenv.isDarwin) [ libGL libGLU libX11 ] - ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals (enableJava) [ + jdk + ] ++ lib.optionals (!stdenv.isDarwin) [ + libGL libGLU libX11 + ] ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Accelerate darwin.apple_sdk.frameworks.Cocoa - ] - ; + ]; nativeBuildInputs = [ pkg-config gfortran - # Listed here as well because it's outputs are split - fftw - fftwSinglePrec texinfo - ] - ++ lib.optionals (sundials != null) [ sundials ] - ++ lib.optionals enableQt [ - qtscript - qttools - ] - ; + ] ++ lib.optionals enableQt [ + qt5.wrapQtAppsHook + qt5.qtscript + qt5.qttools + ]; doCheck = !stdenv.isDarwin; @@ -202,30 +178,39 @@ let # Keep a copy of the octave tests detailed results in the output # derivation, because someone may care postInstall = '' - cp test/fntests.log $out/share/octave/${pname}-${version}-fntests.log || true + cp test/fntests.log $out/share/octave/octave-${finalAttrs.version}-fntests.log || true ''; passthru = rec { - sitePath = "share/octave/${version}/site"; + sitePath = "share/octave/${finalAttrs.version}/site"; octPkgsPath = "share/octave/octave_packages"; blas = blas'; lapack = lapack'; qrupdate = qrupdate'; arpack = arpack'; suitesparse = suitesparse'; + octavePackages = import ../../../top-level/octave-packages.nix { + pkgs = allPkgs; + inherit lib stdenv fetchurl newScope; + octave = finalAttrs.finalPackage; + }; + wrapOctave = callPackage ./wrap-octave.nix { + octave = finalAttrs.finalPackage; + inherit (allPkgs) makeSetupHook makeWrapper; + }; inherit fftw fftwSinglePrec; inherit portaudio; inherit jdk; - inherit python; + python = python3; inherit enableQt enableReadline enableJava; buildEnv = callPackage ./build-env.nix { - octave = self; + octave = finalAttrs.finalPackage; inherit octavePackages wrapOctave; inherit (octavePackages) computeRequiredOctavePackages; }; withPackages = import ./with-packages.nix { inherit buildEnv octavePackages; }; pkgs = octavePackages; - interpreter = "${self}/bin/octave"; + interpreter = "${finalAttrs.finalPackage}/bin/octave"; }; meta = { @@ -233,10 +218,5 @@ let license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ raskin doronbehar ]; description = "Scientific Programming Language"; - platforms = if overridePlatforms == null then - (lib.platforms.linux ++ lib.platforms.darwin) - else overridePlatforms; }; - }; - -in self + }) diff --git a/pkgs/development/libraries/comedilib/default.nix b/pkgs/development/libraries/comedilib/default.nix index d59f4acd8dcce..ab97ac09a57ec 100644 --- a/pkgs/development/libraries/comedilib/default.nix +++ b/pkgs/development/libraries/comedilib/default.nix @@ -12,14 +12,14 @@ , python3 }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "comedilib"; version = "0.12.0"; src = fetchFromGitHub { owner = "Linux-Comedi"; repo = "comedilib"; - rev = "r${lib.replaceStrings [ "." ] [ "_" ] version}"; + rev = "r${lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version}"; sha256 = "0kfs2dw62vjz8j7fgsxq6ky8r8kca726gyklbm6kljvgfh47lyfw"; }; @@ -53,4 +53,4 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.doronbehar ]; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/development/libraries/cpp-utilities/default.nix b/pkgs/development/libraries/cpp-utilities/default.nix index c3731c0e7a759..debc2b7aebdc7 100644 --- a/pkgs/development/libraries/cpp-utilities/default.nix +++ b/pkgs/development/libraries/cpp-utilities/default.nix @@ -6,14 +6,14 @@ , iconv }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "cpp-utilities"; version = "5.24.0"; src = fetchFromGitHub { owner = "Martchus"; - repo = pname; - rev = "v${version}"; + repo = "cpp-utilities"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-krskfuoCRxYcAIDqrae4+yEABXXZ9Nv0BjBVwSMjC7g="; }; @@ -41,4 +41,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.linux ++ platforms.darwin; }; -} +}) diff --git a/pkgs/development/libraries/kpeoplevcard/default.nix b/pkgs/development/libraries/kpeoplevcard/default.nix index d2244a2523477..2ba786800fb32 100644 --- a/pkgs/development/libraries/kpeoplevcard/default.nix +++ b/pkgs/development/libraries/kpeoplevcard/default.nix @@ -1,20 +1,21 @@ -{ mkDerivation +{ stdenv , lib , fetchurl , cmake -, extra-cmake-modules , pkg-config +, wrapQtAppsHook +, extra-cmake-modules , kcoreaddons , kpeople , kcontacts }: -mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "kpeoplevcard"; version = "0.1"; src = fetchurl { - url = "https://download.kde.org/stable/${pname}/${version}/${pname}-${version}.tar.xz"; + url = "https://download.kde.org/stable/${finalAttrs.pname}/${finalAttrs.version}/${finalAttrs.pname}-${finalAttrs.version}.tar.xz"; sha256 = "1hv3fq5k0pps1wdvq9r1zjnr0nxf8qc3vwsnzh9jpvdy79ddzrcd"; }; @@ -25,8 +26,9 @@ mkDerivation rec { ]; nativeBuildInputs = [ - pkg-config cmake + pkg-config + wrapQtAppsHook extra-cmake-modules ]; @@ -36,5 +38,5 @@ mkDerivation rec { license = with licenses; [ lgpl2 ]; maintainers = with maintainers; [ doronbehar ]; }; -} +}) diff --git a/pkgs/development/libraries/liberio/default.nix b/pkgs/development/libraries/liberio/default.nix index 743455b836d5d..f7e4fa6e73299 100644 --- a/pkgs/development/libraries/liberio/default.nix +++ b/pkgs/development/libraries/liberio/default.nix @@ -6,7 +6,7 @@ , pkg-config }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "liberio"; version = "unstable-2019-12-11"; @@ -35,4 +35,4 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.doronbehar ]; platforms = platforms.all; }; -} +}) diff --git a/pkgs/development/libraries/libqalculate/default.nix b/pkgs/development/libraries/libqalculate/default.nix index a8826e4381eb3..893c7b4e3a1e4 100644 --- a/pkgs/development/libraries/libqalculate/default.nix +++ b/pkgs/development/libraries/libqalculate/default.nix @@ -1,28 +1,55 @@ -{ lib, stdenv, fetchFromGitHub -, mpfr, gnuplot +{ lib +, stdenv +, fetchFromGitHub +, intltool +, pkg-config +, doxygen +, autoreconfHook +, buildPackages +, curl +, gettext +, libiconv , readline -, libxml2, curl -, intltool, libiconv, icu, gettext -, pkg-config, doxygen, autoreconfHook, buildPackages +, libxml2 +, mpfr +, icu +, gnuplot }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libqalculate"; version = "4.8.0"; src = fetchFromGitHub { owner = "qalculate"; repo = "libqalculate"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-wONqqd8Ds10SvkUrj7Ps6BfqUNPE6hCnQrKDTEglVEQ="; }; outputs = [ "out" "dev" "doc" ]; - nativeBuildInputs = [ intltool pkg-config autoreconfHook doxygen ]; - buildInputs = [ curl gettext libiconv readline ]; - depsBuildBuild = [ buildPackages.stdenv.cc ]; - propagatedBuildInputs = [ libxml2 mpfr icu ]; + nativeBuildInputs = [ + intltool + pkg-config + autoreconfHook + doxygen + ]; + depsBuildBuild = [ + buildPackages.stdenv.cc + ]; + + buildInputs = [ + curl + gettext + libiconv + readline + ]; + propagatedBuildInputs = [ + libxml2 + mpfr + icu + ]; enableParallelBuilding = true; preConfigure = '' @@ -52,4 +79,4 @@ stdenv.mkDerivation rec { mainProgram = "qalc"; platforms = platforms.all; }; -} +}) diff --git a/pkgs/development/libraries/libwtk-sdl2/default.nix b/pkgs/development/libraries/libwtk-sdl2/default.nix index 00c8ae675e7bc..bdfe404c547c2 100644 --- a/pkgs/development/libraries/libwtk-sdl2/default.nix +++ b/pkgs/development/libraries/libwtk-sdl2/default.nix @@ -9,13 +9,13 @@ , SDL2_image }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libwtk-sdl2"; version = "unstable-2023-02-28"; src = fetchFromGitHub { owner = "muesli4"; - repo = pname; + repo = "libwtk-sdl2"; rev = "0504f8342c8c97d0c8b43d33751427c564ad8d44"; sha256 = "sha256-NAjsDQ4/hklYRfa85uleOr50tmc6UJVo2xiDnEbmIxk="; }; @@ -48,4 +48,4 @@ stdenv.mkDerivation rec { */ platforms = platforms.linux; }; -} +}) diff --git a/pkgs/development/libraries/pulseaudio-qt/default.nix b/pkgs/development/libraries/pulseaudio-qt/default.nix index c1ba89f05842d..9605b5875ec30 100644 --- a/pkgs/development/libraries/pulseaudio-qt/default.nix +++ b/pkgs/development/libraries/pulseaudio-qt/default.nix @@ -1,29 +1,31 @@ -{ mkDerivation +{ stdenv , lib , fetchurl , cmake -, extra-cmake-modules , pkg-config +, extra-cmake-modules +, wrapQtAppsHook , pulseaudio }: -mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "pulseaudio-qt"; version = "1.3.0"; src = fetchurl { - url = "mirror://kde/stable/${pname}/${pname}-${lib.versions.majorMinor version}.tar.xz"; + url = "mirror://kde/stable/${finalAttrs.pname}/${finalAttrs.pname}-${lib.versions.majorMinor finalAttrs.version}.tar.xz"; sha256 = "1i4yb0v1mmhih8c2i61hybg6q60qys3pc5wbjb7a0vwl1mihgsxw"; }; - buildInputs = [ - pulseaudio - ]; - nativeBuildInputs = [ - pkg-config cmake + pkg-config extra-cmake-modules + wrapQtAppsHook + ]; + + buildInputs = [ + pulseaudio ]; meta = with lib; { @@ -32,4 +34,4 @@ mkDerivation rec { license = with licenses; [ lgpl2 ]; maintainers = with maintainers; [ doronbehar ]; }; -} +}) diff --git a/pkgs/development/libraries/qrupdate/default.nix b/pkgs/development/libraries/qrupdate/default.nix index bc4263928078b..12531286d33d3 100644 --- a/pkgs/development/libraries/qrupdate/default.nix +++ b/pkgs/development/libraries/qrupdate/default.nix @@ -1,21 +1,21 @@ { stdenv , lib , fetchFromGitHub -, gfortran -, blas , cmake , lapack , which +, gfortran +, blas }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "qrupdate"; version = "1.1.5"; src = fetchFromGitHub { owner = "mpimd-csc"; repo = "qrupdate-ng"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-dHxLPrN00wwozagY2JyfZkD3sKUD2+BcnbjNgZepzFg="; }; @@ -49,4 +49,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.unix; }; -} +}) diff --git a/pkgs/development/libraries/qtforkawesome/default.nix b/pkgs/development/libraries/qtforkawesome/default.nix index 8fec60db13624..0841c0d457fd7 100644 --- a/pkgs/development/libraries/qtforkawesome/default.nix +++ b/pkgs/development/libraries/qtforkawesome/default.nix @@ -1,12 +1,12 @@ { stdenv , lib , fetchFromGitHub +, cmake +, qttools +, perl , cpp-utilities , qtutilities -, qttools , qtbase -, cmake -, perl }: let @@ -16,28 +16,29 @@ let rev = "1.2.0"; sha256 = "sha256-zG6/0dWjU7/y/oDZuSEv+54Mchng64LVyV8bluskYzc="; }; -in stdenv.mkDerivation rec { +in stdenv.mkDerivation (finalAttrs: { pname = "qtforkawesome"; version = "0.1.0"; src = fetchFromGitHub { owner = "Martchus"; - repo = pname; - rev = "v${version}"; + repo = "qtforkawesome"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-9e2TCg3itYtHZSvzCoaiIZmgsCMIoebh6C/XWtKz/2Q="; }; - buildInputs = [ - qtbase - cpp-utilities - qtutilities - ]; nativeBuildInputs = [ cmake qttools perl perl.pkgs.YAML ]; + + buildInputs = [ + qtbase + cpp-utilities + qtutilities + ]; cmakeFlags = [ # Current freetype used by NixOS users doesn't support the `.woff2` font # format, so we use ttf. See @@ -55,5 +56,5 @@ in stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.linux ++ platforms.darwin; }; -} +}) diff --git a/pkgs/development/libraries/qtutilities/default.nix b/pkgs/development/libraries/qtutilities/default.nix index a629e8a2ac12d..de80fc0709d3a 100644 --- a/pkgs/development/libraries/qtutilities/default.nix +++ b/pkgs/development/libraries/qtutilities/default.nix @@ -1,27 +1,35 @@ { stdenv , lib , fetchFromGitHub -, cpp-utilities +, cmake , qttools +, cpp-utilities , qtbase -, cmake }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "qtutilities"; version = "6.13.1"; src = fetchFromGitHub { owner = "Martchus"; - repo = pname; - rev = "v${version}"; + repo = "qtutilities"; + rev = "v${finalAttrs.version}"; hash = "sha256-ic1Xnle1fGZ5elf0yH0BF+3spAmIo9kP62WhXLmBVNc="; }; - buildInputs = [ qtbase cpp-utilities ]; - nativeBuildInputs = [ cmake qttools ]; + nativeBuildInputs = [ + cmake + qttools + ]; + buildInputs = [ + qtbase + cpp-utilities + ]; - cmakeFlags = ["-DBUILD_SHARED_LIBS=ON"]; + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + ]; dontWrapQtApps = true; @@ -32,4 +40,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.linux ++ platforms.darwin; }; -} +}) diff --git a/pkgs/development/libraries/sqlitecpp/default.nix b/pkgs/development/libraries/sqlitecpp/default.nix index 8c9e3cba5dfbe..e2c0b4ec35b97 100644 --- a/pkgs/development/libraries/sqlitecpp/default.nix +++ b/pkgs/development/libraries/sqlitecpp/default.nix @@ -1,18 +1,29 @@ -{ lib, stdenv, fetchFromGitHub, cmake, sqlite, gtest }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, sqlite +, gtest +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "sqlitecpp"; version = "3.3.1"; src = fetchFromGitHub { owner = "SRombauts"; - repo = pname; - rev = version; + repo = "sqlitecpp"; + rev = finalAttrs.version; sha256 = "sha256-8l1JRaE7w9vJ4bCSLGAk9zwYHDFeKkBi9pE5fUJfLRc="; }; - nativeBuildInputs = [ cmake ]; - buildInputs = [ sqlite gtest ]; + nativeBuildInputs = [ + cmake + ]; + buildInputs = [ + sqlite + gtest + ]; doCheck = true; cmakeFlags = [ @@ -27,4 +38,4 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = [ maintainers.jbedo maintainers.doronbehar ]; }; -} +}) diff --git a/pkgs/development/libraries/tweeny/default.nix b/pkgs/development/libraries/tweeny/default.nix index 0afc82321d8cf..257b966808d20 100644 --- a/pkgs/development/libraries/tweeny/default.nix +++ b/pkgs/development/libraries/tweeny/default.nix @@ -4,14 +4,14 @@ , cmake }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tweeny"; version = "3.2.0"; src = fetchFromGitHub { owner = "mobius3"; repo = "tweeny"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-VmvOMK+FjYZXKH9kPUT2L7pmJMPSr5eXptCcoGWK+qo="; }; @@ -28,4 +28,4 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.doronbehar ]; platforms = with platforms; darwin ++ linux; }; -} +}) diff --git a/pkgs/development/libraries/volk/2.5.0.nix b/pkgs/development/libraries/volk/2.5.0.nix index 5ac88083aa663..35216cb7e31c2 100644 --- a/pkgs/development/libraries/volk/2.5.0.nix +++ b/pkgs/development/libraries/volk/2.5.0.nix @@ -8,7 +8,7 @@ , fetchpatch }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "volk"; # Version 2.5.1 seems to cause a build issue for aarch64-darwin, see: # https://github.com/NixOS/nixpkgs/pull/160152#issuecomment-1043380478A @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "gnuradio"; - repo = pname; - rev = "v${version}"; + repo = "volk"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-XvX6emv30bSB29EFm6aC+j8NGOxWqHCNv0Hxtdrq/jc="; fetchSubmodules = true; }; @@ -57,4 +57,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.all; }; -} +}) diff --git a/pkgs/development/libraries/volk/default.nix b/pkgs/development/libraries/volk/default.nix index 7271a700e92db..02240ac1febff 100644 --- a/pkgs/development/libraries/volk/default.nix +++ b/pkgs/development/libraries/volk/default.nix @@ -8,14 +8,14 @@ , removeReferencesTo }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "volk"; version = "3.0.0"; src = fetchFromGitHub { owner = "gnuradio"; - repo = pname; - rev = "v${version}"; + repo = "volk"; + rev = "v${finalAttrs.version}"; hash = "sha256-kI4IuO6TLplo5lLAGIPWQWtePcjIEWB9XaJDA6WlqSg="; fetchSubmodules = true; }; @@ -55,4 +55,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.all; }; -} +}) diff --git a/pkgs/os-specific/linux/wiringpi/default.nix b/pkgs/os-specific/linux/wiringpi/default.nix index e2412b37aab5c..bc80e2a33543b 100644 --- a/pkgs/os-specific/linux/wiringpi/default.nix +++ b/pkgs/os-specific/linux/wiringpi/default.nix @@ -15,7 +15,7 @@ let rev = version; sha256 = "sha256-VxAaPhaPXd9xYt663Ju6SLblqiSLizauhhuFqCqbO5M="; } - }: stdenv.mkDerivation rec { + }: stdenv.mkDerivation (finalAttrs: { pname = "wiringpi-${subprj}"; inherit version src; sourceRoot = "${src.name}/${subprj}"; @@ -31,7 +31,7 @@ let # On NixOS we don't need to run ldconfig during build: "LDCONFIG=echo" ]; - }; + }); passthru = { inherit mkSubProject; wiringPi = mkSubProject { diff --git a/pkgs/tools/archivers/snzip/default.nix b/pkgs/tools/archivers/snzip/default.nix index c759a7ac07f1e..6ae59143f3e95 100644 --- a/pkgs/tools/archivers/snzip/default.nix +++ b/pkgs/tools/archivers/snzip/default.nix @@ -1,24 +1,32 @@ -{ lib, stdenv, fetchFromGitHub +{ lib +, stdenv +, fetchFromGitHub , autoreconfHook , pkg-config , snappy }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "snzip"; version = "1.0.5"; src = fetchFromGitHub { owner = "kubo"; repo = "snzip"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-trxCGVNw2MugE7kmth62Qrp7JZcHeP1gdTZk32c3hFg="; }; - buildInputs = [ snappy ]; # We don't use a release tarball so we don't have a `./configure` script to # run. That's why we generate it. - nativeBuildInputs = [ autoreconfHook pkg-config ]; + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + buildInputs = [ + snappy + ]; meta = with lib; { description = "A compression/decompression tool based on snappy"; @@ -27,5 +35,5 @@ stdenv.mkDerivation rec { license = licenses.bsd2; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/tools/audio/bpm-tools/default.nix b/pkgs/tools/audio/bpm-tools/default.nix index 6e7236b1008df..e791c838422aa 100644 --- a/pkgs/tools/audio/bpm-tools/default.nix +++ b/pkgs/tools/audio/bpm-tools/default.nix @@ -12,16 +12,18 @@ let path = lib.makeBinPath [ gnuplot sox flac id3v2 vorbis-tools ]; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "bpm-tools"; version = "0.3"; src = fetchurl { - url = "http://www.pogo.org.uk/~mark/bpm-tools/releases/bpm-tools-${version}.tar.gz"; + url = "http://www.pogo.org.uk/~mark/bpm-tools/releases/bpm-tools-${finalAttrs.version}.tar.gz"; sha256 = "151vfbs8h3cibs7kbdps5pqrsxhpjv16y2iyfqbxzsclylgfivrp"; }; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ + makeWrapper + ]; installFlags = [ "PREFIX=${placeholder "out"}" @@ -39,5 +41,5 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ doronbehar ]; }; -} +}) diff --git a/pkgs/tools/cd-dvd/sacd/default.nix b/pkgs/tools/cd-dvd/sacd/default.nix index 23bf808c50fe6..963300c9ca110 100644 --- a/pkgs/tools/cd-dvd/sacd/default.nix +++ b/pkgs/tools/cd-dvd/sacd/default.nix @@ -1,16 +1,17 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , fetchpatch }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "sacd"; version = "19.7.16.37"; src = fetchFromGitHub { owner = "Sound-Linux-More"; repo = "sacd"; - rev = version; + rev = finalAttrs.version; sha256 = "03s7jr75pzqj1xd41rkgbszlgf9zx6vzhd0nizc05wyf0fxq5xif"; }; @@ -38,4 +39,4 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.doronbehar ]; platforms = [ "x86_64-linux" ]; }; -} +}) diff --git a/pkgs/tools/networking/p2p/gtk-gnutella/default.nix b/pkgs/tools/networking/p2p/gtk-gnutella/default.nix index 16eaf0d14e972..a9708dd4713c7 100644 --- a/pkgs/tools/networking/p2p/gtk-gnutella/default.nix +++ b/pkgs/tools/networking/p2p/gtk-gnutella/default.nix @@ -1,9 +1,10 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , bison -, pkg-config -, gettext , desktop-file-utils +, gettext +, pkg-config , glib , gtk2 , libxml2 @@ -13,14 +14,14 @@ , enableGui ? true }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gtk-gnutella"; version = "1.2.2"; src = fetchFromGitHub { owner = "gtk-gnutella"; repo = "gtk-gnutella"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-LbSUdU+a9G8qL7gCZVJQ6UQMATpOMtktY6FeOkUuaYI="; }; @@ -36,24 +37,23 @@ stdenv.mkDerivation rec { libbfd libxml2 zlib - ] - ++ - lib.optionals enableGui [ gtk2 ] - ; + ] ++ lib.optionals enableGui [ + gtk2 + ]; configureScript = "./build.sh"; configureFlags = [ "--configure-only" # See https://sourceforge.net/p/gtk-gnutella/bugs/555/ "--disable-malloc" - ] - ++ lib.optionals (!enableGui) [ "--topless" ] - ; + ] ++ lib.optionals (!enableGui) [ + "--topless" + ]; enableParallelBuilding = true; postInstall = '' - install -Dm0444 src/${pname}.man $out/share/man/man1/${pname}.1 + install -Dm0444 src/gtk-gnutella.man $out/share/man/man1/gtk-gnutella.1 ''; meta = with lib; { @@ -64,4 +64,4 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; platforms = platforms.unix; }; -} +}) diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/tools/typesetting/sile/default.nix index 22ac034c12251..7c436ac419b2f 100644 --- a/pkgs/tools/typesetting/sile/default.nix +++ b/pkgs/tools/typesetting/sile/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , darwin , fetchurl , makeWrapper @@ -43,12 +44,12 @@ let ]); in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "sile"; version = "0.14.11"; src = fetchurl { - url = "https://github.com/sile-typesetter/sile/releases/download/v${version}/${pname}-${version}.tar.xz"; + url = "https://github.com/sile-typesetter/sile/releases/download/v${finalAttrs.version}/sile-${finalAttrs.version}.tar.xz"; sha256 = "sha256-JXlgiK1XyZZSe5QXz06zwEAnVYhiIZhhIaBmfxAgRS4="; }; @@ -76,14 +77,14 @@ stdenv.mkDerivation rec { inherit luaEnv; # Copied from Makefile.am tests.test = lib.optionalAttrs (!(stdenv.isDarwin && stdenv.isAarch64)) ( - runCommand "${pname}-test" + runCommand "sile-test" { nativeBuildInputs = [ poppler_utils sile ]; - inherit FONTCONFIG_FILE; + inherit (finalAttrs) FONTCONFIG_FILE; } '' output=$(mktemp -t selfcheck-XXXXXX.pdf) echo "<sile>foo</sile>" | sile -o $output - - pdfinfo $output | grep "SILE v${version}" > $out + pdfinfo $output | grep "SILE v${finalAttrs.version}" > $out ''); }; @@ -132,9 +133,9 @@ stdenv.mkDerivation rec { such as InDesign. ''; homepage = "https://sile-typesetter.org"; - changelog = "https://github.com/sile-typesetter/sile/raw/v${version}/CHANGELOG.md"; + changelog = "https://github.com/sile-typesetter/sile/raw/v${finalAttrs.version}/CHANGELOG.md"; platforms = platforms.unix; maintainers = with maintainers; [ doronbehar alerque ]; license = licenses.mit; }; -} +}) diff --git a/pkgs/tools/typesetting/tex/pplatex/default.nix b/pkgs/tools/typesetting/tex/pplatex/default.nix index 8e0c65bf346c6..89d08b43e845a 100644 --- a/pkgs/tools/typesetting/tex/pplatex/default.nix +++ b/pkgs/tools/typesetting/tex/pplatex/default.nix @@ -1,6 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, pcre }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, pcre +}: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "pplatex"; version = "unstable-2023-04-18"; @@ -11,9 +17,14 @@ stdenv.mkDerivation { sha256 = "sha256-wPPJBn/UfmTWsD5JOg6po83Qn4qlpwgsPUV3iJzw5KU="; }; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; - buildInputs = [ pcre ]; + buildInputs = [ + pcre + ]; installPhase = '' runHook preInstall @@ -29,4 +40,4 @@ stdenv.mkDerivation { maintainers = [ maintainers.srgom maintainers.doronbehar ]; platforms = platforms.unix; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3dabd1bcd6234..5fd8b501860eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17985,14 +17985,10 @@ with pkgs; obb = callPackage ../development/interpreters/clojure/obb.nix { }; - octave = callPackage ../development/interpreters/octave { - python = python3; - mkDerivation = stdenv.mkDerivation; - }; - octaveFull = libsForQt5.callPackage ../development/interpreters/octave { - python = python3; + octave = callPackage ../development/interpreters/octave { }; + + octaveFull = octave.override { enableQt = true; - overridePlatforms = ["x86_64-linux" "x86_64-darwin"]; }; octave-kernel = callPackage ../applications/editors/jupyter-kernels/octave { }; |