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

manager-io: init at 24.12.23.1999 #368162

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

darwincereska
Copy link

Closes #367590 and adds manager-io to nixpkgs
adds darwincereska to maintainers-list.nix

Accounting software. Available for Windows, Mac and Linux.
manager.io

Notes: You need libicu for the program to work

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Dec 25, 2024
@darwincereska
Copy link
Author

everything should be named correctly and files pass checks

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Dec 25, 2024
darwincereska and others added 3 commits December 25, 2024 12:21
Co-authored-by: aucub <78630225+aucub@users.noreply.github.com>
Co-authored-by: aucub <78630225+aucub@users.noreply.github.com>
Co-authored-by: aucub <78630225+aucub@users.noreply.github.com>
@darwincereska
Copy link
Author

Please install icons and desktop files in extraInstallCommands

i will in a little bit

@darwincereska
Copy link
Author

Please install icons and desktop files in extraInstallCommands

how do i generate a desktop file for it I'm not familiar with the command

@MrGeniusProgrammer
Copy link

There is already a desktop file provided by the AppImage. it is in ${appimageContents}/manager.desktop. use appimageTools.extract to extract appimage contents.

@darwincereska
Copy link
Author

There is already a desktop file provided by the AppImage. it is in ${appimageContents}/manager.desktop. use appimageTools.extract to extract appimage contents.

okay thank you

@MrGeniusProgrammer
Copy link

use this as an example. quick warning when you install it check if you are able to create businesses or able to click on them without crashing.

{
	stdenv,
	fetchurl,
	lib,
	appimageTools,

	icu,
	webkitgtk_6_0,
	webkitgtk_4_0, # for older devices
	mono,
	libnotify,
	lttng-ust,
}: 

let 
	pname = "manager-io";
	version = "24.12.23.1999";
  name = "${pname}-${version}";
	src = fetchurl {
	  url = "https://github.com/Manager-io/Manager/releases/download/${version}/Manager-linux-x64.AppImage";
		hash = "sha256-RwpuI08w0lnP+2V4tiubw4wzc6ya6sAajJi4k5eUyzo=";
	}; 

	appimageContents = appimageTools.extract {
		inherit pname version src;

		postExtra = 
			let 
				libPath = lib.makeLibraryPath [
					icu
					webkitgtk_6_0
					webkitgtk_4_0 # for older devices
					mono 
					libnotify
					stdenv.cc.cc
					lttng-ust
				];

			in ''
				patchelf \
					--add-needed libicui18n.so \
					--add-needed libicuuc.so \
					$out/opt/manager/libcoreclr.so \
					$out/opt/manager/*System.Globalization.Native.so
				patchelf \
					--add-needed libgssapi_krb5.so \
					$out/opt/manager/*System.Net.Security.Native.so
				patchelf --replace-needed liblttng-ust.so.0 liblttng-ust.so $out/opt/manager/libcoreclrtraceptprovider.so
				patchelf --add-needed libssl.so \
					 $out/opt/manager/*System.Security.Cryptography.Native.OpenSsl.so
				patchelf \
					--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
					--set-rpath "${libPath}" \
					$out/opt/manager/ManagerDesktop
			'';
    };
in

appimageTools.wrapType2 {
	inherit pname version src;

  extraInstallCommands = ''
    install -m 444 -D ${appimageContents}/manager.desktop -t $out/share/applications
		cp -r ${appimageContents}/usr/share/icons $out/share
  '';

	extraPkgs = pkgs: with pkgs; [
		icu 
		webkitgtk_6_0
		webkitgtk_4_0 # for older devices
		mono 
		libnotify
		stdenv.cc.cc
		lttng-ust
	];

  meta = {
    description = "Free Accounting software for Windows, Mac and Linux";
    homepage = "https://www.manager.io";
    license = with lib.licenses; [ unfree ];
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
    platforms = [
      "x86_64-linux"
    ];
  };
}

@darwincereska
Copy link
Author

use this as an example. quick warning when you install it check if you are able to create businesses or able to click on them without crashing.

{
	stdenv,
	fetchurl,
	lib,
	appimageTools,

	icu,
	webkitgtk_6_0,
	webkitgtk_4_0, # for older devices
	mono,
	libnotify,
	lttng-ust,
}: 

let 
	pname = "manager-io";
	version = "24.12.23.1999";
  name = "${pname}-${version}";
	src = fetchurl {
	  url = "https://github.com/Manager-io/Manager/releases/download/${version}/Manager-linux-x64.AppImage";
		hash = "sha256-RwpuI08w0lnP+2V4tiubw4wzc6ya6sAajJi4k5eUyzo=";
	}; 

	appimageContents = appimageTools.extract {
		inherit pname version src;

		postExtra = 
			let 
				libPath = lib.makeLibraryPath [
					icu
					webkitgtk_6_0
					webkitgtk_4_0 # for older devices
					mono 
					libnotify
					stdenv.cc.cc
					lttng-ust
				];

			in ''
				patchelf \
					--add-needed libicui18n.so \
					--add-needed libicuuc.so \
					$out/opt/manager/libcoreclr.so \
					$out/opt/manager/*System.Globalization.Native.so
				patchelf \
					--add-needed libgssapi_krb5.so \
					$out/opt/manager/*System.Net.Security.Native.so
				patchelf --replace-needed liblttng-ust.so.0 liblttng-ust.so $out/opt/manager/libcoreclrtraceptprovider.so
				patchelf --add-needed libssl.so \
					 $out/opt/manager/*System.Security.Cryptography.Native.OpenSsl.so
				patchelf \
					--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
					--set-rpath "${libPath}" \
					$out/opt/manager/ManagerDesktop
			'';
    };
in

appimageTools.wrapType2 {
	inherit pname version src;

  extraInstallCommands = ''
    install -m 444 -D ${appimageContents}/manager.desktop -t $out/share/applications
		cp -r ${appimageContents}/usr/share/icons $out/share
  '';

	extraPkgs = pkgs: with pkgs; [
		icu 
		webkitgtk_6_0
		webkitgtk_4_0 # for older devices
		mono 
		libnotify
		stdenv.cc.cc
		lttng-ust
	];

  meta = {
    description = "Free Accounting software for Windows, Mac and Linux";
    homepage = "https://www.manager.io";
    license = with lib.licenses; [ unfree ];
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
    platforms = [
      "x86_64-linux"
    ];
  };
}

alright

@darwincereska
Copy link
Author

I'm spending Christmas with my family i will work on it later today or tomorrow

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Dec 25, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin and removed 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 labels Dec 25, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 labels Dec 25, 2024
@darwincereska
Copy link
Author

@aucub Code is functional. Would you please take a look

pkgs/by-name/ma/manager-io/package.nix Outdated Show resolved Hide resolved
appimageContents = appimageTools.extract {
inherit pname version src;

postExtra =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't work because the files were not used elsewhere

cp -r ${appimageContents}/usr/share/icons $out/share
'';

extraPkgs = pkgs: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this contains unwanted dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: managerio
3 participants