git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #158875 from AndersonTorres/new-misc

dosbox-staging: 0.77.1 -> 0.78.1

commitf4fe98a532a1c306648252265fb38fc082a01d02 authorAnderson Torres <torres.anderson.85@protonmail.com> dateFri 11 Feb 2022, 01:17 (5 years ago) parentf741f20038338b
2 files changed+91−39
pkgs/applications/office/gnucash/default.nix+48−25 pkgs/misc/emulators/dosbox-staging/default.nix+43−14
pkgs/applications/office/gnucash/default.nix+48−25
@@ -1,9 +1,10 @@
1−{ fetchurl
2−, lib
1+{ lib
32, stdenv
3+, fetchurl
44, aqbanking
55, boost
66, cmake
7+, gettext
78, glib
89, glibcLocales
910, gtest
@@ -16,7 +17,6 @@
1617, libxml2
1718, libxslt
1819, makeWrapper
19−, perl
2020, perlPackages
2121, pkg-config
2222, swig
@@ -28,13 +28,15 @@ stdenv.mkDerivation rec {
2828 pname = "gnucash";
2929 version = "4.9";
3030
31+ # raw source code doesn't work out of box; fetchFromGitHub not usable
3132 src = fetchurl {
32− url = "https://github.com/Gnucash/gnucash/releases/download/${version}/gnucash-${version}.tar.bz2";
33− sha256 = "0bdpzb0wc9bjph5iff7133ppnkcqzfd10yi2qagij4mpq4q1qmcs";
33+ url = "https://github.com/Gnucash/gnucash/releases/download/${version}/${pname}-${version}.tar.bz2";
34+ hash = "sha256-mlUcMMG3EhmfwiJ6EJr7mE177xjhOBcLvHIlxsH6ty0=";
3435 };
3536
3637 nativeBuildInputs = [
3738 cmake
39+ gettext
3840 makeWrapper
3941 wrapGAppsHook
4042 ];
@@ -53,11 +55,15 @@ stdenv.mkDerivation rec {
5355 libofx
5456 libxml2
5557 libxslt
56− perl
5758 pkg-config
5859 swig
5960 webkitgtk
60− ] ++ (with perlPackages; [ FinanceQuote DateManip ]);
61+ ]
62+ ++ (with perlPackages; [
63+ DateManip
64+ FinanceQuote
65+ perl
66+ ]);
6167
6268 patches = [
6369 # this patch disables test-gnc-timezone and test-gnc-datetime which fail due to nix datetime challenges
@@ -68,16 +74,14 @@ stdenv.mkDerivation rec {
6874 ./0003-remove-valgrind.patch
6975 ];
7076
71− preConfigure = ''
72− export GUILE_AUTO_COMPILE=0 # this needs to be an env variable and not a cmake flag to suppress guile warning
73− '';
77+ # this needs to be an environment variable and not a cmake flag to suppress
78+ # guile warning
79+ GUILE_AUTO_COMPILE="0";
7480
81+ # `make check` target does not define its prerequisites but expects them to
82+ # have already been built. The list of targets below was built through trial
83+ # and error based on failing tests.
7584 doCheck = true;
76−
77− /*
78− GNUcash's `make check` target does not define its prerequisites but expects them to have already been built.
79− The list of targets below was built through trial and error based on failing tests.
80− */
8185 preCheck = ''
8286 make \
8387 test-account-object \
@@ -156,12 +160,15 @@ stdenv.mkDerivation rec {
156160
157161 preFixup = ''
158162 gappsWrapperArgs+=(
159− --set GNC_DBD_DIR ${libdbiDrivers}/lib/dbd # specify where db drivers are
160− --set GSETTINGS_SCHEMA_DIR ${glib.makeSchemaPath "$out" "${pname}-${version}"} # specify where nix puts the gnome settings schemas
163+ # db drivers location
164+ --set GNC_DBD_DIR ${libdbiDrivers}/lib/dbd
165+ # gnome settings schemas location on Nix
166+ --set GSETTINGS_SCHEMA_DIR ${glib.makeSchemaPath "$out" "${pname}-${version}"}
161167 )
162168 '';
163169
164− # wrapGAppsHook would wrap all binaries including the cli utils which need Perl wrapping
170+ # wrapGAppsHook would wrap all binaries including the cli utils which need
171+ # Perl wrapping
165172 dontWrapGApps = true;
166173
167174 # gnucash is wrapped using the args constructed for wrapGAppsHook.
@@ -176,15 +183,31 @@ stdenv.mkDerivation rec {
176183 '';
177184
178185 meta = with lib; {
179− description = "Personal and small business double entry accounting application.";
186+ homepage = "https://www.gnucash.org/";
187+ description = "Free software for double entry accounting";
180188 longDescription = ''
181− Designed to be easy to use, yet powerful and flexible, GnuCash allows you to track bank accounts, stocks, income and expenses.
182− As quick and intuitive to use as a checkbook register, it is based on professional accounting principles to ensure balanced books and accurate reports.
183− '';
189+ GnuCash is personal and small-business financial-accounting software,
190+ freely licensed under the GNU GPL and available for GNU/Linux, BSD,
191+ Solaris, Mac OS X and Microsoft Windows.
184192
185− homepage = "https://www.gnucash.org/";
193+ Designed to be easy to use, yet powerful and flexible, GnuCash allows you
194+ to track bank accounts, stocks, income and expenses. As quick and
195+ intuitive to use as a checkbook register, it is based on professional
196+ accounting principles to ensure balanced books and accurate reports.
197+
198+ Some interesting features:
199+
200+ - Double-Entry Accounting
201+ - Stock/Bond/Mutual Fund Accounts
202+ - Small-Business Accounting
203+ - Reports, Graphs
204+ - QIF/OFX/HBCI Import, Transaction Matching
205+ - Scheduled Transactions
206+ - Financial Calculations
207+ '';
186208 license = licenses.gpl2Plus;
187− maintainers = [ maintainers.domenkozar ];
188− platforms = platforms.linux;
209+ maintainers = with maintainers; [ domenkozar AndersonTorres ];
210+ platforms = platforms.unix;
189211 };
190212}
213+# TODO: investigate Darwin support
pkgs/misc/emulators/dosbox-staging/default.nix+43−14
@@ -4,32 +4,40 @@
44, SDL2
55, SDL2_net
66, alsa-lib
7+, copyDesktopItems
78, fluidsynth
89, gtest
910, libGL
1011, libGLU
1112, libogg
1213, libpng
14+, libslirp
15+, makeDesktopItem
1316, makeWrapper
1417, meson
1518, libmt32emu
1619, ninja
1720, opusfile
1821, pkg-config
22+, libpulseaudio
23+, glib
24+, libjack2
25+, libsndfile
1926}:
2027
2128stdenv.mkDerivation rec {
2229 pname = "dosbox-staging";
23− version = "0.77.1";
30+ version = "0.78.1";
2431
2532 src = fetchFromGitHub {
2633 owner = pname;
2734 repo = pname;
2835 rev = "v${version}";
29− sha256 = "07jwmmm1bhfxavlhl854cj8l5iy5hqx5hpwkkjbcwqg7yh9jfs2x";
36+ hash = "sha256-gozFZcJorZtbEK0joksig6qWmAMy03hmBHiyJMONfpk=";
3037 };
3138
3239 nativeBuildInputs = [
40+ copyDesktopItems
3341 gtest
3442 makeWrapper
3543 meson
@@ -42,42 +50,63 @@ stdenv.mkDerivation rec {
4250 SDL2_net
4351 alsa-lib
4452 fluidsynth
53+ glib
4554 libGL
4655 libGLU
56+ libjack2
4757 libmt32emu
4858 libogg
4959 libpng
60+ libpulseaudio
61+ libslirp
62+ libsndfile
5063 opusfile
5164 ];
5265
53− hardeningDisable = [ "format" ];
66+ NIX_CFLAGS_COMPILE = [
67+ "-I${SDL2_net}/include/SDL2"
68+ ];
5469
55− mesonFlags = [
56− "--buildtype=release"
57− "-Db_asneeded=true"
58− "-Ddefault_library=static"
59− "-Dfluidsynth:enable-floats=true"
60− "-Dfluidsynth:try-static-deps=true"
61− "-Dtry_static_libs=png"
70+ desktopItems = [
71+ (makeDesktopItem {
72+ name = "dosbox-staging";
73+ exec = "dosbox-staging";
74+ icon = "dosbox-staging";
75+ comment = "x86 dos emulator enhanced";
76+ desktopName = "DosBox-Staging";
77+ genericName = "DOS emulator";
78+ categories = "Emulator;Game;";
79+ })
6280 ];
6381
6482 postFixup = ''
6583 # Rename binary, add a wrapper, and copy manual to avoid conflict with
66− # vanilla dosbox. Doing it this way allows us to work with frontends and
84+ # original dosbox. Doing it this way allows us to work with frontends and
6785 # launchers that expect the binary to be named dosbox, but get out of the
6886 # way of vanilla dosbox if the user desires to install that as well.
69−
7087 mv $out/bin/dosbox $out/bin/${pname}
7188 makeWrapper $out/bin/dosbox-staging $out/bin/dosbox
72− cp $out/share/man/man1/dosbox.1.gz $out/share/man/man1/${pname}.1.gz
89+
90+ # Create a symlink to dosbox manual instead of merely copying it
91+ pushd $out/share/man/man1/
92+ mv dosbox.1.gz ${pname}.1.gz
93+ ln -s ${pname}.1.gz dosbox.1.gz
94+ popd
7395 '';
7496
7597 meta = with lib; {
7698 homepage = "https://dosbox-staging.github.io/";
7799 description = "A modernized DOS emulator";
100+ longDescription = ''
101+ DOSBox Staging is an attempt to revitalize DOSBox's development
102+ process. It's not a rewrite, but a continuation and improvement on the
103+ existing DOSBox codebase while leveraging modern development tools and
104+ practices.
105+ '';
78106 license = licenses.gpl2Plus;
79− maintainers = with maintainers; [ joshuafern ];
107+ maintainers = with maintainers; [ joshuafern AndersonTorres ];
80108 platforms = platforms.unix;
81109 priority = 101;
82110 };
83111}
112+# TODO: report upstream about not finding SDL2_net