Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: use finalAttrs in all packages I maintain #255902

Merged
merged 39 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8aec9ce
mpd-touch-screen-gui: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
6239578
musescore: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
17192ea
syncthingtray: use stdenv.mkDerivation with a function; reformat
doronbehar Sep 18, 2023
0de0838
ocrfeeder: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
4c646e1
castget: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
bacd910
gnome-network-displays: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
d25f59d
mailreaders: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
8ec2af2
mswatch: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
e8b0d81
uhd: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
7d33d27
maxima: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
7442697
qalculate-gtk: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
afc2adb
qalculate-qt: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
313e407
wxmaxima: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
8d301bc
lammps: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
a93f1f6
mlterm: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
930900e
video-trimmer: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
b140182
nerdfonts: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
9269452
gnomeExtensions.easyScreenCast: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
a091313
octave: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
3a222ba
comedilib: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
a26a8aa
cpp-utilities: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
93a6a7e
libsForQt5.kpeoplevcard: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
5547fd0
liberio: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
c59d9b9
libqalculate: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
8e0dfb8
libwtk-sdl2: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
687791e
libsForQt5.pulseaudio-qt: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
e176f32
qrupdate: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
189ba38
libsForQt5.qtforkawesome: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
20be3a4
libsForQt5.qtutilities: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
0ccdf05
sqlitecpp: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
382cfd6
tweeny: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
64a22d1
volk: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
d8997bd
wiringpi: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
257558e
snzip: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
0e566e7
bpm-tools: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
a6e75a1
sacd: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
4756a18
gtk-gnutella: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
8517339
sile: use finalAttrs in mkDerivation
doronbehar Sep 18, 2023
316948e
pplatex: use finalAttrs in mkDerivation; reformat
doronbehar Sep 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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