Add Gnucash

This commit is contained in:
greg-compass
2022-11-10 12:21:59 -06:00
parent 8a78e58f04
commit 4ba5211b49
4 changed files with 40 additions and 3 deletions
+1 -1
View File
@@ -14,6 +14,7 @@
bitwarden
cdrtools
ffmpeg
gnucash
gopls
jdk11
libtheora
@@ -25,7 +26,6 @@
libreoffice-bin
] else
[
gnucash
handbrake
jellyfin-media-player
nextcloud-client
+6 -1
View File
@@ -21,6 +21,10 @@ let
];
myPython = super.python3.withPackages myPackages;
macOver = file: og:
if super.stdenv.isDarwin then
(super.callPackage file {}) else
super."${og}";
in rec {
gregpy = myPython;
@@ -60,5 +64,6 @@ in rec {
propagatedBuildInputs = old.propagatedBuildInputs ++ [ my-py-addons.xonsh-direnv ];
});
bitwarden = if super.stdenv.isDarwin then (super.callPackage ./mac/bitwarden.nix {}) else super.bitwarden;
bitwarden = macOver ./mac/bitwarden.nix "bitwarden";
gnucash = macOver ./mac/gnucash.nix "gnucash";
}
+1 -1
View File
@@ -30,7 +30,7 @@ if [ "$(uname -s)" == "Darwin" ]; then
cd ~/.nix-profile/Applications
for app in *.app; do
echo "Updating permissions on '${app}'"
chmod -R u+w "${HOME}/Applications/${app}"
chmod -R u+w "${HOME}/Applications/${app}" || true
echo "Copying new version to Applications"
cp -r "${app}" "${HOME}/Applications" 2>&1 > /dev/null || true
if [ "$?" != "0" ]; then
+32
View File
@@ -0,0 +1,32 @@
{ stdenv, fetchurl,
undmg,
}:
stdenv.mkDerivation rec {
version = "4.12";
pname = "GnuCash";
buildInputs = [
undmg
];
sourceRoot = ".";
phases = [
"unpackPhase"
"installPhase"
];
installPhase = ''
mkdir -p "$out/Applications"
cp -r Gnucash*.app "$out/Applications"
'';
src = fetchurl {
name = "${pname}-${version}.dmg";
url = "https://sourceforge.net/projects/gnucash/files/gnucash%20(stable)/${version}/Gnucash-Intel-${version}-1.dmg";
sha256 = "sha256-GXsGOk+F/QdcD19ZmZmor0upCFHa7iy3Hs4CLbiby1M=";
};
meta = {
description = "GnuCash is free accounting software for your local machine";
homepage = "https://www.gnucash.org";
};
}