Skip to content
forked from NixOS/nixpkgs

Commit

Permalink
treewide: use finalAttrs in all packages I maintain (NixOS#255902)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
doronbehar authored and toastal committed Sep 25, 2023
1 parent 51dd6c5 commit 5e7d29d
Show file tree
Hide file tree
Showing 41 changed files with 331 additions and 278 deletions.
8 changes: 4 additions & 4 deletions pkgs/applications/audio/mpd-touch-screen-gui/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, autoreconfHook
, SDL2
, SDL2_ttf
, SDL2_image
Expand All @@ -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=";
};
Expand Down Expand Up @@ -60,4 +60,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.all;
};
}
})
6 changes: 3 additions & 3 deletions pkgs/applications/audio/musescore/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -168,4 +168,4 @@ in stdenv'.mkDerivation rec {
broken = (stdenv.isLinux && stdenv.isAarch64);
mainProgram = "mscore";
};
}
})
20 changes: 10 additions & 10 deletions pkgs/applications/graphics/ocrfeeder/default.nix
Original file line number Diff line number Diff line change
@@ -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=";
};

Expand Down Expand Up @@ -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")
'';

Expand All @@ -70,4 +70,4 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}
})
10 changes: 6 additions & 4 deletions pkgs/applications/misc/syncthingtray/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, qtutilities
, qtforkawesome
, boost
, wrapQtAppsHook
, cmake
, kio
, plasma-framework
Expand All @@ -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=";
};

Expand All @@ -54,6 +55,7 @@ mkDerivation rec {
;

nativeBuildInputs = [
wrapQtAppsHook
cmake
qttools
]
Expand All @@ -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 = [
Expand All @@ -85,4 +87,4 @@ mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.linux ++ platforms.darwin;
};
}
})
6 changes: 3 additions & 3 deletions pkgs/applications/networking/feedreaders/castget/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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=";
};

Expand Down Expand Up @@ -51,4 +51,4 @@ stdenv.mkDerivation rec {
license = licenses.gpl2;
platforms = platforms.linux;
};
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -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=";
};

Expand Down Expand Up @@ -77,4 +77,4 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}
})
6 changes: 3 additions & 3 deletions pkgs/applications/networking/mailreaders/imapfilter.nix
Original file line number Diff line number Diff line change
@@ -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 = [
Expand All @@ -24,4 +24,4 @@ stdenv.mkDerivation rec {
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ doronbehar ];
};
}
})
4 changes: 2 additions & 2 deletions pkgs/applications/networking/mailreaders/mswatch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
, glib
}:

stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "mswatch";
# Stable release won't compile successfully
version = "unstable-2018-11-21";
Expand All @@ -35,4 +35,4 @@ stdenv.mkDerivation {
platforms = platforms.linux;
maintainers = with maintainers; [ doronbehar ];
};
}
})
13 changes: 7 additions & 6 deletions pkgs/applications/radio/uhd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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 ]
;

Expand All @@ -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
Expand Down Expand Up @@ -157,4 +158,4 @@ stdenv.mkDerivation rec {
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ bjornfor fpletz tomberek doronbehar ];
};
}
})
12 changes: 6 additions & 6 deletions pkgs/applications/science/math/maxima/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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=";
};

Expand Down Expand Up @@ -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/"
'')
;

Expand Down Expand Up @@ -115,4 +115,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.unix;
};
}
})
6 changes: 3 additions & 3 deletions pkgs/applications/science/math/qalculate-gtk/default.nix
Original file line number Diff line number Diff line change
@@ -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=";
};

Expand All @@ -24,4 +24,4 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
platforms = platforms.all;
};
}
})
6 changes: 3 additions & 3 deletions pkgs/applications/science/math/qalculate-qt/default.nix
Original file line number Diff line number Diff line change
@@ -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=";
};

Expand All @@ -33,4 +33,4 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}
})
6 changes: 3 additions & 3 deletions pkgs/applications/science/math/wxmaxima/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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=";
};

Expand Down Expand Up @@ -51,4 +51,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.linux;
};
}
})
Loading

0 comments on commit 5e7d29d

Please sign in to comment.