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

fvm: init at 3.2.1 #368392

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14585,6 +14585,12 @@
githubId = 68288772;
name = "Markus Heinrich";
};
MH0386 = {
name = "Mohamed Hisham Abdelzaher";
email = "[email protected]";
github = "MH0386";
githubId = 77013511;
};
mh182 = {
email = "[email protected]";
github = "mh182";
Expand Down
52 changes: 52 additions & 0 deletions pkgs/by-name/fv/fvm/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
buildDartApplication,
clang,
pkg-config,
gtk3,
cmake,
fetchFromGitHub,
nix-update-script,
lib,
}:

buildDartApplication rec {
pname = "fvm";
version = "3.2.1";

src = fetchFromGitHub {
owner = "leoafarias";
repo = pname;
tag = version;
hash = "sha256-i7sJRBrS5qyW8uGlx+zg+wDxsxgmolTMcikHyOzv3Bs=";
};

pubspecLock = lib.importJSON ./pubspec.lock.json;

nativeBuildInputs = [
clang
pkg-config
gtk3
cmake
];
Comment on lines +25 to +30
Copy link
Contributor

@thiagokokada thiagokokada Dec 27, 2024

Choose a reason for hiding this comment

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

Suggested change
nativeBuildInputs = [
clang
pkg-config
gtk3
cmake
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [ gtk3 ];

If you really need clang instead of gcc, please override stdenv for buildDartApplication:

buildDartApplication.override { stdenv = clangStdenv; } { ... }


shellHook = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Why shellHook?

Copy link
Contributor

@thiagokokada thiagokokada Dec 27, 2024

Choose a reason for hiding this comment

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

I think you want to set env.PKG_CONFIG_PATH and env.LD_LIBRARY_PATH instead. Or if you really need to keep the current environment, use preBuild or something else.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is very likely that once you add gtk3 to buildInputs, this becomes unnecessary.

export PKG_CONFIG_PATH=${gtk3.dev}/lib/pkgconfig
export LD_LIBRARY_PATH=${gtk3.out}/lib:$LD_LIBRARY_PATH
Comment on lines +33 to +34
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export PKG_CONFIG_PATH=${gtk3.dev}/lib/pkgconfig
export LD_LIBRARY_PATH=${gtk3.out}/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=${lib.getDev gtk3}/lib/pkgconfig
export LD_LIBRARY_PATH=${gtk3}/lib:$LD_LIBRARY_PATH

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks really strange though, are you sure the build doesn't work without this being set?

'';

dontUseCmakeConfigure = true;

passthru.updateScript = nix-update-script { };

postInstall = ''
export HOME=$TMPDIR
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export HOME=$TMPDIR
export HOME=$(mktemp -d)

'';

meta = {
description = "Flutter Version Management: A simple CLI to manage Flutter SDK versions.";
homepage = "https://fvm.app";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.MH0386 ];
};
}
Loading
Loading